Browse Source

fix(ant-design-v): table v-slot:headerCell deprecated error

master
wangxiang 2 years ago
parent
commit
5d12061714
  1. 44
      src/views/common/push/pushApplication/index.vue
  2. 26
      src/views/monitor/operLog/index.vue
  3. 26
      src/views/monitor/token/index.vue
  4. 38
      src/views/system/client/index.vue
  5. 56
      src/views/system/dept/index.vue
  6. 38
      src/views/system/dict/DictDataTable.vue
  7. 38
      src/views/system/dict/index.vue
  8. 38
      src/views/system/file/index.vue
  9. 56
      src/views/system/menu/index.vue
  10. 50
      src/views/system/region/index.vue
  11. 38
      src/views/system/role/index.vue
  12. 38
      src/views/system/tenant/index.vue
  13. 82
      src/views/system/user/index.vue

44
src/views/common/push/pushApplication/index.vue

@ -20,26 +20,28 @@ @@ -20,26 +20,28 @@
@click="handleDel()"
>删除应用</a-button>
</template>
<template #action="{ record }">
<TableAction
:actions="[
{
label: '发送消息',
icon: 'fa6-regular:message',
onClick: handleSend.bind(null, record)
},
{
label: '编辑',
icon: 'fa6-regular:pen-to-square',
onClick: handleEdit.bind(null, record)
},
{
label: '删除',
icon: 'ant-design:delete-outlined',
color: 'error',
onClick: handleDel.bind(null, record)
}]"
/>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<TableAction
:actions="[
{
label: '发送消息',
icon: 'fa6-regular:message',
onClick: handleSend.bind(null, record)
},
{
label: '编辑',
icon: 'fa6-regular:pen-to-square',
onClick: handleEdit.bind(null, record)
},
{
label: '删除',
icon: 'ant-design:delete-outlined',
color: 'error',
onClick: handleDel.bind(null, record)
}]"
/>
</template>
</template>
</BasicTable>
<!--弹出窗体区域-->
@ -103,7 +105,7 @@ @@ -103,7 +105,7 @@
width: 220,
title: '操作',
dataIndex: 'action',
slots: { customRender: 'action' },
// slots: { customRender: 'action' },
fixed: false
},
handleSearchInfoFn: () => clearSelectedRowKeys()

26
src/views/monitor/operLog/index.vue

@ -17,17 +17,19 @@ @@ -17,17 +17,19 @@
@click="handleCleanOperLog()"
>清空日志</a-button>
</template>
<template #action="{ record }">
<TableAction
:actions="[
{
label: '删除',
icon: 'ant-design:delete-outlined',
color: 'error',
auth: ['client_del'],
onClick: handleDel.bind(null, record)
}]"
/>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<TableAction
:actions="[
{
label: '删除',
icon: 'ant-design:delete-outlined',
color: 'error',
auth: ['client_del'],
onClick: handleDel.bind(null, record)
}]"
/>
</template>
</template>
</BasicTable>
</div>
@ -81,7 +83,7 @@ @@ -81,7 +83,7 @@
width: 120,
title: '操作',
dataIndex: 'action',
slots: { customRender: 'action' },
// slots: { customRender: 'action' },
fixed: false
},
handleSearchInfoFn: () => clearSelectedRowKeys()

26
src/views/monitor/token/index.vue

@ -1,17 +1,19 @@ @@ -1,17 +1,19 @@
<template>
<div>
<BasicTable @register="registerTable">
<template #action="{ record }">
<TableAction
:actions="[
{
label: '删除',
icon: 'ant-design:delete-outlined',
color: 'error',
auth: ['client_del'],
onClick: handleDel.bind(null, record)
}]"
/>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<TableAction
:actions="[
{
label: '删除',
icon: 'ant-design:delete-outlined',
color: 'error',
auth: ['client_del'],
onClick: handleDel.bind(null, record)
}]"
/>
</template>
</template>
</BasicTable>
</div>
@ -41,7 +43,7 @@ @@ -41,7 +43,7 @@
width: 120,
title: '操作',
dataIndex: 'action',
slots: { customRender: 'action' },
//slots: { customRender: 'action' },
fixed: false
}
});

