WIP Попытки переделать форму создания клиента

This commit is contained in:
Daria Golova
2023-01-23 15:50:29 +03:00
parent 9f026f7916
commit 12d1b60368

View File

@@ -4,7 +4,6 @@
:url="url", :url="url",
:is-open-form="isOpenForm", :is-open-form="isOpenForm",
:close-form="closeForm", :close-form="closeForm",
:open-form="openForm",
:set-updated-clients="setUpdatedClients", :set-updated-clients="setUpdatedClients",
:write-created-client-id="writeCreatedClientId" :write-created-client-id="writeCreatedClientId"
) )
@@ -39,10 +38,13 @@ export default {
}, },
methods: { methods: {
openForm() { openForm() {
console.log("before open", this.isOpenForm);
this.isOpenForm = true; this.isOpenForm = true;
console.log("after open", this.isOpenForm);
}, },
closeForm() { closeForm() {
this.isOpenForm = false; this.isOpenForm = false;
console.log("close", this.isOpenForm);
}, },
setUpdatedClients() { setUpdatedClients() {
if (this.$router.currentRoute._value.path === "/clients") if (this.$router.currentRoute._value.path === "/clients")
@@ -57,5 +59,14 @@ export default {
this.createdClientId = id; this.createdClientId = id;
}, },
}, },
watch: {
isOpenForm: {
immediate: true,
deep: true,
handler(newValue, oldValue) {
console.log("layout", newValue, oldValue);
},
},
},
}; };
</script> </script>