From 4a56b810fd019e701a5706196ab385f26c835861 Mon Sep 17 00:00:00 2001 From: Cagatay Civici Date: Fri, 11 Sep 2020 20:52:54 +0300 Subject: [PATCH] Migrated TabView --- src/components/tabpanel/TabPanel.vue | 8 ++++++ src/components/tabview/TabView.vue | 37 ++++++++++------------------ src/views/tabview/TabViewDemo.vue | 6 ++--- src/views/tabview/TabViewDoc.vue | 10 ++++---- 4 files changed, 29 insertions(+), 32 deletions(-) diff --git a/src/components/tabpanel/TabPanel.vue b/src/components/tabpanel/TabPanel.vue index e9cd4745f..5ebbcc408 100755 --- a/src/components/tabpanel/TabPanel.vue +++ b/src/components/tabpanel/TabPanel.vue @@ -21,6 +21,14 @@ export default { active(newValue) { this.d_active = newValue; } + }, + mounted() { + if (!this.$parent.tabs.includes(this)) { + this.$parent.tabs.push(this); + } + }, + beforeDestroy() { + this.$parent.tabs = this.$parent.tabs.filter(tab => tab !== this); } } \ No newline at end of file diff --git a/src/components/tabview/TabView.vue b/src/components/tabview/TabView.vue index 5f3ad675f..8ac503075 100755 --- a/src/components/tabview/TabView.vue +++ b/src/components/tabview/TabView.vue @@ -4,7 +4,7 @@
  • {{tab.header}} - +
  • @@ -18,24 +18,16 @@ diff --git a/src/views/tabview/TabViewDemo.vue b/src/views/tabview/TabViewDemo.vue index f8666dfbd..c963b1fb4 100755 --- a/src/views/tabview/TabViewDemo.vue +++ b/src/views/tabview/TabViewDemo.vue @@ -82,7 +82,7 @@
    Custom Headers
    -