refactor: refs #8372 simplify button click handlers in FormModelPopup.vue
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
parent
cc2d1ed09d
commit
1f89233372
|
@ -1,5 +1,5 @@
|
|||
<script setup>
|
||||
import { ref, computed, onMounted } from 'vue';
|
||||
import { ref, computed } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
import FormModel from 'components/FormModel.vue';
|
||||
|
@ -62,14 +62,16 @@ defineExpose({
|
|||
v-if="showSaveAndContinueBtn"
|
||||
:label="t('globals.isSaveAndContinue')"
|
||||
:title="t('globals.isSaveAndContinue')"
|
||||
type="submit"
|
||||
color="primary"
|
||||
class="q-ml-sm"
|
||||
:disabled="isLoading"
|
||||
:loading="isLoading"
|
||||
data-cy="FormModelPopup_isSaveAndContinue"
|
||||
z-max
|
||||
@click="() => (isSaveAndContinue = true)"
|
||||
@click="
|
||||
isSaveAndContinue = true;
|
||||
formModelRef.save();
|
||||
"
|
||||
/>
|
||||
<QBtn
|
||||
:label="t('globals.cancel')"
|
||||
|
@ -83,23 +85,23 @@ defineExpose({
|
|||
v-close-popup
|
||||
z-max
|
||||
@click="
|
||||
() => {
|
||||
isSaveAndContinue = false;
|
||||
emit('onDataCanceled');
|
||||
}
|
||||
isSaveAndContinue = false;
|
||||
emit('onDataCanceled');
|
||||
"
|
||||
/>
|
||||
<QBtn
|
||||
:label="t('globals.save')"
|
||||
:title="t('globals.save')"
|
||||
@click="formModelRef.save()"
|
||||
@click="
|
||||
formModelRef.save();
|
||||
isSaveAndContinue = false;
|
||||
"
|
||||
color="primary"
|
||||
class="q-ml-sm"
|
||||
:disabled="isLoading"
|
||||
:loading="isLoading"
|
||||
data-cy="FormModelPopup_save"
|
||||
z-max
|
||||
@click="() => (isSaveAndContinue = false)"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
|
Loading…
Reference in New Issue