From 6fb44ee5354811fe3581bee0ee1b772e13079d71 Mon Sep 17 00:00:00 2001 From: cagataycivici Date: Thu, 5 Dec 2019 14:45:15 +0300 Subject: [PATCH] Implemented TabMenu component --- exports/tabmenu.d.ts | 1 + exports/tabmenu.js | 3 + src/AppMenu.vue | 1 + src/components/tabmenu/TabMenu.d.ts | 5 + src/components/tabmenu/TabMenu.vue | 107 +++++++++++++++++++ src/main.js | 2 + src/router.js | 27 ++++- src/views/tabmenu/CalendarDemo.vue | 12 +++ src/views/tabmenu/DocumentationDemo.vue | 12 +++ src/views/tabmenu/EditDemo.vue | 12 +++ src/views/tabmenu/HomeDemo.vue | 12 +++ src/views/tabmenu/SettingsDemo.vue | 12 +++ src/views/tabmenu/TabMenuDemo.vue | 53 ++++++++++ src/views/tabmenu/TabMenuDoc.vue | 131 ++++++++++++++++++++++++ 14 files changed, 389 insertions(+), 1 deletion(-) create mode 100644 exports/tabmenu.d.ts create mode 100644 exports/tabmenu.js create mode 100644 src/components/tabmenu/TabMenu.d.ts create mode 100644 src/components/tabmenu/TabMenu.vue create mode 100644 src/views/tabmenu/CalendarDemo.vue create mode 100644 src/views/tabmenu/DocumentationDemo.vue create mode 100644 src/views/tabmenu/EditDemo.vue create mode 100644 src/views/tabmenu/HomeDemo.vue create mode 100644 src/views/tabmenu/SettingsDemo.vue create mode 100644 src/views/tabmenu/TabMenuDemo.vue create mode 100644 src/views/tabmenu/TabMenuDoc.vue diff --git a/exports/tabmenu.d.ts b/exports/tabmenu.d.ts new file mode 100644 index 000000000..e7cc52ad3 --- /dev/null +++ b/exports/tabmenu.d.ts @@ -0,0 +1 @@ +export * from './components/tabmenu/TabMenu'; \ No newline at end of file diff --git a/exports/tabmenu.js b/exports/tabmenu.js new file mode 100644 index 000000000..cce185935 --- /dev/null +++ b/exports/tabmenu.js @@ -0,0 +1,3 @@ +'use strict'; +module.exports = require('./components/tabmenu/TabMenu.vue'); + \ No newline at end of file diff --git a/src/AppMenu.vue b/src/AppMenu.vue index ee02d9d17..735453d5e 100644 --- a/src/AppMenu.vue +++ b/src/AppMenu.vue @@ -132,6 +132,7 @@ ● MegaMenu ● Menu ● Menubar + ● TabMenu ● TieredMenu diff --git a/src/components/tabmenu/TabMenu.d.ts b/src/components/tabmenu/TabMenu.d.ts new file mode 100644 index 000000000..3cab3e3f5 --- /dev/null +++ b/src/components/tabmenu/TabMenu.d.ts @@ -0,0 +1,5 @@ +import Vue from 'vue'; + +export declare class TabMenu extends Vue { + model?: any[]; +} \ No newline at end of file diff --git a/src/components/tabmenu/TabMenu.vue b/src/components/tabmenu/TabMenu.vue new file mode 100644 index 000000000..90c585552 --- /dev/null +++ b/src/components/tabmenu/TabMenu.vue @@ -0,0 +1,107 @@ + + + + + diff --git a/src/main.js b/src/main.js index c06cfe3fe..eb302092b 100644 --- a/src/main.js +++ b/src/main.js @@ -51,6 +51,7 @@ import Slider from './components/slider/Slider'; import Sidebar from './components/sidebar/Sidebar'; import SplitButton from './components/splitbutton/SplitButton'; import Spinner from './components/spinner/Spinner'; +import TabMenu from './components/tabmenu/TabMenu'; import TabView from './components/tabview/TabView'; import TabPanel from './components/tabpanel/TabPanel'; import Textarea from './components/textarea/Textarea'; @@ -131,6 +132,7 @@ Vue.component('Spinner', Spinner); Vue.component('SplitButton', SplitButton); Vue.component('TabView', TabView); Vue.component('TabPanel', TabPanel); +Vue.component('TabMenu', TabMenu); Vue.component('Textarea', Textarea); Vue.component('TieredMenu', TieredMenu); Vue.component('Toast', Toast); diff --git a/src/router.js b/src/router.js index f2c01fe17..ae28369f9 100644 --- a/src/router.js +++ b/src/router.js @@ -410,7 +410,32 @@ export default new Router({ path: '/textarea', name: 'textarea', component: () => import('./views/textarea/TextareaDemo.vue') - }, + }, + { + path: '/tabmenu', + name: 'tabmenu', + component: () => import('./views/tabmenu/TabMenuDemo.vue'), + children: [{ + path: '', + component: () => import('./views/tabmenu/HomeDemo.vue') + }, + { + path: '/tabmenu/calendar', + component: () => import('./views/tabmenu/CalendarDemo.vue') + }, + { + path: '/tabmenu/edit', + component: () => import('./views/tabmenu/EditDemo.vue') + }, + { + path: '/tabmenu/documentation', + component: () => import('./views/tabmenu/DocumentationDemo.vue') + }, + { + path: '/tabmenu/settings', + component: () => import('./views/tabmenu/SettingsDemo.vue') + }] + }, { path: '/tabview', name: 'tabview', diff --git a/src/views/tabmenu/CalendarDemo.vue b/src/views/tabmenu/CalendarDemo.vue new file mode 100644 index 000000000..cdcf2856b --- /dev/null +++ b/src/views/tabmenu/CalendarDemo.vue @@ -0,0 +1,12 @@ + + + \ No newline at end of file diff --git a/src/views/tabmenu/DocumentationDemo.vue b/src/views/tabmenu/DocumentationDemo.vue new file mode 100644 index 000000000..ec1455de3 --- /dev/null +++ b/src/views/tabmenu/DocumentationDemo.vue @@ -0,0 +1,12 @@ + + + \ No newline at end of file diff --git a/src/views/tabmenu/EditDemo.vue b/src/views/tabmenu/EditDemo.vue new file mode 100644 index 000000000..4f6f35c36 --- /dev/null +++ b/src/views/tabmenu/EditDemo.vue @@ -0,0 +1,12 @@ + + + \ No newline at end of file diff --git a/src/views/tabmenu/HomeDemo.vue b/src/views/tabmenu/HomeDemo.vue new file mode 100644 index 000000000..4a39e5277 --- /dev/null +++ b/src/views/tabmenu/HomeDemo.vue @@ -0,0 +1,12 @@ + + + \ No newline at end of file diff --git a/src/views/tabmenu/SettingsDemo.vue b/src/views/tabmenu/SettingsDemo.vue new file mode 100644 index 000000000..cdb86e6f7 --- /dev/null +++ b/src/views/tabmenu/SettingsDemo.vue @@ -0,0 +1,12 @@ + + + \ No newline at end of file diff --git a/src/views/tabmenu/TabMenuDemo.vue b/src/views/tabmenu/TabMenuDemo.vue new file mode 100644 index 000000000..66c9c53a4 --- /dev/null +++ b/src/views/tabmenu/TabMenuDemo.vue @@ -0,0 +1,53 @@ + + + + + \ No newline at end of file diff --git a/src/views/tabmenu/TabMenuDoc.vue b/src/views/tabmenu/TabMenuDoc.vue new file mode 100644 index 000000000..dcda7723f --- /dev/null +++ b/src/views/tabmenu/TabMenuDoc.vue @@ -0,0 +1,131 @@ + \ No newline at end of file