+
@@ -45,7 +45,8 @@ export default {
data() {
return {
visible: false,
- interval: null
+ interval: null,
+ isMoving: false
}
},
mounted() {
@@ -62,13 +63,16 @@ export default {
this.visible = window.pageYOffset > this.visibilityHeight
},
backToTop() {
+ if (this.isMoving) return
const start = window.pageYOffset
let i = 0
+ this.isMoving = true
this.interval = setInterval(() => {
const next = Math.floor(this.easeInOutQuad(10 * i, start, -start, 500))
if (next <= this.backPosition) {
window.scrollTo(0, this.backPosition)
clearInterval(this.interval)
+ this.isMoving = false
} else {
window.scrollTo(0, next)
}
diff --git a/src/components/Breadcrumb/index.vue b/src/components/Breadcrumb/index.vue
index a30fe0cd..f1507a9e 100644
--- a/src/components/Breadcrumb/index.vue
+++ b/src/components/Breadcrumb/index.vue
@@ -1,9 +1,9 @@
-
- {{generateTitle(item.meta.title)}}
- {{generateTitle(item.meta.title)}}
+
+ {{ generateTitle(item.meta.title) }}
+ {{ generateTitle(item.meta.title) }}
@@ -13,9 +13,6 @@
import { generateTitle } from '@/utils/i18n'
export default {
- created() {
- this.getBreadcrumb()
- },
data() {
return {
levelList: null
@@ -26,12 +23,15 @@ export default {
this.getBreadcrumb()
}
},
+ created() {
+ this.getBreadcrumb()
+ },
methods: {
generateTitle,
getBreadcrumb() {
let matched = this.$route.matched.filter(item => item.name)
const first = matched[0]
- if (first && first.name !== 'dashboard') {
+ if (first && first.name.trim().toLocaleLowerCase() !== 'Dashboard'.toLocaleLowerCase()) {
matched = [{ path: '/dashboard', meta: { title: 'dashboard' }}].concat(matched)
}
this.levelList = matched
diff --git a/src/components/Charts/keyboard.vue b/src/components/Charts/keyboard.vue
index 4b1bd499..15cc3432 100644
--- a/src/components/Charts/keyboard.vue
+++ b/src/components/Charts/keyboard.vue
@@ -1,5 +1,5 @@
-
+
diff --git a/src/components/ErrorLog/index.vue b/src/components/ErrorLog/index.vue
index ac8c2aa2..1fd883d0 100644
--- a/src/components/ErrorLog/index.vue
+++ b/src/components/ErrorLog/index.vue
@@ -2,15 +2,24 @@
-
-
+
@@ -18,21 +27,21 @@
Msg:
{{ scope.row.err.message }}
-
+
Info:
- {{scope.row.vm.$vnode.tag}} error in {{scope.row.info}}
+ {{ scope.row.vm.$vnode.tag }} error in {{ scope.row.info }}
-
+
Url:
- {{scope.row.url}}
+ {{ scope.row.url }}
- {{ scope.row.err.stack}}
+ {{ scope.row.err.stack }}
@@ -43,7 +52,7 @@
-
\ No newline at end of file
diff --git a/src/lang/en.js b/src/lang/en.js
index 8d6e711b..52fe707d 100644
--- a/src/lang/en.js
+++ b/src/lang/en.js
@@ -60,7 +60,8 @@ export default {
exportZip: 'Export Zip',
theme: 'Theme',
clipboardDemo: 'Clipboard',
- i18n: 'I18n'
+ i18n: 'I18n',
+ externalLink: 'External Link'
},
navbar: {
logOut: 'Log Out',
@@ -132,7 +133,7 @@ export default {
},
excel: {
export: 'Export',
- selectedExport: 'Export selected items',
+ selectedExport: 'Export Selected Items',
placeholder: 'Please enter the file name(default excel-list)'
},
zip: {
@@ -140,7 +141,7 @@ export default {
placeholder: 'Please enter the file name(default file)'
},
theme: {
- change: 'Theme change',
+ change: 'Change Theme',
documentation: 'Theme documentation',
tips: 'Tips: It is different from the theme-pick on the navbar is two different skinning methods, each with different application scenarios. Refer to the documentation for details.'
},
diff --git a/src/lang/zh.js b/src/lang/zh.js
index 7958b879..ee182ec4 100644
--- a/src/lang/zh.js
+++ b/src/lang/zh.js
@@ -60,7 +60,8 @@ export default {
exportZip: 'Export Zip',
theme: '换肤',
clipboardDemo: 'Clipboard',
- i18n: '国际化'
+ i18n: '国际化',
+ externalLink: '外链'
},
navbar: {
logOut: '退出登录',
diff --git a/src/router/index.js b/src/router/index.js
index 0492a28f..6c0c0f0d 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -59,7 +59,7 @@ export const constantRouterMap = [
{
path: 'dashboard',
component: () => import('@/views/dashboard/index'),
- name: 'dashboard',
+ name: 'Dashboard',
meta: { title: 'dashboard', icon: 'dashboard', noCache: true }
}
]
@@ -72,7 +72,7 @@ export const constantRouterMap = [
{
path: 'index',
component: () => import('@/views/documentation/index'),
- name: 'documentation',
+ name: 'Documentation',
meta: { title: 'documentation', icon: 'documentation', noCache: true }
}
]
@@ -85,7 +85,7 @@ export const constantRouterMap = [
{
path: 'index',
component: () => import('@/views/guide/index'),
- name: 'guide',
+ name: 'Guide',
meta: { title: 'guide', icon: 'guide', noCache: true }
}
]
@@ -113,7 +113,7 @@ export const asyncRouterMap = [
{
path: 'page',
component: () => import('@/views/permission/page'),
- name: 'pagePermission',
+ name: 'PagePermission',
meta: {
title: 'pagePermission',
roles: ['admin'] // or you can only set roles in sub nav
@@ -122,7 +122,7 @@ export const asyncRouterMap = [
{
path: 'directive',
component: () => import('@/views/permission/directive'),
- name: 'directivePermission',
+ name: 'DirectivePermission',
meta: {
title: 'directivePermission'
// if do not set roles, means: this page does not require permission
@@ -138,7 +138,7 @@ export const asyncRouterMap = [
{
path: 'index',
component: () => import('@/views/svg-icons/index'),
- name: 'icons',
+ name: 'Icons',
meta: { title: 'icons', icon: 'icon', noCache: true }
}
]
@@ -154,7 +154,7 @@ export const asyncRouterMap = [
path: '/example',
component: Layout,
redirect: '/example/list',
- name: 'example',
+ name: 'Example',
meta: {
title: 'example',
icon: 'example'
@@ -163,20 +163,20 @@ export const asyncRouterMap = [
{
path: 'create',
component: () => import('@/views/example/create'),
- name: 'createArticle',
+ name: 'CreateArticle',
meta: { title: 'createArticle', icon: 'edit' }
},
{
path: 'edit/:id(\\d+)',
component: () => import('@/views/example/edit'),
- name: 'editArticle',
+ name: 'EditArticle',
meta: { title: 'editArticle', noCache: true },
hidden: true
},
{
path: 'list',
component: () => import('@/views/example/list'),
- name: 'articleList',
+ name: 'ArticleList',
meta: { title: 'articleList', icon: 'list' }
}
]
@@ -189,7 +189,7 @@ export const asyncRouterMap = [
{
path: 'index',
component: () => import('@/views/tab/index'),
- name: 'tab',
+ name: 'Tab',
meta: { title: 'tab', icon: 'tab' }
}
]
@@ -199,7 +199,7 @@ export const asyncRouterMap = [
path: '/error',
component: Layout,
redirect: 'noredirect',
- name: 'errorPages',
+ name: 'ErrorPages',
meta: {
title: 'errorPages',
icon: '404'
@@ -208,13 +208,13 @@ export const asyncRouterMap = [
{
path: '401',
component: () => import('@/views/errorPage/401'),
- name: 'page401',
+ name: 'Page401',
meta: { title: 'page401', noCache: true }
},
{
path: '404',
component: () => import('@/views/errorPage/404'),
- name: 'page404',
+ name: 'Page404',
meta: { title: 'page404', noCache: true }
}
]
@@ -228,7 +228,7 @@ export const asyncRouterMap = [
{
path: 'log',
component: () => import('@/views/errorLog/index'),
- name: 'errorLog',
+ name: 'ErrorLog',
meta: { title: 'errorLog', icon: 'bug' }
}
]
@@ -238,7 +238,7 @@ export const asyncRouterMap = [
path: '/excel',
component: Layout,
redirect: '/excel/export-excel',
- name: 'excel',
+ name: 'Excel',
meta: {
title: 'excel',
icon: 'excel'
@@ -247,19 +247,19 @@ export const asyncRouterMap = [
{
path: 'export-excel',
component: () => import('@/views/excel/exportExcel'),
- name: 'exportExcel',
+ name: 'ExportExcel',
meta: { title: 'exportExcel' }
},
{
path: 'export-selected-excel',
component: () => import('@/views/excel/selectExcel'),
- name: 'selectExcel',
+ name: 'EelectExcel',
meta: { title: 'selectExcel' }
},
{
path: 'upload-excel',
component: () => import('@/views/excel/uploadExcel'),
- name: 'uploadExcel',
+ name: 'UploadExcel',
meta: { title: 'uploadExcel' }
}
]
@@ -275,7 +275,7 @@ export const asyncRouterMap = [
{
path: 'download',
component: () => import('@/views/zip/index'),
- name: 'exportZip',
+ name: 'ExportZip',
meta: { title: 'exportZip' }
}
]
@@ -289,7 +289,7 @@ export const asyncRouterMap = [
{
path: 'index',
component: () => import('@/views/theme/index'),
- name: 'theme',
+ name: 'Theme',
meta: { title: 'theme', icon: 'theme' }
}
]
@@ -303,7 +303,7 @@ export const asyncRouterMap = [
{
path: 'index',
component: () => import('@/views/clipboard/index'),
- name: 'clipboardDemo',
+ name: 'ClipboardDemo',
meta: { title: 'clipboardDemo', icon: 'clipboard' }
}
]
@@ -316,11 +316,22 @@ export const asyncRouterMap = [
{
path: 'index',
component: () => import('@/views/i18n-demo/index'),
- name: 'i18n',
+ name: 'I18n',
meta: { title: 'i18n', icon: 'international' }
}
]
},
+ {
+ path: 'external-link',
+ component: Layout,
+ children: [
+ {
+ path: 'https://github.com/PanJiaChen/vue-element-admin',
+ meta: { title: 'externalLink', icon: 'link' }
+ }
+ ]
+ },
+
{ path: '*', redirect: '/404', hidden: true }
]
diff --git a/src/router/modules/charts.js b/src/router/modules/charts.js
index 8bdff406..d11f6efd 100644
--- a/src/router/modules/charts.js
+++ b/src/router/modules/charts.js
@@ -6,7 +6,7 @@ const chartsRouter = {
path: '/charts',
component: Layout,
redirect: 'noredirect',
- name: 'charts',
+ name: 'Charts',
meta: {
title: 'charts',
icon: 'chart'
@@ -15,19 +15,19 @@ const chartsRouter = {
{
path: 'keyboard',
component: () => import('@/views/charts/keyboard'),
- name: 'keyboardChart',
+ name: 'KeyboardChart',
meta: { title: 'keyboardChart', noCache: true }
},
{
path: 'line',
component: () => import('@/views/charts/line'),
- name: 'lineChart',
+ name: 'LineChart',
meta: { title: 'lineChart', noCache: true }
},
{
path: 'mixchart',
component: () => import('@/views/charts/mixChart'),
- name: 'mixChart',
+ name: 'MixChart',
meta: { title: 'mixChart', noCache: true }
}
]
diff --git a/src/router/modules/components.js b/src/router/modules/components.js
index 62d4520d..56dad2b1 100644
--- a/src/router/modules/components.js
+++ b/src/router/modules/components.js
@@ -6,7 +6,7 @@ const componentsRouter = {
path: '/components',
component: Layout,
redirect: 'noredirect',
- name: 'component-demo',
+ name: 'ComponentDemo',
meta: {
title: 'components',
icon: 'component'
@@ -15,79 +15,79 @@ const componentsRouter = {
{
path: 'tinymce',
component: () => import('@/views/components-demo/tinymce'),
- name: 'tinymce-demo',
+ name: 'TinymceDemo',
meta: { title: 'tinymce' }
},
{
path: 'markdown',
component: () => import('@/views/components-demo/markdown'),
- name: 'markdown-demo',
+ name: 'MarkdownDemo',
meta: { title: 'markdown' }
},
{
path: 'json-editor',
component: () => import('@/views/components-demo/jsonEditor'),
- name: 'jsonEditor-demo',
+ name: 'JsonEditorDemo',
meta: { title: 'jsonEditor' }
},
{
path: 'splitpane',
component: () => import('@/views/components-demo/splitpane'),
- name: 'splitpane-demo',
+ name: 'SplitpaneDemo',
meta: { title: 'splitPane' }
},
{
path: 'avatar-upload',
component: () => import('@/views/components-demo/avatarUpload'),
- name: 'avatarUpload-demo',
+ name: 'AvatarUploadDemo',
meta: { title: 'avatarUpload' }
},
{
path: 'dropzone',
component: () => import('@/views/components-demo/dropzone'),
- name: 'dropzone-demo',
+ name: 'DropzoneDemo',
meta: { title: 'dropzone' }
},
{
path: 'sticky',
component: () => import('@/views/components-demo/sticky'),
- name: 'sticky-demo',
+ name: 'StickyDemo',
meta: { title: 'sticky' }
},
{
path: 'count-to',
component: () => import('@/views/components-demo/countTo'),
- name: 'countTo-demo',
+ name: 'CountToDemo',
meta: { title: 'countTo' }
},
{
path: 'mixin',
component: () => import('@/views/components-demo/mixin'),
- name: 'componentMixin-demo',
+ name: 'ComponentMixinDemo',
meta: { title: 'componentMixin' }
},
{
path: 'back-to-top',
component: () => import('@/views/components-demo/backToTop'),
- name: 'backToTop-demo',
+ name: 'BackToTopDemo',
meta: { title: 'backToTop' }
},
{
path: 'drag-dialog',
component: () => import('@/views/components-demo/dragDialog'),
- name: 'dragDialog-demo',
+ name: 'DragDialogDemo',
meta: { title: 'dragDialog' }
},
{
path: 'dnd-list',
component: () => import('@/views/components-demo/dndList'),
- name: 'dndList-demo',
+ name: 'DndListDemo',
meta: { title: 'dndList' }
},
{
path: 'drag-kanban',
component: () => import('@/views/components-demo/dragKanban'),
- name: 'dragKanban-demo',
+ name: 'DragKanbanDemo',
meta: { title: 'dragKanban' }
}
]
diff --git a/src/router/modules/nested.js b/src/router/modules/nested.js
index 0cbd9272..ad8e31f9 100644
--- a/src/router/modules/nested.js
+++ b/src/router/modules/nested.js
@@ -6,7 +6,7 @@ const nestedRouter = {
path: '/nested',
component: Layout,
redirect: '/nested/menu1/menu1-1',
- name: 'nested',
+ name: 'Nested',
meta: {
title: 'nested',
icon: 'nested'
@@ -15,33 +15,33 @@ const nestedRouter = {
{
path: 'menu1',
component: () => import('@/views/nested/menu1/index'), // Parent router-view
- name: 'menu1',
+ name: 'Menu1',
meta: { title: 'menu1' },
redirect: '/nested/menu1/menu1-1',
children: [
{
path: 'menu1-1',
component: () => import('@/views/nested/menu1/menu1-1'),
- name: 'menu1-1',
+ name: 'Menu1-1',
meta: { title: 'menu1-1' }
},
{
path: 'menu1-2',
component: () => import('@/views/nested/menu1/menu1-2'),
- name: 'menu1-2',
+ name: 'Menu1-2',
redirect: '/nested/menu1/menu1-2/menu1-2-1',
meta: { title: 'menu1-2' },
children: [
{
path: 'menu1-2-1',
component: () => import('@/views/nested/menu1/menu1-2/menu1-2-1'),
- name: 'menu1-2-1',
+ name: 'Menu1-2-1',
meta: { title: 'menu1-2-1' }
},
{
path: 'menu1-2-2',
component: () => import('@/views/nested/menu1/menu1-2/menu1-2-2'),
- name: 'menu1-2-2',
+ name: 'Menu1-2-2',
meta: { title: 'menu1-2-2' }
}
]
@@ -49,14 +49,14 @@ const nestedRouter = {
{
path: 'menu1-3',
component: () => import('@/views/nested/menu1/menu1-3'),
- name: 'menu1-3',
+ name: 'Menu1-3',
meta: { title: 'menu1-3' }
}
]
},
{
path: 'menu2',
- name: 'menu2',
+ name: 'Menu2',
component: () => import('@/views/nested/menu2/index'),
meta: { title: 'menu2' }
}
diff --git a/src/router/modules/table.js b/src/router/modules/table.js
index fde5a41f..a9c4cb44 100644
--- a/src/router/modules/table.js
+++ b/src/router/modules/table.js
@@ -6,7 +6,7 @@ const tableRouter = {
path: '/table',
component: Layout,
redirect: '/table/complex-table',
- name: 'table',
+ name: 'Table',
meta: {
title: 'Table',
icon: 'table'
@@ -15,37 +15,37 @@ const tableRouter = {
{
path: 'dynamic-table',
component: () => import('@/views/table/dynamicTable/index'),
- name: 'dynamicTable',
+ name: 'DynamicTable',
meta: { title: 'dynamicTable' }
},
{
path: 'drag-table',
component: () => import('@/views/table/dragTable'),
- name: 'dragTable',
+ name: 'DragTable',
meta: { title: 'dragTable' }
},
{
path: 'inline-edit-table',
component: () => import('@/views/table/inlineEditTable'),
- name: 'inlineEditTable',
+ name: 'InlineEditTable',
meta: { title: 'inlineEditTable' }
},
{
path: 'tree-table',
component: () => import('@/views/table/treeTable/treeTable'),
- name: 'treeTableDemo',
+ name: 'TreeTableDemo',
meta: { title: 'treeTable' }
},
{
path: 'custom-tree-table',
component: () => import('@/views/table/treeTable/customTreeTable'),
- name: 'customTreeTableDemo',
+ name: 'CustomTreeTableDemo',
meta: { title: 'customTreeTable' }
},
{
path: 'complex-table',
component: () => import('@/views/table/complexTable'),
- name: 'complexTable',
+ name: 'ComplexTable',
meta: { title: 'complexTable' }
}
]
diff --git a/src/styles/btn.scss b/src/styles/btn.scss
index f3f75c16..0c5ee768 100644
--- a/src/styles/btn.scss
+++ b/src/styles/btn.scss
@@ -46,7 +46,6 @@
border-radius: 8px;
border: none;
outline: none;
- margin-right: 25px;
transition: 600ms ease all;
position: relative;
display: inline-block;
diff --git a/src/utils/index.js b/src/utils/index.js
index 3e540802..43a374e4 100644
--- a/src/utils/index.js
+++ b/src/utils/index.js
@@ -25,7 +25,8 @@ export function parseTime(time, cFormat) {
}
const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => {
let value = formatObj[key]
- if (key === 'a') { return ['一', '二', '三', '四', '五', '六', '日'][value - 1] }
+ // Note: getDay() returns 0 on Sunday
+ if (key === 'a') { return ['日', '一', '二', '三', '四', '五', '六'][value ] }
if (result.length > 0 && value < 10) {
value = '0' + value
}
diff --git a/src/views/charts/keyboard.vue b/src/views/charts/keyboard.vue
index 30ed5762..98087ab0 100644
--- a/src/views/charts/keyboard.vue
+++ b/src/views/charts/keyboard.vue
@@ -1,6 +1,6 @@
-
-
+
+
@@ -8,7 +8,7 @@
import Chart from '@/components/Charts/keyboard'
export default {
- name: 'keyboardChart',
+ name: 'KeyboardChart',
components: { Chart }
}
diff --git a/src/views/charts/line.vue b/src/views/charts/line.vue
index c45c3813..da0b5bba 100644
--- a/src/views/charts/line.vue
+++ b/src/views/charts/line.vue
@@ -1,6 +1,6 @@
-
-
+
+
@@ -8,7 +8,7 @@
import Chart from '@/components/Charts/lineMarker'
export default {
- name: 'lineChart',
+ name: 'LineChart',
components: { Chart }
}
diff --git a/src/views/charts/mixChart.vue b/src/views/charts/mixChart.vue
index 1ca476e6..568bae7b 100644
--- a/src/views/charts/mixChart.vue
+++ b/src/views/charts/mixChart.vue
@@ -1,6 +1,6 @@
-
-
+
+
@@ -8,7 +8,7 @@
import Chart from '@/components/Charts/mixChart'
export default {
- name: 'mixChart',
+ name: 'MixChart',
components: { Chart }
}
diff --git a/src/views/clipboard/index.vue b/src/views/clipboard/index.vue
index 8a7583e3..0a4c63f2 100644
--- a/src/views/clipboard/index.vue
+++ b/src/views/clipboard/index.vue
@@ -2,12 +2,12 @@
-
- copy
+
+ copy
-
- copy
+
+ copy
@@ -18,7 +18,7 @@ import clip from '@/utils/clipboard' // use clipboard directly
import clipboard from '@/directive/clipboard/index.js' // use clipboard by v-directive
export default {
- name: 'clipboardDemo',
+ name: 'ClipboardDemo',
directives: {
clipboard
},
diff --git a/src/views/components-demo/avatarUpload.vue b/src/views/components-demo/avatarUpload.vue
index f993a4f6..144448ce 100644
--- a/src/views/components-demo/avatarUpload.vue
+++ b/src/views/components-demo/avatarUpload.vue
@@ -2,16 +2,23 @@
This is based on
vue-image-crop-upload.
- {{$t('components.imageUploadTips')}}
+ {{ $t('components.imageUploadTips') }}
-
+
-
Change avatar
+ Change Avatar
-
+
@@ -20,7 +27,7 @@ import ImageCropper from '@/components/ImageCropper'
import PanThumb from '@/components/PanThumb'
export default {
- name: 'avatarUpload-demo',
+ name: 'AvatarUploadDemo',
components: { ImageCropper, PanThumb },
data() {
return {
diff --git a/src/views/components-demo/backToTop.vue b/src/views/components-demo/backToTop.vue
index 6abb652a..83a5529b 100644
--- a/src/views/components-demo/backToTop.vue
+++ b/src/views/components-demo/backToTop.vue
@@ -1,7 +1,7 @@
-
{{$t('components.backToTopTips1')}}
-
{{$t('components.backToTopTips2')}}
+
{{ $t('components.backToTopTips1') }}
+
{{ $t('components.backToTopTips2') }}
placeholder
placeholder
@@ -116,7 +116,7 @@
-
+
@@ -125,7 +125,7 @@
import BackToTop from '@/components/BackToTop'
export default {
- name: 'backToTop-demo',
+ name: 'BackToTopDemo',
components: { BackToTop },
data() {
return {
diff --git a/src/views/components-demo/countTo.vue b/src/views/components-demo/countTo.vue
index b30204d9..7044a5d2 100644
--- a/src/views/components-demo/countTo.vue
+++ b/src/views/components-demo/countTo.vue
@@ -3,37 +3,46 @@
countTo-component
-
+
-
<count-to :start-val='{{_startVal}}' :end-val='{{_endVal}}' :duration='{{_duration}}'
- :decimals='{{_decimals}}' :separator='{{_separator}}' :prefix='{{_prefix}}' :suffix='{{_suffix}}'
- :autoplay=false>
+
<count-to :start-val='{{ _startVal }}' :end-val='{{ _endVal }}' :duration='{{ _duration }}'
+ :decimals='{{ _decimals }}' :separator='{{ _separator }}' :prefix='{{ _prefix }}' :suffix='{{ _suffix }}'
+ :autoplay=false>
@@ -41,7 +50,7 @@
import countTo from 'vue-count-to'
export default {
- name: 'countTo-demo',
+ name: 'CountToDemo',
components: { countTo },
data() {
return {
@@ -202,4 +211,3 @@ input {
}
-
diff --git a/src/views/components-demo/dndList.vue b/src/views/components-demo/dndList.vue
index b9779a31..9c8847a9 100644
--- a/src/views/components-demo/dndList.vue
+++ b/src/views/components-demo/dndList.vue
@@ -4,7 +4,7 @@
Vue.Draggable
-
+
@@ -14,7 +14,7 @@ import DndList from '@/components/DndList'
import { fetchList } from '@/api/article'
export default {
- name: 'dndList-demo',
+ name: 'DndListDemo',
components: { DndList },
data() {
return {
@@ -37,4 +37,3 @@ export default {
}
-
diff --git a/src/views/components-demo/dragDialog.vue b/src/views/components-demo/dragDialog.vue
index 454d6327..0a023f90 100644
--- a/src/views/components-demo/dragDialog.vue
+++ b/src/views/components-demo/dragDialog.vue
@@ -1,15 +1,14 @@
open a Drag Dialog
-
+
-
-
+
-
-
-
+
+
+
@@ -19,7 +18,7 @@
import elDragDialog from '@/directive/el-dragDialog' // base on element-ui
export default {
- name: 'dragDialog-demo',
+ name: 'DragDialogDemo',
directives: { elDragDialog },
data() {
return {
diff --git a/src/views/components-demo/dragKanban.vue b/src/views/components-demo/dragKanban.vue
index 2bbab2bd..4353fb1e 100644
--- a/src/views/components-demo/dragKanban.vue
+++ b/src/views/components-demo/dragKanban.vue
@@ -1,15 +1,15 @@
-
-
-
+
+
+
-
diff --git a/src/views/components-demo/jsonEditor.vue b/src/views/components-demo/jsonEditor.vue
index 75299bc0..cff3780c 100644
--- a/src/views/components-demo/jsonEditor.vue
+++ b/src/views/components-demo/jsonEditor.vue
@@ -2,7 +2,7 @@
JsonEditor is base on CodeMirrorr , lint base on json-lint
-
+
@@ -13,7 +13,7 @@ import JsonEditor from '@/components/JsonEditor'
const jsonData = '[{"items":[{"market_type":"forexdata","symbol":"XAUUSD"},{"market_type":"forexdata","symbol":"UKOIL"},{"market_type":"forexdata","symbol":"CORN"}],"name":""},{"items":[{"market_type":"forexdata","symbol":"XAUUSD"},{"market_type":"forexdata","symbol":"XAGUSD"},{"market_type":"forexdata","symbol":"AUTD"},{"market_type":"forexdata","symbol":"AGTD"}],"name":"贵金属"},{"items":[{"market_type":"forexdata","symbol":"CORN"},{"market_type":"forexdata","symbol":"WHEAT"},{"market_type":"forexdata","symbol":"SOYBEAN"},{"market_type":"forexdata","symbol":"SUGAR"}],"name":"农产品"},{"items":[{"market_type":"forexdata","symbol":"UKOIL"},{"market_type":"forexdata","symbol":"USOIL"},{"market_type":"forexdata","symbol":"NGAS"}],"name":"能源化工"}]'
export default {
- name: 'jsonEditor-demo',
+ name: 'JsonEditorDemo',
components: { JsonEditor },
data() {
return {
diff --git a/src/views/components-demo/markdown.vue b/src/views/components-demo/markdown.vue
index 4e8b0648..f60911d0 100644
--- a/src/views/components-demo/markdown.vue
+++ b/src/views/components-demo/markdown.vue
@@ -6,10 +6,10 @@
相关文章
-
+
-
To HTML
-
+
To HTML
+
@@ -27,7 +27,7 @@ const content = `
`
export default {
- name: 'markdown-demo',
+ name: 'MarkdownDemo',
components: { MarkdownEditor },
data() {
return {
@@ -46,4 +46,3 @@ export default {
}
-
diff --git a/src/views/components-demo/mixin.vue b/src/views/components-demo/mixin.vue
index 7f713f6d..99b62468 100644
--- a/src/views/components-demo/mixin.vue
+++ b/src/views/components-demo/mixin.vue
@@ -37,7 +37,7 @@
- 标题
+ 标题
@@ -74,20 +74,20 @@
hover text
-
+
-
+
Share
-
+
@@ -104,7 +104,7 @@ import DropdownMenu from '@/components/Share/dropdownMenu'
import waves from '@/directive/waves/index.js' // 水波纹指令
export default {
- name: 'componentMixin-demo',
+ name: 'ComponentMixinDemo',
components: {
PanThumb,
MdInput,
@@ -134,10 +134,7 @@ export default {
{ title: '登录权限篇', href: 'https://juejin.im/post/591aa14f570c35006961acac' },
{ title: '实战篇', href: 'https://juejin.im/post/593121aa0ce4630057f70d35' },
{ title: 'vue-admin-template 篇', href: 'https://juejin.im/post/595b4d776fb9a06bbe7dba56' },
- { title: '自行封装 component', href: 'https://segmentfault.com/a/1190000009090836' },
- { title: '优雅的使用 icon', href: 'https://juejin.im/post/59bb864b5188257e7a427c09' },
- { title: 'webpack4(上)', href: 'https://juejin.im/post/59bb864b5188257e7a427c09' },
- { title: 'webpack4(下)', href: 'https://juejin.im/post/5b5d6d6f6fb9a04fea58aabc' }
+ { title: '优雅的使用 icon', href: 'https://juejin.im/post/59bb864b5188257e7a427c09' }
]
}
}
diff --git a/src/views/components-demo/splitpane.vue b/src/views/components-demo/splitpane.vue
index 5a0bfb2b..dcd87149 100644
--- a/src/views/components-demo/splitpane.vue
+++ b/src/views/components-demo/splitpane.vue
@@ -3,19 +3,19 @@
SplitPane If you've used
codepen,
jsfiddle will not be unfamiliar.
- Github repository
+ Github repository
-
+
-
+
-
+
-
+
@@ -27,7 +27,7 @@
import splitPane from 'vue-splitpane'
export default {
- name: 'splitpane-demo',
+ name: 'SplitpaneDemo',
components: { splitPane },
methods: {
resize() {
diff --git a/src/views/components-demo/sticky.vue b/src/views/components-demo/sticky.vue
index 49772bea..65cfb091 100644
--- a/src/views/components-demo/sticky.vue
+++ b/src/views/components-demo/sticky.vue
@@ -1,14 +1,14 @@
-
+
- Platform
+ Platform
-
+
- {{item.name}}
+ {{ item.name }}
@@ -16,18 +16,17 @@
- Link
+ Link
-
-
+
+
Url
-
-
+
publish
@@ -35,7 +34,7 @@
-
Sticky header, {{$t('components.stickyTips')}}
+
Sticky header, {{ $t('components.stickyTips') }}
placeholder
placeholder
placeholder
@@ -92,12 +91,11 @@
-
diff --git a/src/views/dashboard/admin/components/LineChart.vue b/src/views/dashboard/admin/components/LineChart.vue
index 9be9c92d..6c6637a8 100644
--- a/src/views/dashboard/admin/components/LineChart.vue
+++ b/src/views/dashboard/admin/components/LineChart.vue
@@ -1,5 +1,5 @@
-
+
diff --git a/src/views/dashboard/admin/components/TransactionTable.vue b/src/views/dashboard/admin/components/TransactionTable.vue
index 7c79b77b..bcbfbb43 100644
--- a/src/views/dashboard/admin/components/TransactionTable.vue
+++ b/src/views/dashboard/admin/components/TransactionTable.vue
@@ -2,17 +2,17 @@
- {{scope.row.order_no | orderNoFilter}}
+ {{ scope.row.order_no | orderNoFilter }}
- ¥{{scope.row.price | toThousandslsFilter}}
+ ¥{{ scope.row.price | toThousandslsFilter }}
- {{scope.row.status}}
+ {{ scope.row.status }}
@@ -22,11 +22,6 @@
import { fetchList } from '@/api/transaction'
export default {
- data() {
- return {
- list: null
- }
- },
filters: {
statusFilter(status) {
const statusMap = {
@@ -39,6 +34,11 @@ export default {
return str.substring(0, 30)
}
},
+ data() {
+ return {
+ list: null
+ }
+ },
created() {
this.fetchData()
},
diff --git a/src/views/dashboard/admin/index.vue b/src/views/dashboard/admin/index.vue
index 8da28543..1a79637a 100644
--- a/src/views/dashboard/admin/index.vue
+++ b/src/views/dashboard/admin/index.vue
@@ -1,48 +1,47 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
diff --git a/src/views/errorLog/errorTestB.vue b/src/views/errorLog/errorTestB.vue
index a1303f89..b04c2511 100644
--- a/src/views/errorLog/errorTestB.vue
+++ b/src/views/errorLog/errorTestB.vue
@@ -1,5 +1,5 @@
-
+
diff --git a/src/views/errorPage/401.vue b/src/views/errorPage/401.vue
index b8bbb013..d43be52d 100644
--- a/src/views/errorPage/401.vue
+++ b/src/views/errorPage/401.vue
@@ -1,10 +1,10 @@
-
返回
+
返回
Oops!
- gif来源airbnb 页面
+ gif来源airbnb 页面
你没有权限去该页面
如有不满请联系你领导
-
-
+
+
@@ -30,7 +30,7 @@
import errGif from '@/assets/401_images/401.gif'
export default {
- name: 'page401',
+ name: 'Page401',
data() {
return {
errGif: errGif + '?' + +new Date(),
diff --git a/src/views/errorPage/404.vue b/src/views/errorPage/404.vue
index 97e57b2f..c3eafea0 100644
--- a/src/views/errorPage/404.vue
+++ b/src/views/errorPage/404.vue
@@ -10,7 +10,7 @@
OOPS!
{{ message }}
请检查您输入的网址是否正确,请点击以下按钮返回主页或者发送错误报告
@@ -23,7 +23,7 @@
diff --git a/src/views/example/edit.vue b/src/views/example/edit.vue
index 097b6140..c21af0c9 100644
--- a/src/views/example/edit.vue
+++ b/src/views/example/edit.vue
@@ -1,12 +1,12 @@
-
+
diff --git a/src/views/example/list.vue b/src/views/example/list.vue
index 7dccafa6..f44d7078 100644
--- a/src/views/example/list.vue
+++ b/src/views/example/list.vue
@@ -1,41 +1,41 @@
-
+
- {{scope.row.id}}
+ {{ scope.row.id }}
- {{scope.row.timestamp | parseTime('{y}-{m}-{d} {h}:{i}')}}
+ {{ scope.row.timestamp | parseTime('{y}-{m}-{d} {h}:{i}') }}
- {{scope.row.author}}
+ {{ scope.row.author }}
-
+
- {{scope.row.status}}
+ {{ scope.row.status }}
-
+
{{ scope.row.title }}
@@ -51,9 +51,15 @@
@@ -63,7 +69,17 @@
import { fetchList } from '@/api/article'
export default {
- name: 'articleList',
+ name: 'ArticleList',
+ filters: {
+ statusFilter(status) {
+ const statusMap = {
+ published: 'success',
+ draft: 'info',
+ deleted: 'danger'
+ }
+ return statusMap[status]
+ }
+ },
data() {
return {
list: null,
@@ -75,16 +91,6 @@ export default {
}
}
},
- filters: {
- statusFilter(status) {
- const statusMap = {
- published: 'success',
- draft: 'info',
- deleted: 'danger'
- }
- return statusMap[status]
- }
- },
created() {
this.getList()
},
diff --git a/src/views/excel/exportExcel.vue b/src/views/excel/exportExcel.vue
index 6f633a2b..ae32b3aa 100644
--- a/src/views/excel/exportExcel.vue
+++ b/src/views/excel/exportExcel.vue
@@ -3,39 +3,39 @@
-
-
+
+
True
False
-
{{$t('excel.export')}} excel
+
{{ $t('excel.export') }} Excel
-
-
+
+
- {{scope.$index}}
+ {{ scope.$index }}
- {{scope.row.title}}
+ {{ scope.row.title }}
- {{scope.row.author}}
+ {{ scope.row.author }}
- {{scope.row.pageviews}}
+ {{ scope.row.pageviews }}
-
- {{scope.row.timestamp | parseTime('{y}-{m}-{d} {h}:{i}')}}
+
+ {{ scope.row.timestamp | parseTime('{y}-{m}-{d} {h}:{i}') }}
@@ -47,7 +47,7 @@ import { fetchList } from '@/api/article'
import { parseTime } from '@/utils'
export default {
- name: 'exportExcel',
+ name: 'ExportExcel',
data() {
return {
list: null,
diff --git a/src/views/excel/selectExcel.vue b/src/views/excel/selectExcel.vue
index c0841373..7e5366f4 100644
--- a/src/views/excel/selectExcel.vue
+++ b/src/views/excel/selectExcel.vue
@@ -1,35 +1,42 @@
-
-
{{$t('excel.selectedExport')}}
-
-
-
+
+ {{ $t('excel.selectedExport') }}
+
+
+
- {{scope.$index}}
+ {{ scope.$index }}
- {{scope.row.title}}
+ {{ scope.row.title }}
- {{scope.row.author}}
+ {{ scope.row.author }}
- {{scope.row.pageviews}}
+ {{ scope.row.pageviews }}
-
- {{scope.row.display_time}}
+
+ {{ scope.row.display_time }}
@@ -40,7 +47,7 @@
import { fetchList } from '@/api/article'
export default {
- name: 'selectExcel',
+ name: 'SelectExcel',
data() {
return {
list: null,
diff --git a/src/views/excel/uploadExcel.vue b/src/views/excel/uploadExcel.vue
index 42789816..4095e910 100644
--- a/src/views/excel/uploadExcel.vue
+++ b/src/views/excel/uploadExcel.vue
@@ -1,9 +1,8 @@
-
+
-
-
+
@@ -12,7 +11,7 @@
import UploadExcelComponent from '@/components/UploadExcel/index.vue'
export default {
- name: 'uploadExcel',
+ name: 'UploadExcel',
components: { UploadExcelComponent },
data() {
return {
diff --git a/src/views/guide/index.vue b/src/views/guide/index.vue
index 99788caf..c30c52cf 100644
--- a/src/views/guide/index.vue
+++ b/src/views/guide/index.vue
@@ -1,11 +1,11 @@
- {{$t('guide.description')}}
+ {{ $t('guide.description') }}
driver.js.
-
{{$t('guide.button')}}
+
{{ $t('guide.button') }}
@@ -15,7 +15,7 @@ import 'driver.js/dist/driver.min.css' // import driver.js css
import steps from './defineSteps'
export default {
- name: 'guide',
+ name: 'Guide',
data() {
return {
driver: null
diff --git a/src/views/i18n-demo/index.vue b/src/views/i18n-demo/index.vue
index dc842a71..788558ba 100644
--- a/src/views/i18n-demo/index.vue
+++ b/src/views/i18n-demo/index.vue
@@ -3,41 +3,45 @@
- {{$t('i18nView.title')}}
+ {{ $t('i18nView.title') }}
简体中文
English
- {{$t('i18nView.note')}}
+ {{ $t('i18nView.note') }}
-
+
-
-
+
- {{$t('i18nView.default')}}
- {{$t('i18nView.primary')}}
- {{$t('i18nView.success')}}
- {{$t('i18nView.info')}}
- {{$t('i18nView.warning')}}
- {{$t('i18nView.danger')}}
+ {{ $t('i18nView.default') }}
+ {{ $t('i18nView.primary') }}
+ {{ $t('i18nView.success') }}
+ {{ $t('i18nView.info') }}
+ {{ $t('i18nView.warning') }}
+ {{ $t('i18nView.danger') }}
-
-
-
+
+
+
@@ -49,7 +53,7 @@ import local from './local'
const viewName = 'i18nView'
export default {
- name: 'i18n',
+ name: 'I18n',
data() {
return {
date: '',
@@ -76,12 +80,6 @@ export default {
}]
}
},
- created() {
- if (!this.$i18n.getLocaleMessage('en')[viewName]) {
- this.$i18n.mergeLocaleMessage('en', local.en)
- this.$i18n.mergeLocaleMessage('zh', local.zh)
- }
- },
computed: {
lang: {
get() {
@@ -92,6 +90,12 @@ export default {
this.$store.dispatch('setLanguage', lang)
}
}
+ },
+ created() {
+ if (!this.$i18n.getLocaleMessage('en')[viewName]) {
+ this.$i18n.mergeLocaleMessage('en', local.en)
+ this.$i18n.mergeLocaleMessage('zh', local.zh)
+ }
}
}
diff --git a/src/views/i18n-demo/local.js b/src/views/i18n-demo/local.js
index a4c07203..7977d2f9 100644
--- a/src/views/i18n-demo/local.js
+++ b/src/views/i18n-demo/local.js
@@ -3,7 +3,7 @@ export default {
zh: {
i18nView: {
title: '切换语言',
- note: '目前只翻译了当前页面和侧边栏和导航,未完待续,敬请期待...',
+ note: '本项目国际化基于 vue-i18n',
datePlaceholder: '请选择日期',
tableDate: '日期',
tableName: '姓名',
@@ -20,7 +20,7 @@ export default {
en: {
i18nView: {
title: 'Switch Language',
- note: 'Currently only translated the i18n page and the sidebar and levelbar, please look forword to...',
+ note: 'The internationalization of this project is based on vue-i18n',
datePlaceholder: 'Pick a day',
tableDate: 'tableDate',
tableName: 'tableName',
diff --git a/src/views/layout/Layout.vue b/src/views/layout/Layout.vue
index 5b78bf0f..bd882ef0 100644
--- a/src/views/layout/Layout.vue
+++ b/src/views/layout/Layout.vue
@@ -1,11 +1,11 @@
-
-
-
+
@@ -15,7 +15,7 @@ import { Navbar, Sidebar, AppMain, TagsView } from './components'
import ResizeMixin from './mixin/ResizeHandler'
export default {
- name: 'layout',
+ name: 'Layout',
components: {
Navbar,
Sidebar,
diff --git a/src/views/layout/components/AppMain.vue b/src/views/layout/components/AppMain.vue
index 584e3723..553bb61d 100644
--- a/src/views/layout/components/AppMain.vue
+++ b/src/views/layout/components/AppMain.vue
@@ -2,7 +2,7 @@
diff --git a/src/views/layout/components/Navbar.vue b/src/views/layout/components/Navbar.vue
index ad96453c..07244584 100644
--- a/src/views/layout/components/Navbar.vue
+++ b/src/views/layout/components/Navbar.vue
@@ -1,40 +1,40 @@
-
+
-
+