44 lines
906 B
JavaScript
44 lines
906 B
JavaScript
export default {
|
|
data() {
|
|
return {
|
|
scrollView: '',
|
|
functionGuideData: {
|
|
step: 0,
|
|
tips: '',
|
|
tipsPosition: '',
|
|
btnGroupPosition: '',
|
|
position: {}
|
|
},
|
|
screenWidth: 0,
|
|
scrollLeft: 0,
|
|
totalWidth: 0,
|
|
scrollViewWidth: 0,
|
|
imgs: [],
|
|
_step: 0
|
|
}
|
|
},
|
|
onLoad() {
|
|
this.$refs.FunctionGuide.init()
|
|
},
|
|
methods: {
|
|
setFunctionGuideData(data) {
|
|
this.functionGuideData = {
|
|
...this.functionGuideData,
|
|
...data
|
|
}
|
|
this.showFunctionGuide()
|
|
},
|
|
getElementData(el, cb) {
|
|
const query = uni.createSelectorQuery().in(this)
|
|
query.select(el).boundingClientRect().exec((res)=> {
|
|
console.log(res, 'getElementData');
|
|
if(res[0]) {
|
|
cb(res[0])
|
|
} else {
|
|
this.$refs.FunctionGuide.show = false
|
|
}
|
|
})
|
|
},
|
|
|
|
}
|
|
} |