38
src/views/system/client/index.vue

@ -23,23 +23,25 @@ @@ -23,23 +23,25 @@
@click="handleDel()"
>删除客户端</a-button>
</template>
<template #action="{ record }">
<TableAction
:actions="[
{
label: '编辑',
icon: 'fa6-regular:pen-to-square',
auth: ['client_edit'],
onClick: handleEdit.bind(null, record)
},
{
label: '删除',
icon: 'ant-design:delete-outlined',
color: 'error',
auth: ['client_del'],
onClick: handleDel.bind(null, record)
}]"
/>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<TableAction
:actions="[
{
label: '编辑',
icon: 'fa6-regular:pen-to-square',
auth: ['client_edit'],
onClick: handleEdit.bind(null, record)
},
{
label: '删除',
icon: 'ant-design:delete-outlined',
color: 'error',
auth: ['client_del'],
onClick: handleDel.bind(null, record)
}]"
/>
</template>
</template>
</BasicTable>
<!--弹出窗体区域-->
@ -101,7 +103,7 @@ @@ -101,7 +103,7 @@
width: 220,
title: '操作',
dataIndex: 'action',
slots: { customRender: 'action' },
//slots: { customRender: 'action' },
fixed: false
},
handleSearchInfoFn: () => clearSelectedRowKeys()

56
src/views/system/dept/index.vue

@ -6,33 +6,35 @@ @@ -6,33 +6,35 @@
<a-button type="default" @click="expandAll">展开全部</a-button>
<a-button type="default" @click="collapseAll">折叠全部</a-button>
</template>
<template #action="{ record }">
<TableAction
:actions="[
{
label: '编辑',
icon: 'fa6-regular:pen-to-square',
auth: ['dept_edit'],
onClick: handleEdit.bind(null, record)
},
{
label: '新增',
icon: 'ant-design:plus-circle-outlined',
auth: ['dept_add'],
onClick: handleAdd.bind(null, record)
},
{
label: '删除',
icon: 'ant-design:delete-outlined',
auth: ['dept_del'],
color: 'error',
popConfirm: {
title: '是否确认删除',
confirm: handleDel.bind(null, record)
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<TableAction
:actions="[
{
label: '编辑',
icon: 'fa6-regular:pen-to-square',
auth: ['dept_edit'],
onClick: handleEdit.bind(null, record)
},
{
label: '新增',
icon: 'ant-design:plus-circle-outlined',
auth: ['dept_add'],
onClick: handleAdd.bind(null, record)
},
{
label: '删除',
icon: 'ant-design:delete-outlined',
auth: ['dept_del'],
color: 'error',
popConfirm: {
title: '是否确认删除',
confirm: handleDel.bind(null, record)
}
}
}
]"
/>
]"
/>
</template>
</template>
</BasicTable>
<DeptModal @register="registerModal" @success="handleRefreshTable"/>
@ -82,7 +84,7 @@ @@ -82,7 +84,7 @@
width: 250,
title: '操作',
dataIndex: 'action',
slots: { customRender: 'action' },
//slots: { customRender: 'action' },
fixed: false
},
afterFetch: result => listToTree(result, { id: 'deptId' }),

38
src/views/system/dict/DictDataTable.vue

