@tripup-company/element-ui-extended 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +8 -2
- package/src/filters-top.js +8 -0
- package/src/filters.js +64 -0
- package/src/lang/en.js +167 -0
- package/src/lang/index.js +35 -0
- package/src/lang/vi.js +166 -0
- package/src/lang/zh.js +164 -0
- package/src/models/base-model.ts +10 -0
- package/src/models/contact-model.ts +23 -0
- package/src/models/meta-model.ts +13 -0
- package/src/services/list-query-service.ts +39 -0
- package/src/services/local-storage-service.ts +27 -0
- package/src/services/resolutions.js +21 -0
- package/src/types/article.js +6 -0
- package/src/types/article.js.map +1 -0
- package/src/types/axiosInterface.ts +54 -0
- package/src/types/collection.ts +6 -0
- package/src/types/error.ts +3 -0
- package/src/types/icontact.ts +17 -0
- package/src/types/meta.ts +7 -0
- package/src/types/pagination.ts +8 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tripup-company/element-ui-extended",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"main": "./dist/element-ui-extended.umd.js",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"serve": "vue-cli-service serve",
|
|
@@ -48,7 +48,13 @@
|
|
|
48
48
|
},
|
|
49
49
|
"files": [
|
|
50
50
|
"dist/*",
|
|
51
|
-
"src/**/*.vue"
|
|
51
|
+
"src/**/*.vue",
|
|
52
|
+
"src/services/*",
|
|
53
|
+
"src/models/*",
|
|
54
|
+
"src/lang/*",
|
|
55
|
+
"src/types/*",
|
|
56
|
+
"src/filters.js",
|
|
57
|
+
"src/filters-top.js"
|
|
52
58
|
],
|
|
53
59
|
"description": "## Project setup ``` npm install ```",
|
|
54
60
|
"repository": {
|
package/src/filters.js
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
export default [
|
|
2
|
+
{
|
|
3
|
+
name: 'title',
|
|
4
|
+
label: 'Title',
|
|
5
|
+
type: 'string',
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
name: 'first_name',
|
|
9
|
+
label: 'First Name',
|
|
10
|
+
type: 'string',
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
name: 'last_name',
|
|
14
|
+
label: 'Last Name',
|
|
15
|
+
type: 'string',
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
name: 'email',
|
|
19
|
+
label: 'Email',
|
|
20
|
+
type: 'string',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: 'phone',
|
|
24
|
+
label: 'Phone',
|
|
25
|
+
type: 'string',
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
name: 'mobile',
|
|
29
|
+
label: 'Mobile',
|
|
30
|
+
type: 'string',
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
name: 'position',
|
|
34
|
+
label: 'Position',
|
|
35
|
+
type: 'string',
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
name: 'street',
|
|
39
|
+
label: 'Street',
|
|
40
|
+
type: 'string',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: 'zip_code',
|
|
44
|
+
label: 'Zip Code',
|
|
45
|
+
type: 'string',
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: 'city',
|
|
49
|
+
label: 'City',
|
|
50
|
+
type: 'string',
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: 'state',
|
|
54
|
+
label: 'State',
|
|
55
|
+
type: 'string',
|
|
56
|
+
},
|
|
57
|
+
|
|
58
|
+
{
|
|
59
|
+
name: 'created_at',
|
|
60
|
+
label: 'Created at',
|
|
61
|
+
type: 'date',
|
|
62
|
+
operator: 'between_date',
|
|
63
|
+
},
|
|
64
|
+
];
|
package/src/lang/en.js
ADDED
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
common: {
|
|
3
|
+
back: 'Back',
|
|
4
|
+
return: 'Return',
|
|
5
|
+
},
|
|
6
|
+
route: {
|
|
7
|
+
dashboard: 'Dashboard',
|
|
8
|
+
introduction: 'Introduction',
|
|
9
|
+
documentation: 'Documentation',
|
|
10
|
+
guide: 'Guide',
|
|
11
|
+
permission: 'Permission',
|
|
12
|
+
pagePermission: 'Page Permission',
|
|
13
|
+
directivePermission: 'Directive Permission',
|
|
14
|
+
icons: 'Icons',
|
|
15
|
+
components: 'Components',
|
|
16
|
+
componentIndex: 'Introduction',
|
|
17
|
+
tinymce: 'Tinymce',
|
|
18
|
+
markdown: 'Markdown',
|
|
19
|
+
jsonEditor: 'JSON Editor',
|
|
20
|
+
dndList: 'Dnd List',
|
|
21
|
+
splitPane: 'SplitPane',
|
|
22
|
+
avatarUpload: 'Avatar Upload',
|
|
23
|
+
dropzone: 'Dropzone',
|
|
24
|
+
sticky: 'Sticky',
|
|
25
|
+
countTo: 'CountTo',
|
|
26
|
+
componentMixin: 'Mixin',
|
|
27
|
+
backToTop: 'BackToTop',
|
|
28
|
+
dragDialog: 'Drag Dialog',
|
|
29
|
+
dragSelect: 'Drag Select',
|
|
30
|
+
dragKanban: 'Drag Kanban',
|
|
31
|
+
charts: 'Charts',
|
|
32
|
+
keyboardChart: 'Keyboard Chart',
|
|
33
|
+
lineChart: 'Line Chart',
|
|
34
|
+
mixChart: 'Mix Chart',
|
|
35
|
+
example: 'Example',
|
|
36
|
+
nested: 'Nested Routes',
|
|
37
|
+
menu1: 'Menu 1',
|
|
38
|
+
'menu1-1': 'Menu 1-1',
|
|
39
|
+
'menu1-2': 'Menu 1-2',
|
|
40
|
+
'menu1-2-1': 'Menu 1-2-1',
|
|
41
|
+
'menu1-2-2': 'Menu 1-2-2',
|
|
42
|
+
'menu1-3': 'Menu 1-3',
|
|
43
|
+
menu2: 'Menu 2',
|
|
44
|
+
Table: 'Table',
|
|
45
|
+
dynamicTable: 'Dynamic Table',
|
|
46
|
+
dragTable: 'Drag Table',
|
|
47
|
+
inlineEditTable: 'Inline Edit',
|
|
48
|
+
complexTable: 'Complex Table',
|
|
49
|
+
treeTable: 'Tree Table',
|
|
50
|
+
customTreeTable: 'Custom TreeTable',
|
|
51
|
+
tab: 'Tab',
|
|
52
|
+
form: 'Form',
|
|
53
|
+
createArticle: 'Create Article',
|
|
54
|
+
editArticle: 'Edit Article',
|
|
55
|
+
articleList: 'Article List',
|
|
56
|
+
errorPages: 'Error Pages',
|
|
57
|
+
page401: '401',
|
|
58
|
+
page404: '404',
|
|
59
|
+
errorLog: 'Error Log',
|
|
60
|
+
excel: 'Excel',
|
|
61
|
+
exportExcel: 'Export Excel',
|
|
62
|
+
selectExcel: 'Export Selected',
|
|
63
|
+
uploadExcel: 'Upload Excel',
|
|
64
|
+
zip: 'Zip',
|
|
65
|
+
exportZip: 'Export Zip',
|
|
66
|
+
theme: 'Theme',
|
|
67
|
+
clipboardDemo: 'Clipboard',
|
|
68
|
+
i18n: 'I18n',
|
|
69
|
+
externalLink: 'External Link',
|
|
70
|
+
},
|
|
71
|
+
navbar: {
|
|
72
|
+
logOut: 'Log Out',
|
|
73
|
+
dashboard: 'Dashboard',
|
|
74
|
+
github: 'Github',
|
|
75
|
+
screenfull: 'Screenfull',
|
|
76
|
+
theme: 'Theme',
|
|
77
|
+
size: 'Global Size',
|
|
78
|
+
},
|
|
79
|
+
login: {
|
|
80
|
+
title: 'Laravel Vue Admin',
|
|
81
|
+
logIn: 'Log in',
|
|
82
|
+
username: 'Username',
|
|
83
|
+
email: 'Email',
|
|
84
|
+
password: 'Password',
|
|
85
|
+
any: 'any',
|
|
86
|
+
thirdparty: 'Or connect with',
|
|
87
|
+
thirdpartyTips: 'Can not be simulated on local, so please combine you own business simulation! ! !',
|
|
88
|
+
},
|
|
89
|
+
documentation: {
|
|
90
|
+
documentation: 'Documentation',
|
|
91
|
+
github: 'Github Repository',
|
|
92
|
+
laravel: 'Laravel',
|
|
93
|
+
},
|
|
94
|
+
permission: {
|
|
95
|
+
roles: 'Your roles',
|
|
96
|
+
switchRoles: 'Switch roles',
|
|
97
|
+
tips: 'In some cases it is not suitable to use v-permission, such as element Tab component or el-table-column and other asynchronous rendering dom cases which can only be achieved by manually setting the v-if.',
|
|
98
|
+
pageDescription: 'This place is accessible for admin only. Switching to non-admin role will redirect to 404 page',
|
|
99
|
+
},
|
|
100
|
+
guide: {
|
|
101
|
+
description: 'The guide page is useful for some people who entered the project for the first time. You can briefly introduce the features of the project. Demo is based on ',
|
|
102
|
+
button: 'Show Guide',
|
|
103
|
+
},
|
|
104
|
+
components: {
|
|
105
|
+
documentation: 'Documentation',
|
|
106
|
+
tinymceTips: 'Rich text editor is a core part of management system, but at the same time is a place with lots of problems. In the process of selecting rich texts, I also walked a lot of detours. The common rich text editors in the market are basically used, and the finally chose Tinymce. See documentation for more detailed rich text editor comparisons and introductions.',
|
|
107
|
+
dropzoneTips: 'Because my business has special needs, and has to upload images to qiniu, so instead of a third party, I chose encapsulate it by myself. It is very simple, you can see the detail code in @/components/Dropzone.',
|
|
108
|
+
stickyTips: 'When the page is scrolled to the preset position will be sticky on the top.',
|
|
109
|
+
backToTopTips1: 'When the page is scrolled to the specified position, the Back to Top button appears in the lower right corner',
|
|
110
|
+
backToTopTips2: 'You can customize the style of the button, show / hide, height of appearance, height of the return. If you need a text prompt, you can use element-ui el-tooltip elements externally',
|
|
111
|
+
imageUploadTips: 'Since I was using only the vue@1 version, and it is not compatible with mockjs at the moment, I modified it myself, and if you are going to use it, it is better to use official version.',
|
|
112
|
+
},
|
|
113
|
+
table: {
|
|
114
|
+
dynamicTips1: 'Fixed header, sorted by header order',
|
|
115
|
+
dynamicTips2: 'Not fixed header, sorted by click order',
|
|
116
|
+
dragTips1: 'The default order',
|
|
117
|
+
dragTips2: 'The after dragging order',
|
|
118
|
+
title: 'Title',
|
|
119
|
+
importance: 'Imp',
|
|
120
|
+
type: 'Type',
|
|
121
|
+
remark: 'Remark',
|
|
122
|
+
search: 'Search',
|
|
123
|
+
add: 'Add',
|
|
124
|
+
export: 'Export',
|
|
125
|
+
reviewer: 'reviewer',
|
|
126
|
+
id: 'ID',
|
|
127
|
+
date: 'Date',
|
|
128
|
+
author: 'Author',
|
|
129
|
+
readings: 'Readings',
|
|
130
|
+
status: 'Status',
|
|
131
|
+
actions: 'Actions',
|
|
132
|
+
edit: 'Edit',
|
|
133
|
+
publish: 'Publish',
|
|
134
|
+
draft: 'Draft',
|
|
135
|
+
delete: 'Delete',
|
|
136
|
+
cancel: 'Cancel',
|
|
137
|
+
confirm: 'Confirm',
|
|
138
|
+
},
|
|
139
|
+
errorLog: {
|
|
140
|
+
tips: 'Please click the bug icon in the upper right corner',
|
|
141
|
+
description: 'Now the management system are basically the form of the spa, it enhances the user experience, but it also increases the possibility of page problems, a small negligence may lead to the entire page deadlock. Fortunately Vue provides a way to catch handling exceptions, where you can handle errors or report exceptions.',
|
|
142
|
+
documentation: 'Document introduction',
|
|
143
|
+
},
|
|
144
|
+
excel: {
|
|
145
|
+
export: 'Export',
|
|
146
|
+
selectedExport: 'Export Selected Items',
|
|
147
|
+
placeholder: 'Please enter the file name(default excel-list)',
|
|
148
|
+
},
|
|
149
|
+
zip: {
|
|
150
|
+
export: 'Export',
|
|
151
|
+
placeholder: 'Please enter the file name(default file)',
|
|
152
|
+
},
|
|
153
|
+
pdf: {
|
|
154
|
+
tips: 'Here we use window.print() to implement the feature of downloading pdf.',
|
|
155
|
+
},
|
|
156
|
+
theme: {
|
|
157
|
+
change: 'Change Theme',
|
|
158
|
+
documentation: 'Theme documentation',
|
|
159
|
+
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.',
|
|
160
|
+
},
|
|
161
|
+
tagsView: {
|
|
162
|
+
refresh: 'Refresh',
|
|
163
|
+
close: 'Close',
|
|
164
|
+
closeOthers: 'Close Others',
|
|
165
|
+
closeAll: 'Close All',
|
|
166
|
+
},
|
|
167
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import Vue from 'vue';
|
|
2
|
+
import VueI18n from 'vue-i18n';
|
|
3
|
+
import elementEnLocale from 'element-ui/lib/locale/lang/en'; // element-ui lang
|
|
4
|
+
import elementZhLocale from 'element-ui/lib/locale/lang/zh-CN';// element-ui lang
|
|
5
|
+
import elementViLocale from 'element-ui/lib/locale/lang/vi';// element-ui lang
|
|
6
|
+
import enLocale from './en';
|
|
7
|
+
import zhLocale from './zh';
|
|
8
|
+
import viLocale from './vi';
|
|
9
|
+
|
|
10
|
+
Vue.use(VueI18n);
|
|
11
|
+
|
|
12
|
+
const messages = {
|
|
13
|
+
en: {
|
|
14
|
+
...enLocale,
|
|
15
|
+
...elementEnLocale,
|
|
16
|
+
},
|
|
17
|
+
zh: {
|
|
18
|
+
...zhLocale,
|
|
19
|
+
...elementZhLocale,
|
|
20
|
+
},
|
|
21
|
+
vi: {
|
|
22
|
+
...viLocale,
|
|
23
|
+
...elementViLocale,
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
const i18n = new VueI18n({
|
|
28
|
+
// set locale
|
|
29
|
+
// options: en | zh | vi
|
|
30
|
+
locale: 'en',
|
|
31
|
+
// set locale messages
|
|
32
|
+
messages,
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
export default i18n;
|
package/src/lang/vi.js
ADDED
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
common: {
|
|
3
|
+
back: 'Quay lại',
|
|
4
|
+
return: 'Trở về',
|
|
5
|
+
},
|
|
6
|
+
route: {
|
|
7
|
+
dashboard: 'Dashboard',
|
|
8
|
+
introduction: 'Giới thiệu',
|
|
9
|
+
documentation: 'Tài liệu',
|
|
10
|
+
guide: 'Hướng dẫn',
|
|
11
|
+
permission: 'Quyền truy cập',
|
|
12
|
+
pagePermission: 'Trang giới hạn truy cập',
|
|
13
|
+
directivePermission: 'Thuộc tính truy cập',
|
|
14
|
+
icons: 'Ký hiệu',
|
|
15
|
+
components: 'Thành phần',
|
|
16
|
+
componentIndex: 'Giới thiệu',
|
|
17
|
+
tinymce: 'Tinymce',
|
|
18
|
+
markdown: 'Markdown',
|
|
19
|
+
jsonEditor: 'Soạn thảo JSON',
|
|
20
|
+
dndList: 'Danh sách Dnd',
|
|
21
|
+
splitPane: 'SplitPane',
|
|
22
|
+
avatarUpload: 'Tải hình đại diện',
|
|
23
|
+
dropzone: 'Dropzone',
|
|
24
|
+
sticky: 'Sticky',
|
|
25
|
+
countTo: 'CountTo',
|
|
26
|
+
componentMixin: 'Mixin',
|
|
27
|
+
backToTop: 'BackToTop',
|
|
28
|
+
dragDialog: 'Drag Dialog',
|
|
29
|
+
dragSelect: 'Drag Select',
|
|
30
|
+
dragKanban: 'Drag Kanban',
|
|
31
|
+
charts: 'Biểu đồ',
|
|
32
|
+
keyboardChart: 'Biểu đồ bàn phím',
|
|
33
|
+
lineChart: 'Biểu đồ đường',
|
|
34
|
+
mixChart: 'Biểu đồ đa dạng',
|
|
35
|
+
example: 'Ví dụ',
|
|
36
|
+
nested: 'Danh mục con',
|
|
37
|
+
menu1: 'Danh mục 1',
|
|
38
|
+
'menu1-1': 'Danh mục 1-1',
|
|
39
|
+
'menu1-2': 'Danh mục 1-2',
|
|
40
|
+
'menu1-2-1': 'Danh mục 1-2-1',
|
|
41
|
+
'menu1-2-2': 'Danh mục 1-2-2',
|
|
42
|
+
'menu1-3': 'Danh mục 1-3',
|
|
43
|
+
menu2: 'Danh mục 2',
|
|
44
|
+
Table: 'Bảng',
|
|
45
|
+
dynamicTable: 'Bảng động',
|
|
46
|
+
dragTable: 'Bảng kéo thả',
|
|
47
|
+
inlineEditTable: 'Chỉnh sửa trực tiếp',
|
|
48
|
+
complexTable: 'Bảng phức tạp',
|
|
49
|
+
treeTable: 'Bảng dạng cây',
|
|
50
|
+
customTreeTable: 'Bảng dạng cây tùy biến',
|
|
51
|
+
tab: 'Tab',
|
|
52
|
+
form: 'Form',
|
|
53
|
+
createArticle: 'Viết bài',
|
|
54
|
+
editArticle: 'Chỉnh sửa',
|
|
55
|
+
articleList: 'Danh sách',
|
|
56
|
+
errorPages: 'Trang lỗi',
|
|
57
|
+
page401: '401',
|
|
58
|
+
page404: '404',
|
|
59
|
+
errorLog: 'Lỗi',
|
|
60
|
+
excel: 'Excel',
|
|
61
|
+
exportExcel: 'Export Excel',
|
|
62
|
+
selectExcel: 'Export Selected',
|
|
63
|
+
uploadExcel: 'Upload Excel',
|
|
64
|
+
zip: 'Zip',
|
|
65
|
+
exportZip: 'Export Zip',
|
|
66
|
+
theme: 'Theme',
|
|
67
|
+
clipboardDemo: 'Clipboard',
|
|
68
|
+
i18n: 'I18n',
|
|
69
|
+
externalLink: 'Liên kết ngoài',
|
|
70
|
+
},
|
|
71
|
+
navbar: {
|
|
72
|
+
logOut: 'Đăng xuất',
|
|
73
|
+
dashboard: 'Dashboard',
|
|
74
|
+
github: 'Github',
|
|
75
|
+
screenfull: 'Toàn màn hình',
|
|
76
|
+
theme: 'Theme',
|
|
77
|
+
size: 'Global Size',
|
|
78
|
+
},
|
|
79
|
+
login: {
|
|
80
|
+
title: 'Đăng nhập',
|
|
81
|
+
logIn: 'Đăng nhập',
|
|
82
|
+
username: 'Username',
|
|
83
|
+
email: 'Email',
|
|
84
|
+
password: 'Mật khẩu',
|
|
85
|
+
any: 'any',
|
|
86
|
+
thirdparty: 'Hoặc đăng nhập với',
|
|
87
|
+
thirdpartyTips: 'Không thể giả lập, xi vui lòng áp dụng tùy theo tình huống nghiệp vụ của bạn! ! !',
|
|
88
|
+
},
|
|
89
|
+
documentation: {
|
|
90
|
+
documentation: 'Tài liệu',
|
|
91
|
+
github: 'Github Repository',
|
|
92
|
+
laravel: 'Laravel',
|
|
93
|
+
},
|
|
94
|
+
permission: {
|
|
95
|
+
roles: 'Nhóm của bạn',
|
|
96
|
+
switchRoles: 'Đổi nhóm',
|
|
97
|
+
tips: 'Trong vài trường hợp sẽ không thích hợp để dùng v-permission, như là thành phần Tab hay el-table-column và các trường hợp render DOM không đồng bộ, khi đó chỉ có thể xử lý bằng tay với v-if.',
|
|
98
|
+
},
|
|
99
|
+
guide: {
|
|
100
|
+
description: 'Trang hướng dẫn sẽ có ích cho những người mới vào website lần đầu. Bạn có thể giới thiệu sơ lược các chức năng của website. Kiểm tra demo',
|
|
101
|
+
button: 'Hiện hướng dẫn',
|
|
102
|
+
},
|
|
103
|
+
components: {
|
|
104
|
+
documentation: 'Tài liệu',
|
|
105
|
+
tinymceTips: 'Rich text editor is a core part of management system, but at the same time is a place with lots of problems. In the process of selecting rich texts, I also walked a lot of detours. The common rich text editors in the market are basically used, and the finally chose Tinymce. See documentation for more detailed rich text editor comparisons and introductions.',
|
|
106
|
+
dropzoneTips: 'Because my business has special needs, and has to upload images to qiniu, so instead of a third party, I chose encapsulate it by myself. It is very simple, you can see the detail code in @/components/Dropzone.',
|
|
107
|
+
stickyTips: 'When the page is scrolled to the preset position will be sticky on the top.',
|
|
108
|
+
backToTopTips1: 'When the page is scrolled to the specified position, the Back to Top button appears in the lower right corner',
|
|
109
|
+
backToTopTips2: 'You can customize the style of the button, show / hide, height of appearance, height of the return. If you need a text prompt, you can use element-ui el-tooltip elements externally',
|
|
110
|
+
imageUploadTips: 'Since I was using only the vue@1 version, and it is not compatible with mockjs at the moment, I modified it myself, and if you are going to use it, it is better to use official version.',
|
|
111
|
+
},
|
|
112
|
+
table: {
|
|
113
|
+
dynamicTips1: 'Fixed header, sorted by header order',
|
|
114
|
+
dynamicTips2: 'Not fixed header, sorted by click order',
|
|
115
|
+
dragTips1: 'The default order',
|
|
116
|
+
dragTips2: 'The after dragging order',
|
|
117
|
+
title: 'Tiêu đề',
|
|
118
|
+
importance: 'IMP',
|
|
119
|
+
type: 'Thể loại',
|
|
120
|
+
remark: 'Remark',
|
|
121
|
+
search: 'Tìm kiếm',
|
|
122
|
+
add: 'Thêm',
|
|
123
|
+
export: 'Export',
|
|
124
|
+
reviewer: 'reviewer',
|
|
125
|
+
id: 'ID',
|
|
126
|
+
date: 'Ngày',
|
|
127
|
+
author: 'Tác giả',
|
|
128
|
+
readings: 'Số lần đọc',
|
|
129
|
+
status: 'Status',
|
|
130
|
+
actions: 'Actions',
|
|
131
|
+
edit: 'Edit',
|
|
132
|
+
publish: 'Publish',
|
|
133
|
+
draft: 'Draft',
|
|
134
|
+
delete: 'Delete',
|
|
135
|
+
cancel: 'Cancel',
|
|
136
|
+
confirm: 'Confirm',
|
|
137
|
+
},
|
|
138
|
+
errorLog: {
|
|
139
|
+
tips: 'Please click the bug icon in the upper right corner',
|
|
140
|
+
description: 'Now the management system are basically the form of the spa, it enhances the user experience, but it also increases the possibility of page problems, a small negligence may lead to the entire page deadlock. Fortunately Vue provides a way to catch handling exceptions, where you can handle errors or report exceptions.',
|
|
141
|
+
documentation: 'Document introduction',
|
|
142
|
+
},
|
|
143
|
+
excel: {
|
|
144
|
+
export: 'Export',
|
|
145
|
+
selectedExport: 'Export Selected Items',
|
|
146
|
+
placeholder: 'Please enter the file name(default excel-list)',
|
|
147
|
+
},
|
|
148
|
+
zip: {
|
|
149
|
+
export: 'Export',
|
|
150
|
+
placeholder: 'Please enter the file name(default file)',
|
|
151
|
+
},
|
|
152
|
+
pdf: {
|
|
153
|
+
tips: 'Here we use window.print() to implement the feature of downloading pdf.',
|
|
154
|
+
},
|
|
155
|
+
theme: {
|
|
156
|
+
change: 'Change Theme',
|
|
157
|
+
documentation: 'Theme documentation',
|
|
158
|
+
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.',
|
|
159
|
+
},
|
|
160
|
+
tagsView: {
|
|
161
|
+
refresh: 'Refresh',
|
|
162
|
+
close: 'Close',
|
|
163
|
+
closeOthers: 'Close Others',
|
|
164
|
+
closeAll: 'Close All',
|
|
165
|
+
},
|
|
166
|
+
};
|
package/src/lang/zh.js
ADDED
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
common: {
|
|
3
|
+
back: 'Back',
|
|
4
|
+
return: 'Return',
|
|
5
|
+
},
|
|
6
|
+
route: {
|
|
7
|
+
dashboard: '首页',
|
|
8
|
+
introduction: '简述',
|
|
9
|
+
documentation: '文档',
|
|
10
|
+
guide: '引导页',
|
|
11
|
+
permission: '权限测试页',
|
|
12
|
+
pagePermission: '页面权限',
|
|
13
|
+
directivePermission: '指令权限',
|
|
14
|
+
icons: '图标',
|
|
15
|
+
components: '组件',
|
|
16
|
+
componentIndex: '介绍',
|
|
17
|
+
tinymce: '富文本编辑器',
|
|
18
|
+
markdown: 'Markdown',
|
|
19
|
+
jsonEditor: 'JSON编辑器',
|
|
20
|
+
dndList: '列表拖拽',
|
|
21
|
+
splitPane: 'Splitpane',
|
|
22
|
+
avatarUpload: '头像上传',
|
|
23
|
+
dropzone: 'Dropzone',
|
|
24
|
+
sticky: 'Sticky',
|
|
25
|
+
countTo: 'CountTo',
|
|
26
|
+
componentMixin: '小组件',
|
|
27
|
+
backToTop: '返回顶部',
|
|
28
|
+
dragDialog: '拖拽 Dialog',
|
|
29
|
+
dragSelect: '拖拽 Select',
|
|
30
|
+
dragKanban: '可拖拽看板',
|
|
31
|
+
charts: '图表',
|
|
32
|
+
keyboardChart: '键盘图表',
|
|
33
|
+
lineChart: '折线图',
|
|
34
|
+
mixChart: '混合图表',
|
|
35
|
+
example: '综合实例',
|
|
36
|
+
nested: '路由嵌套',
|
|
37
|
+
menu1: '菜单1',
|
|
38
|
+
'menu1-1': '菜单1-1',
|
|
39
|
+
'menu1-2': '菜单1-2',
|
|
40
|
+
'menu1-2-1': '菜单1-2-1',
|
|
41
|
+
'menu1-2-2': '菜单1-2-2',
|
|
42
|
+
'menu1-3': '菜单1-3',
|
|
43
|
+
menu2: '菜单2',
|
|
44
|
+
Table: 'Table',
|
|
45
|
+
dynamicTable: '动态Table',
|
|
46
|
+
dragTable: '拖拽Table',
|
|
47
|
+
inlineEditTable: 'Table内编辑',
|
|
48
|
+
complexTable: '综合Table',
|
|
49
|
+
treeTable: '树形表格',
|
|
50
|
+
customTreeTable: '自定义树表',
|
|
51
|
+
tab: 'Tab',
|
|
52
|
+
form: '表单',
|
|
53
|
+
createArticle: '创建文章',
|
|
54
|
+
editArticle: '编辑文章',
|
|
55
|
+
articleList: '文章列表',
|
|
56
|
+
errorPages: '错误页面',
|
|
57
|
+
page401: '401',
|
|
58
|
+
page404: '404',
|
|
59
|
+
errorLog: '错误日志',
|
|
60
|
+
excel: 'Excel',
|
|
61
|
+
exportExcel: 'Export Excel',
|
|
62
|
+
selectExcel: 'Export Selected',
|
|
63
|
+
uploadExcel: 'Upload Excel',
|
|
64
|
+
zip: 'Zip',
|
|
65
|
+
exportZip: 'Export Zip',
|
|
66
|
+
theme: '换肤',
|
|
67
|
+
clipboardDemo: 'Clipboard',
|
|
68
|
+
i18n: '国际化',
|
|
69
|
+
externalLink: '外链',
|
|
70
|
+
},
|
|
71
|
+
navbar: {
|
|
72
|
+
logOut: '退出登录',
|
|
73
|
+
dashboard: '首页',
|
|
74
|
+
github: '项目地址',
|
|
75
|
+
screenfull: '全屏',
|
|
76
|
+
theme: '换肤',
|
|
77
|
+
size: '布局大小',
|
|
78
|
+
},
|
|
79
|
+
login: {
|
|
80
|
+
title: '系统登录',
|
|
81
|
+
logIn: '登录',
|
|
82
|
+
username: '账号',
|
|
83
|
+
password: '密码',
|
|
84
|
+
any: '随便填',
|
|
85
|
+
thirdparty: '第三方登录',
|
|
86
|
+
thirdpartyTips: '本地不能模拟,请结合自己业务进行模拟!!!',
|
|
87
|
+
},
|
|
88
|
+
documentation: {
|
|
89
|
+
documentation: '文档',
|
|
90
|
+
github: 'Github 地址',
|
|
91
|
+
},
|
|
92
|
+
permission: {
|
|
93
|
+
roles: '你的权限',
|
|
94
|
+
switchRoles: '切换权限',
|
|
95
|
+
tips: '在某些情况下,不适合使用 v-permission。例如:Element-UI 的 Tab 组件或 el-table-column 以及其它动态渲染 dom 的场景。你只能通过手动设置 v-if 来实现。',
|
|
96
|
+
},
|
|
97
|
+
guide: {
|
|
98
|
+
description: '引导页对于一些第一次进入项目的人很有用,你可以简单介绍下项目的功能。本 Demo 是基于',
|
|
99
|
+
button: '打开引导',
|
|
100
|
+
},
|
|
101
|
+
components: {
|
|
102
|
+
documentation: '文档',
|
|
103
|
+
tinymceTips: '富文本是管理后台一个核心的功能,但同时又是一个有很多坑的地方。在选择富文本的过程中我也走了不少的弯路,市面上常见的富文本都基本用过了,最终权衡了一下选择了Tinymce。更详细的富文本比较和介绍见',
|
|
104
|
+
dropzoneTips: '由于我司业务有特殊需求,而且要传七牛 所以没用第三方,选择了自己封装。代码非常的简单,具体代码你可以在这里看到 @/components/Dropzone',
|
|
105
|
+
stickyTips: '当页面滚动到预设的位置会吸附在顶部',
|
|
106
|
+
backToTopTips1: '页面滚动到指定位置会在右下角出现返回顶部按钮',
|
|
107
|
+
backToTopTips2: '可自定义按钮的样式、show/hide、出现的高度、返回的位置 如需文字提示,可在外部使用Element的el-tooltip元素',
|
|
108
|
+
imageUploadTips: '由于我在使用时它只有vue@1版本,而且和mockjs不兼容,所以自己改造了一下,如果大家要使用的话,优先还是使用官方版本。',
|
|
109
|
+
},
|
|
110
|
+
table: {
|
|
111
|
+
dynamicTips1: '固定表头, 按照表头顺序排序',
|
|
112
|
+
dynamicTips2: '不固定表头, 按照点击顺序排序',
|
|
113
|
+
dragTips1: '默认顺序',
|
|
114
|
+
dragTips2: '拖拽后顺序',
|
|
115
|
+
title: '标题',
|
|
116
|
+
importance: '重要性',
|
|
117
|
+
type: '类型',
|
|
118
|
+
remark: '点评',
|
|
119
|
+
search: '搜索',
|
|
120
|
+
add: '添加',
|
|
121
|
+
export: '导出',
|
|
122
|
+
reviewer: '审核人',
|
|
123
|
+
id: '序号',
|
|
124
|
+
date: '时间',
|
|
125
|
+
author: '作者',
|
|
126
|
+
readings: '阅读数',
|
|
127
|
+
status: '状态',
|
|
128
|
+
actions: '操作',
|
|
129
|
+
edit: '编辑',
|
|
130
|
+
publish: '发布',
|
|
131
|
+
draft: '草稿',
|
|
132
|
+
delete: '删除',
|
|
133
|
+
cancel: '取 消',
|
|
134
|
+
confirm: '确 定',
|
|
135
|
+
},
|
|
136
|
+
errorLog: {
|
|
137
|
+
tips: '请点击右上角bug小图标',
|
|
138
|
+
description: '现在的管理后台基本都是spa的形式了,它增强了用户体验,但同时也会增加页面出问题的可能性,可能一个小小的疏忽就导致整个页面的死锁。好在 Vue 官网提供了一个方法来捕获处理异常,你可以在其中进行错误处理或者异常上报。',
|
|
139
|
+
documentation: '文档介绍',
|
|
140
|
+
},
|
|
141
|
+
excel: {
|
|
142
|
+
export: '导出',
|
|
143
|
+
selectedExport: '导出已选择项',
|
|
144
|
+
placeholder: '请输入文件名(默认excel-list)',
|
|
145
|
+
},
|
|
146
|
+
zip: {
|
|
147
|
+
export: '导出',
|
|
148
|
+
placeholder: '请输入文件名(默认file)',
|
|
149
|
+
},
|
|
150
|
+
pdf: {
|
|
151
|
+
tips: '这里使用 window.print() 来实现下载pdf的功能',
|
|
152
|
+
},
|
|
153
|
+
theme: {
|
|
154
|
+
change: '换肤',
|
|
155
|
+
documentation: '换肤文档',
|
|
156
|
+
tips: 'Tips: 它区别于 navbar 上的 theme-pick, 是两种不同的换肤方法,各自有不同的应用场景,具体请参考文档。',
|
|
157
|
+
},
|
|
158
|
+
tagsView: {
|
|
159
|
+
refresh: '刷新',
|
|
160
|
+
close: '关闭',
|
|
161
|
+
closeOthers: '关闭其它',
|
|
162
|
+
closeAll: '关闭所有',
|
|
163
|
+
},
|
|
164
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Icontact } from "../types/icontact";
|
|
2
|
+
import { BaseModel } from "./base-model";
|
|
3
|
+
|
|
4
|
+
export class ContactModel extends BaseModel implements Icontact {
|
|
5
|
+
id?: number;
|
|
6
|
+
title?: string;
|
|
7
|
+
first_name?: string;
|
|
8
|
+
last_name?: string;
|
|
9
|
+
email: string;
|
|
10
|
+
phone?: string;
|
|
11
|
+
mobile?: string;
|
|
12
|
+
position?: string;
|
|
13
|
+
comments_guid?: string;
|
|
14
|
+
city: string;
|
|
15
|
+
state?: string;
|
|
16
|
+
zip_code: string;
|
|
17
|
+
street?: string;
|
|
18
|
+
country?: string;
|
|
19
|
+
|
|
20
|
+
constructor(data = []) {
|
|
21
|
+
super(data);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Meta } from "../types/meta";
|
|
2
|
+
import { BaseModel } from "./base-model";
|
|
3
|
+
import { Pagination } from "../types/pagination";
|
|
4
|
+
|
|
5
|
+
export default class MetaModel extends BaseModel implements Meta {
|
|
6
|
+
include: [];
|
|
7
|
+
custom: [];
|
|
8
|
+
pagination: Pagination;
|
|
9
|
+
|
|
10
|
+
constructor(data = []) {
|
|
11
|
+
super(data);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export default class ListQueryService {
|
|
2
|
+
key: string;
|
|
3
|
+
storageService: any;
|
|
4
|
+
|
|
5
|
+
constructor(key: any, storageService: any) {
|
|
6
|
+
this.key = key;
|
|
7
|
+
this.storageService = storageService;
|
|
8
|
+
}
|
|
9
|
+
updateSort(column) {
|
|
10
|
+
const sortTypes = {
|
|
11
|
+
ascending: 'asc',
|
|
12
|
+
descending: 'desc',
|
|
13
|
+
};
|
|
14
|
+
if (!sortTypes[column.order]) {
|
|
15
|
+
const query = this.getListQuery();
|
|
16
|
+
delete query['orderBy'];
|
|
17
|
+
delete query['sortedBy'];
|
|
18
|
+
this.setListQuery(query);
|
|
19
|
+
} else {
|
|
20
|
+
this.setListQuery(Object.assign(this.getListQuery(), { orderBy: column.prop, sortedBy: sortTypes[column.order] }));
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
getListQuery() {
|
|
24
|
+
let listQuery = {
|
|
25
|
+
meta: {
|
|
26
|
+
page: 1,
|
|
27
|
+
limit: 10,
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
listQuery = Object.assign(listQuery, this.storageService.get(this.key));
|
|
31
|
+
return listQuery;
|
|
32
|
+
}
|
|
33
|
+
updateListQuery(listQuery: any) {
|
|
34
|
+
this.setListQuery(Object.assign(this.getListQuery(), listQuery));
|
|
35
|
+
}
|
|
36
|
+
setListQuery(listQuery: any) {
|
|
37
|
+
this.storageService.set(this.key, listQuery);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export class LocalStorageService {
|
|
2
|
+
key: string | undefined;
|
|
3
|
+
constructor(key = '') {
|
|
4
|
+
this.key = key;
|
|
5
|
+
}
|
|
6
|
+
get(key, defaultValue = {}) {
|
|
7
|
+
if (localStorage[this.key] === undefined) {
|
|
8
|
+
return defaultValue;
|
|
9
|
+
}
|
|
10
|
+
const json = JSON.parse(localStorage[this.key]);
|
|
11
|
+
if (json[key]) {
|
|
12
|
+
return json[key];
|
|
13
|
+
}
|
|
14
|
+
return defaultValue;
|
|
15
|
+
}
|
|
16
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
17
|
+
set(key, val) {
|
|
18
|
+
let data = localStorage[this.key];
|
|
19
|
+
if (data === undefined) {
|
|
20
|
+
data = {};
|
|
21
|
+
} else {
|
|
22
|
+
data = JSON.parse(data);
|
|
23
|
+
}
|
|
24
|
+
data[key] = val;
|
|
25
|
+
localStorage[this.key] = JSON.stringify(data);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const resolutions = {
|
|
2
|
+
quarterResolution: {
|
|
3
|
+
xl: 6, lg: 6, md: 6, sm: 6, xs: 6,
|
|
4
|
+
},
|
|
5
|
+
halfResolution: {
|
|
6
|
+
xl: 12, lg: 12, md: 12, sm: 12, xs: 12,
|
|
7
|
+
},
|
|
8
|
+
fullFromSm: {
|
|
9
|
+
xl: 12, lg: 12, md: 12, sm: 24, xs: 24,
|
|
10
|
+
},
|
|
11
|
+
fullFromLg: {
|
|
12
|
+
xl: 12, lg: 24, md: 24, sm: 24, xs: 24,
|
|
13
|
+
},
|
|
14
|
+
fullResolution: {
|
|
15
|
+
xl: 24, lg: 24, md: 24, sm: 24, xs: 24,
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export default function getResolution(size) {
|
|
20
|
+
return resolutions[size];
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"article.js","sourceRoot":"","sources":["article.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,OAAO;IAApB;QACS,SAAI,GAAG,SAAS,CAAC;IAC1B,CAAC;CAAA"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AxiosError,
|
|
3
|
+
AxiosRequestConfig,
|
|
4
|
+
AxiosResponse,
|
|
5
|
+
AxiosStatic,
|
|
6
|
+
} from "axios";
|
|
7
|
+
|
|
8
|
+
export interface AxiosInstance extends AxiosStatic {
|
|
9
|
+
$request<T = any>(config: AxiosRequestConfig): Promise<T>;
|
|
10
|
+
$get<T = any>(url: string, config?: AxiosRequestConfig): Promise<T>;
|
|
11
|
+
$delete<T = any>(url: string, config?: AxiosRequestConfig): Promise<T>;
|
|
12
|
+
$head<T = any>(url: string, config?: AxiosRequestConfig): Promise<T>;
|
|
13
|
+
$options<T = any>(url: string, config?: AxiosRequestConfig): Promise<T>;
|
|
14
|
+
$post<T = any>(
|
|
15
|
+
url: string,
|
|
16
|
+
data?: any,
|
|
17
|
+
config?: AxiosRequestConfig
|
|
18
|
+
): Promise<T>;
|
|
19
|
+
$put<T = any>(
|
|
20
|
+
url: string,
|
|
21
|
+
data?: any,
|
|
22
|
+
config?: AxiosRequestConfig
|
|
23
|
+
): Promise<T>;
|
|
24
|
+
$patch<T = any>(
|
|
25
|
+
url: string,
|
|
26
|
+
data?: any,
|
|
27
|
+
config?: AxiosRequestConfig
|
|
28
|
+
): Promise<T>;
|
|
29
|
+
setBaseURL(baseURL: string): void;
|
|
30
|
+
setHeader(
|
|
31
|
+
name: string,
|
|
32
|
+
value?: string | false,
|
|
33
|
+
scopes?: string | string[]
|
|
34
|
+
): void;
|
|
35
|
+
setToken(
|
|
36
|
+
token: string | false,
|
|
37
|
+
type?: string,
|
|
38
|
+
scopes?: string | string[]
|
|
39
|
+
): void;
|
|
40
|
+
onRequest(
|
|
41
|
+
callback: (
|
|
42
|
+
config: AxiosRequestConfig
|
|
43
|
+
) => void | AxiosRequestConfig | Promise<AxiosRequestConfig>
|
|
44
|
+
): void;
|
|
45
|
+
onResponse<T = any>(
|
|
46
|
+
callback: (
|
|
47
|
+
response: AxiosResponse<T>
|
|
48
|
+
) => void | AxiosResponse<T> | Promise<AxiosResponse<T>>
|
|
49
|
+
): void;
|
|
50
|
+
onError(callback: (error: AxiosError) => any): void;
|
|
51
|
+
onRequestError(callback: (error: AxiosError) => any): void;
|
|
52
|
+
onResponseError(callback: (error: AxiosError) => any): void;
|
|
53
|
+
create(options?: AxiosRequestConfig): AxiosInstance;
|
|
54
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface Icontact {
|
|
2
|
+
id?: number;
|
|
3
|
+
title?: string;
|
|
4
|
+
first_name?: string;
|
|
5
|
+
last_name?: string;
|
|
6
|
+
email: string;
|
|
7
|
+
phone?: string;
|
|
8
|
+
mobile?: string;
|
|
9
|
+
position?: string;
|
|
10
|
+
comments_guid?: string;
|
|
11
|
+
city: string;
|
|
12
|
+
state?: string;
|
|
13
|
+
zip_code: string;
|
|
14
|
+
street?: string;
|
|
15
|
+
country?: string;
|
|
16
|
+
|
|
17
|
+
}
|