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()