Browse Source

tab修改

master
@AliceXiaoZhan 3 years ago
parent
commit
99cdcd5d19
  1. 11
      components/tab/tab.vue
  2. 1
      components/tabs/tabs.vue
  3. 6
      pages/resource_list/resource_list.vue

11
components/tab/tab.vue

@ -24,14 +24,21 @@
shouldRender: false
}
},
created() {
this.tabs.childrens.push(this)
created(){
console.log('this----------------')
console.log(this.tabs.childrens)
this.tabs.childrens=[]
},
// mounted () {
// this.tabs.childrens.push(this)
// },
mounted() {
this.tabs.childrens.push(this)
this.update()
},
methods: {
getComputedName: function() {
if (this.data.name !== '') {
return this.data.name;
}

1
components/tabs/tabs.vue

@ -256,6 +256,7 @@
},
methods: {
updateTabs() {
console.log(this.childrens)
this.list = this.childrens.map((item) => {
const {
name,

6
pages/resource_list/resource_list.vue

@ -201,6 +201,8 @@
},
async downCallback() {
await this.getCategoryListFun();
console.log("后续值",this.categoryList)
console.log("后续值2",this.cid)
this.mescroll.resetUpScroll();
},
upCallback(page) {
@ -265,13 +267,13 @@
this.$set(this.categoryList, index, item);
});
});
console.log("后续值",this.categoryList)
console.log("后续值2",this.cid)
this.categoryList.forEach((item, index) => {
if(this.cid>0 && item.id == this.cid){
this.active = index+1
}
})
},
},
computed: {

Loading…
Cancel
Save