修复部门和角色树列表部分情况无法自动展开问题

This commit is contained in:
孟帅
2023-08-08 10:14:16 +08:00
parent 90d09deeff
commit 5538d9b720
4 changed files with 45 additions and 28 deletions

View File

@@ -25,6 +25,7 @@
</n-space>
<n-data-table
v-if="data.length > 0 || !loading"
:columns="columns"
:data="data"
:row-key="rowKey"
@@ -317,6 +318,10 @@
return h(TableAction as any, {
style: 'button',
actions: [
{
label: '添加',
onClick: handleAddSub.bind(null, record),
},
{
label: '编辑',
onClick: handleEdit.bind(null, record),
@@ -341,6 +346,12 @@
optionsDefaultValue.value = 0;
}
function handleAddSub(record: Recordable) {
showModal.value = true;
formParams.value = cloneDeep(defaultState);
optionsDefaultValue.value = record.id;
}
function handleEdit(record: Recordable) {
showModal.value = true;
formParams.value = cloneDeep(record);