|
@@ -78,14 +78,19 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ watch:{
|
|
|
|
+ dataList(val){
|
|
|
|
+ this.$nextTick(() =>{
|
|
|
|
+ this.init()
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },
|
|
created() {
|
|
created() {
|
|
|
|
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
this.screenHeight = uni.getSystemInfoSync().windowHeight
|
|
this.screenHeight = uni.getSystemInfoSync().windowHeight
|
|
- this.$nextTick(() =>{
|
|
|
|
- this.init()
|
|
|
|
- })
|
|
|
|
|
|
+
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
changeCheck(child,e){
|
|
changeCheck(child,e){
|
|
@@ -144,11 +149,13 @@
|
|
this.scrollHeight = this.screenHeight - listHeight
|
|
this.scrollHeight = this.screenHeight - listHeight
|
|
},
|
|
},
|
|
tabClick(item, index) {
|
|
tabClick(item, index) {
|
|
- console.log(this.scrollList)
|
|
|
|
- this.onTab = true
|
|
|
|
- this.scrollTop = this.scrollList[index].top
|
|
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+ try{
|
|
|
|
+ this.onTab = true
|
|
|
|
+ this.scrollTop = this.scrollList[index].top
|
|
|
|
+ }catch(e){
|
|
|
|
+ let listHeight = this.scrollList[this.scrollList.length - 1].height
|
|
|
|
+ this.scrollHeight = this.screenHeight - listHeight
|
|
|
|
+ }
|
|
},
|
|
},
|
|
scrollChange(ev) {
|
|
scrollChange(ev) {
|
|
var scorllTop = Math.round(ev.detail.scrollTop)
|
|
var scorllTop = Math.round(ev.detail.scrollTop)
|