This commit is contained in:
2024-04-19 17:38:07 +08:00
parent 5674c763db
commit f09e688c1f

View File

@@ -98,11 +98,23 @@
show: false, show: false,
distanceToTop: -300, distanceToTop: -300,
distanceToLeft: -300, distanceToLeft: -300,
windowHeight: '',
val1: '' val1: ''
}; };
}, },
onLoad (options) { onLoad (options) {
this.title = options.title this.title = options.title
uni.getSystemInfo({
success: (info) => {
this.windowHeight = info.windowHeight
}
})
const query = uni.createSelectorQuery().in(this)
query
.select('.pop_point_wrap')
.boundingClientRect(data => {
console.log(data)
}).exec()
}, },
created () { created () {
this.initArea() this.initArea()
@@ -110,8 +122,8 @@
methods: { methods: {
selectPoint () { selectPoint () {
this.pointArr.map(el => { this.pointArr.map(el => {
if (val1 === el.device_code || val1 === el.device_name) { if (this.val1 === el.device_code || this.val1 === el.device_name) {
console.log(this.val1)
} }
}) })
}, },
@@ -138,6 +150,7 @@
query query
.select(`#site_item_box_${index}`) .select(`#site_item_box_${index}`)
.boundingClientRect(data => { .boundingClientRect(data => {
console.log(data.top)
if (data) { if (data) {
this.distanceToTop = data.top + (data.height / 2) - 9 this.distanceToTop = data.top + (data.height / 2) - 9
this.distanceToLeft = data.left this.distanceToLeft = data.left