fix: bug #184 clear formData when create new item
This commit is contained in:
parent
dec7bf3014
commit
0d22b766af
2 changed files with 7 additions and 0 deletions
|
|
@ -101,6 +101,12 @@ const columns = [
|
||||||
|
|
||||||
function triggerDialog(type: 'add' | 'edit' | 'view') {
|
function triggerDialog(type: 'add' | 'edit' | 'view') {
|
||||||
if (type === 'add') {
|
if (type === 'add') {
|
||||||
|
registeredBranchId.value = '';
|
||||||
|
formDataWorkflow.value = {
|
||||||
|
status: 'CREATED',
|
||||||
|
name: '',
|
||||||
|
step: [],
|
||||||
|
};
|
||||||
pageState.addModal = true;
|
pageState.addModal = true;
|
||||||
pageState.isDrawerEdit = true;
|
pageState.isDrawerEdit = true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -112,6 +112,7 @@ const onCreateImageList = ref<{
|
||||||
|
|
||||||
function triggerDialog(type: 'add' | 'edit' | 'view') {
|
function triggerDialog(type: 'add' | 'edit' | 'view') {
|
||||||
if (type === 'add') {
|
if (type === 'add') {
|
||||||
|
formData.value = structuredClone(blankFormData);
|
||||||
pageState.addModal = true;
|
pageState.addModal = true;
|
||||||
pageState.isDrawerEdit = true;
|
pageState.isDrawerEdit = true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue