@tplc/wot 1.0.12 → 1.0.13
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/CHANGELOG.md +2 -0
- package/components/wd-calendar/index.scss +145 -58
- package/components/wd-calendar/types.ts +41 -23
- package/components/wd-calendar/wd-calendar.vue +130 -123
- package/components/wd-calendar-view/month/index.scss +65 -33
- package/components/wd-calendar-view/month/month.vue +113 -80
- package/components/wd-calendar-view/month/types.ts +1 -2
- package/components/wd-calendar-view/monthPanel/index.scss +15 -15
- package/components/wd-calendar-view/monthPanel/month-panel.vue +78 -64
- package/components/wd-calendar-view/monthPanel/types.ts +10 -58
- package/components/wd-calendar-view/types.ts +36 -12
- package/components/wd-calendar-view/utils.ts +36 -14
- package/components/wd-calendar-view/wd-calendar-view.vue +7 -7
- package/components/wd-calendar-view/year/index.scss +13 -18
- package/components/wd-calendar-view/year/types.ts +1 -2
- package/components/wd-calendar-view/year/year.vue +43 -25
- package/components/wd-calendar-view/yearPanel/index.scss +4 -4
- package/components/wd-calendar-view/yearPanel/types.ts +2 -2
- package/components/wd-calendar-view/yearPanel/year-panel.vue +41 -36
- package/components/wd-drop-menu/index.scss +45 -17
- package/components/wd-drop-menu/types.ts +3 -3
- package/components/wd-drop-menu/wd-drop-menu.vue +25 -61
- package/components/wd-drop-menu-item/index.scss +15 -15
- package/components/wd-drop-menu-item/types.ts +15 -18
- package/components/wd-drop-menu-item/wd-drop-menu-item.vue +54 -33
- package/package.json +1 -1
- package/types/components/common/dayjs.d.ts +26 -0
- package/types/components/wd-calendar/types.d.ts +18 -24
- package/types/components/wd-calendar/wd-calendar.vue.d.ts +24 -40
- package/types/components/wd-calendar-view/month/month.vue.d.ts +3 -11
- package/types/components/wd-calendar-view/month/types.d.ts +0 -4
- package/types/components/wd-calendar-view/monthPanel/month-panel.vue.d.ts +12 -18
- package/types/components/wd-calendar-view/monthPanel/types.d.ts +6 -48
- package/types/components/wd-calendar-view/types.d.ts +4 -11
- package/types/components/wd-calendar-view/utils.d.ts +12 -3
- package/types/components/wd-calendar-view/year/types.d.ts +0 -4
- package/types/components/wd-calendar-view/year/year.vue.d.ts +3 -11
- package/types/components/wd-cell/wd-cell.vue.d.ts +5 -5
- package/types/components/wd-col-picker/wd-col-picker.vue.d.ts +9 -9
- package/types/components/wd-datetime-picker/wd-datetime-picker.vue.d.ts +10 -10
- package/types/components/wd-datetime-picker-view/wd-datetime-picker-view.vue.d.ts +1 -1
- package/types/components/wd-drop-menu/types.d.ts +3 -3
- package/types/components/wd-drop-menu/wd-drop-menu.vue.d.ts +5 -5
- package/types/components/wd-drop-menu-item/types.d.ts +15 -27
- package/types/components/wd-drop-menu-item/wd-drop-menu-item.vue.d.ts +35 -46
- package/types/components/wd-floating-panel/wd-floating-panel.vue.d.ts +1 -1
- package/types/components/wd-form/wd-form.vue.d.ts +1 -1
- package/types/components/wd-form-item/wd-form-item.vue.d.ts +1 -1
- package/types/components/wd-grid-item/wd-grid-item.vue.d.ts +1 -1
- package/types/components/wd-input/wd-input.vue.d.ts +4 -4
- package/types/components/wd-keyboard/wd-keyboard.vue.d.ts +1 -1
- package/types/components/wd-notify/wd-notify.vue.d.ts +1 -1
- package/types/components/wd-number-keyboard/wd-number-keyboard.vue.d.ts +1 -1
- package/types/components/wd-picker/wd-picker.vue.d.ts +12 -12
- package/types/components/wd-picker-view/wd-picker-view.vue.d.ts +2 -2
- package/types/components/wd-select-picker/wd-select-picker.vue.d.ts +12 -12
- package/types/components/wd-signature/wd-signature.vue.d.ts +2 -2
- package/types/components/wd-steps/wd-steps.vue.d.ts +1 -1
- package/types/components/wd-swiper/wd-swiper.vue.d.ts +1 -1
- package/types/components/wd-tabs/wd-tabs.vue.d.ts +1 -1
- package/types/components/wd-textarea/wd-textarea.vue.d.ts +3 -3
- /package/components/wd-input/{placeholder.scss → placeholder.css} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [1.0.13](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.82...v1.0.13) (2025-12-06)
|
|
6
|
+
|
|
5
7
|
### [1.0.12](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v1.0.11...v1.0.12) (2025-12-06)
|
|
6
8
|
|
|
7
9
|
### [1.0.11](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v1.0.10...v1.0.11) (2025-12-06)
|
|
@@ -3,17 +3,34 @@
|
|
|
3
3
|
|
|
4
4
|
.wot-theme-dark {
|
|
5
5
|
@include b(calendar) {
|
|
6
|
+
@include e(cell) {
|
|
7
|
+
color: $-dark-color;
|
|
8
|
+
background-color: $-dark-background2;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@include e(label) {
|
|
12
|
+
color: $-dark-color;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@include e(value) {
|
|
16
|
+
color: $-dark-color;
|
|
17
|
+
}
|
|
6
18
|
|
|
7
19
|
@include e(title) {
|
|
8
20
|
color: $-dark-color;
|
|
9
21
|
}
|
|
10
22
|
|
|
11
23
|
:deep(.wd-calendar__arrow),
|
|
12
|
-
:deep(.wd-calendar__close)
|
|
13
|
-
:deep(.wd-calendar__clear) {
|
|
24
|
+
:deep(.wd-calendar__close) {
|
|
14
25
|
color: $-dark-color;
|
|
15
26
|
}
|
|
16
27
|
|
|
28
|
+
@include when(border) {
|
|
29
|
+
.wd-calendar__cell {
|
|
30
|
+
@include halfPixelBorder('top', $-cell-padding, $-dark-border-color);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
17
34
|
@include e(range-label-item) {
|
|
18
35
|
color: $-dark-color;
|
|
19
36
|
|
|
@@ -25,16 +42,128 @@
|
|
|
25
42
|
@include e(range-sperator) {
|
|
26
43
|
color: $-dark-color-gray;
|
|
27
44
|
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
28
47
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
48
|
+
@include b(calendar) {
|
|
49
|
+
@include when(border) {
|
|
50
|
+
.wd-calendar__cell {
|
|
51
|
+
@include halfPixelBorder('top', $-cell-padding);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@include e(cell) {
|
|
56
|
+
position: relative;
|
|
57
|
+
display: flex;
|
|
58
|
+
align-items: flex-start;
|
|
59
|
+
padding: $-cell-wrapper-padding $-cell-padding;
|
|
60
|
+
overflow: hidden;
|
|
61
|
+
font-size: $-cell-title-fs;
|
|
62
|
+
line-height: $-cell-line-height;
|
|
63
|
+
color: $-cell-title-color;
|
|
64
|
+
text-decoration: none;
|
|
65
|
+
background-color: $-color-white;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
@include e(cell) {
|
|
69
|
+
@include when(disabled) {
|
|
70
|
+
.wd-calendar__value {
|
|
71
|
+
color: $-input-disabled-color;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
@include when(align-right) {
|
|
76
|
+
.wd-calendar__value {
|
|
77
|
+
text-align: right;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
@include when(error) {
|
|
82
|
+
.wd-calendar__value {
|
|
83
|
+
color: $-input-error-color;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
:deep(.wd-calendar__arrow) {
|
|
87
|
+
color: $-input-error-color;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
@include when(large) {
|
|
92
|
+
font-size: $-cell-title-fs-large;
|
|
93
|
+
|
|
94
|
+
:deep(.wd-calendar__arrow) {
|
|
95
|
+
font-size: $-cell-icon-size-large;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
@include when(center) {
|
|
100
|
+
align-items: center;
|
|
101
|
+
|
|
102
|
+
:deep(.wd-calendar__arrow) {
|
|
103
|
+
margin-top: 0;
|
|
32
104
|
}
|
|
33
105
|
}
|
|
34
106
|
}
|
|
35
|
-
}
|
|
36
107
|
|
|
37
|
-
@include
|
|
108
|
+
@include e(error-message) {
|
|
109
|
+
font-size: $-form-item-error-message-font-size;
|
|
110
|
+
line-height: $-form-item-error-message-line-height;
|
|
111
|
+
color: $-form-item-error-message-color;
|
|
112
|
+
text-align: left;
|
|
113
|
+
vertical-align: middle;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
@include e(label) {
|
|
117
|
+
position: relative;
|
|
118
|
+
box-sizing: border-box;
|
|
119
|
+
width: $-input-cell-label-width;
|
|
120
|
+
margin-right: $-cell-padding;
|
|
121
|
+
color: $-cell-title-color;
|
|
122
|
+
|
|
123
|
+
@include when(required) {
|
|
124
|
+
.wd-calendar__label-inner {
|
|
125
|
+
position: relative;
|
|
126
|
+
&::after {
|
|
127
|
+
position: absolute;
|
|
128
|
+
top: 2px;
|
|
129
|
+
right: -24rpx;
|
|
130
|
+
font-size: $-cell-required-size;
|
|
131
|
+
line-height: 1.1;
|
|
132
|
+
color: $-cell-required-color;
|
|
133
|
+
content: '*';
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
@include e(value-wraper) {
|
|
140
|
+
display: flex;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
@include e(value) {
|
|
144
|
+
flex: 1;
|
|
145
|
+
margin-right: 10px;
|
|
146
|
+
color: $-cell-value-color;
|
|
147
|
+
|
|
148
|
+
@include when(ellipsis) {
|
|
149
|
+
@include lineEllipsis;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
@include m(placeholder) {
|
|
153
|
+
color: $-input-placeholder-color;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
@include e(body) {
|
|
158
|
+
flex: 1;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
@include edeep(arrow) {
|
|
162
|
+
display: block;
|
|
163
|
+
font-size: $-cell-icon-size;
|
|
164
|
+
line-height: $-cell-line-height;
|
|
165
|
+
color: $-cell-arrow-color;
|
|
166
|
+
}
|
|
38
167
|
|
|
39
168
|
@include e(header) {
|
|
40
169
|
position: relative;
|
|
@@ -42,22 +171,22 @@
|
|
|
42
171
|
}
|
|
43
172
|
|
|
44
173
|
@include e(title) {
|
|
45
|
-
color: $-action-sheet-color;
|
|
46
174
|
height: $-action-sheet-title-height;
|
|
47
|
-
line-height: $-action-sheet-title-height;
|
|
48
|
-
text-align: center;
|
|
49
175
|
font-size: $-action-sheet-title-fs;
|
|
50
176
|
font-weight: $-action-sheet-weight;
|
|
177
|
+
line-height: $-action-sheet-title-height;
|
|
178
|
+
color: $-action-sheet-color;
|
|
179
|
+
text-align: center;
|
|
51
180
|
}
|
|
52
181
|
|
|
53
182
|
@include edeep(close) {
|
|
54
183
|
position: absolute;
|
|
55
184
|
top: $-action-sheet-close-top;
|
|
56
185
|
right: $-action-sheet-close-right;
|
|
57
|
-
color: $-action-sheet-close-color;
|
|
58
186
|
font-size: $-action-sheet-close-fs;
|
|
59
|
-
transform: rotate(-45deg);
|
|
60
187
|
line-height: 1.1;
|
|
188
|
+
color: $-action-sheet-close-color;
|
|
189
|
+
transform: rotate(-45deg);
|
|
61
190
|
}
|
|
62
191
|
|
|
63
192
|
@include e(tabs) {
|
|
@@ -76,18 +205,18 @@
|
|
|
76
205
|
|
|
77
206
|
@include e(view) {
|
|
78
207
|
@include when(show-confirm) {
|
|
79
|
-
height:
|
|
208
|
+
height: 544px;
|
|
80
209
|
|
|
81
210
|
@include when(range) {
|
|
82
|
-
height:
|
|
211
|
+
height: 534px;
|
|
83
212
|
}
|
|
84
213
|
}
|
|
85
214
|
}
|
|
86
215
|
|
|
87
216
|
@include e(range-label) {
|
|
88
217
|
display: flex;
|
|
89
|
-
justify-content: center;
|
|
90
218
|
align-items: center;
|
|
219
|
+
justify-content: center;
|
|
91
220
|
font-size: 14px;
|
|
92
221
|
|
|
93
222
|
@include when(monthrange) {
|
|
@@ -113,46 +242,4 @@
|
|
|
113
242
|
@include e(confirm) {
|
|
114
243
|
padding: 12px 25px 14px;
|
|
115
244
|
}
|
|
116
|
-
|
|
117
|
-
@include edeep(cell) {
|
|
118
|
-
@include when(disabled) {
|
|
119
|
-
.wd-cell__value {
|
|
120
|
-
color: $-input-disabled-color;
|
|
121
|
-
cursor: not-allowed;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
@include when(error) {
|
|
125
|
-
.wd-cell__value {
|
|
126
|
-
color: $-input-error-color;
|
|
127
|
-
}
|
|
128
|
-
:deep(.wd-calendar__arrow) {
|
|
129
|
-
color: $-input-error-color;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
@include when(large) {
|
|
133
|
-
.wd-calendar__arrow {
|
|
134
|
-
font-size: $-cell-icon-size-large;
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
@include m(placeholder) {
|
|
139
|
-
.wd-cell__value {
|
|
140
|
-
color: $-input-placeholder-color;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
@include edeep(arrow) {
|
|
146
|
-
display: block;
|
|
147
|
-
font-size: $-cell-icon-size;
|
|
148
|
-
color: $-cell-arrow-color;
|
|
149
|
-
line-height: $-cell-line-height;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
@include edeep(clear) {
|
|
153
|
-
display: block;
|
|
154
|
-
font-size: $-cell-icon-size;
|
|
155
|
-
color: $-cell-clear-color;
|
|
156
|
-
line-height: $-cell-line-height;
|
|
157
|
-
}
|
|
158
|
-
}
|
|
245
|
+
}
|
|
@@ -1,21 +1,24 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* @Author: weisheng
|
|
3
3
|
* @Date: 2024-03-15 20:40:34
|
|
4
|
-
* @LastEditTime:
|
|
4
|
+
* @LastEditTime: 2024-06-09 14:38:57
|
|
5
5
|
* @LastEditors: weisheng
|
|
6
6
|
* @Description:
|
|
7
7
|
* @FilePath: /wot-design-uni/src/uni_modules/wot-design-uni/components/wd-calendar/types.ts
|
|
8
8
|
* 记得注释
|
|
9
9
|
*/
|
|
10
10
|
import type { ComponentPublicInstance, ExtractPropTypes, PropType } from 'vue'
|
|
11
|
-
import {
|
|
11
|
+
import {
|
|
12
|
+
baseProps,
|
|
13
|
+
makeArrayProp,
|
|
14
|
+
makeBooleanProp,
|
|
15
|
+
makeNumberProp,
|
|
16
|
+
makeRequiredProp,
|
|
17
|
+
makeStringProp,
|
|
18
|
+
} from '../common/props'
|
|
12
19
|
import type { CalendarFormatter, CalendarTimeFilter, CalendarType } from '../wd-calendar-view/types'
|
|
13
20
|
import type { FormItemRule } from '../wd-form/types'
|
|
14
21
|
|
|
15
|
-
const now = new Date()
|
|
16
|
-
const defaultMinDate = new Date(now.getFullYear(), now.getMonth() - 6, now.getDate()).getTime()
|
|
17
|
-
const defaultMaxDate = new Date(now.getFullYear(), now.getMonth() + 6, now.getDate(), 23, 59, 59).getTime()
|
|
18
|
-
|
|
19
22
|
export const calendarProps = {
|
|
20
23
|
...baseProps,
|
|
21
24
|
/**
|
|
@@ -29,11 +32,22 @@ export const calendarProps = {
|
|
|
29
32
|
/**
|
|
30
33
|
* 最小日期,为 13 位时间戳
|
|
31
34
|
*/
|
|
32
|
-
minDate: makeNumberProp(
|
|
35
|
+
minDate: makeNumberProp(
|
|
36
|
+
new Date(new Date().getFullYear(), new Date().getMonth() - 6, new Date().getDate()).getTime(),
|
|
37
|
+
),
|
|
33
38
|
/**
|
|
34
39
|
* 最大日期,为 13 位时间戳
|
|
35
40
|
*/
|
|
36
|
-
maxDate: makeNumberProp(
|
|
41
|
+
maxDate: makeNumberProp(
|
|
42
|
+
new Date(
|
|
43
|
+
new Date().getFullYear(),
|
|
44
|
+
new Date().getMonth() + 6,
|
|
45
|
+
new Date().getDate(),
|
|
46
|
+
23,
|
|
47
|
+
59,
|
|
48
|
+
59,
|
|
49
|
+
).getTime(),
|
|
50
|
+
),
|
|
37
51
|
/**
|
|
38
52
|
* 周起始天
|
|
39
53
|
*/
|
|
@@ -58,7 +72,7 @@ export const calendarProps = {
|
|
|
58
72
|
* 选中日期所使用的当日内具体时刻
|
|
59
73
|
*/
|
|
60
74
|
defaultTime: {
|
|
61
|
-
type: [String, Array] as PropType<string | string[]
|
|
75
|
+
type: [String, Array] as PropType<string | string[]>,
|
|
62
76
|
},
|
|
63
77
|
/**
|
|
64
78
|
* type 为 'datetime' 或 'datetimerange' 时有效,用于过滤时间选择器的数据
|
|
@@ -75,7 +89,15 @@ export const calendarProps = {
|
|
|
75
89
|
/**
|
|
76
90
|
* 设置左侧标题宽度
|
|
77
91
|
*/
|
|
78
|
-
labelWidth:
|
|
92
|
+
labelWidth: String,
|
|
93
|
+
/**
|
|
94
|
+
* 使用 label 插槽时设置该选项
|
|
95
|
+
*/
|
|
96
|
+
useLabelSlot: makeBooleanProp(false),
|
|
97
|
+
/**
|
|
98
|
+
* 使用默认插槽时设置该选项
|
|
99
|
+
*/
|
|
100
|
+
useDefaultSlot: makeBooleanProp(false),
|
|
79
101
|
/**
|
|
80
102
|
* 禁用
|
|
81
103
|
*/
|
|
@@ -181,28 +203,24 @@ export const calendarProps = {
|
|
|
181
203
|
* 是否在手指松开时立即触发picker-view的 change 事件。若不开启则会在滚动动画结束后触发 change 事件,1.2.25版本起提供,仅微信小程序和支付宝小程序支持。
|
|
182
204
|
*/
|
|
183
205
|
immediateChange: makeBooleanProp(false),
|
|
206
|
+
/**
|
|
207
|
+
* 打开前执行的函数
|
|
208
|
+
*/
|
|
209
|
+
initFun: Function as PropType<() => void>,
|
|
184
210
|
/**
|
|
185
211
|
* 是否使用内置单元格
|
|
186
212
|
* 默认为 true,使用内置单元格
|
|
187
213
|
*/
|
|
188
214
|
withCell: makeBooleanProp(true),
|
|
189
|
-
/**
|
|
190
|
-
* 是否从页面中脱离出来,用于解决各种 fixed 失效问题 (H5: teleport, APP: renderjs, 小程序: root-portal)
|
|
191
|
-
*/
|
|
192
|
-
rootPortal: makeBooleanProp(false),
|
|
193
|
-
/**
|
|
194
|
-
* 必填标记位置,可选值:before、after
|
|
195
|
-
*/
|
|
196
|
-
markerSide: makeStringProp<'before' | 'after'>('before'),
|
|
197
|
-
/**
|
|
198
|
-
* 显示清空按钮
|
|
199
|
-
*/
|
|
200
|
-
clearable: makeBooleanProp(false)
|
|
201
215
|
}
|
|
202
216
|
|
|
203
217
|
export type CalendarDisplayFormat = (value: number | number[], type: CalendarType) => string
|
|
204
218
|
|
|
205
|
-
export type CalendarInnerDisplayFormat = (
|
|
219
|
+
export type CalendarInnerDisplayFormat = (
|
|
220
|
+
value: number,
|
|
221
|
+
rangeType: 'start' | 'end',
|
|
222
|
+
type: CalendarType,
|
|
223
|
+
) => string
|
|
206
224
|
|
|
207
225
|
export type CalendarBeforeConfirmOption = {
|
|
208
226
|
value: number | number[] | null
|