WIP: account edit modal layout done (now: without password rows)

This commit is contained in:
Cindy Chang
2024-06-20 10:56:03 +08:00
parent b7862ab164
commit d6a79687da
8 changed files with 126 additions and 17 deletions

View File

@@ -42,7 +42,7 @@
</Column>
<Column field="edit" :header="i18next.t('AcctMgmt.Edit')" bodyClass="text-neutral-500">
<template #body="slotProps">
<img src="@/assets/icon-edit.svg" alt="Edit" class="cursor-pointer"/>
<img src="@/assets/icon-edit.svg" alt="Edit" class="cursor-pointer" @click="onEditBtnClick(slotProps.data.id)"/>
</template></Column>
</DataTable>
</div>
@@ -66,7 +66,7 @@ function repeatAccountList(accountList, N) {
// 复制每次的对象并将其添加到新数组中
accountList.forEach(account => {
// 创建一个新的对象,避免直接引用
const newAccount = { ...account };
const newAccount = { ...account, id: account.id + i };
repeatedList.push(newAccount);
});
}
@@ -168,6 +168,9 @@ export default {
onDetailBtnClick(dataId){
this.openModal();
},
onEditBtnClick(dataId){
this.openModal();
},
...mapActions(useModalStore, ['openModal']),
},
created() {