| | |
| | | deep: true, |
| | | handler(newVal, oldVal) { |
| | | // this.observer(); |
| | | sleep(30); |
| | | sleep(30).then(() => { |
| | | this.getMenuItemTop(); |
| | | this.leftMenuStatus(this.innerCurrent); |
| | | }) |
| | | } |
| | | }, |
| | | current(nval) { |
| | | this.innerCurrent = nval; |
| | | this.leftMenuStatus(this.innerCurrent); |
| | | sleep(30).then(() => { |
| | | this.swichMenu(this.innerCurrent) |
| | | }) |
| | | }, |
| | | height() { |
| | | // console.log('height change'); |
| | |
| | | this.innerCurrent = this.current; |
| | | this.leftMenuStatus(this.innerCurrent); |
| | | this.getMenuItemTop() |
| | | // 设置默认index |
| | | sleep(50).then(() => { |
| | | this.swichMenu(this.innerCurrent) |
| | | }) |
| | | }, |
| | | methods: { |
| | | addUnit, |
| | |
| | | if(this.arr.length == 0) { |
| | | await this.getMenuItemTop(); |
| | | } |
| | | if (this.scrollIntoView != 'item' + index) { |
| | | this.scrollIntoView = 'item' + index; |
| | | } |
| | | } |
| | | |
| | | if (index == this.innerCurrent) return; |
| | | this.$nextTick(function(){ |