From da91ea7e04b19ef9d946b66da525451a53f2d3fb Mon Sep 17 00:00:00 2001 From: liyang <1711467488@qq.com> Date: Mon, 18 Jun 2018 23:58:29 +0800 Subject: [PATCH] no message Former-commit-id: a0c0728527719f8b17f57d21b1272dac8eb84a28 [formerly a0c0728527719f8b17f57d21b1272dac8eb84a28 [formerly a0c0728527719f8b17f57d21b1272dac8eb84a28 [formerly a0c0728527719f8b17f57d21b1272dac8eb84a28 [formerly e4942e02601f72b1fa9fb12d55cefc411172684d [formerly 9cd728219dde5a1999cb4e0819f2736676de5fbd]]]]] Former-commit-id: f61b0a8c5dd7cb7f2d57cd61229dc441ab4713ba Former-commit-id: ca292c0a1308e70474b6cbc1c962d70365dcff85 Former-commit-id: 37dfdd44bdbf252ccb7e963dc4ba2f71fdb28773 [formerly 68311a8c655e257c5e691fb11331e9d989040797] Former-commit-id: 3d0f7c675b8719a4d702f5a17b66142672e36c1c Former-commit-id: 48a2a1a96d9781a312308fa02debb13ff8c6d1d1 Former-commit-id: 15a2dee9d035beb02e92ee028c373e2573621b45 Former-commit-id: c9f57159d76e30f81ae08bc4e3a6dec252c78d21 Former-commit-id: 9e1f868fb2ac6b2f87b93b006afb29b34f9d6f5f --- src/menu/index.js | 12 +- .../demo/element/form-color-picker/index.vue | 7 + .../demo/element/form-date-picker/index.vue | 7 + .../element/form-datetime-picker/index.vue | 7 + src/pages/demo/element/form-form/index.vue | 7 + src/pages/demo/element/form-rate/index.vue | 7 + src/pages/demo/element/form-slider/index.vue | 7 + src/pages/demo/element/form-switch/index.vue | 7 + .../demo/element/form-time-picker/index.vue | 7 + .../demo/element/form-transfer/index.vue | 7 + src/pages/demo/element/form-upload/index.vue | 7 + src/router/index.js | 155 ------------------ src/router/index.js.REMOVED.git-id | 1 + 13 files changed, 82 insertions(+), 156 deletions(-) create mode 100644 src/pages/demo/element/form-color-picker/index.vue create mode 100644 src/pages/demo/element/form-date-picker/index.vue create mode 100644 src/pages/demo/element/form-datetime-picker/index.vue create mode 100644 src/pages/demo/element/form-form/index.vue create mode 100644 src/pages/demo/element/form-rate/index.vue create mode 100644 src/pages/demo/element/form-slider/index.vue create mode 100644 src/pages/demo/element/form-switch/index.vue create mode 100644 src/pages/demo/element/form-time-picker/index.vue create mode 100644 src/pages/demo/element/form-transfer/index.vue create mode 100644 src/pages/demo/element/form-upload/index.vue delete mode 100755 src/router/index.js create mode 100644 src/router/index.js.REMOVED.git-id diff --git a/src/menu/index.js b/src/menu/index.js index 005e8fcb..2871e53d 100644 --- a/src/menu/index.js +++ b/src/menu/index.js @@ -150,7 +150,17 @@ const demoElement = { { path: `${pre}form-input`, title: '输入框' }, { path: `${pre}form-input-number`, title: '计数器' }, { path: `${pre}form-select`, title: '选择器' }, - { path: `${pre}form-cascader`, title: '级联选择器' } + { path: `${pre}form-cascader`, title: '级联选择器' }, + { path: `${pre}form-switch`, title: '开关' }, + { path: `${pre}form-slider`, title: '滑块' }, + { path: `${pre}form-time-picker`, title: '时间选择器' }, + { path: `${pre}form-date-picker`, title: '日期选择器' }, + { path: `${pre}form-datetime-picker`, title: '日期时间选择器' }, + { path: `${pre}form-upload`, title: '上传' }, + { path: `${pre}form-rate`, title: '评分' }, + { path: `${pre}form-color-picker`, title: '颜色选择器' }, + { path: `${pre}form-transfer`, title: '穿梭框' }, + { path: `${pre}form-form`, title: '表单' } ] } ])('/demo/element/') diff --git a/src/pages/demo/element/form-color-picker/index.vue b/src/pages/demo/element/form-color-picker/index.vue new file mode 100644 index 00000000..b81590a2 --- /dev/null +++ b/src/pages/demo/element/form-color-picker/index.vue @@ -0,0 +1,7 @@ + diff --git a/src/pages/demo/element/form-date-picker/index.vue b/src/pages/demo/element/form-date-picker/index.vue new file mode 100644 index 00000000..b81590a2 --- /dev/null +++ b/src/pages/demo/element/form-date-picker/index.vue @@ -0,0 +1,7 @@ + diff --git a/src/pages/demo/element/form-datetime-picker/index.vue b/src/pages/demo/element/form-datetime-picker/index.vue new file mode 100644 index 00000000..b81590a2 --- /dev/null +++ b/src/pages/demo/element/form-datetime-picker/index.vue @@ -0,0 +1,7 @@ + diff --git a/src/pages/demo/element/form-form/index.vue b/src/pages/demo/element/form-form/index.vue new file mode 100644 index 00000000..b81590a2 --- /dev/null +++ b/src/pages/demo/element/form-form/index.vue @@ -0,0 +1,7 @@ + diff --git a/src/pages/demo/element/form-rate/index.vue b/src/pages/demo/element/form-rate/index.vue new file mode 100644 index 00000000..b81590a2 --- /dev/null +++ b/src/pages/demo/element/form-rate/index.vue @@ -0,0 +1,7 @@ + diff --git a/src/pages/demo/element/form-slider/index.vue b/src/pages/demo/element/form-slider/index.vue new file mode 100644 index 00000000..b81590a2 --- /dev/null +++ b/src/pages/demo/element/form-slider/index.vue @@ -0,0 +1,7 @@ + diff --git a/src/pages/demo/element/form-switch/index.vue b/src/pages/demo/element/form-switch/index.vue new file mode 100644 index 00000000..b81590a2 --- /dev/null +++ b/src/pages/demo/element/form-switch/index.vue @@ -0,0 +1,7 @@ + diff --git a/src/pages/demo/element/form-time-picker/index.vue b/src/pages/demo/element/form-time-picker/index.vue new file mode 100644 index 00000000..b81590a2 --- /dev/null +++ b/src/pages/demo/element/form-time-picker/index.vue @@ -0,0 +1,7 @@ + diff --git a/src/pages/demo/element/form-transfer/index.vue b/src/pages/demo/element/form-transfer/index.vue new file mode 100644 index 00000000..b81590a2 --- /dev/null +++ b/src/pages/demo/element/form-transfer/index.vue @@ -0,0 +1,7 @@ + diff --git a/src/pages/demo/element/form-upload/index.vue b/src/pages/demo/element/form-upload/index.vue new file mode 100644 index 00000000..b81590a2 --- /dev/null +++ b/src/pages/demo/element/form-upload/index.vue @@ -0,0 +1,7 @@ + diff --git a/src/router/index.js b/src/router/index.js deleted file mode 100755 index 55519527..00000000 --- a/src/router/index.js +++ /dev/null @@ -1,155 +0,0 @@ -import Vue from 'vue' -import VueRouter from 'vue-router' -import Cookies from 'js-cookie' - -const meta = { requiresAuth: true } - -Vue.use(VueRouter) - -const routes = [ - // 首页 - { - path: '/', - redirect: { name: 'index' }, - component: () => import('@/components/core/d2-layout-main/index.vue'), - children: [ - { - path: 'index', - name: 'index', - meta, - component: () => import('@/pages/core/index/index.vue') - } - ] - }, - { - path: '/demo/business', - name: 'demo-business', - meta, - redirect: { name: 'demo-business-index' }, - component: () => import('@/components/core/d2-layout-main/index.vue'), - children: (pre => [ - { path: 'index', name: `${pre}index`, component: () => import('@/pages/demo/business/index/index.vue'), meta } - ])('demo-business-') - }, - { - path: '/demo/chart', - name: 'demo-chart', - meta, - redirect: { name: 'demo-chart-index' }, - component: () => import('@/components/core/d2-layout-main/index.vue'), - children: (pre => [ - { path: 'all', name: `${pre}all`, component: () => import('@/pages/demo/chart/all/index.vue'), meta }, - { path: 'demo/areaBase', name: `${pre}demo-areaBase`, component: () => import('@/pages/demo/chart/demo/areaBase.vue'), meta }, - { path: 'demo/barBase', name: `${pre}demo-barBase`, component: () => import('@/pages/demo/chart/demo/barBase.vue'), meta }, - { path: 'demo/columnBase', name: `${pre}demo-columnBase`, component: () => import('@/pages/demo/chart/demo/columnBase.vue'), meta }, - { path: 'demo/lineBase', name: `${pre}demo-lineBase`, component: () => import('@/pages/demo/chart/demo/lineBase.vue'), meta }, - { path: 'demo/lineStep', name: `${pre}demo-lineStep`, component: () => import('@/pages/demo/chart/demo/lineStep.vue'), meta }, - { path: 'demo/nightingaleRoseBase', name: `${pre}demo-nightingaleRoseBase`, component: () => import('@/pages/demo/chart/demo/nightingaleRoseBase.vue'), meta }, - { path: 'demo/PieBase', name: `${pre}demo-PieBase`, component: () => import('@/pages/demo/chart/demo/PieBase.vue'), meta }, - { path: 'demo/radarBase', name: `${pre}demo-radarBase`, component: () => import('@/pages/demo/chart/demo/radarBase.vue'), meta }, - { path: 'dynamicSize', name: `${pre}dynamicSize`, component: () => import('@/pages/demo/chart/dynamicSize/index.vue'), meta }, - { path: 'index', name: `${pre}index`, component: () => import('@/pages/demo/chart/index/index.vue'), meta } - ])('demo-chart-') - }, - { - path: '/demo/plugins', - name: 'demo-plugins', - meta, - redirect: { name: 'demo-plugins-index' }, - component: () => import('@/components/core/d2-layout-main/index.vue'), - children: (pre => [ - { path: 'build', name: `${pre}build`, component: () => import('@/pages/demo/plugins/build/index.vue'), meta }, - { path: 'clipboard-polyfill', name: `${pre}clipboard-polyfill`, component: () => import('@/pages/demo/plugins/clipboard-polyfill/index.vue'), meta }, - { path: 'day', name: `${pre}day`, component: () => import('@/pages/demo/plugins/day/index.vue'), meta }, - { path: 'export/table', name: `${pre}export-table`, component: () => import('@/pages/demo/plugins/export/table.vue'), meta }, - { path: 'export/txt', name: `${pre}export-txt`, component: () => import('@/pages/demo/plugins/export/txt.vue'), meta }, - { path: 'i18n/demo1', name: `${pre}i18n-demo1`, component: () => import('@/pages/demo/plugins/i18n/demo1.vue'), meta }, - { path: 'i18n/demo2', name: `${pre}i18n-demo2`, component: () => import('@/pages/demo/plugins/i18n/demo2.vue'), meta }, - { path: 'import/csv', name: `${pre}import-csv`, component: () => import('@/pages/demo/plugins/import/csv.vue'), meta }, - { path: 'import/xlsx', name: `${pre}import-xlsx`, component: () => import('@/pages/demo/plugins/import/xlsx.vue'), meta }, - { path: 'index', name: `${pre}index`, component: () => import('@/pages/demo/plugins/index/index.vue'), meta }, - { path: 'js-cookie', name: `${pre}js-cookie`, component: () => import('@/pages/demo/plugins/js-cookie/index.vue'), meta }, - { path: 'mock/ajax', name: `${pre}mock-ajax`, component: () => import('@/pages/demo/plugins/mock/ajax.vue'), meta }, - { path: 'mock/dpd', name: `${pre}mock-dpd`, component: () => import('@/pages/demo/plugins/mock/dpd.vue'), meta }, - { path: 'mock/dtd', name: `${pre}mock-dtd`, component: () => import('@/pages/demo/plugins/mock/dtd.vue'), meta } - ])('demo-plugins-') - }, - { - path: '/demo/components', - name: 'demo-components', - meta, - redirect: { name: 'demo-components-index' }, - component: () => import('@/components/core/d2-layout-main/index.vue'), - children: (pre => [ - { path: 'bigdata-table', name: `${pre}bigdata-table`, component: () => import('@/pages/demo/components/bigdata-table/index.vue'), meta }, - { path: 'container/full', name: `${pre}container-full`, component: () => import('@/pages/demo/components/container/full.vue'), meta }, - { path: 'container/ghost', name: `${pre}container-ghost`, component: () => import('@/pages/demo/components/container/ghost.vue'), meta }, - { path: 'container/card', name: `${pre}container-card`, component: () => import('@/pages/demo/components/container/card.vue'), meta }, - { path: 'countup', name: `${pre}countup`, component: () => import('@/pages/demo/components/countup/index.vue'), meta }, - { path: 'editor-quill', name: `${pre}editor-quill`, component: () => import('@/pages/demo/components/editor-quill/index.vue'), meta }, - { path: 'editor-simpleMDE', name: `${pre}editor-simpleMDE`, component: () => import('@/pages/demo/components/editor-simpleMDE/index.vue'), meta }, - { path: 'highlight', name: `${pre}highlight`, component: () => import('@/pages/demo/components/highlight/index.vue'), meta }, - { path: 'icon/icon', name: `${pre}icon-icon`, component: () => import('@/pages/demo/components/icon/icon.vue'), meta }, - { path: 'icon/list', name: `${pre}icon-list`, component: () => import('@/pages/demo/components/icon/list.vue'), meta }, - { path: 'icon/select', name: `${pre}icon-select`, component: () => import('@/pages/demo/components/icon/select.vue'), meta }, - { path: 'icon/svg', name: `${pre}icon-svg`, component: () => import('@/pages/demo/components/icon/svg.vue'), meta }, - { path: 'index', name: `${pre}index`, component: () => import('@/pages/demo/components/index/index.vue'), meta }, - { path: 'layout/grid', name: `${pre}layout-grid`, component: () => import('@/pages/demo/components/layout/grid.vue'), meta }, - { path: 'layout/splitpane', name: `${pre}layout-splitpane`, component: () => import('@/pages/demo/components/layout/splitpane.vue'), meta }, - { path: 'markdown/source', name: `${pre}markdown-source`, component: () => import('@/pages/demo/components/markdown/source.vue'), meta }, - { path: 'markdown/url', name: `${pre}markdown-url`, component: () => import('@/pages/demo/components/markdown/url.vue'), meta }, - { path: 'scrollbar', name: `${pre}scrollbar`, component: () => import('@/pages/demo/components/scrollbar/index.vue'), meta } - ])('demo-components-') - }, - { - path: '/demo/element', - name: 'demo-element', - meta, - redirect: { name: 'demo-element-index' }, - component: () => import('@/components/core/d2-layout-main/index.vue'), - children: (pre => [ - { path: 'basic-layout', name: `${pre}basic-layout`, component: () => import('@/pages/demo/element/basic-layout/index.vue'), meta }, - { path: 'basic-container', name: `${pre}basic-container`, component: () => import('@/pages/demo/element/basic-container/index.vue'), meta }, - { path: 'basic-color', name: `${pre}basic-color`, component: () => import('@/pages/demo/element/basic-color/index.vue'), meta }, - { path: 'basic-typography', name: `${pre}basic-typography`, component: () => import('@/pages/demo/element/basic-typography/index.vue'), meta }, - { path: 'basic-icon', name: `${pre}basic-icon`, component: () => import('@/pages/demo/element/basic-icon/index.vue'), meta }, - { path: 'basic-button', name: `${pre}basic-button`, component: () => import('@/pages/demo/element/basic-button/index.vue'), meta }, - { path: 'form-radio', name: `${pre}form-radio`, component: () => import('@/pages/demo/element/form-radio/index.vue'), meta }, - { path: 'form-checkbox', name: `${pre}form-checkbox`, component: () => import('@/pages/demo/element/form-checkbox/index.vue'), meta }, - { path: 'form-input', name: `${pre}form-input`, component: () => import('@/pages/demo/element/form-input/index.vue'), meta }, - { path: 'form-input-number', name: `${pre}form-input-number`, component: () => import('@/pages/demo/element/form-input-number/index.vue'), meta }, - { path: 'form-select', name: `${pre}form-select`, component: () => import('@/pages/demo/element/form-select/index.vue'), meta }, - { path: 'form-cascader', name: `${pre}form-cascader`, component: () => import('@/pages/demo/element/form-cascader/index.vue'), meta }, - { path: 'index', name: `${pre}index`, component: () => import('@/pages/demo/element/index/index.vue'), meta } - ])('demo-element-') - }, - // 登陆 - { - path: '/login', - name: 'login', - component: () => import('@/pages/core/login/index.vue') - } -] - -let router = new VueRouter({ routes }) - -router.beforeEach((to, from, next) => { - // 验证当前路由所有的匹配中是否需要有登陆验证的 - if (to.matched.some(r => r.meta.requiresAuth)) { - // 这里暂时将cookie里是否存有token作为验证是否登陆的条件 - // 请根据自身业务需要修改 - if (Cookies.get('token')) { - next() - } else { - // 没有登陆的时候跳转到登陆界面 - next({ - name: 'login' - }) - } - } else { - // 不需要身份校验 直接通过 - next() - } -}) - -export default router diff --git a/src/router/index.js.REMOVED.git-id b/src/router/index.js.REMOVED.git-id new file mode 100644 index 00000000..ea981d45 --- /dev/null +++ b/src/router/index.js.REMOVED.git-id @@ -0,0 +1 @@ +e7a207dac2e68bd2f67dba3415969d3781afb14c \ No newline at end of file