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>
|
<script setup>
|
||||||
import { ref, computed, onMounted } from 'vue';
|
import { ref, computed } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
|
||||||
import FormModel from 'components/FormModel.vue';
|
import FormModel from 'components/FormModel.vue';
|
||||||
|
@ -62,14 +62,16 @@ defineExpose({
|
||||||
v-if="showSaveAndContinueBtn"
|
v-if="showSaveAndContinueBtn"
|
||||||
:label="t('globals.isSaveAndContinue')"
|
:label="t('globals.isSaveAndContinue')"
|
||||||
:title="t('globals.isSaveAndContinue')"
|
:title="t('globals.isSaveAndContinue')"
|
||||||
type="submit"
|
|
||||||
color="primary"
|
color="primary"
|
||||||
class="q-ml-sm"
|
class="q-ml-sm"
|
||||||
:disabled="isLoading"
|
:disabled="isLoading"
|
||||||
:loading="isLoading"
|
:loading="isLoading"
|
||||||
data-cy="FormModelPopup_isSaveAndContinue"
|
data-cy="FormModelPopup_isSaveAndContinue"
|
||||||
z-max
|
z-max
|
||||||
@click="() => (isSaveAndContinue = true)"
|
@click="
|
||||||
|
isSaveAndContinue = true;
|
||||||
|
formModelRef.save();
|
||||||
|
"
|
||||||
/>
|
/>
|
||||||
<QBtn
|
<QBtn
|
||||||
:label="t('globals.cancel')"
|
:label="t('globals.cancel')"
|
||||||
|
@ -83,23 +85,23 @@ defineExpose({
|
||||||
v-close-popup
|
v-close-popup
|
||||||
z-max
|
z-max
|
||||||
@click="
|
@click="
|
||||||
() => {
|
|
||||||
isSaveAndContinue = false;
|
isSaveAndContinue = false;
|
||||||
emit('onDataCanceled');
|
emit('onDataCanceled');
|
||||||
}
|
|
||||||
"
|
"
|
||||||
/>
|
/>
|
||||||
<QBtn
|
<QBtn
|
||||||
:label="t('globals.save')"
|
:label="t('globals.save')"
|
||||||
:title="t('globals.save')"
|
:title="t('globals.save')"
|
||||||
@click="formModelRef.save()"
|
@click="
|
||||||
|
formModelRef.save();
|
||||||
|
isSaveAndContinue = false;
|
||||||
|
"
|
||||||
color="primary"
|
color="primary"
|
||||||
class="q-ml-sm"
|
class="q-ml-sm"
|
||||||
:disabled="isLoading"
|
:disabled="isLoading"
|
||||||
:loading="isLoading"
|
:loading="isLoading"
|
||||||
data-cy="FormModelPopup_save"
|
data-cy="FormModelPopup_save"
|
||||||
z-max
|
z-max
|
||||||
@click="() => (isSaveAndContinue = false)"
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
Loading…
Reference in New Issue