Task:指引页

This commit is contained in:
linxi
2025-01-17 18:17:30 +08:00
parent 50dab652e9
commit f3be581278
4 changed files with 798 additions and 79 deletions
+10
View File
@@ -25,6 +25,7 @@
v-for="(item, index) in tabbarItem"
:key="index"
:class="currIndex === item.index ? 'curr' : ''"
:id="'icon' + index"
class="item"
@click="gotoPage(item.url, item.type, item.index)"
>
@@ -97,6 +98,7 @@ export default {
},
mounted() {
this.getElementData('#quweiIcon')
this.getIconData('#icon1')
},
methods: {
getElementData(el) {
@@ -107,6 +109,14 @@ export default {
}
})
},
getIconData(el) {
const query = uni.createSelectorQuery().in(this)
query.select(el).boundingClientRect().exec((res)=> {
if(res[0]) {
this.$emit('getIcon', res[0])
}
})
},
/**
* 跳转至目标页面
* type: 1-tabbar页面,2-非tabbar页面