Commit ad8441ac authored by Damon's avatar Damon

定位到第一项

parent be460f14
......@@ -500,17 +500,6 @@
})
}
},
tabsChange(index){
this.tabIndex = index
this.arr = []
this.scrollRightTop = 0;
this.current = 0;
this.leftMenuStatus(0)
this.$nextTick(function() {
this.itemId = this.oldItemId
this.getMenuItemTop()
})
},
calMaterialCraftListAmount(arr){
let amount = 0
if(arr){
......@@ -567,13 +556,26 @@
this.tabIndex++
this.arr = []
this.scrollRightTop = 0
this.leftMenuStatus(0)
this.$nextTick(function() {
this.getMenuItemTop()
this.current = 0
this.leftMenuStatus(0)
const itemId = this.list[this.tabIndex].items[0].items[0].fieldsId
this.oldItemId = `item${itemId}`
this.$nextTick(async () => {
if (this.oldItemId) this.itemId = this.oldItemId
})
}
},
tabsChange(index){
this.tabIndex = index
this.arr = []
this.scrollRightTop = 0;
this.current = 0;
this.leftMenuStatus(0)
this.$nextTick(function() {
if (this.oldItemId)this.itemId = this.oldItemId
this.getMenuItemTop()
})
},
// ------------------------- 以下方法为上传组件相关 -------------------------
// 弹出上传选项
selectUpload(item, groupIndex, itemIndex){
......@@ -665,6 +667,7 @@
if (this.arr.length == 0) {
await this.getMenuItemTop();
}
console.log("index, this.current", index, this.current)
if (index == this.current) return;
this.scrollRightTop = this.oldScrollTop;
this.$nextTick(function() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment