eoss-ui 0.6.34 → 0.6.36
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/lib/button-group.js +36 -19
- package/lib/button.js +36 -19
- package/lib/checkbox-group.js +36 -19
- package/lib/data-table-form.js +36 -19
- package/lib/data-table.js +36 -19
- package/lib/date-picker.js +36 -19
- package/lib/dialog.js +36 -19
- package/lib/eoss-ui.common.js +82 -42
- package/lib/flow-group.js +36 -19
- package/lib/flow-list.js +36 -19
- package/lib/flow.js +36 -19
- package/lib/form.js +36 -19
- package/lib/handle-user.js +36 -19
- package/lib/handler.js +36 -19
- package/lib/icon.js +36 -19
- package/lib/icons.js +1 -1
- package/lib/index.js +1 -1
- package/lib/input-number.js +36 -19
- package/lib/input.js +36 -19
- package/lib/login.js +39 -22
- package/lib/main.js +61 -31
- package/lib/nav.js +36 -19
- package/lib/page.js +36 -19
- package/lib/pagination.js +36 -19
- package/lib/player.js +36 -19
- package/lib/qr-code.js +36 -19
- package/lib/radio-group.js +36 -19
- package/lib/retrial-auth.js +36 -19
- package/lib/select-ganged.js +36 -19
- package/lib/select.js +47 -20
- package/lib/selector-panel.js +36 -19
- package/lib/selector.js +36 -19
- package/lib/sizer.js +36 -19
- package/lib/steps.js +36 -19
- package/lib/switch.js +36 -19
- package/lib/table-form.js +36 -19
- package/lib/tabs.js +36 -19
- package/lib/theme-chalk/base.css +1 -1
- package/lib/theme-chalk/fonts/iconfont.ttf +0 -0
- package/lib/theme-chalk/fonts/iconfont.woff +0 -0
- package/lib/theme-chalk/icon.css +1 -1
- package/lib/theme-chalk/index.css +1 -1
- package/lib/theme-chalk/main.css +1 -1
- package/lib/theme-chalk/menu.css +1 -1
- package/lib/theme-chalk/simplicity.css +1 -1
- package/lib/theme-chalk/sizer.css +1 -1
- package/lib/theme-chalk/upload.css +1 -1
- package/lib/tips.js +36 -19
- package/lib/tree-group.js +36 -19
- package/lib/tree.js +36 -19
- package/lib/upload.js +36 -19
- package/lib/utils/util.js +36 -19
- package/lib/wujie.js +36 -19
- package/lib/wxlogin.js +36 -19
- package/package.json +2 -2
- package/packages/icons/src/icon.json +1 -1
- package/packages/login/src/main.vue +1 -1
- package/packages/main/src/simplicity/index.vue +19 -8
- package/packages/select/src/main.vue +16 -1
- package/packages/theme-chalk/lib/base.css +1 -1
- package/packages/theme-chalk/lib/fonts/iconfont.ttf +0 -0
- package/packages/theme-chalk/lib/fonts/iconfont.woff +0 -0
- package/packages/theme-chalk/lib/icon.css +1 -1
- package/packages/theme-chalk/lib/index.css +1 -1
- package/packages/theme-chalk/lib/main.css +1 -1
- package/packages/theme-chalk/lib/menu.css +1 -1
- package/packages/theme-chalk/lib/simplicity.css +1 -1
- package/packages/theme-chalk/lib/sizer.css +1 -1
- package/packages/theme-chalk/lib/upload.css +1 -1
- package/packages/theme-chalk/src/common/var.scss +2 -2
- package/packages/theme-chalk/src/fonts/iconfont.ttf +0 -0
- package/packages/theme-chalk/src/fonts/iconfont.woff +0 -0
- package/packages/theme-chalk/src/handler.scss +1 -1
- package/packages/theme-chalk/src/icon.scss +7 -0
- package/packages/theme-chalk/src/login.scss +1 -1
- package/packages/theme-chalk/src/retrial-auth.scss +1 -1
- package/src/index.js +157 -157
- package/src/utils/util.js +34 -22
- package/packages/.DS_Store +0 -0
- package/packages/checkbox-group/.DS_Store +0 -0
- package/packages/data-table/.DS_Store +0 -0
- package/packages/dialog/.DS_Store +0 -0
- package/packages/handler/.DS_Store +0 -0
- package/packages/login/.DS_Store +0 -0
- package/packages/main/.DS_Store +0 -0
- package/packages/main/src/.DS_Store +0 -0
- package/packages/theme-chalk/src/.DS_Store +0 -0
- package/src/.DS_Store +0 -0
|
@@ -219,7 +219,7 @@ $--color-primary-light-2: getColor($--color-primary, 2) !default; /* 66b1ff */
|
|
|
219
219
|
$--color-primary-light-3: getColor($--color-primary, 3) !default; /* 79bbff */
|
|
220
220
|
$--color-primary-light-4: getColor($--color-primary, 4) !default; /* 8cc5ff */
|
|
221
221
|
$--color-primary-light-5: getColor($--color-primary, 5) !default; /* a0cfff */
|
|
222
|
-
$--color-primary
|
|
222
|
+
$--color-primary: $--color-primary !default; /* a0cfff */
|
|
223
223
|
$--color-primary-light-7: getColor($--color-primary, 7) !default; /* b3d8ff */
|
|
224
224
|
$--color-primary-light-8: getColor($--color-primary, 8) !default; /* c6e2ff */
|
|
225
225
|
$--color-primary-light-9: getColor($--color-primary, 9) !default; /* d9ecff */
|
|
@@ -885,7 +885,7 @@ $--primary-button-colors: (
|
|
|
885
885
|
$--color-primary-light-3,
|
|
886
886
|
$--color-primary-light-4,
|
|
887
887
|
$--color-primary-light-5,
|
|
888
|
-
$--color-primary
|
|
888
|
+
$--color-primary,
|
|
889
889
|
$--color-primary-light-7,
|
|
890
890
|
$--color-primary-light-8,
|
|
891
891
|
$--color-primary-light-9,
|
|
Binary file
|
|
Binary file
|
|
@@ -15,6 +15,13 @@
|
|
|
15
15
|
-webkit-font-smoothing: antialiased;
|
|
16
16
|
-moz-osx-font-smoothing: grayscale;
|
|
17
17
|
}
|
|
18
|
+
.es-icon-tingzhi:before {
|
|
19
|
+
content: '\e800';
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.es-icon-zhengfangti:before {
|
|
23
|
+
content: '\e609';
|
|
24
|
+
}
|
|
18
25
|
|
|
19
26
|
.es-icon-zhanghaodenglu:before {
|
|
20
27
|
content: '\e781';
|
package/src/index.js
CHANGED
|
@@ -1,112 +1,112 @@
|
|
|
1
1
|
/* Automatically generated by './build/bin/build-entry.js' */
|
|
2
2
|
|
|
3
|
-
import Button from '../packages/button/index.js';
|
|
4
|
-
import ButtonGroup from '../packages/button-group/index.js';
|
|
5
|
-
import Calendar from '../packages/calendar/index.js';
|
|
6
|
-
import Card from '../packages/card/index.js';
|
|
7
|
-
import Cascader from '../packages/cascader/index.js';
|
|
8
|
-
import CheckboxGroup from '../packages/checkbox-group/index.js';
|
|
9
|
-
import Clients from '../packages/clients/index.js';
|
|
10
|
-
import DataTable from '../packages/data-table/index.js';
|
|
11
|
-
import DataTableForm from '../packages/data-table-form/index.js';
|
|
12
|
-
import DatePicker from '../packages/date-picker/index.js';
|
|
13
|
-
import Dialog from '../packages/dialog/index.js';
|
|
14
|
-
import Enterprise from '../packages/enterprise/index.js';
|
|
15
|
-
import ErrorPage from '../packages/error-page/index.js';
|
|
16
|
-
import Form from '../packages/form/index.js';
|
|
17
|
-
import Flow from '../packages/flow/index.js';
|
|
18
|
-
import FlowGroup from '../packages/flow-group/index.js';
|
|
19
|
-
import FlowList from '../packages/flow-list/index.js';
|
|
20
|
-
import HandleUser from '../packages/handle-user/index.js';
|
|
21
|
-
import Handler from '../packages/handler/index.js';
|
|
22
|
-
import Icon from '../packages/icon/index.js';
|
|
23
|
-
import Icons from '../packages/icons/index.js';
|
|
24
|
-
import Input from '../packages/input/index.js';
|
|
25
|
-
import InputNumber from '../packages/input-number/index.js';
|
|
26
|
-
import Label from '../packages/label/index.js';
|
|
27
|
-
import Layout from '../packages/layout/index.js';
|
|
28
|
-
import Login from '../packages/login/index.js';
|
|
29
|
-
import Main from '../packages/main/index.js';
|
|
30
|
-
import Menu from '../packages/menu/index.js';
|
|
31
|
-
import Nav from '../packages/nav/index.js';
|
|
32
|
-
import Notify from '../packages/notify/index.js';
|
|
33
|
-
import Pagination from '../packages/pagination/index.js';
|
|
34
|
-
import Page from '../packages/page/index.js';
|
|
35
|
-
import Player from '../packages/player/index.js';
|
|
36
|
-
import QrCode from '../packages/qr-code/index.js';
|
|
37
|
-
import RadioGroup from '../packages/radio-group/index.js';
|
|
38
|
-
import RetrialAuth from '../packages/retrial-auth/index.js';
|
|
39
|
-
import Select from '../packages/select/index.js';
|
|
40
|
-
import SelectGanged from '../packages/select-ganged/index.js';
|
|
41
|
-
import Selector from '../packages/selector/index.js';
|
|
42
|
-
import SelectorPanel from '../packages/selector-panel/index.js';
|
|
43
|
-
import Sizer from '../packages/sizer/index.js';
|
|
44
|
-
import Steps from '../packages/steps/index.js';
|
|
45
|
-
import Switch from '../packages/switch/index.js';
|
|
46
|
-
import Tabs from '../packages/tabs/index.js';
|
|
47
|
-
import TabsPanel from '../packages/tabs-panel/index.js';
|
|
48
|
-
import Tips from '../packages/tips/index.js';
|
|
49
|
-
import Tree from '../packages/tree/index.js';
|
|
50
|
-
import TreeGroup from '../packages/tree-group/index.js';
|
|
51
|
-
import Toolbar from '../packages/toolbar/index.js';
|
|
52
|
-
import TableForm from '../packages/table-form/index.js';
|
|
53
|
-
import Upload from '../packages/upload/index.js';
|
|
54
|
-
import Wujie from '../packages/wujie/index.js';
|
|
3
|
+
import Button from '../packages/button/index.js';
|
|
4
|
+
import ButtonGroup from '../packages/button-group/index.js';
|
|
5
|
+
import Calendar from '../packages/calendar/index.js';
|
|
6
|
+
import Card from '../packages/card/index.js';
|
|
7
|
+
import Cascader from '../packages/cascader/index.js';
|
|
8
|
+
import CheckboxGroup from '../packages/checkbox-group/index.js';
|
|
9
|
+
import Clients from '../packages/clients/index.js';
|
|
10
|
+
import DataTable from '../packages/data-table/index.js';
|
|
11
|
+
import DataTableForm from '../packages/data-table-form/index.js';
|
|
12
|
+
import DatePicker from '../packages/date-picker/index.js';
|
|
13
|
+
import Dialog from '../packages/dialog/index.js';
|
|
14
|
+
import Enterprise from '../packages/enterprise/index.js';
|
|
15
|
+
import ErrorPage from '../packages/error-page/index.js';
|
|
16
|
+
import Form from '../packages/form/index.js';
|
|
17
|
+
import Flow from '../packages/flow/index.js';
|
|
18
|
+
import FlowGroup from '../packages/flow-group/index.js';
|
|
19
|
+
import FlowList from '../packages/flow-list/index.js';
|
|
20
|
+
import HandleUser from '../packages/handle-user/index.js';
|
|
21
|
+
import Handler from '../packages/handler/index.js';
|
|
22
|
+
import Icon from '../packages/icon/index.js';
|
|
23
|
+
import Icons from '../packages/icons/index.js';
|
|
24
|
+
import Input from '../packages/input/index.js';
|
|
25
|
+
import InputNumber from '../packages/input-number/index.js';
|
|
26
|
+
import Label from '../packages/label/index.js';
|
|
27
|
+
import Layout from '../packages/layout/index.js';
|
|
28
|
+
import Login from '../packages/login/index.js';
|
|
29
|
+
import Main from '../packages/main/index.js';
|
|
30
|
+
import Menu from '../packages/menu/index.js';
|
|
31
|
+
import Nav from '../packages/nav/index.js';
|
|
32
|
+
import Notify from '../packages/notify/index.js';
|
|
33
|
+
import Pagination from '../packages/pagination/index.js';
|
|
34
|
+
import Page from '../packages/page/index.js';
|
|
35
|
+
import Player from '../packages/player/index.js';
|
|
36
|
+
import QrCode from '../packages/qr-code/index.js';
|
|
37
|
+
import RadioGroup from '../packages/radio-group/index.js';
|
|
38
|
+
import RetrialAuth from '../packages/retrial-auth/index.js';
|
|
39
|
+
import Select from '../packages/select/index.js';
|
|
40
|
+
import SelectGanged from '../packages/select-ganged/index.js';
|
|
41
|
+
import Selector from '../packages/selector/index.js';
|
|
42
|
+
import SelectorPanel from '../packages/selector-panel/index.js';
|
|
43
|
+
import Sizer from '../packages/sizer/index.js';
|
|
44
|
+
import Steps from '../packages/steps/index.js';
|
|
45
|
+
import Switch from '../packages/switch/index.js';
|
|
46
|
+
import Tabs from '../packages/tabs/index.js';
|
|
47
|
+
import TabsPanel from '../packages/tabs-panel/index.js';
|
|
48
|
+
import Tips from '../packages/tips/index.js';
|
|
49
|
+
import Tree from '../packages/tree/index.js';
|
|
50
|
+
import TreeGroup from '../packages/tree-group/index.js';
|
|
51
|
+
import Toolbar from '../packages/toolbar/index.js';
|
|
52
|
+
import TableForm from '../packages/table-form/index.js';
|
|
53
|
+
import Upload from '../packages/upload/index.js';
|
|
54
|
+
import Wujie from '../packages/wujie/index.js';
|
|
55
55
|
import Wxlogin from '../packages/wxlogin/index.js';
|
|
56
56
|
|
|
57
57
|
const components = [
|
|
58
|
-
Button,
|
|
59
|
-
ButtonGroup,
|
|
60
|
-
Calendar,
|
|
61
|
-
Card,
|
|
62
|
-
Cascader,
|
|
63
|
-
CheckboxGroup,
|
|
64
|
-
Clients,
|
|
65
|
-
DataTable,
|
|
66
|
-
DataTableForm,
|
|
67
|
-
DatePicker,
|
|
68
|
-
Dialog,
|
|
69
|
-
Enterprise,
|
|
70
|
-
ErrorPage,
|
|
71
|
-
Form,
|
|
72
|
-
Flow,
|
|
73
|
-
FlowGroup,
|
|
74
|
-
FlowList,
|
|
75
|
-
HandleUser,
|
|
76
|
-
Handler,
|
|
77
|
-
Icon,
|
|
78
|
-
Icons,
|
|
79
|
-
Input,
|
|
80
|
-
InputNumber,
|
|
81
|
-
Label,
|
|
82
|
-
Layout,
|
|
83
|
-
Login,
|
|
84
|
-
Main,
|
|
85
|
-
Menu,
|
|
86
|
-
Nav,
|
|
87
|
-
Notify,
|
|
88
|
-
Pagination,
|
|
89
|
-
Page,
|
|
90
|
-
Player,
|
|
91
|
-
QrCode,
|
|
92
|
-
RadioGroup,
|
|
93
|
-
RetrialAuth,
|
|
94
|
-
Select,
|
|
95
|
-
SelectGanged,
|
|
96
|
-
Selector,
|
|
97
|
-
SelectorPanel,
|
|
98
|
-
Sizer,
|
|
99
|
-
Steps,
|
|
100
|
-
Switch,
|
|
101
|
-
Tabs,
|
|
102
|
-
TabsPanel,
|
|
103
|
-
Tips,
|
|
104
|
-
Tree,
|
|
105
|
-
TreeGroup,
|
|
106
|
-
Toolbar,
|
|
107
|
-
TableForm,
|
|
108
|
-
Upload,
|
|
109
|
-
Wujie,
|
|
58
|
+
Button,
|
|
59
|
+
ButtonGroup,
|
|
60
|
+
Calendar,
|
|
61
|
+
Card,
|
|
62
|
+
Cascader,
|
|
63
|
+
CheckboxGroup,
|
|
64
|
+
Clients,
|
|
65
|
+
DataTable,
|
|
66
|
+
DataTableForm,
|
|
67
|
+
DatePicker,
|
|
68
|
+
Dialog,
|
|
69
|
+
Enterprise,
|
|
70
|
+
ErrorPage,
|
|
71
|
+
Form,
|
|
72
|
+
Flow,
|
|
73
|
+
FlowGroup,
|
|
74
|
+
FlowList,
|
|
75
|
+
HandleUser,
|
|
76
|
+
Handler,
|
|
77
|
+
Icon,
|
|
78
|
+
Icons,
|
|
79
|
+
Input,
|
|
80
|
+
InputNumber,
|
|
81
|
+
Label,
|
|
82
|
+
Layout,
|
|
83
|
+
Login,
|
|
84
|
+
Main,
|
|
85
|
+
Menu,
|
|
86
|
+
Nav,
|
|
87
|
+
Notify,
|
|
88
|
+
Pagination,
|
|
89
|
+
Page,
|
|
90
|
+
Player,
|
|
91
|
+
QrCode,
|
|
92
|
+
RadioGroup,
|
|
93
|
+
RetrialAuth,
|
|
94
|
+
Select,
|
|
95
|
+
SelectGanged,
|
|
96
|
+
Selector,
|
|
97
|
+
SelectorPanel,
|
|
98
|
+
Sizer,
|
|
99
|
+
Steps,
|
|
100
|
+
Switch,
|
|
101
|
+
Tabs,
|
|
102
|
+
TabsPanel,
|
|
103
|
+
Tips,
|
|
104
|
+
Tree,
|
|
105
|
+
TreeGroup,
|
|
106
|
+
Toolbar,
|
|
107
|
+
TableForm,
|
|
108
|
+
Upload,
|
|
109
|
+
Wujie,
|
|
110
110
|
Wxlogin
|
|
111
111
|
];
|
|
112
112
|
|
|
@@ -121,59 +121,59 @@ if (typeof window !== 'undefined' && window.Vue) {
|
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
export default {
|
|
124
|
-
version: '0.6.
|
|
124
|
+
version: '0.6.36',
|
|
125
125
|
install,
|
|
126
|
-
Button,
|
|
127
|
-
ButtonGroup,
|
|
128
|
-
Calendar,
|
|
129
|
-
Card,
|
|
130
|
-
Cascader,
|
|
131
|
-
CheckboxGroup,
|
|
132
|
-
Clients,
|
|
133
|
-
DataTable,
|
|
134
|
-
DataTableForm,
|
|
135
|
-
DatePicker,
|
|
136
|
-
Dialog,
|
|
137
|
-
Enterprise,
|
|
138
|
-
ErrorPage,
|
|
139
|
-
Form,
|
|
140
|
-
Flow,
|
|
141
|
-
FlowGroup,
|
|
142
|
-
FlowList,
|
|
143
|
-
HandleUser,
|
|
144
|
-
Handler,
|
|
145
|
-
Icon,
|
|
146
|
-
Icons,
|
|
147
|
-
Input,
|
|
148
|
-
InputNumber,
|
|
149
|
-
Label,
|
|
150
|
-
Layout,
|
|
151
|
-
Login,
|
|
152
|
-
Main,
|
|
153
|
-
Menu,
|
|
154
|
-
Nav,
|
|
155
|
-
Notify,
|
|
156
|
-
Pagination,
|
|
157
|
-
Page,
|
|
158
|
-
Player,
|
|
159
|
-
QrCode,
|
|
160
|
-
RadioGroup,
|
|
161
|
-
RetrialAuth,
|
|
162
|
-
Select,
|
|
163
|
-
SelectGanged,
|
|
164
|
-
Selector,
|
|
165
|
-
SelectorPanel,
|
|
166
|
-
Sizer,
|
|
167
|
-
Steps,
|
|
168
|
-
Switch,
|
|
169
|
-
Tabs,
|
|
170
|
-
TabsPanel,
|
|
171
|
-
Tips,
|
|
172
|
-
Tree,
|
|
173
|
-
TreeGroup,
|
|
174
|
-
Toolbar,
|
|
175
|
-
TableForm,
|
|
176
|
-
Upload,
|
|
177
|
-
Wujie,
|
|
126
|
+
Button,
|
|
127
|
+
ButtonGroup,
|
|
128
|
+
Calendar,
|
|
129
|
+
Card,
|
|
130
|
+
Cascader,
|
|
131
|
+
CheckboxGroup,
|
|
132
|
+
Clients,
|
|
133
|
+
DataTable,
|
|
134
|
+
DataTableForm,
|
|
135
|
+
DatePicker,
|
|
136
|
+
Dialog,
|
|
137
|
+
Enterprise,
|
|
138
|
+
ErrorPage,
|
|
139
|
+
Form,
|
|
140
|
+
Flow,
|
|
141
|
+
FlowGroup,
|
|
142
|
+
FlowList,
|
|
143
|
+
HandleUser,
|
|
144
|
+
Handler,
|
|
145
|
+
Icon,
|
|
146
|
+
Icons,
|
|
147
|
+
Input,
|
|
148
|
+
InputNumber,
|
|
149
|
+
Label,
|
|
150
|
+
Layout,
|
|
151
|
+
Login,
|
|
152
|
+
Main,
|
|
153
|
+
Menu,
|
|
154
|
+
Nav,
|
|
155
|
+
Notify,
|
|
156
|
+
Pagination,
|
|
157
|
+
Page,
|
|
158
|
+
Player,
|
|
159
|
+
QrCode,
|
|
160
|
+
RadioGroup,
|
|
161
|
+
RetrialAuth,
|
|
162
|
+
Select,
|
|
163
|
+
SelectGanged,
|
|
164
|
+
Selector,
|
|
165
|
+
SelectorPanel,
|
|
166
|
+
Sizer,
|
|
167
|
+
Steps,
|
|
168
|
+
Switch,
|
|
169
|
+
Tabs,
|
|
170
|
+
TabsPanel,
|
|
171
|
+
Tips,
|
|
172
|
+
Tree,
|
|
173
|
+
TreeGroup,
|
|
174
|
+
Toolbar,
|
|
175
|
+
TableForm,
|
|
176
|
+
Upload,
|
|
177
|
+
Wujie,
|
|
178
178
|
Wxlogin
|
|
179
179
|
};
|
package/src/utils/util.js
CHANGED
|
@@ -76,7 +76,8 @@ const ajax = function ({
|
|
|
76
76
|
publicKey,
|
|
77
77
|
secret,
|
|
78
78
|
encodes,
|
|
79
|
-
oldmode
|
|
79
|
+
oldmode,
|
|
80
|
+
...configs
|
|
80
81
|
}) {
|
|
81
82
|
let header = headers || {};
|
|
82
83
|
if (!method) {
|
|
@@ -476,7 +477,8 @@ const ajax = function ({
|
|
|
476
477
|
url,
|
|
477
478
|
data,
|
|
478
479
|
params,
|
|
479
|
-
headers: header
|
|
480
|
+
headers: header,
|
|
481
|
+
...configs
|
|
480
482
|
});
|
|
481
483
|
};
|
|
482
484
|
|
|
@@ -1186,37 +1188,47 @@ const extend = function () {
|
|
|
1186
1188
|
* @param {String} [fmt] - 格式
|
|
1187
1189
|
**/
|
|
1188
1190
|
const formatDate = function (date, fmt) {
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
'
|
|
1202
|
-
'
|
|
1203
|
-
'
|
|
1204
|
-
|
|
1191
|
+
// 1. 处理日期输入
|
|
1192
|
+
const obj = date ? new Date(date) : new Date();
|
|
1193
|
+
if (isNaN(obj.getTime())) throw new Error('Invalid date input');
|
|
1194
|
+
|
|
1195
|
+
// 2. 工具函数
|
|
1196
|
+
const pad = n => String(n).padStart(2, '0');
|
|
1197
|
+
const monthNum = obj.getMonth(); // 数值月份 (0-11)
|
|
1198
|
+
|
|
1199
|
+
// 3. 定义格式化规则
|
|
1200
|
+
const quarter = ['一', '二', '三', '四'];
|
|
1201
|
+
const halfyear = ['上', '下'];
|
|
1202
|
+
const o = {
|
|
1203
|
+
'b+': halfyear[Math.floor(monthNum / 6)], // 1=上半年, 2=下半年
|
|
1204
|
+
'M+': monthNum + 1, // 月份 (1-12)
|
|
1205
|
+
'd+': obj.getDate(), // 日 (1-31)
|
|
1206
|
+
'H+': obj.getHours(), // 小时 (0-23)
|
|
1207
|
+
'm+': obj.getMinutes(), // 分钟 (0-59)
|
|
1208
|
+
's+': obj.getSeconds(), // 秒 (0-59)
|
|
1209
|
+
'q+': quarter[Math.floor(monthNum / 3)], // 季度 (一~四)
|
|
1210
|
+
'S': obj.getMilliseconds() // 毫秒 (0-999)
|
|
1205
1211
|
};
|
|
1212
|
+
|
|
1213
|
+
// 4. 处理年份
|
|
1206
1214
|
if (/(y+)/.test(fmt)) {
|
|
1207
1215
|
fmt = fmt.replace(
|
|
1208
1216
|
RegExp.$1,
|
|
1209
|
-
(obj.getFullYear()
|
|
1217
|
+
String(obj.getFullYear()).slice(-RegExp.$1.length)
|
|
1210
1218
|
);
|
|
1211
1219
|
}
|
|
1212
|
-
|
|
1213
|
-
|
|
1220
|
+
|
|
1221
|
+
// 5. 处理其他字段
|
|
1222
|
+
for (const k in o) {
|
|
1223
|
+
if (new RegExp(`(${k})`).test(fmt)) {
|
|
1224
|
+
const val = k === 'q+' ? o[k] : pad(o[k]); // 季度不补零
|
|
1214
1225
|
fmt = fmt.replace(
|
|
1215
1226
|
RegExp.$1,
|
|
1216
|
-
RegExp.$1.length === 1 ? o[k] :
|
|
1227
|
+
RegExp.$1.length === 1 ? o[k] : val
|
|
1217
1228
|
);
|
|
1218
1229
|
}
|
|
1219
1230
|
}
|
|
1231
|
+
|
|
1220
1232
|
return fmt;
|
|
1221
1233
|
};
|
|
1222
1234
|
|
package/packages/.DS_Store
DELETED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/packages/login/.DS_Store
DELETED
|
Binary file
|
package/packages/main/.DS_Store
DELETED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/src/.DS_Store
DELETED
|
Binary file
|