fix create form and fix origin

This commit is contained in:
kandrusyak
2023-09-04 20:57:34 +03:00
parent e7b9cce5a2
commit 66efe5bc95
6 changed files with 35 additions and 40 deletions

View File

@@ -15,9 +15,8 @@
:popup-content-style="{height: candidates?.length > 3 ? '216px' : ''}"
v-model="value"
ref="selectRef"
@blur="pasteFullName"
)
//template(#selected)
// .text-dark.text-sm.font-medium(v-if="person") {{ person.last_name + ' ' + person.first_name + ' ' + person.patronymic }}
template(v-slot:iconLeft)
q-icon.search-icon(name="app:search", size="20px")
template(v-slot:customOption="{props, data}")
@@ -60,6 +59,7 @@ export default {
},
computed: {
pickedFullName() {
if (!this.value.first_name) return "";
return (
this.value.last_name +
" " +
@@ -70,8 +70,8 @@ export default {
},
},
watch: {
pickedFullName(val) {
this.$refs?.selectRef?.updateInputValue(val, true);
pickedFullName() {
this.pasteFullName();
},
},
methods: {
@@ -87,8 +87,10 @@ export default {
});
});
},
test(slotProps) {
console.log(slotProps);
pasteFullName() {
this.$nextTick(() => {
this.$refs?.selectRef?.updateInputValue(this.pickedFullName, true);
});
},
},
};