[update] 修改操作列只显示一个按钮,其他显示在更多

This commit is contained in:
lideqin
2023-08-23 18:28:36 +08:00
parent 083bcaf0a2
commit a8f350e6d7
7 changed files with 227 additions and 62 deletions
+8 -1
View File
@@ -2,6 +2,7 @@
* 表头通过标签管理配置的模块的表格数据的混入
*/
import { getAction, postAction } from '@api/manage'
import { isHasPermission } from '../utils/hasPermission'
// 模拟接口返回的表头数据
const TempApiReturnColumns = [
@@ -49,6 +50,7 @@ export const ConfigurableTableMixin = {
orderBy: '1',
orderByField: '',
getTableHeaderData: null, // 获取表头数据的方法
operateMaxNum: 1,
// 操作列的column
operateColumn: {
title: this.$t('operation'),
@@ -57,12 +59,17 @@ export const ConfigurableTableMixin = {
scopedSlots: { customRender: 'operation' }
},
type: '', // 这个字段不知道什么含义
filters: {} // 固定的搜索条件
filters: {}, // 固定的搜索条件
needFilterTableBtn: true // 是否需要过滤没有权限的按钮
}
},
mounted () {
this.getTableHeader()
this.loadData()
// 过滤没有权限的按钮
if (this.needFilterTableBtn) {
this.operationList = this.operationList.filter(item => isHasPermission(item.has))
}
},
methods: {
/**