[WIP] Поправил ошибку раскрытия опций состояния

This commit is contained in:
DwCay
2023-06-21 17:04:42 +03:00
parent 1dcacfa08a
commit 6a29ad4abf

View File

@@ -27,6 +27,7 @@
v-for="(type, key) in formConfig.conditions", v-for="(type, key) in formConfig.conditions",
v-model="isOpenExpansion[key]", v-model="isOpenExpansion[key]",
:label="type.label", :label="type.label",
@click="() => partId = ''"
@after-show="()=>jumpToItem()" @after-show="()=>jumpToItem()"
) )
.general-expaction.flex.flex-col.pl-4(v-if="!type?.partsTooth") .general-expaction.flex.flex-col.pl-4(v-if="!type?.partsTooth")
@@ -137,10 +138,12 @@ export default {
} }
}, },
jumpToItem() { jumpToItem() {
this.$refs[this.partId][0].scrollIntoView({ if (this.partId) {
block: "center", this.$refs[this.partId][0].scrollIntoView({
behavior: "smooth", block: "center",
}); behavior: "smooth",
});
}
}, },
updateConditions() { updateConditions() {
let arraySelected = [...this.getFilledConditions(this.data)]; let arraySelected = [...this.getFilledConditions(this.data)];