From 14538ce399667e659419f393ea159efc91ff8dee Mon Sep 17 00:00:00 2001 From: 抓蛙师 <770492966@qq.com> Date: 星期五, 08 九月 2023 18:35:17 +0800 Subject: [PATCH] 优化字典标签支持数组和多标签 --- src/views/system/post/index.vue | 16 ++++++---------- 1 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/views/system/post/index.vue b/src/views/system/post/index.vue index d53eb1c..b1cddd3 100644 --- a/src/views/system/post/index.vue +++ b/src/views/system/post/index.vue @@ -192,22 +192,18 @@ } /** 鏂板鎸夐挳鎿嶄綔 */ const handleAdd = () => { + reset(); dialog.visible = true; dialog.title = "娣诲姞宀椾綅"; - nextTick(() => { - reset(); - }) } /** 淇敼鎸夐挳鎿嶄綔 */ -const handleUpdate = (row?: PostVO) => { +const handleUpdate = async (row?: PostVO) => { + reset(); + const postId = row?.postId || ids.value[0]; + const res = await getPost(postId); + Object.assign(form.value, res.data); dialog.visible = true; dialog.title = "淇敼宀椾綅"; - nextTick(async () => { - reset(); - const postId = row?.postId || ids.value[0]; - const res = await getPost(postId); - form.value = res.data; - }) } /** 鎻愪氦鎸夐挳 */ const submitForm = () => { -- Gitblit v1.9.3