ai.touchui-vue 1.40.1 → 1.41.0
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/affix.js +2 -2
- package/lib/ai.touchui-vue.common.js +930 -845
- package/lib/align.js +2 -2
- package/lib/animation.js +2 -2
- package/lib/article.js +2 -2
- package/lib/box.js +2 -2
- package/lib/button.js +2 -2
- package/lib/calendar.js +2 -2
- package/lib/card-item.js +18 -18
- package/lib/card.js +2 -2
- package/lib/cascader.js +2 -2
- package/lib/center-scroll.js +2 -2
- package/lib/chat.js +4 -4
- package/lib/checkbox.js +2 -2
- package/lib/checkboxes.js +2 -2
- package/lib/collapse.js +12 -12
- package/lib/color.js +2 -2
- package/lib/countdown.js +2 -2
- package/lib/date-picker.js +120 -480
- package/lib/date-range.js +2 -2
- package/lib/dialog.js +2 -2
- package/lib/dis.js +2 -2
- package/lib/ellipsis.js +2 -2
- package/lib/emote.js +2 -2
- package/lib/export.js +2 -2
- package/lib/filter.js +2 -2
- package/lib/fix.js +2 -2
- package/lib/float.js +2 -2
- package/lib/flow.js +4 -4
- package/lib/form.js +2 -2
- package/lib/grid.js +2 -2
- package/lib/guider.js +2 -2
- package/lib/header.js +2 -2
- package/lib/hide.js +2 -2
- package/lib/icon.js +2 -2
- package/lib/import.js +6 -6
- package/lib/index.js +1 -1
- package/lib/input.js +2 -2
- package/lib/ip.js +2 -2
- package/lib/line.js +2 -2
- package/lib/loading.js +2 -2
- package/lib/longtap.js +2 -2
- package/lib/menu-icon.js +670 -673
- package/lib/message.js +2 -2
- package/lib/msg.js +2 -2
- package/lib/org.js +22 -22
- package/lib/padding.js +2 -2
- package/lib/page.js +2 -2
- package/lib/param.js +2 -2
- package/lib/pic.js +2 -2
- package/lib/popup.js +2 -2
- package/lib/progress.js +2 -2
- package/lib/range.js +10 -10
- package/lib/rate.js +2 -2
- package/lib/reverser.js +2 -2
- package/lib/scroll.js +2 -2
- package/lib/segment.js +2 -2
- package/lib/select.js +4 -4
- package/lib/size.js +2 -2
- package/lib/skeleton.js +2 -2
- package/lib/slide.js +26 -23
- package/lib/space.js +2 -2
- package/lib/step.js +2 -2
- package/lib/submit.js +2 -2
- package/lib/switch.js +2 -2
- package/lib/tab.js +2 -2
- package/lib/table.js +4 -4
- package/lib/tag.js +2 -2
- package/lib/theme/css/theme/B-Design.css +1 -1
- package/lib/theme/css/theme/aiplan.css +1 -1
- package/lib/theme/css/theme/aiplangd.css +1 -1
- package/lib/theme/css/theme/chbn.css +1 -1
- package/lib/theme/css/theme/default.css +1 -1
- package/lib/theme/css/theme/dt.css +1 -1
- package/lib/theme/css/theme/ecloud.css +1 -1
- package/lib/theme/css/theme/hongkong.css +1 -1
- package/lib/theme/css/theme/logistics.css +1 -1
- package/lib/theme/css/theme/narrow.css +1 -1
- package/lib/theme/css/theme/sdpf.css +1 -1
- package/lib/theme/css/theme/upc.css +1 -1
- package/lib/theme/css/theme/website.css +1 -1
- package/lib/theme/css/theme/workbench-gz.css +1 -1
- package/lib/theme/css/theme/zj.css +1 -1
- package/lib/timeline.js +2 -2
- package/lib/tip.js +2 -2
- package/lib/tooltip.js +2 -2
- package/lib/transfer.js +2 -2
- package/lib/tree.js +2 -2
- package/lib/upload.js +6 -6
- package/package.json +1 -1
- package/packages/date-picker/src/date-picker.vue +40 -12
- package/packages/date-picker/src/picker.vue +5 -1
- package/packages/slide/src/slide.vue +24 -20
- package/packages/theme/lib/css/theme/B-Design.css +1 -1
- package/packages/theme/lib/css/theme/aiplan.css +1 -1
- package/packages/theme/lib/css/theme/aiplangd.css +1 -1
- package/packages/theme/lib/css/theme/chbn.css +1 -1
- package/packages/theme/lib/css/theme/default.css +1 -1
- package/packages/theme/lib/css/theme/dt.css +1 -1
- package/packages/theme/lib/css/theme/ecloud.css +1 -1
- package/packages/theme/lib/css/theme/hongkong.css +1 -1
- package/packages/theme/lib/css/theme/logistics.css +1 -1
- package/packages/theme/lib/css/theme/narrow.css +1 -1
- package/packages/theme/lib/css/theme/sdpf.css +1 -1
- package/packages/theme/lib/css/theme/upc.css +1 -1
- package/packages/theme/lib/css/theme/website.css +1 -1
- package/packages/theme/lib/css/theme/workbench-gz.css +1 -1
- package/packages/theme/lib/css/theme/zj.css +1 -1
- package/packages/theme/src/less/component/calendar-dark.less +27 -1
- package/packages/theme/src/less/component/calendar.less +15 -11
- package/packages/theme/src/less/element/datePicker-dark.less +15 -0
- package/packages/theme/src/less/element/datePicker.less +17 -0
- package/packages/theme/src/less/theme/B-Design.less +2 -0
- package/packages/theme/src/less/theme/aiplan.less +2 -0
- package/packages/theme/src/less/theme/aiplangd.less +2 -0
- package/packages/theme/src/less/theme/chbn.less +2 -0
- package/packages/theme/src/less/theme/default.less +2 -0
- package/packages/theme/src/less/theme/dt.less +2 -0
- package/packages/theme/src/less/theme/ecloud.less +2 -0
- package/packages/theme/src/less/theme/hongkong.less +2 -0
- package/packages/theme/src/less/theme/logistics.less +2 -0
- package/packages/theme/src/less/theme/narrow.less +2 -0
- package/packages/theme/src/less/theme/sdpf.less +2 -0
- package/packages/theme/src/less/theme/upc.less +2 -0
- package/packages/theme/src/less/theme/website.less +2 -0
- package/packages/theme/src/less/theme/workbench-gz.less +2 -0
- package/packages/theme/src/less/theme/zj.less +2 -0
- package/src/index.js +64 -2
|
@@ -12,10 +12,11 @@
|
|
|
12
12
|
>ul>li.end,
|
|
13
13
|
>ul>li.on { color:@dark-bg;}
|
|
14
14
|
}
|
|
15
|
-
.
|
|
15
|
+
.week { border-bottom:1px solid @dark-fg-dark-8;}
|
|
16
16
|
.select {
|
|
17
17
|
background:@dark-bg;
|
|
18
18
|
ul li.dis { color:@dark-fg-dark-8;}
|
|
19
|
+
.year { border-bottom:1px solid @dark-fg-dark-8;}
|
|
19
20
|
.month { color:@dark-fg-dark-1;}
|
|
20
21
|
}
|
|
21
22
|
.time {
|
|
@@ -74,6 +75,19 @@
|
|
|
74
75
|
>ul>li:hover:after { background:@dark-bg-light-0-7; color:@dark-fg-dark-1;}
|
|
75
76
|
}
|
|
76
77
|
}
|
|
78
|
+
.select {
|
|
79
|
+
ul li:hover:after{ background:@dark-bg-light-0-7;}
|
|
80
|
+
ul li:hover{color:@dark-fg-dark-1;}
|
|
81
|
+
ul li.on:hover:after{ background:@warning;}
|
|
82
|
+
ul li.on:hover{ color:@bg;}
|
|
83
|
+
ul li.dis:hover:after { background:none;}
|
|
84
|
+
.year {
|
|
85
|
+
.next:hover,
|
|
86
|
+
.prev:hover { background:@dark-bg-light-0-5;}
|
|
87
|
+
.next:active,
|
|
88
|
+
.prev:active { background:@dark-bg-light-1;}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
77
91
|
}
|
|
78
92
|
.to-calendar-size-large {
|
|
79
93
|
.day {
|
|
@@ -89,6 +103,18 @@
|
|
|
89
103
|
.theme-dark.s_phone,
|
|
90
104
|
.theme-dark.s_pad {
|
|
91
105
|
.to-calendar {
|
|
106
|
+
.header {
|
|
107
|
+
.prevYear:hover,
|
|
108
|
+
.nextYear:hover,
|
|
109
|
+
.info-unfold:hover,
|
|
110
|
+
.prev:hover,
|
|
111
|
+
.next:hover { background:@dark-bg-light-0-7;}
|
|
112
|
+
.prevYear:active,
|
|
113
|
+
.nextYear:active,
|
|
114
|
+
.info-unfold:active,
|
|
115
|
+
.prev:active,
|
|
116
|
+
.next:active { background:@dark-bg-light-1;}
|
|
117
|
+
}
|
|
92
118
|
.day {
|
|
93
119
|
>ul>li:not(:empty).active:after { background:@dark-bg-light-0-7;}
|
|
94
120
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
.to-calendar {
|
|
3
3
|
position:relative; background:@bg; text-align:center; user-select:none;
|
|
4
4
|
.header {
|
|
5
|
-
height:1+2*@gap; line-height:1+2*@gap;
|
|
5
|
+
height:1+2*@gap; line-height:1+2*@gap; display:flex; width:100%; vertical-align:top;
|
|
6
6
|
.prevYear,
|
|
7
7
|
.nextYear,
|
|
8
8
|
.prev,
|
|
@@ -17,11 +17,11 @@
|
|
|
17
17
|
}
|
|
18
18
|
.info-unfold {
|
|
19
19
|
cursor:pointer;
|
|
20
|
-
&:after { color:@
|
|
20
|
+
&:after { color:@fg-light-3; font-size:75%; font-family:"icon"; content:"\e081";}
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
.week {
|
|
24
|
-
|
|
24
|
+
height:1+2*@gap; line-height:1+2*@gap; border-bottom:1px solid @fg-light-9-5; font-weight:bold;
|
|
25
25
|
> ul { display:flex;}
|
|
26
26
|
> ul > li { flex:1}
|
|
27
27
|
}
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
li:nth-child(4n) { border-right:0 none;}
|
|
71
71
|
}
|
|
72
72
|
.select {
|
|
73
|
-
position:absolute; width:100%; bottom:0; top:1+2*@gap; background:@bg;
|
|
73
|
+
position:absolute; width:100%; bottom:0; top:1+2*@gap; background:@bg; z-index:12;
|
|
74
74
|
ul { overflow:hidden;}
|
|
75
75
|
ul li { width:20%; float:left; text-align:center; height:1+2*@gap; z-index:14; position:relative; line-height:1+2*@gap; cursor:pointer;}
|
|
76
76
|
ul li:after { content:""; width:1+2*@gap; height:1+2*@gap; .x_round; z-index:-1; position:absolute; margin:0 auto; top:0; left:0; right:0; bottom:0;}
|
|
@@ -82,10 +82,10 @@
|
|
|
82
82
|
ul li.on.cur { color:@bg;}
|
|
83
83
|
ul li.on.cur:after { background:@warning;}
|
|
84
84
|
.year {
|
|
85
|
-
width:100%; margin:0 auto; overflow:hidden; display:table; table-layout:fixed;
|
|
85
|
+
width:100%; margin:0 auto; overflow:hidden; display:table; table-layout:fixed; border-bottom:1px solid @fg-light-8-5;
|
|
86
86
|
> ul { display:table-cell; vertical-align:middle; padding-bottom:0.5em;}
|
|
87
87
|
.prev,
|
|
88
|
-
.next { display:table-cell; vertical-align:middle; width:1+2*@gap; cursor:pointer; color:@
|
|
88
|
+
.next { display:table-cell; vertical-align:middle; width:1+2*@gap; cursor:pointer; color:@fg-light-3;}
|
|
89
89
|
.prev:after { font-family:"icon"; content:"\e009";}
|
|
90
90
|
.next:after { font-family:"icon"; content:"\e05a";}
|
|
91
91
|
}
|
|
@@ -200,7 +200,12 @@
|
|
|
200
200
|
.nextYear:hover,
|
|
201
201
|
.info-unfold:hover,
|
|
202
202
|
.prev:hover,
|
|
203
|
-
.next:hover { background:@
|
|
203
|
+
.next:hover { background:@fg-light-9-5;}
|
|
204
|
+
.prevYear:active,
|
|
205
|
+
.nextYear:active,
|
|
206
|
+
.info-unfold:active,
|
|
207
|
+
.prev:active,
|
|
208
|
+
.next:active { background:@fg-light-8-5;}
|
|
204
209
|
}
|
|
205
210
|
.day {
|
|
206
211
|
> ul > li:not(:empty):hover:after { background:@bg-dark-0-7;}
|
|
@@ -217,12 +222,11 @@
|
|
|
217
222
|
ul li.dis:hover:after { background:none;}
|
|
218
223
|
.year {
|
|
219
224
|
.next:hover,
|
|
220
|
-
.prev:hover { background:@
|
|
225
|
+
.prev:hover { background:@bg-dark-0-5;}
|
|
226
|
+
.next:active,
|
|
227
|
+
.prev:active { background:@bg-dark-1;}
|
|
221
228
|
}
|
|
222
229
|
}
|
|
223
|
-
.shortcut {
|
|
224
|
-
li:hover { background:@bg-dark-0-7;}
|
|
225
|
-
}
|
|
226
230
|
.time {
|
|
227
231
|
.option {
|
|
228
232
|
> ul > li:hover:after { background:@bg-dark-0-7; color:@fg-light-1;}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
.theme-dark {
|
|
2
|
+
.to-date-picker-layer {
|
|
3
|
+
.wrapper {
|
|
4
|
+
.shortcuts { border-right:1px solid @dark-fg-dark-8;}
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.s_pc {
|
|
10
|
+
.to-date-picker-layer {
|
|
11
|
+
.shortcuts li:hover { background:@dark-fg-op-0-5;}
|
|
12
|
+
.shortcuts li:active { background:@dark-fg-op-1;}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
.to-date-picker-layer {
|
|
2
|
+
.wrapper {
|
|
3
|
+
display:flex;
|
|
4
|
+
.shortcuts { border-right:1px solid @fg-light-9-5; cursor:pointer;}
|
|
5
|
+
.shortcuts li { padding:0 1em; line-height:3em;}
|
|
6
|
+
> .to-calendar { flex:1;}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
}
|
|
10
|
+
.to-date-picker.to-dis > .to-icon-date { pointer-events:none;}
|
|
11
|
+
|
|
12
|
+
.s_pc {
|
|
13
|
+
.to-date-picker-layer {
|
|
14
|
+
.shortcuts li:hover { background:@fg-op-0-5;}
|
|
15
|
+
.shortcuts li:active { background:@fg-op-1;}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -46,6 +46,8 @@
|
|
|
46
46
|
@import "../element/menu-icon-dark.less";
|
|
47
47
|
@import "../element/input.less";
|
|
48
48
|
@import "../element/input-dark.less";
|
|
49
|
+
@import "../element/datePicker.less";
|
|
50
|
+
@import "../element/datePicker-dark.less";
|
|
49
51
|
@import "../element/pic.less";
|
|
50
52
|
@import "../element/pic-dark.less";
|
|
51
53
|
@import "../element/progress.less";
|
|
@@ -46,6 +46,8 @@
|
|
|
46
46
|
@import "../element/menu-icon-dark.less";
|
|
47
47
|
@import "../element/input.less";
|
|
48
48
|
@import "../element/input-dark.less";
|
|
49
|
+
@import "../element/datePicker.less";
|
|
50
|
+
@import "../element/datePicker-dark.less";
|
|
49
51
|
@import "../element/pic.less";
|
|
50
52
|
@import "../element/pic-dark.less";
|
|
51
53
|
@import "../element/progress.less";
|
|
@@ -46,6 +46,8 @@
|
|
|
46
46
|
@import "../element/menu-icon-dark.less";
|
|
47
47
|
@import "../element/input.less";
|
|
48
48
|
@import "../element/input-dark.less";
|
|
49
|
+
@import "../element/datePicker.less";
|
|
50
|
+
@import "../element/datePicker-dark.less";
|
|
49
51
|
@import "../element/pic.less";
|
|
50
52
|
@import "../element/pic-dark.less";
|
|
51
53
|
@import "../element/progress.less";
|
|
@@ -46,6 +46,8 @@
|
|
|
46
46
|
@import "../element/menu-icon-dark.less";
|
|
47
47
|
@import "../element/input.less";
|
|
48
48
|
@import "../element/input-dark.less";
|
|
49
|
+
@import "../element/datePicker.less";
|
|
50
|
+
@import "../element/datePicker-dark.less";
|
|
49
51
|
@import "../element/pic.less";
|
|
50
52
|
@import "../element/pic-dark.less";
|
|
51
53
|
@import "../element/progress.less";
|
|
@@ -46,6 +46,8 @@
|
|
|
46
46
|
@import "../element/menu-icon-dark.less";
|
|
47
47
|
@import "../element/input.less";
|
|
48
48
|
@import "../element/input-dark.less";
|
|
49
|
+
@import "../element/datePicker.less";
|
|
50
|
+
@import "../element/datePicker-dark.less";
|
|
49
51
|
@import "../element/pic.less";
|
|
50
52
|
@import "../element/pic-dark.less";
|
|
51
53
|
@import "../element/progress.less";
|
|
@@ -46,6 +46,8 @@
|
|
|
46
46
|
@import "../element/menu-icon-dark.less";
|
|
47
47
|
@import "../element/input.less";
|
|
48
48
|
@import "../element/input-dark.less";
|
|
49
|
+
@import "../element/datePicker.less";
|
|
50
|
+
@import "../element/datePicker-dark.less";
|
|
49
51
|
@import "../element/pic.less";
|
|
50
52
|
@import "../element/pic-dark.less";
|
|
51
53
|
@import "../element/progress.less";
|
|
@@ -46,6 +46,8 @@
|
|
|
46
46
|
@import "../element/menu-icon-dark.less";
|
|
47
47
|
@import "../element/input.less";
|
|
48
48
|
@import "../element/input-dark.less";
|
|
49
|
+
@import "../element/datePicker.less";
|
|
50
|
+
@import "../element/datePicker-dark.less";
|
|
49
51
|
@import "../element/pic.less";
|
|
50
52
|
@import "../element/pic-dark.less";
|
|
51
53
|
@import "../element/progress.less";
|
|
@@ -46,6 +46,8 @@
|
|
|
46
46
|
@import "../element/menu-icon-dark.less";
|
|
47
47
|
@import "../element/input.less";
|
|
48
48
|
@import "../element/input-dark.less";
|
|
49
|
+
@import "../element/datePicker.less";
|
|
50
|
+
@import "../element/datePicker-dark.less";
|
|
49
51
|
@import "../element/pic.less";
|
|
50
52
|
@import "../element/pic-dark.less";
|
|
51
53
|
@import "../element/progress.less";
|
|
@@ -46,6 +46,8 @@
|
|
|
46
46
|
@import "../element/menu-icon-dark.less";
|
|
47
47
|
@import "../element/input.less";
|
|
48
48
|
@import "../element/input-dark.less";
|
|
49
|
+
@import "../element/datePicker.less";
|
|
50
|
+
@import "../element/datePicker-dark.less";
|
|
49
51
|
@import "../element/pic.less";
|
|
50
52
|
@import "../element/pic-dark.less";
|
|
51
53
|
@import "../element/progress.less";
|
|
@@ -46,6 +46,8 @@
|
|
|
46
46
|
@import "../element/menu-icon-dark.less";
|
|
47
47
|
@import "../element/input.less";
|
|
48
48
|
@import "../element/input-dark.less";
|
|
49
|
+
@import "../element/datePicker.less";
|
|
50
|
+
@import "../element/datePicker-dark.less";
|
|
49
51
|
@import "../element/pic.less";
|
|
50
52
|
@import "../element/pic-dark.less";
|
|
51
53
|
@import "../element/progress.less";
|
|
@@ -47,6 +47,8 @@
|
|
|
47
47
|
@import "../element/menu-icon-dark.less";
|
|
48
48
|
@import "../element/input.less";
|
|
49
49
|
@import "../element/input-dark.less";
|
|
50
|
+
@import "../element/datePicker.less";
|
|
51
|
+
@import "../element/datePicker-dark.less";
|
|
50
52
|
@import "../element/pic.less";
|
|
51
53
|
@import "../element/pic-dark.less";
|
|
52
54
|
@import "../element/progress.less";
|
|
@@ -46,6 +46,8 @@
|
|
|
46
46
|
@import "../element/menu-icon-dark.less";
|
|
47
47
|
@import "../element/input.less";
|
|
48
48
|
@import "../element/input-dark.less";
|
|
49
|
+
@import "../element/datePicker.less";
|
|
50
|
+
@import "../element/datePicker-dark.less";
|
|
49
51
|
@import "../element/pic.less";
|
|
50
52
|
@import "../element/pic-dark.less";
|
|
51
53
|
@import "../element/progress.less";
|
|
@@ -46,6 +46,8 @@
|
|
|
46
46
|
@import "../element/menu-icon-dark.less";
|
|
47
47
|
@import "../element/input.less";
|
|
48
48
|
@import "../element/input-dark.less";
|
|
49
|
+
@import "../element/datePicker.less";
|
|
50
|
+
@import "../element/datePicker-dark.less";
|
|
49
51
|
@import "../element/pic.less";
|
|
50
52
|
@import "../element/pic-dark.less";
|
|
51
53
|
@import "../element/progress.less";
|
|
@@ -46,6 +46,8 @@
|
|
|
46
46
|
@import "../element/menu-icon-dark.less";
|
|
47
47
|
@import "../element/input.less";
|
|
48
48
|
@import "../element/input-dark.less";
|
|
49
|
+
@import "../element/datePicker.less";
|
|
50
|
+
@import "../element/datePicker-dark.less";
|
|
49
51
|
@import "../element/pic.less";
|
|
50
52
|
@import "../element/pic-dark.less";
|
|
51
53
|
@import "../element/progress.less";
|
|
@@ -46,6 +46,8 @@
|
|
|
46
46
|
@import "../element/menu-icon-dark.less";
|
|
47
47
|
@import "../element/input.less";
|
|
48
48
|
@import "../element/input-dark.less";
|
|
49
|
+
@import "../element/datePicker.less";
|
|
50
|
+
@import "../element/datePicker-dark.less";
|
|
49
51
|
@import "../element/pic.less";
|
|
50
52
|
@import "../element/pic-dark.less";
|
|
51
53
|
@import "../element/progress.less";
|
package/src/index.js
CHANGED
|
@@ -319,7 +319,69 @@ const install = function(Vue, opts = {}) {
|
|
|
319
319
|
},
|
|
320
320
|
datePicker: {
|
|
321
321
|
fillet: opts.datePicker && opts.datePicker.fillet ? opts.datePicker.fillet : '',
|
|
322
|
-
lazy: (opts.datePicker && (opts.datePicker.lazy === true || opts.datePicker.lazy === false)) ? opts.datePicker.lazy : null
|
|
322
|
+
lazy: (opts.datePicker && (opts.datePicker.lazy === true || opts.datePicker.lazy === false)) ? opts.datePicker.lazy : null,
|
|
323
|
+
shortcuts: opts.datePicker && opts.datePicker.shortcuts ? opts.datePicker.shortcuts : (datePicker) => {
|
|
324
|
+
return [
|
|
325
|
+
{
|
|
326
|
+
label: '半年前',
|
|
327
|
+
value() {
|
|
328
|
+
const today = new Date();
|
|
329
|
+
return new Date(today.getFullYear(), today.getMonth() - 6, today.getDate());
|
|
330
|
+
}
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
label: '三月前',
|
|
334
|
+
value() {
|
|
335
|
+
const today = new Date();
|
|
336
|
+
return new Date(today.getFullYear(), today.getMonth() - 3, today.getDate());
|
|
337
|
+
}
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
label: '一月前',
|
|
341
|
+
value() {
|
|
342
|
+
const today = new Date();
|
|
343
|
+
return new Date(today.getFullYear(), today.getMonth() - 1, today.getDate());
|
|
344
|
+
}
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
label: datePicker.type === 'month' ? '本月' : (datePicker.type === 'datetime' || datePicker.type === 'time' ? '现在' : '今天'),
|
|
348
|
+
value() {
|
|
349
|
+
return new Date();
|
|
350
|
+
}
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
label: '次月1日',
|
|
354
|
+
value() {
|
|
355
|
+
const today = new Date();
|
|
356
|
+
return new Date(today.getFullYear(), today.getMonth() + 1, 1);
|
|
357
|
+
}
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
label: '次月末日',
|
|
361
|
+
value() {
|
|
362
|
+
const today = new Date();
|
|
363
|
+
return new Date(today.getFullYear(), today.getMonth() + 2, 0);
|
|
364
|
+
}
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
label: '明年今日',
|
|
368
|
+
value() {
|
|
369
|
+
const today = new Date();
|
|
370
|
+
return new Date(today.getFullYear() + 1, today.getMonth(), today.getDate());
|
|
371
|
+
}
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
label: '2050',
|
|
375
|
+
value() {
|
|
376
|
+
if (datePicker.type === 'datetime') {
|
|
377
|
+
return new Date(2050, 11, 31, 23, 59, 59);
|
|
378
|
+
} else {
|
|
379
|
+
return new Date(2050, 11, 31);
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
]
|
|
384
|
+
}
|
|
323
385
|
},
|
|
324
386
|
dateRange: {
|
|
325
387
|
fillet: opts.dateRange && opts.dateRange.fillet ? opts.dateRange.fillet : '',
|
|
@@ -455,7 +517,7 @@ if (typeof window !== 'undefined' && window.Vue) {
|
|
|
455
517
|
}
|
|
456
518
|
|
|
457
519
|
export default {
|
|
458
|
-
version: '1.
|
|
520
|
+
version: '1.41.0',
|
|
459
521
|
locale: locale.use,
|
|
460
522
|
i18n: locale.i18n,
|
|
461
523
|
install,
|