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,
|
||||
old: originalData.value,
|
||||
});
|
||||
if ($props.goTo) return push({ path: $props.goTo });
|
||||
if ($props.reload) await arrayData.fetch({});
|
||||
hasChanges.value = false;
|
||||
} finally {
|
||||
|
@ -254,11 +255,6 @@ async function save() {
|
|||
}
|
||||
}
|
||||
|
||||
async function saveAndGo() {
|
||||
await save();
|
||||
push({ path: $props.goTo });
|
||||
}
|
||||
|
||||
function reset() {
|
||||
formData.value = JSON.parse(JSON.stringify(originalData.value));
|
||||
updateAndEmit('onFetch', { val: originalData.value });
|
||||
|
@ -379,7 +375,7 @@ defineExpose({
|
|||
<QBtnDropdown
|
||||
data-cy="saveAndContinueDefaultBtn"
|
||||
v-if="$props.goTo"
|
||||
@click="saveAndGo"
|
||||
@click="submitForm"
|
||||
:label="tMobile('globals.saveAndContinue')"
|
||||
:title="t('globals.saveAndContinue')"
|
||||
:disable="!hasChanges"
|
||||
|
@ -391,7 +387,7 @@ defineExpose({
|
|||
<QItem
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="save"
|
||||
@click="submitForm"
|
||||
:title="t('globals.save')"
|
||||
>
|
||||
<QItemSection>
|
||||
|
|
Loading…
Reference in New Issue