人员管理模块开发
Showing
5 changed files
with
75 additions
and
11 deletions
... | @@ -2,16 +2,28 @@ module.exports = { | ... | @@ -2,16 +2,28 @@ module.exports = { |
2 | presets: [ | 2 | presets: [ |
3 | // https://github.com/vuejs/vue-cli/tree/master/packages/@vue/babel-preset-app | 3 | // https://github.com/vuejs/vue-cli/tree/master/packages/@vue/babel-preset-app |
4 | // '@vue/cli-plugin-babel/preset' | 4 | // '@vue/cli-plugin-babel/preset' |
5 | [ | 5 | |
6 | "@vue/app", | 6 | { |
7 | { | 7 | "plugins": [ |
8 | "useBuiltIns": "entry", | 8 | [ |
9 | polyfills: [ | 9 | "import", |
10 | 'es6.promise', | 10 | { |
11 | 'es6.symbol' | 11 | "libraryName": "vxe-table", |
12 | "style": true // 样式是否也按需加载 | ||
13 | } | ||
14 | ], | ||
15 | [ | ||
16 | "@vue/app", | ||
17 | { | ||
18 | "useBuiltIns": "entry", | ||
19 | polyfills: [ | ||
20 | 'es6.promise', | ||
21 | 'es6.symbol' | ||
22 | ] | ||
23 | } | ||
12 | ] | 24 | ] |
13 | } | 25 | ] |
14 | ] | 26 | } |
15 | ], | 27 | ], |
16 | 'env': { | 28 | 'env': { |
17 | 'development': { | 29 | 'development': { | ... | ... |
... | @@ -21,7 +21,8 @@ | ... | @@ -21,7 +21,8 @@ |
21 | "vue": "2.6.10", | 21 | "vue": "2.6.10", |
22 | "vue-awesome": "^4.5.0", | 22 | "vue-awesome": "^4.5.0", |
23 | "vue-router": "3.0.2", | 23 | "vue-router": "3.0.2", |
24 | "vuex": "3.1.0" | 24 | "vuex": "3.1.0", |
25 | "xe-utils": "^3.5.7" | ||
25 | }, | 26 | }, |
26 | "devDependencies": { | 27 | "devDependencies": { |
27 | "@vue/cli-plugin-babel": "4.4.4", | 28 | "@vue/cli-plugin-babel": "4.4.4", |
... | @@ -42,7 +43,9 @@ | ... | @@ -42,7 +43,9 @@ |
42 | "style-resources-loader": "^1.4.1", | 43 | "style-resources-loader": "^1.4.1", |
43 | "svg-sprite-loader": "4.1.3", | 44 | "svg-sprite-loader": "4.1.3", |
44 | "svgo": "^2.3.1", | 45 | "svgo": "^2.3.1", |
45 | "vue-template-compiler": "2.6.10" | 46 | "vue-template-compiler": "2.6.10", |
47 | "vxe-table": "^3.6.9", | ||
48 | "vxe-table-plugin-element": "^1.11.2" | ||
46 | }, | 49 | }, |
47 | "browserslist": [ | 50 | "browserslist": [ |
48 | "> 1%", | 51 | "> 1%", | ... | ... |
src/directive/vxe-table.js
0 → 100644
1 | import Vue from 'vue' | ||
2 | import XEUtils from 'xe-utils' | ||
3 | import VXETablePluginElement from 'vxe-table-plugin-element' | ||
4 | import { | ||
5 | VXETable, | ||
6 | Icon, | ||
7 | Header, | ||
8 | Column, | ||
9 | Table, | ||
10 | Colgroup, | ||
11 | Input, | ||
12 | Select, | ||
13 | Edit, | ||
14 | Keyboard, | ||
15 | Toolbar, | ||
16 | Tooltip | ||
17 | } from 'vxe-table' | ||
18 | |||
19 | import zhCNLocat from 'vxe-table/lib/locale/lang/zh-CN' | ||
20 | |||
21 | import 'vxe-table-plugin-element/dist/style.css' | ||
22 | // 导入默认的国际化(如果项目中使用多语言,则应该导入到 vue-i18n 中) | ||
23 | |||
24 | VXETable.setup({ | ||
25 | i18n: (key, args) => XEUtils.toFormatString(XEUtils.get(zhCNLocat, key), args) | ||
26 | }) | ||
27 | |||
28 | Vue.use(Icon) | ||
29 | |||
30 | Vue.use(Header) | ||
31 | Vue.use(Toolbar) | ||
32 | Vue.use(Tooltip) | ||
33 | |||
34 | Vue.use(Column) | ||
35 | |||
36 | Vue.use(Colgroup) | ||
37 | |||
38 | Vue.use(Input) | ||
39 | |||
40 | Vue.use(Edit) | ||
41 | Vue.use(Select) | ||
42 | |||
43 | Vue.use(Keyboard) | ||
44 | |||
45 | Vue.use(Table) | ||
46 | Vue.use(VXETable) | ||
47 | |||
48 | VXETable.use(VXETablePluginElement) |
... | @@ -10,6 +10,7 @@ import dataV from '@jiaminghi/data-view'; | ... | @@ -10,6 +10,7 @@ import dataV from '@jiaminghi/data-view'; |
10 | import echarts from "echarts" | 10 | import echarts from "echarts" |
11 | import { startLoadingAddCount, endLoadingSubCount } from './utils/requestLoading' | 11 | import { startLoadingAddCount, endLoadingSubCount } from './utils/requestLoading' |
12 | Vue.mixin(mixin) | 12 | Vue.mixin(mixin) |
13 | import './directive/vxe-table' | ||
13 | // 按需引入vue-awesome图标 | 14 | // 按需引入vue-awesome图标 |
14 | import Icon from 'vue-awesome/components/Icon'; | 15 | import Icon from 'vue-awesome/components/Icon'; |
15 | import 'vue-awesome/icons/chart-bar.js'; | 16 | import 'vue-awesome/icons/chart-bar.js'; | ... | ... |
This diff is collapsed.
Click to expand it.
-
Please register or sign in to post a comment