feat: refs #8388 save & continue onEnter
gitea/salix-front/pipeline/pr-dev This commit is unstable
Details
gitea/salix-front/pipeline/pr-dev This commit is unstable
Details
This commit is contained in:
parent
b2202d7843
commit
ce8127b723
|
@ -247,6 +247,7 @@ async function save() {
|
||||||
res: response?.data,
|
res: response?.data,
|
||||||
old: originalData.value,
|
old: originalData.value,
|
||||||
});
|
});
|
||||||
|
if ($props.goTo) return push({ path: $props.goTo });
|
||||||
if ($props.reload) await arrayData.fetch({});
|
if ($props.reload) await arrayData.fetch({});
|
||||||
hasChanges.value = false;
|
hasChanges.value = false;
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -254,11 +255,6 @@ async function save() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function saveAndGo() {
|
|
||||||
await save();
|
|
||||||
push({ path: $props.goTo });
|
|
||||||
}
|
|
||||||
|
|
||||||
function reset() {
|
function reset() {
|
||||||
formData.value = JSON.parse(JSON.stringify(originalData.value));
|
formData.value = JSON.parse(JSON.stringify(originalData.value));
|
||||||
updateAndEmit('onFetch', { val: originalData.value });
|
updateAndEmit('onFetch', { val: originalData.value });
|
||||||
|
@ -379,7 +375,7 @@ defineExpose({
|
||||||
<QBtnDropdown
|
<QBtnDropdown
|
||||||
data-cy="saveAndContinueDefaultBtn"
|
data-cy="saveAndContinueDefaultBtn"
|
||||||
v-if="$props.goTo"
|
v-if="$props.goTo"
|
||||||
@click="saveAndGo"
|
@click="submitForm"
|
||||||
:label="tMobile('globals.saveAndContinue')"
|
:label="tMobile('globals.saveAndContinue')"
|
||||||
:title="t('globals.saveAndContinue')"
|
:title="t('globals.saveAndContinue')"
|
||||||
:disable="!hasChanges"
|
:disable="!hasChanges"
|
||||||
|
@ -391,7 +387,7 @@ defineExpose({
|
||||||
<QItem
|
<QItem
|
||||||
clickable
|
clickable
|
||||||
v-close-popup
|
v-close-popup
|
||||||
@click="save"
|
@click="submitForm"
|
||||||
:title="t('globals.save')"
|
:title="t('globals.save')"
|
||||||
>
|
>
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
|
|
Loading…
Reference in New Issue