选择器

This commit is contained in:
yanran200730
2022-01-18 17:18:00 +08:00
parent 8926e4c8a9
commit 8d15875750

View File

@@ -111,7 +111,9 @@ export default {
fullArea: { fullArea: {
handler(v) { handler(v) {
this.$nextTick(() => { this.$nextTick(() => {
this.scrollHeight() if (v) {
this.scrollHeight()
}
}) })
} }
} }
@@ -125,7 +127,7 @@ export default {
this.$refs.areaSelector.showPopup() this.$refs.areaSelector.showPopup()
}, },
scrollHeight () { scrollHeight () {
return this.height = `calc(100% - ${document.querySelector('.areaSelector').offsetHeight}px)` return this.height = document.querySelector('.areaSelector') && `calc(100% - ${document.querySelector('.areaSelector').offsetHeight}px)`
}, },
getFullArea() { getFullArea() {
let areaId = this.areaId || (this.all ? '' : this.$areaId) let areaId = this.areaId || (this.all ? '' : this.$areaId)