From d3d66c1050a41b058f1b3ed6bbfe23f763d49dbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tu=C4=9F=C3=A7e=20K=C3=BC=C3=A7=C3=BCko=C4=9Flu?= Date: Mon, 14 Dec 2020 16:16:39 +0300 Subject: [PATCH] Fix #779 - Tag Component --- exports/tag.d.ts | 1 + exports/tag.js | 2 + src/AppMenu.vue | 1 + src/components/tag/Tag.d.ts | 10 +++ src/components/tag/Tag.vue | 49 ++++++++++++ src/main.js | 2 + src/router.js | 7 +- src/views/tag/TagDemo.vue | 46 ++++++++++++ src/views/tag/TagDoc.vue | 145 ++++++++++++++++++++++++++++++++++++ 9 files changed, 262 insertions(+), 1 deletion(-) create mode 100644 exports/tag.d.ts create mode 100644 exports/tag.js create mode 100644 src/components/tag/Tag.d.ts create mode 100644 src/components/tag/Tag.vue create mode 100644 src/views/tag/TagDemo.vue create mode 100644 src/views/tag/TagDoc.vue diff --git a/exports/tag.d.ts b/exports/tag.d.ts new file mode 100644 index 0000000000..de094f9cc6 --- /dev/null +++ b/exports/tag.d.ts @@ -0,0 +1 @@ +export * from './components/tag/Tag'; \ No newline at end of file diff --git a/exports/tag.js b/exports/tag.js new file mode 100644 index 0000000000..7b0154d223 --- /dev/null +++ b/exports/tag.js @@ -0,0 +1,2 @@ +'use strict'; +module.exports = require('./components/tag/Tag.vue'); \ No newline at end of file diff --git a/src/AppMenu.vue b/src/AppMenu.vue index 53b534cf01..ea4ecc7bb1 100755 --- a/src/AppMenu.vue +++ b/src/AppMenu.vue @@ -254,6 +254,7 @@ ProgressBar ProgressSpinner Ripple + Tag Terminal diff --git a/src/components/tag/Tag.d.ts b/src/components/tag/Tag.d.ts new file mode 100644 index 0000000000..c322eab3b2 --- /dev/null +++ b/src/components/tag/Tag.d.ts @@ -0,0 +1,10 @@ +import Vue from 'vue'; + +declare class Tag extends Vue { + value?: any; + severity?: string; + rounded?: boolean; + icon?: string; +} + +export default Tag; \ No newline at end of file diff --git a/src/components/tag/Tag.vue b/src/components/tag/Tag.vue new file mode 100644 index 0000000000..1ede3e8c13 --- /dev/null +++ b/src/components/tag/Tag.vue @@ -0,0 +1,49 @@ + + + + + \ No newline at end of file diff --git a/src/main.js b/src/main.js index 2c4e864eea..cb2ff88290 100644 --- a/src/main.js +++ b/src/main.js @@ -62,6 +62,7 @@ import Steps from './components/steps/Steps'; import TabMenu from './components/tabmenu/TabMenu'; import TabView from './components/tabview/TabView'; import TabPanel from './components/tabpanel/TabPanel'; +import Tag from './components/tag/Tag'; import Terminal from './components/terminal/Terminal'; import Textarea from './components/textarea/Textarea'; import TieredMenu from './components/tieredmenu/TieredMenu'; @@ -156,6 +157,7 @@ Vue.component('Steps', Steps); Vue.component('TabView', TabView); Vue.component('TabPanel', TabPanel); Vue.component('TabMenu', TabMenu); +Vue.component('Tag', Tag); Vue.component('Terminal', Terminal); Vue.component('Textarea', Textarea); Vue.component('TieredMenu', TieredMenu); diff --git a/src/router.js b/src/router.js index 759fb36c75..0e7802b90b 100755 --- a/src/router.js +++ b/src/router.js @@ -559,7 +559,12 @@ export default new Router({ path: '/tabview', name: 'tabview', component: () => import('./views/tabview/TabViewDemo.vue') - }, + }, + { + path: '/tag', + name: 'tag', + component: () => import('./views/tag/TagDemo.vue') + }, { path: '/text', name: 'text', diff --git a/src/views/tag/TagDemo.vue b/src/views/tag/TagDemo.vue new file mode 100644 index 0000000000..8a46a8bb13 --- /dev/null +++ b/src/views/tag/TagDemo.vue @@ -0,0 +1,46 @@ + + + \ No newline at end of file diff --git a/src/views/tag/TagDoc.vue b/src/views/tag/TagDoc.vue new file mode 100644 index 0000000000..d5b9063920 --- /dev/null +++ b/src/views/tag/TagDoc.vue @@ -0,0 +1,145 @@ + \ No newline at end of file