update fileTable优化
This commit is contained in:
@@ -150,6 +150,13 @@ const defaultActionList = computed(() => [
|
||||
title: '重命名',
|
||||
type: 'primary',
|
||||
click: (row: any) => renameFun(row[props.fileIdField] || row.fileId || row.uuid, row),
|
||||
hide: (row: any) => {
|
||||
// 如果父组件传入了自定义的 hide 判断方法,则使用父组件的方法
|
||||
const customHide = (props.actionList as any[]).find(
|
||||
(action: any) => action.title === '重命名'
|
||||
)?.hide;
|
||||
return customHide ? customHide(row) : false;
|
||||
},
|
||||
},
|
||||
]
|
||||
: []),
|
||||
|
||||
Reference in New Issue
Block a user