From 551c730771fa88b49ce145e231cfed7d83ba6776 Mon Sep 17 00:00:00 2001 From: "mo.duan" Date: Tue, 24 Sep 2019 12:02:52 +0800 Subject: [PATCH] optimize Tabs --- examples/routers/tabs.vue | 44 +++++++++++++++++++++++++----------- src/components/tabs/tabs.vue | 2 +- 2 files changed, 32 insertions(+), 14 deletions(-) diff --git a/examples/routers/tabs.vue b/examples/routers/tabs.vue index 390624cf..a82fa940 100644 --- a/examples/routers/tabs.vue +++ b/examples/routers/tabs.vue @@ -55,22 +55,40 @@ + + + + + + + + + + + + + + + + + + + diff --git a/src/components/tabs/tabs.vue b/src/components/tabs/tabs.vue index 4341c306..4ff7531c 100644 --- a/src/components/tabs/tabs.vue +++ b/src/components/tabs/tabs.vue @@ -217,7 +217,7 @@ if (item.tab === this.name) { TabPanes.push(item); } - } else if (this.$children.indexOf(item) !== -1) { + }else if (this.$children.includes(item)) { // #6279 #6299 TabPanes.push(item); } });