update reset state

parent 05015b82
......@@ -79,6 +79,7 @@ export default defineComponent({
const keyword = ref('');
const showDialog = ref(false);
const showDialogUpdate = ref(false);
const id = ref(0);
const userName = ref('');
const password = ref('');
......@@ -137,6 +138,21 @@ export default defineComponent({
}
});
};
const openAddUserDialog = () => {
showDialog.value = true;
userName.value = '';
password.value = '';
fullName.value = '';
birthday.value = '';
email.value = '';
phoneNumber.value = '';
mobileNumber.value = '';
sex.value = undefined;
address.value = '';
unit.value = undefined;
status.value = true;
group.value = [];
};
const addNewUser = async () => {
try {
......@@ -378,6 +394,7 @@ export default defineComponent({
showDialogUpdateUser,
updateUser,
getUserDetail,
openAddUserDialog,
};
},
});
......@@ -23,7 +23,7 @@
<q-space></q-space>
<div class="col-auto flex flex-center">
<q-btn
@click="showDialog = true"
@click="openAddUserDialog"
:label="$t('crudActions.add')"
color="primary"
></q-btn>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment