From e0b37628a90575e40a7a4f75f467edbd0d0b0c45 Mon Sep 17 00:00:00 2001 From: chenbo <709206448@qq.com> Date: Wed, 3 Jan 2024 14:03:20 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8E=E5=8F=B0=E6=B7=BB=E5=8A=A0=E6=89=8B?= =?UTF-8?q?=E6=9C=BA=E7=94=A8=E6=88=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/src/views/consumer/lists/index.vue | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/admin/src/views/consumer/lists/index.vue b/admin/src/views/consumer/lists/index.vue index 8bed0b31..681c28d0 100644 --- a/admin/src/views/consumer/lists/index.vue +++ b/admin/src/views/consumer/lists/index.vue @@ -84,11 +84,10 @@ - - + + - 初始密码:123456 @@ -125,18 +124,22 @@ const { pager, getLists, resetPage, resetParams } = usePaging({ onActivated(() => { getLists() }) + const dialogFormVisible = ref(false) const form = reactive({ "mobile": "" }) +const addForm = ref() const addUser = () => { - addUserApi(form) - ElMessage({ - message: '用户添加成功', - type: 'success', + addUserApi(form).then(() => { + ElMessage({ + message: '用户添加成功', + type: 'success', + }) + addForm.value.resetFields() + dialogFormVisible.value = false + getLists() }) - dialogFormVisible.value = false - getLists() } getLists()