|
@@ -20,8 +20,24 @@
|
|
|
</template>
|
|
|
|
|
|
<template #operation="{ row }">
|
|
|
- <el-button type="primary" link icon="EditPen" @click="openDrawer('编辑', row)"> 编辑 </el-button>
|
|
|
- <el-button v-if="row.userId !== '1'" type="primary" link icon="Delete" @click="deleteRow(row)"> 删除 </el-button>
|
|
|
+ <div class="operation-group">
|
|
|
+ <el-button type="primary" link icon="EditPen" @click="openDrawer('编辑', row)"> 编辑 </el-button>
|
|
|
+ <el-button v-if="row.userId !== '1'" type="primary" link icon="Delete" @click="deleteRow(row)"> 删除 </el-button>
|
|
|
+ <div>
|
|
|
+ <el-dropdown trigger="click">
|
|
|
+ <el-button type="primary" link icon="DArrowRight"> 更多 </el-button>
|
|
|
+ <template #dropdown>
|
|
|
+ <el-dropdown-menu>
|
|
|
+ <el-dropdown-item icon="Refresh" @click="UserApi.resetPassword(row)">重置密码</el-dropdown-item>
|
|
|
+ <el-dropdown-item icon="CirclePlusFilled"> Action 2 </el-dropdown-item>
|
|
|
+ <el-dropdown-item icon="CirclePlus">Action 3</el-dropdown-item>
|
|
|
+ <el-dropdown-item icon="Check">Action 4</el-dropdown-item>
|
|
|
+ <el-dropdown-item icon="CircleCheck">Action 5</el-dropdown-item>
|
|
|
+ </el-dropdown-menu>
|
|
|
+ </template>
|
|
|
+ </el-dropdown>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
</ProTable>
|
|
|
</div>
|
|
@@ -55,7 +71,7 @@ const changeTree = (val: string) => {
|
|
|
// 表格配置项
|
|
|
const columns: ColumnProps<UserVO>[] = [
|
|
|
{ type: 'selection', width: 60, selectable: row => row.userId !== '1' },
|
|
|
- { prop: 'account', label: '账号', width: 120 },
|
|
|
+ { prop: 'account', label: '账号', width: 130 },
|
|
|
{ prop: 'userName', label: '姓名', width: 120 },
|
|
|
{ prop: 'nickName', label: '昵称', width: 120 },
|
|
|
{
|
|
@@ -76,7 +92,7 @@ const columns: ColumnProps<UserVO>[] = [
|
|
|
width: 80,
|
|
|
fieldNames: { label: 'dictLabel', value: 'dictValue', tagType: 'callbackShowStyle' }
|
|
|
},
|
|
|
- { prop: 'remark', label: '备注', width: 100 },
|
|
|
+ { prop: 'remark', label: '备注' },
|
|
|
{ prop: 'createByName', label: '创建人', width: 120 },
|
|
|
{ prop: 'createTime', label: '创建时间', width: 160 },
|
|
|
{ prop: 'operation', label: '操作', width: 200, fixed: 'right' }
|
|
@@ -125,3 +141,13 @@ const openDrawer = (title: string, row: Partial<UserBO> = {}) => {
|
|
|
drawerRef.value?.acceptParams(params)
|
|
|
}
|
|
|
</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+.operation-group {
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+}
|
|
|
+.operation-group > * {
|
|
|
+ margin-left: 8px;
|
|
|
+}
|
|
|
+</style>
|