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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Loading…
Cancel
Save