WIP Доработал работу полей в форме Основных данных
This commit is contained in:
@@ -8,9 +8,9 @@
|
||||
span.font-bold.text-base {{title}}
|
||||
q-icon.edit-button.text-lg.cursor-pointer(name="app:edit" v-if="!isEdit" @click="clickEditForm" size="20")
|
||||
slot
|
||||
.flex.h-fit.w-fit.gap-2
|
||||
base-button.text-base.font-semibold(v-if="isEdit" outlined :size="40" @click="cancelEdit") Отменить
|
||||
base-button.text-base.font-semibold(v-if="isEdit" :size="40" @click="saveChangeForm") Сохранить изменения
|
||||
.flex.h-fit.w-fit.gap-2(v-if="isEdit")
|
||||
base-button.text-base.font-semibold(outlined :size="40" @click="cancelEdit") Отменить
|
||||
base-button.text-base.font-semibold(:size="40" @click="saveChangeForm") Сохранить изменения
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -21,7 +21,15 @@ export default {
|
||||
components: { BaseButton, BaseLoader },
|
||||
props: {
|
||||
title: String,
|
||||
changeEdit: {
|
||||
cancel: {
|
||||
type: Function,
|
||||
default: () => {},
|
||||
},
|
||||
save: {
|
||||
type: Function,
|
||||
default: () => {},
|
||||
},
|
||||
openEdit: {
|
||||
type: Function,
|
||||
default: () => {},
|
||||
},
|
||||
@@ -35,18 +43,18 @@ export default {
|
||||
methods: {
|
||||
clickEditForm() {
|
||||
this.isEdit = true;
|
||||
this.changeEdit();
|
||||
this.openEdit();
|
||||
},
|
||||
cancelEdit() {
|
||||
this.isEdit = false;
|
||||
this.changeEdit();
|
||||
this.cancel();
|
||||
},
|
||||
saveChangeForm() {
|
||||
this.isLoadingData = true;
|
||||
setTimeout(() => {
|
||||
this.isLoadingData = false;
|
||||
this.isEdit = false;
|
||||
this.changeEdit();
|
||||
this.save();
|
||||
}, 2000);
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user