微调
This commit is contained in:
@@ -4,15 +4,12 @@
|
||||
ref='proTable'
|
||||
:columns='columns'
|
||||
:request-api='getFunctionList'
|
||||
:pagination="false"
|
||||
>
|
||||
<!-- :data='userData' -->
|
||||
<!-- 表格 header 按钮 -->
|
||||
<template #tableHeader='scope'>
|
||||
<template #tableHeader>
|
||||
<el-button type='primary' :icon='CirclePlus' @click="openDialog('add')">新增</el-button>
|
||||
<el-button type='danger' :icon='Delete' plain :disabled='!scope.isSelected'
|
||||
@click='batchDelete(scope.selectedListIds)'>
|
||||
批量删除
|
||||
</el-button>
|
||||
</template>
|
||||
<!-- 表格操作 -->
|
||||
<template #operation='scope'>
|
||||
@@ -43,7 +40,7 @@
|
||||
|
||||
// 表格配置项
|
||||
const columns = reactive<ColumnProps<Function.ResFunction>[]>([
|
||||
{ type: 'selection', fixed: 'left', width: 70 },
|
||||
{ type: 'index', fixed: 'left', width: 70, label: '序号' },
|
||||
{
|
||||
prop: 'name',
|
||||
label: '名称',
|
||||
@@ -92,10 +89,12 @@ const openDialog = (titleType: string, row: Partial<Function.ResFunction> = {})
|
||||
|
||||
// 删除用户信息
|
||||
const handleDelete = async (params: Function.ResFunction) => {
|
||||
await useHandleData(deleteFunction, [params.id] , `删除【${params.name}】用户`)
|
||||
await useHandleData(deleteFunction, params , `删除【${params.name}】用户`)
|
||||
proTable.value?.getTableList()
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 批量删除用户信息
|
||||
const batchDelete = async (id: string[]) => {
|
||||
await useHandleData(deleteFunction, { id }, '删除所选用户信息')
|
||||
|
||||
Reference in New Issue
Block a user