diff --git a/.gitignore b/.gitignore index ea077fbb0..b4f20924c 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ node_modules/ dist/ npm-debug.log package-lock.json +/yarn-error.log .idea/ diff --git a/package.json b/package.json index 47327a2a6..df05e8ac1 100644 --- a/package.json +++ b/package.json @@ -87,6 +87,7 @@ "semver": "5.3.0", "shelljs": "0.7.6", "url-loader": "0.5.8", + "vue-component-tree": "^2.2.1", "vue-loader": "13.3.0", "vue-style-loader": "3.0.1", "vue-template-compiler": "2.5.2", diff --git a/src/components/ui/tree-view/TreeView.vue b/src/components/ui/tree-view/TreeView.vue new file mode 100644 index 000000000..79f86335c --- /dev/null +++ b/src/components/ui/tree-view/TreeView.vue @@ -0,0 +1,116 @@ + + + + + + diff --git a/src/i18n/en.json b/src/i18n/en.json index e7890a9f4..6b7463963 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -174,7 +174,8 @@ "statistics": "Statistics", "tables": "Tables", "typography": "Typography", - "uiElements": "UI Elements" + "uiElements": "UI Elements", + "treeView": "Tree view" }, "messages": { "all": "See all messages", diff --git a/src/router/index.js b/src/router/index.js index ce2052343..4353f63d7 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -1,14 +1,27 @@ import Vue from 'vue' import Router from 'vue-router' +import VueComponentTree from 'vue-component-tree' + import menuModule from 'vuex-store/modules/menu' Vue.use(Router) +const demoRoutes = [] +if (process.env.NODE_ENV === 'development') { + demoRoutes.push( + VueComponentTree(require.context('./..', true, /.demo.vue$/), '/demo') + ) +} + export default new Router({ routes: [ + ...demoRoutes, ...generateRoutesFromMenu(menuModule.state.items), - {path: '*', redirect: { name: getDefaultRoute(menuModule.state.items).name }} + { + path: '*', + redirect: { name: getDefaultRoute(menuModule.state.items).name } + } ] }) diff --git a/src/sass/_variables.scss b/src/sass/_variables.scss index d1feb0f99..d1cd8201b 100644 --- a/src/sass/_variables.scss +++ b/src/sass/_variables.scss @@ -6,6 +6,7 @@ $charcoal: #555; $darkest-gray: #333; $almost-black: #161616; $vue-green: #4ae387; +$vue-light-green: #dbf9e8; $light-green: #c8f9c5; $light-blue: #dcf1ff; $light-yellow: #fff1c8; diff --git a/src/store/modules/menu/ui.js b/src/store/modules/menu/ui.js index 99c8e7b2c..09e562fb1 100644 --- a/src/store/modules/menu/ui.js +++ b/src/store/modules/menu/ui.js @@ -79,6 +79,14 @@ export default { meta: { title: 'menu.modals' } + }, + { + name: 'TreeView', + path: '/ui/tree-view', + component: lazyLoading('ui/tree-view/TreeView'), + meta: { + title: 'menu.treeView' + } } ] } diff --git a/src/vuestic-theme/vuestic-components/vuestic-checkbox/VuesticCheckbox.vue b/src/vuestic-theme/vuestic-components/vuestic-checkbox/VuesticCheckbox.vue index 95d1b8fdc..32ebdf2db 100755 --- a/src/vuestic-theme/vuestic-components/vuestic-checkbox/VuesticCheckbox.vue +++ b/src/vuestic-theme/vuestic-components/vuestic-checkbox/VuesticCheckbox.vue @@ -1,6 +1,8 @@