@ -35,23 +35,25 @@ @@ -35,23 +35,25 @@
@click="handleDel()"
>删除字典数据</a-button>
</template>
<template #action="{ record }">
<TableAction
:actions="[
{
label: '编辑',
icon: 'fa6-regular:pen-to-square',
auth: ['dictData_edit'],
onClick: handleEdit.bind(null, record)
},
{
label: '删除',
icon: 'ant-design:delete-outlined',
auth: ['dictData_del'],
color: 'error',
onClick: handleDel.bind(null, record)
}]"
/>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<TableAction
:actions="[
{
label: '编辑',
icon: 'fa6-regular:pen-to-square',
auth: ['dictData_edit'],
onClick: handleEdit.bind(null, record)
},
{
label: '删除',
icon: 'ant-design:delete-outlined',
auth: ['dictData_del'],
color: 'error',
onClick: handleDel.bind(null, record)
}]"
/>
</template>
</template>
</BasicTable>
<DictDataModal @register="registerModal" @success="handleRefreshTable"/>
@ -116,7 +118,7 @@ @@ -116,7 +118,7 @@
width: 220,
title: '操作',
dataIndex: 'action',
slots: { customRender: 'action' },
//slots: { customRender: 'action' },
fixed: false
},
handleSearchInfoFn: () => clearSelectedRowKeys()

38
src/views/system/dict/index.vue

@ -30,23 +30,25 @@ @@ -30,23 +30,25 @@
@click="handleDel()"
>删除字典</a-button>
</template>
<template #action="{ record }">
<TableAction
:actions="[
{
label: '编辑',
icon: 'fa6-regular:pen-to-square',
auth: ['dict_edit'],
onClick: handleEdit.bind(null, record)
},
{
label: '删除',
icon: 'ant-design:delete-outlined',
auth: ['dict_del'],
color: 'error',
onClick: handleDel.bind(null, record)
}]"
/>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<TableAction
:actions="[
{
label: '编辑',
icon: 'fa6-regular:pen-to-square',
auth: ['dict_edit'],
onClick: handleEdit.bind(null, record)
},
{
label: '删除',
icon: 'ant-design:delete-outlined',
auth: ['dict_del'],
color: 'error',
onClick: handleDel.bind(null, record)
}]"
/>
</template>
</template>
</BasicTable>
<DictDataTable ref="dictSubRef" class="w-2/4 xl:w-2/4"/>
@ -112,7 +114,7 @@ @@ -112,7 +114,7 @@
width: 220,
title: '操作',
dataIndex: 'action',
slots: { customRender: 'action' },
//slots: { customRender: 'action' },
fixed: false
},
handleSearchInfoFn: () => clearSelectedRowKeys()

38
src/views/system/file/index.vue

@ -24,23 +24,25 @@ @@ -24,23 +24,25 @@
@click="handleDel()"
>删除</a-button>
</template>
<template #action="{ record }">
<TableAction
:actions="[
{
label: '文件下载',
icon: 'fa6-regular:circle-down',
auth: ['file_download'],
onClick: handleFileDownLoad.bind(null, record)
},
{
label: '删除',
icon: 'ant-design:delete-outlined',
color: 'error',
auth: ['file_del'],
onClick: handleDel.bind(null, record)
}]"
/>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<TableAction
:actions="[
{
label: '文件下载',
icon: 'fa6-regular:circle-down',
auth: ['file_download'],
onClick: handleFileDownLoad.bind(null, record)
},
{
label: '删除',
icon: 'ant-design:delete-outlined',
color: 'error',
auth: ['file_del'],
onClick: handleDel.bind(null, record)
}]"
/>
</template>
</template>
</BasicTable>
</div>
@ -98,7 +100,7 @@ @@ -98,7 +100,7 @@
width: 220,
title: '操作',
dataIndex: 'action',
slots: { customRender: 'action' },
//slots: { customRender: 'action' },
fixed: false
},
handleSearchInfoFn: () => clearSelectedRowKeys()

56
src/views/system/menu/index.vue

