diff --git a/components/tab/tab.vue b/components/tab/tab.vue index 2da702d..49078de 100644 --- a/components/tab/tab.vue +++ b/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; } diff --git a/components/tabs/tabs.vue b/components/tabs/tabs.vue index 3374371..cdf8656 100644 --- a/components/tabs/tabs.vue +++ b/components/tabs/tabs.vue @@ -256,6 +256,7 @@ }, methods: { updateTabs() { + console.log(this.childrens) this.list = this.childrens.map((item) => { const { name, diff --git a/pages/resource_list/resource_list.vue b/pages/resource_list/resource_list.vue index 25765dc..a9d1479 100644 --- a/pages/resource_list/resource_list.vue +++ b/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: {