From 6cdbd0d082c81bcc152e1123243c7cf928c35257 Mon Sep 17 00:00:00 2001 From: cagataycivici Date: Sun, 16 Dec 2018 23:33:51 +0300 Subject: [PATCH] Implemented TriStateCheckbox Component --- src/AppMenu.vue | 1 + .../tristatecheckbox/TriStateCheckbox.vue | 88 +++++++++++++++++++ src/main.js | 2 + src/router.js | 5 ++ .../tristatecheckbox/TriStateCheckboxDemo.vue | 29 ++++++ 5 files changed, 125 insertions(+) create mode 100644 src/components/tristatecheckbox/TriStateCheckbox.vue create mode 100644 src/views/tristatecheckbox/TriStateCheckboxDemo.vue diff --git a/src/AppMenu.vue b/src/AppMenu.vue index 04569ce9c..c110cac76 100644 --- a/src/AppMenu.vue +++ b/src/AppMenu.vue @@ -15,6 +15,7 @@ ● SelectButton ● Textarea ● ToggleButton + ● TriCheckbox diff --git a/src/components/tristatecheckbox/TriStateCheckbox.vue b/src/components/tristatecheckbox/TriStateCheckbox.vue new file mode 100644 index 000000000..011edc28f --- /dev/null +++ b/src/components/tristatecheckbox/TriStateCheckbox.vue @@ -0,0 +1,88 @@ + + + \ No newline at end of file diff --git a/src/main.js b/src/main.js index 2bcca6855..9766deeb6 100644 --- a/src/main.js +++ b/src/main.js @@ -17,6 +17,7 @@ import Toolbar from './components/toolbar/Toolbar'; import TabView from './components/tabview/TabView'; import TabPanel from './components/tabview/TabPanel'; import ToggleButton from './components/togglebutton/ToggleButton'; +import TriStateCheckbox from './components/tristatecheckbox/TriStateCheckbox'; import './assets/styles/primevue.css'; import 'primeflex/primeflex.css'; @@ -40,6 +41,7 @@ Vue.component('p-tabPanel', TabPanel); Vue.component('p-textarea', Textarea); Vue.component('p-toolbar', Toolbar); Vue.component('p-toggleButton', ToggleButton); +Vue.component('p-triStateCheckbox', TriStateCheckbox); new Vue({ router, diff --git a/src/router.js b/src/router.js index e8a1cba67..c1a65ef43 100644 --- a/src/router.js +++ b/src/router.js @@ -85,6 +85,11 @@ export default new Router({ path: '/toolbar', name: 'toolbar', component: () => import('./views/toolbar/ToolbarDemo.vue') + }, + { + path: '/tristatecheckbox', + name: 'tristatecheckbox', + component: () => import('./views/tristatecheckbox/TriStateCheckboxDemo.vue') } ] }); diff --git a/src/views/tristatecheckbox/TriStateCheckboxDemo.vue b/src/views/tristatecheckbox/TriStateCheckboxDemo.vue new file mode 100644 index 000000000..f3ccd1d5f --- /dev/null +++ b/src/views/tristatecheckbox/TriStateCheckboxDemo.vue @@ -0,0 +1,29 @@ + + + + +