Task:指引页
This commit is contained in:
@@ -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页面
|
||||
|
||||
Reference in New Issue
Block a user