diff --git a/src/lang/en.js b/src/lang/en.js
index 358a6e61..d2c767e6 100644
--- a/src/lang/en.js
+++ b/src/lang/en.js
@@ -82,7 +82,27 @@ export default {
dynamicTips1: 'Fixed header, sorted by header order',
dynamicTips2: 'Not fixed header, sorted by click order',
dragTips1: 'The default order',
- dragTips2: 'The Drag after order'
+ dragTips2: 'The Drag after order',
+ title: 'Title',
+ importance: 'Imp',
+ type: 'Type',
+ remark: 'Remark',
+ search: 'Search',
+ add: 'Add',
+ export: 'Export',
+ reviewer: 'reviewer',
+ id: 'ID',
+ date: 'Date',
+ author: 'Author',
+ readings: 'Readings',
+ status: 'Status',
+ actions: 'Actions',
+ edit: 'Edit',
+ publish: 'Publish',
+ draft: 'Draft',
+ delete: 'Delete',
+ cancel: 'Cancel',
+ confirm: 'Confirm'
},
errorLog: {
tips: 'Please click the bug icon in the upper right corner',
diff --git a/src/lang/zh.js b/src/lang/zh.js
index 54b6141b..25f86773 100644
--- a/src/lang/zh.js
+++ b/src/lang/zh.js
@@ -82,7 +82,27 @@ export default {
dynamicTips1: '固定表头, 按照表头顺序排序',
dynamicTips2: '不固定表头, 按照点击顺序排序',
dragTips1: '默认顺序',
- dragTips2: '拖拽后顺序'
+ dragTips2: '拖拽后顺序',
+ title: '标题',
+ importance: '重要性',
+ type: '类型',
+ remark: '点评',
+ search: '搜索',
+ add: '添加',
+ export: '导出',
+ reviewer: '审核人',
+ id: '序号',
+ date: '时间',
+ author: '作者',
+ readings: '阅读数',
+ status: '状态',
+ actions: '操作',
+ edit: '编辑',
+ publish: '发布',
+ draft: '草稿',
+ delete: '删除',
+ cancel: '取 消',
+ confirm: '确 定'
},
errorLog: {
tips: '请点击右上角bug小图标',
diff --git a/src/mock/article.js b/src/mock/article.js
index bd9fbd17..2f5b4583 100644
--- a/src/mock/article.js
+++ b/src/mock/article.js
@@ -9,7 +9,7 @@ for (let i = 0; i < count; i++) {
id: '@increment',
timestamp: +Mock.Random.date('T'),
author: '@first',
- auditor: '@name',
+ reviewer: '@first',
title: '@title(5, 10)',
forecast: '@float(0, 100, 2, 2)',
importance: '@integer(1, 3)',
@@ -43,7 +43,7 @@ export default {
}
},
getPv: () => ({
- pvData: [{ key: 'PC网站', pv: 1024 }, { key: 'mobile网站', pv: 1024 }, { key: 'ios', pv: 1024 }, { key: 'android', pv: 1024 }]
+ pvData: [{ key: 'PC', pv: 1024 }, { key: 'mobile', pv: 1024 }, { key: 'ios', pv: 1024 }, { key: 'android', pv: 1024 }]
}),
getArticle: () => ({
id: 120000000001,
diff --git a/src/styles/element-ui.scss b/src/styles/element-ui.scss
index 72b03e37..08a7388a 100644
--- a/src/styles/element-ui.scss
+++ b/src/styles/element-ui.scss
@@ -27,6 +27,13 @@
}
}
+ .fixed-width{
+ .el-button--mini{
+ padding: 7px 10px;
+ width: 60px;
+ }
+ }
+
.status-col {
.cell {
padding: 0 10px;
diff --git a/src/views/example/tab/components/tabPane.vue b/src/views/example/tab/components/tabPane.vue
index ad0da617..5d11d33b 100644
--- a/src/views/example/tab/components/tabPane.vue
+++ b/src/views/example/tab/components/tabPane.vue
@@ -1,7 +1,7 @@
-
{{scope.row.id}}
diff --git a/src/views/example/table/complexTable.vue b/src/views/example/table/complexTable.vue
index 98bc6b1f..b96b8f9c 100644
--- a/src/views/example/table/complexTable.vue
+++ b/src/views/example/table/complexTable.vue
@@ -1,78 +1,78 @@
-
+
-
+
-
+
-
+
- 搜索
- 添加
- 导出
- 显示审核人
+ {{$t('table.search')}}
+ {{$t('table.add')}}
+ {{$t('table.export')}}
+ {{$t('table.reviewer')}}
-
+
{{scope.row.id}}
-
+
{{scope.row.timestamp | parseTime('{y}-{m}-{d} {h}:{i}')}}
-
+
{{scope.row.title}}
{{scope.row.type | typeFilter}}
-
+
{{scope.row.author}}
-
+
- {{scope.row.auditor}}
+ {{scope.row.reviewer}}
-
+
-
+
{{scope.row.pageviews}}
- 无
+ 0
-
+
{{scope.row.status}}
-
+
- 编辑
- 发布
+ {{$t('table.edit')}}
+ {{$t('table.publish')}}
- 草稿
+ {{$t('table.draft')}}
- 删除
+ {{$t('table.delete')}}
@@ -86,47 +86,47 @@
-
-
+
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
@@ -139,13 +139,13 @@ import waves from '@/directive/waves' // 水波纹指令
import { parseTime } from '@/utils'
const calendarTypeOptions = [
- { key: 'CN', display_name: '中国' },
- { key: 'US', display_name: '美国' },
- { key: 'JP', display_name: '日本' },
- { key: 'EU', display_name: '欧元区' }
+ { key: 'CN', display_name: 'China' },
+ { key: 'US', display_name: 'USA' },
+ { key: 'JP', display_name: 'Japan' },
+ { key: 'EU', display_name: 'Eurozone' }
]
-// arr to obj ,such as { CN : "中国", US : "美国" }
+// arr to obj ,such as { CN : "China", US : "USA" }
const calendarTypeKeyValue = calendarTypeOptions.reduce((acc, cur) => {
acc[cur.key] = cur.display_name
return acc
@@ -172,9 +172,9 @@ export default {
},
importanceOptions: [1, 2, 3],
calendarTypeOptions,
- sortOptions: [{ label: '按ID升序列', key: '+id' }, { label: '按ID降序', key: '-id' }],
+ sortOptions: [{ label: 'ID Ascending', key: '+id' }, { label: 'ID Descending', key: '-id' }],
statusOptions: ['published', 'draft', 'deleted'],
- showAuditor: false,
+ showReviewer: false,
temp: {
id: undefined,
importance: 1,
@@ -187,8 +187,8 @@ export default {
dialogFormVisible: false,
dialogStatus: '',
textMap: {
- update: '编辑',
- create: '创建'
+ update: 'Edit',
+ create: 'Create'
},
dialogPvVisible: false,
pvData: [],
@@ -267,7 +267,7 @@ export default {
this.$refs['dataForm'].validate((valid) => {
if (valid) {
this.temp.id = parseInt(Math.random() * 100) + 1024 // mock a id
- this.temp.author = '原创作者'
+ this.temp.author = 'vue-element-admin'
createArticle(this.temp).then(() => {
this.list.unshift(this.temp)
this.dialogFormVisible = false
@@ -333,10 +333,10 @@ export default {
handleDownload() {
this.downloadLoading = true
import('@/vendor/Export2Excel').then(excel => {
- const tHeader = ['时间', '地区', '类型', '标题', '重要性']
- const filterVal = ['timestamp', 'province', 'type', 'title', 'importance']
+ const tHeader = ['timestamp', 'title', 'type', 'importance', 'status']
+ const filterVal = ['timestamp', 'title', 'type', 'importance', 'status']
const data = this.formatJson(filterVal, this.list)
- excel.export_json_to_excel(tHeader, data, 'table数据')
+ excel.export_json_to_excel(tHeader, data, 'table-list')
this.downloadLoading = false
})
},
diff --git a/src/views/example/table/dragTable.vue b/src/views/example/table/dragTable.vue
index f5a086b8..5534f2f8 100644
--- a/src/views/example/table/dragTable.vue
+++ b/src/views/example/table/dragTable.vue
@@ -3,7 +3,7 @@
-
+
{{scope.row.id}}
diff --git a/src/views/example/table/inlineEditTable.vue b/src/views/example/table/inlineEditTable.vue
index 1b880855..3d2ad00f 100644
--- a/src/views/example/table/inlineEditTable.vue
+++ b/src/views/example/table/inlineEditTable.vue
@@ -3,7 +3,7 @@
-
+
{{scope.row.id}}
@@ -43,7 +43,7 @@
-
+
Ok
Edit