@ -16,32 +16,34 @@ @@ -16,32 +16,34 @@
@click="collapseAll"
>折叠全部</a-button>
</template>
<template #action="{ record }">
<TableAction
:actions="[
{
label: '编辑',
icon: 'fa6-regular:pen-to-square',
auth: ['menu_edit'],
onClick: handleEdit.bind(null, record)
},
{
label: '新增',
icon: 'ant-design:plus-circle-outlined',
auth: ['menu_add'],
onClick: handleAdd.bind(null, record)
},
{
label: '删除',
icon: 'ant-design:delete-outlined',
auth: ['menu_del'],
color: 'error',
popConfirm: {
title: '是否确认删除',
confirm: handleDel.bind(null, record)
}
}]"
/>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<TableAction
:actions="[
{
label: '编辑',
icon: 'fa6-regular:pen-to-square',
auth: ['menu_edit'],
onClick: handleEdit.bind(null, record)
},
{
label: '新增',
icon: 'ant-design:plus-circle-outlined',
auth: ['menu_add'],
onClick: handleAdd.bind(null, record)
},
{
label: '删除',
icon: 'ant-design:delete-outlined',
auth: ['menu_del'],
color: 'error',
popConfirm: {
title: '是否确认删除',
confirm: handleDel.bind(null, record)
}
}]"
/>
</template>
</template>
</BasicTable>
<MenuModal @register="registerModal" @success="handleRefreshTable"/>
@ -91,7 +93,7 @@ @@ -91,7 +93,7 @@
width: 250,
title: '操作',
dataIndex: 'action',
slots: { customRender: 'action' },
//slots: { customRender: 'action' },
fixed: false
},
afterFetch: (result) => listToTree(result)

50
src/views/system/region/index.vue

@ -10,29 +10,31 @@ @@ -10,29 +10,31 @@
@click="handleAdd()"
>新增区域</a-button>
</template>
<template #action="{ record }">
<TableAction
:actions="[
{
label: '编辑',
icon: 'fa6-regular:pen-to-square',
onClick: handleEdit.bind(null, record)
},
{
label: '新增',
icon: 'ant-design:plus-circle-outlined',
onClick: handleAdd.bind(null, record)
},
{
label: '删除',
icon: 'ant-design:delete-outlined',
color: 'error',
popConfirm: {
title: '是否确认删除',
confirm: handleDel.bind(null, record)
}
}]"
/>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<TableAction
:actions="[
{
label: '编辑',
icon: 'fa6-regular:pen-to-square',
onClick: handleEdit.bind(null, record)
},
{
label: '新增',
icon: 'ant-design:plus-circle-outlined',
onClick: handleAdd.bind(null, record)
},
{
label: '删除',
icon: 'ant-design:delete-outlined',
color: 'error',
popConfirm: {
title: '是否确认删除',
confirm: handleDel.bind(null, record)
}
}]"
/>
</template>
</template>
</BasicTable>
<RegionModal @register="registerModal" @success="handleRefreshTable"/>
@ -81,7 +83,7 @@ @@ -81,7 +83,7 @@
width: 250,
title: '操作',
dataIndex: 'action',
slots: { customRender: 'action' },
//slots: { customRender: 'action' },
fixed: false
},
searchInfo: { parentId: '0' },

38
src/views/system/role/index.vue

@ -23,23 +23,25 @@ @@ -23,23 +23,25 @@
@click="handleDel()"
>删除角色</a-button>
</template>
<template #action="{ record }">
<TableAction
:actions="[
{
label: '编辑',
icon: 'fa6-regular:pen-to-square',
auth: ['role_edit'],
onClick: handleEdit.bind(null, record)
},
{
label: '删除',
icon: 'ant-design:delete-outlined',
auth: ['role_del'],
color: 'error',
onClick: handleDel.bind(null, record)
}]"
/>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<TableAction
:actions="[
{
label: '编辑',
icon: 'fa6-regular:pen-to-square',
auth: ['role_edit'],
onClick: handleEdit.bind(null, record)
},
{
label: '删除',
icon: 'ant-design:delete-outlined',
auth: ['role_del'],
color: 'error',
onClick: handleDel.bind(null, record)
}]"
/>
</template>
</template>
</BasicTable>
<!--弹出窗体区域-->
@ -102,7 +104,7 @@ @@ -102,7 +104,7 @@
width: 220,
title: '操作',
dataIndex: 'action',
slots: { customRender: 'action' },
//slots: { customRender: 'action' },
fixed: false
},
handleSearchInfoFn: () => clearSelectedRowKeys()

38
src/views/system/tenant/index.vue

@ -23,23 +23,25 @@ @@ -23,23 +23,25 @@
@click="handleDel()"
>删除多租户</a-button>
</template>
<template #action="{ record }">
<TableAction
:actions="[
{
label: '编辑',
icon: 'fa6-regular:pen-to-square',
auth: ['tenant_edit'],
onClick: handleEdit.bind(null, record)
},
{
label: '删除',
icon: 'ant-design:delete-outlined',
color: 'error',
auth: ['tenant_del'],
onClick: handleDel.bind(null, record)
}]"
/>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<TableAction
:actions="[
{
label: '编辑',
icon: 'fa6-regular:pen-to-square',
auth: ['tenant_edit'],
onClick: handleEdit.bind(null, record)
},
{
label: '删除',
icon: 'ant-design:delete-outlined',
color: 'error',
auth: ['tenant_del'],
onClick: handleDel.bind(null, record)
}]"
/>
</template>
</template>
</BasicTable>
<!--弹出窗体区域-->
@ -100,7 +102,7 @@ @@ -100,7 +102,7 @@
width: 220,
title: '操作',
dataIndex: 'action',
slots: { customRender: 'action' },
//slots: { customRender: 'action' },
fixed: false
},
handleSearchInfoFn: () => clearSelectedRowKeys()

82
src/views/system/user/index.vue

@ -30,45 +30,47 @@ @@ -30,45 +30,47 @@
@click="handleDel()"
>删除用户</a-button>
</template>
<template #action="{ record }">
<TableAction
:actions="[
{
label: '编辑',
icon: 'fa6-regular:pen-to-square',
auth: ['user_edit'],
onClick: handleEdit.bind(null, record)
},
{
label: '删除',
icon: 'ant-design:delete-outlined',
color: 'error',
auth: ['user_del'],
onClick: handleDel.bind(null, record)
}]"
:dropDownActions="[
{
label: '加入黑名单',
icon: 'fa6-regular:pen-to-square',
onClick: handleBlacklist.bind(null, record)
},
{
label: '加入白名单',
icon: 'fa6-regular:pen-to-square',
onClick: handleWhitelist.bind(null, record)
},
{
label: '推送申请',
icon: 'fa6-regular:pen-to-square',
onClick: handlePushAdd.bind(null, record)
},
{
label: '重置密码',
icon: 'fa6-brands:battle-net',
auth: ['user_reset'],
onClick: handleResetPassword.bind(null, record),
}]"
/>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<TableAction
:actions="[
{
label: '编辑',
icon: 'fa6-regular:pen-to-square',
auth: ['user_edit'],
onClick: handleEdit.bind(null, record)
},
{
label: '删除',
icon: 'ant-design:delete-outlined',
color: 'error',
auth: ['user_del'],
onClick: handleDel.bind(null, record)
}]"
:dropDownActions="[
{
label: '加入黑名单',
icon: 'fa6-regular:pen-to-square',
onClick: handleBlacklist.bind(null, record)
},
{
label: '加入白名单',
icon: 'fa6-regular:pen-to-square',
onClick: handleWhitelist.bind(null, record)
},
{
label: '推送申请',
icon: 'fa6-regular:pen-to-square',
onClick: handlePushAdd.bind(null, record)
},
{
label: '重置密码',
icon: 'fa6-brands:battle-net',
auth: ['user_reset'],
onClick: handleResetPassword.bind(null, record),
}]"
/>
</template>
</template>
</BasicTable>
<!--弹出窗体区域-->
@ -160,7 +162,7 @@ @@ -160,7 +162,7 @@
width: 220,
title: '操作',
dataIndex: 'action',
slots: { customRender: 'action' },
//slots: { customRender: 'action' },
fixed: false
},
handleSearchInfoFn: () => clearSelectedRowKeys()

Loading…
Cancel
Save