sard-uniapp 1.19.1 → 1.19.3
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 +30 -0
- package/components/accordion/README.md +91 -0
- package/components/accordion/accordion.vue +7 -0
- package/components/accordion-item/accordion-item.vue +9 -0
- package/components/action-sheet/README.md +85 -0
- package/components/action-sheet/action-sheet.vue +15 -0
- package/components/action-sheet/variables.scss +1 -1
- package/components/alert/README.md +74 -0
- package/components/alert/alert.vue +10 -0
- package/components/avatar/README.md +86 -0
- package/components/avatar/avatar.vue +8 -0
- package/components/back-top/README.md +134 -0
- package/components/back-top/back-top.vue +9 -0
- package/components/badge/README.md +95 -0
- package/components/badge/badge.vue +11 -0
- package/components/button/README.md +162 -0
- package/components/button/button.vue +46 -0
- package/components/calendar/README.md +94 -0
- package/components/calendar/calendar.vue +21 -2
- package/components/calendar-input/README.md +65 -0
- package/components/calendar-input/calendar-input.d.ts +3 -2
- package/components/calendar-input/calendar-input.vue +32 -0
- package/components/calendar-input/common.d.ts +2 -0
- package/components/calendar-popout/README.md +100 -0
- package/components/calendar-popout/calendar-popout.d.ts +12 -2
- package/components/calendar-popout/calendar-popout.vue +32 -1
- package/components/calendar-popout/common.d.ts +2 -0
- package/components/card/README.md +82 -0
- package/components/card/card.vue +9 -0
- package/components/cascader/README.md +117 -0
- package/components/cascader/cascader.vue +13 -0
- package/components/cascader-input/README.md +51 -0
- package/components/cascader-input/cascader-input.d.ts +2 -1
- package/components/cascader-input/cascader-input.vue +32 -6
- package/components/cascader-input/common.d.ts +2 -0
- package/components/cascader-input/common.js +1 -0
- package/components/cascader-popout/README.md +53 -0
- package/components/cascader-popout/cascader-popout.d.ts +1 -1
- package/components/cascader-popout/cascader-popout.vue +21 -2
- package/components/check-icon/variables.scss +1 -1
- package/components/checkbox/README.md +185 -0
- package/components/checkbox/checkbox.vue +17 -0
- package/components/checkbox/variables.scss +1 -1
- package/components/checkbox-group/checkbox-group.vue +15 -0
- package/components/checkbox-input/README.md +44 -0
- package/components/checkbox-input/checkbox-input.d.ts +1 -0
- package/components/checkbox-input/checkbox-input.vue +25 -2
- package/components/checkbox-input/common.d.ts +2 -0
- package/components/checkbox-input/common.js +5 -1
- package/components/checkbox-popout/README.md +52 -0
- package/components/checkbox-popout/checkbox-popout.vue +19 -0
- package/components/col/col.vue +7 -0
- package/components/collapse/README.md +45 -0
- package/components/collapse/collapse.vue +3 -0
- package/components/config/index.d.ts +46 -1
- package/components/config/index.js +37 -0
- package/components/count-down/README.md +97 -0
- package/components/count-down/count-down.vue +8 -0
- package/components/count-to/README.md +61 -0
- package/components/count-to/count-to.vue +7 -0
- package/components/crop-image/README.md +86 -0
- package/components/crop-image/crop-image.vue +15 -0
- package/components/datetime-picker/README.md +136 -0
- package/components/datetime-picker/datetime-picker.vue +14 -0
- package/components/datetime-picker-input/README.md +82 -0
- package/components/datetime-picker-input/common.d.ts +2 -0
- package/components/datetime-picker-input/common.js +1 -0
- package/components/datetime-picker-input/datetime-picker-input.d.ts +2 -1
- package/components/datetime-picker-input/datetime-picker-input.vue +26 -0
- package/components/datetime-picker-popout/README.md +77 -0
- package/components/datetime-picker-popout/datetime-picker-popout.d.ts +1 -1
- package/components/datetime-picker-popout/datetime-picker-popout.vue +21 -2
- package/components/datetime-range-picker/README.md +49 -0
- package/components/datetime-range-picker/datetime-range-picker.vue +15 -0
- package/components/datetime-range-picker-input/README.md +58 -0
- package/components/datetime-range-picker-input/common.d.ts +2 -0
- package/components/datetime-range-picker-input/common.js +1 -0
- package/components/datetime-range-picker-input/datetime-range-picker-input.d.ts +1 -0
- package/components/datetime-range-picker-input/datetime-range-picker-input.vue +27 -0
- package/components/datetime-range-picker-popout/README.md +53 -0
- package/components/datetime-range-picker-popout/datetime-range-picker-popout.vue +22 -2
- package/components/dialog/README.md +192 -0
- package/components/dialog/dialog.d.ts +1 -1
- package/components/dialog/dialog.vue +33 -0
- package/components/dialog-agent/dialog-agent.d.ts +1 -1
- package/components/dialog-agent/dialog-agent.vue +21 -0
- package/components/divider/README.md +80 -0
- package/components/divider/divider.vue +8 -0
- package/components/dropdown/README.md +168 -0
- package/components/dropdown/common.d.ts +7 -0
- package/components/dropdown/common.js +1 -0
- package/components/dropdown/dropdown.d.ts +1 -1
- package/components/dropdown/dropdown.vue +16 -1
- package/components/dropdown/variables.scss +1 -1
- package/components/dropdown-item/dropdown-item.vue +51 -4
- package/components/empty/README.md +71 -0
- package/components/empty/empty.vue +8 -0
- package/components/empty/variables.scss +1 -1
- package/components/fab/README.md +111 -0
- package/components/fab/fab.vue +18 -0
- package/components/floating-bubble/README.md +70 -0
- package/components/floating-bubble/floating-bubble.vue +11 -0
- package/components/floating-panel/README.md +78 -0
- package/components/floating-panel/floating-panel.vue +11 -0
- package/components/form/README.md +308 -0
- package/components/form/form.vue +19 -0
- package/components/form-item/form-item.vue +17 -0
- package/components/grid/README.md +140 -0
- package/components/grid/grid.vue +11 -0
- package/components/grid-item/grid-item.vue +15 -0
- package/components/icon/README.md +118 -0
- package/components/icon/common.d.ts +2 -0
- package/components/icon/icon.d.ts +1 -0
- package/components/icon/icon.vue +18 -3
- package/components/indexes/README.md +83 -0
- package/components/indexes/indexes.vue +7 -0
- package/components/indexes-anchor/indexes-anchor.vue +5 -0
- package/components/input/README.md +170 -0
- package/components/input/common.d.ts +1 -0
- package/components/input/index.scss +0 -20
- package/components/input/input.vue +71 -17
- package/components/input/variables.scss +2 -2
- package/components/keyboard/README.md +82 -0
- package/components/keyboard/keyboard.vue +7 -0
- package/components/layout/README.md +89 -0
- package/components/list/README.md +118 -0
- package/components/list/list.vue +8 -0
- package/components/list-item/list-item.vue +15 -0
- package/components/load-more/README.md +75 -0
- package/components/load-more/load-more.vue +11 -0
- package/components/loading/README.md +89 -0
- package/components/loading/loading.vue +13 -0
- package/components/lucky-draw/README.md +174 -0
- package/components/marquee/README.md +65 -0
- package/components/marquee/marquee.vue +7 -0
- package/components/menu/_README.md +61 -0
- package/components/navbar/README.md +123 -0
- package/components/navbar/navbar.vue +11 -0
- package/components/navbar-item/navbar-item.vue +10 -0
- package/components/notice-bar/README.md +135 -0
- package/components/notice-bar/notice-bar.vue +17 -0
- package/components/notify/README.md +118 -0
- package/components/notify/notify.vue +11 -0
- package/components/notify-agent/notify-agent.vue +12 -0
- package/components/overlay/README.md +56 -0
- package/components/overlay/overlay.vue +10 -0
- package/components/pagination/README.md +80 -0
- package/components/pagination/pagination.vue +15 -0
- package/components/password-input/README.md +87 -0
- package/components/password-input/password-input.vue +17 -0
- package/components/picker/README.md +115 -0
- package/components/picker/common.d.ts +1 -1
- package/components/picker/common.js +18 -6
- package/components/picker/picker.vue +40 -15
- package/components/picker-input/README.md +51 -0
- package/components/picker-input/common.d.ts +2 -0
- package/components/picker-input/common.js +2 -0
- package/components/picker-input/picker-input.d.ts +2 -1
- package/components/picker-input/picker-input.vue +24 -2
- package/components/picker-popout/README.md +51 -0
- package/components/picker-popout/picker-popout.d.ts +1 -1
- package/components/picker-popout/picker-popout.vue +24 -4
- package/components/popout/README.md +111 -0
- package/components/popout/common.d.ts +1 -0
- package/components/popout/popout.d.ts +1 -1
- package/components/popout/popout.vue +30 -0
- package/components/popout-input/README.md +55 -0
- package/components/popout-input/popout-input.vue +16 -0
- package/components/popout-input/variables.scss +1 -1
- package/components/popover/README.md +191 -0
- package/components/popover/popover.vue +15 -0
- package/components/popover-reference/popover-reference.vue +5 -0
- package/components/popup/README.md +67 -0
- package/components/popup/popup.vue +20 -0
- package/components/progress-bar/README.md +90 -0
- package/components/progress-bar/progress-bar.vue +13 -0
- package/components/progress-circle/README.md +75 -0
- package/components/progress-circle/progress-circle.vue +10 -0
- package/components/pull-down-refresh/README.md +100 -0
- package/components/pull-down-refresh/pull-down-refresh.d.ts +1 -1
- package/components/pull-down-refresh/pull-down-refresh.vue +11 -0
- package/components/qrcode/README.md +103 -0
- package/components/qrcode/common.d.ts +2 -0
- package/components/qrcode/qrcode.vue +71 -61
- package/components/radio/README.md +172 -0
- package/components/radio/radio.vue +13 -0
- package/components/radio/variables.scss +1 -1
- package/components/radio-group/radio-group.vue +16 -0
- package/components/radio-input/README.md +44 -0
- package/components/radio-input/common.d.ts +3 -1
- package/components/radio-input/common.js +5 -1
- package/components/radio-input/radio-input.d.ts +1 -0
- package/components/radio-input/radio-input.vue +26 -2
- package/components/radio-popout/README.md +52 -0
- package/components/radio-popout/common.d.ts +1 -1
- package/components/radio-popout/radio-popout.vue +20 -0
- package/components/rate/README.md +106 -0
- package/components/rate/rate.d.ts +1 -1
- package/components/rate/rate.vue +22 -0
- package/components/rate/variables.scss +1 -1
- package/components/result/README.md +66 -0
- package/components/result/result.vue +10 -0
- package/components/row/row.vue +7 -0
- package/components/scroll-spy/README.md +70 -0
- package/components/scroll-spy/scroll-spy.vue +13 -0
- package/components/search/README.md +117 -0
- package/components/search/search.vue +25 -0
- package/components/search/variables.scss +1 -1
- package/components/share-sheet/README.md +94 -0
- package/components/share-sheet/share-sheet.vue +20 -0
- package/components/share-sheet/variables.scss +1 -1
- package/components/sidebar/README.md +118 -0
- package/components/sidebar/sidebar.vue +10 -0
- package/components/sidebar-item/sidebar-item.vue +8 -0
- package/components/signature/README.md +99 -0
- package/components/signature/signature.vue +20 -0
- package/components/skeleton/README.md +128 -0
- package/components/skeleton/skeleton.vue +12 -0
- package/components/skeleton-avatar/skeleton-avatar.vue +9 -0
- package/components/skeleton-block/skeleton-block.vue +8 -0
- package/components/skeleton-paragraph/skeleton-paragraph.vue +9 -0
- package/components/skeleton-title/skeleton-title.vue +8 -0
- package/components/slider/README.md +140 -0
- package/components/slider/slider.vue +29 -0
- package/components/space/README.md +82 -0
- package/components/space/space.vue +9 -0
- package/components/status-bar/README.md +72 -0
- package/components/status-bar/status-bar.vue +6 -0
- package/components/step/step.vue +9 -1
- package/components/stepper/README.md +94 -0
- package/components/stepper/stepper.vue +24 -0
- package/components/stepper/variables.scss +1 -1
- package/components/steps/README.md +142 -0
- package/components/steps/steps.vue +15 -0
- package/components/style/README.md +20 -0
- package/components/style/variables-dark.scss +10 -6
- package/components/style/variables.scss +17 -11
- package/components/swipe-action/README.md +82 -0
- package/components/swipe-action/swipe-action.vue +7 -0
- package/components/swiper-dot/README.md +45 -0
- package/components/swiper-dot/swiper-dot.vue +9 -0
- package/components/switch/README.md +89 -0
- package/components/switch/switch.vue +18 -0
- package/components/tab/tab.vue +8 -0
- package/components/tabbar/README.md +111 -0
- package/components/tabbar/tabbar.vue +12 -0
- package/components/tabbar-item/tabbar-item.vue +12 -0
- package/components/tabbar-pit/README.md +41 -0
- package/components/tabbar-pit/tabbar-pit.vue +5 -0
- package/components/table/README.md +162 -0
- package/components/table/table.vue +7 -0
- package/components/table-cell/table-cell.vue +7 -0
- package/components/table-row/table-row.vue +5 -0
- package/components/tabs/README.md +113 -0
- package/components/tabs/tabs.vue +10 -0
- package/components/tag/README.md +96 -0
- package/components/tag/common.d.ts +1 -1
- package/components/tag/index.scss +5 -1
- package/components/tag/tag.vue +16 -2
- package/components/timeline/README.md +66 -0
- package/components/timeline/timeline.vue +4 -0
- package/components/timeline/variables.scss +1 -1
- package/components/timeline-item/timeline-item.vue +9 -0
- package/components/toast/README.md +111 -0
- package/components/toast/toast.vue +11 -0
- package/components/toast-agent/toast-agent.vue +11 -0
- package/components/tree/README.md +208 -0
- package/components/tree/tree.vue +21 -0
- package/components/tree/variables.scss +3 -3
- package/components/upload/README.md +154 -0
- package/components/upload/common.d.ts +1 -0
- package/components/upload/upload.d.ts +1 -1
- package/components/upload/upload.vue +67 -26
- package/package.json +74 -45
- package/use/useFormPopout.d.ts +1 -1
- package/use/useFormPopout.js +4 -1
- package/use/usePopoutInput.d.ts +2 -1
- package/use/usePopoutInput.js +7 -4
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
import { type AvatarProps } from '../avatar';
|
|
2
2
|
import { type AlertProps } from '../alert';
|
|
3
3
|
import { type ButtonProps } from '../button';
|
|
4
|
+
import { type CalendarInputProps } from '../calendar-input';
|
|
4
5
|
import { type CalendarProps } from '../calendar';
|
|
6
|
+
import { type CascaderInputProps } from '../cascader-input';
|
|
5
7
|
import { type CheckboxGroupProps } from '../checkbox';
|
|
8
|
+
import { type CheckboxInputProps } from '../checkbox-input';
|
|
9
|
+
import { type DatetimePickerInputProps } from '../datetime-picker-input';
|
|
10
|
+
import { type DatetimeRangePickerInputProps } from '../datetime-range-picker-input';
|
|
6
11
|
import { type DialogProps } from '../dialog';
|
|
7
12
|
import { type DropdownProps } from '../dropdown';
|
|
8
13
|
import { type FloatingBubbleProps } from '../floating-bubble';
|
|
9
14
|
import { type FormProps } from '../form';
|
|
10
15
|
import { type GridProps } from '../grid';
|
|
16
|
+
import { type IconProps } from '../icon';
|
|
11
17
|
import { type InputProps } from '../input';
|
|
12
18
|
import { type KeyboardProps } from '../keyboard';
|
|
13
19
|
import { type ListItemProps } from '../list';
|
|
@@ -17,12 +23,14 @@ import { type NoticeBarProps } from '../notice-bar';
|
|
|
17
23
|
import { type NotifyProps } from '../notify';
|
|
18
24
|
import { type PaginationProps } from '../pagination';
|
|
19
25
|
import { type PasswordInputProps } from '../password-input';
|
|
26
|
+
import { type PickerInputProps } from '../picker-input';
|
|
20
27
|
import { type PopoutProps } from '../popout';
|
|
21
28
|
import { type PopoverProps } from '../popover';
|
|
22
29
|
import { type PopupProps } from '../popup';
|
|
23
30
|
import { type QrcodeProps } from '../qrcode';
|
|
24
31
|
import { type RadioGroupProps } from '../radio';
|
|
25
32
|
import { type RadioInputProps } from '../radio-input';
|
|
33
|
+
import { type RadioPopoutProps } from '../radio-popout';
|
|
26
34
|
import { type ResultProps } from '../result';
|
|
27
35
|
import { type SearchProps } from '../search';
|
|
28
36
|
import { type SpaceProps } from '../space';
|
|
@@ -40,6 +48,23 @@ type DeepPartial<T> = {
|
|
|
40
48
|
};
|
|
41
49
|
export declare const defaultConfig: {
|
|
42
50
|
initialZIndex: number;
|
|
51
|
+
/**
|
|
52
|
+
* 设置点击清除按钮后的值
|
|
53
|
+
*
|
|
54
|
+
* - 类型:() => any
|
|
55
|
+
* - 默认值:() = undefined
|
|
56
|
+
*
|
|
57
|
+
* 支持以下组件:
|
|
58
|
+
*
|
|
59
|
+
* - CalendarInput
|
|
60
|
+
* - DatetimePickerInput
|
|
61
|
+
* - DatetimeRangePickerInput
|
|
62
|
+
* - CascaderInput
|
|
63
|
+
* - CheckboxInput
|
|
64
|
+
* - PickerInput
|
|
65
|
+
* - RadioInput
|
|
66
|
+
*/
|
|
67
|
+
valueOnClear: (() => any) | undefined;
|
|
43
68
|
actionSheet: {
|
|
44
69
|
overlayClosable: boolean;
|
|
45
70
|
duration: number;
|
|
@@ -74,6 +99,7 @@ export declare const defaultConfig: {
|
|
|
74
99
|
};
|
|
75
100
|
calendarInput: {
|
|
76
101
|
outletFormat: string;
|
|
102
|
+
valueOnClear: CalendarInputProps["valueOnClear"];
|
|
77
103
|
};
|
|
78
104
|
calendarPopout: {
|
|
79
105
|
showConfirm: boolean;
|
|
@@ -83,6 +109,9 @@ export declare const defaultConfig: {
|
|
|
83
109
|
showConfirm: boolean;
|
|
84
110
|
validateEvent: boolean;
|
|
85
111
|
};
|
|
112
|
+
cascaderInput: {
|
|
113
|
+
valueOnClear: CascaderInputProps["valueOnClear"];
|
|
114
|
+
};
|
|
86
115
|
checkbox: {
|
|
87
116
|
validateEvent: boolean;
|
|
88
117
|
};
|
|
@@ -90,6 +119,9 @@ export declare const defaultConfig: {
|
|
|
90
119
|
direction: CheckboxGroupProps["direction"];
|
|
91
120
|
validateEvent: boolean;
|
|
92
121
|
};
|
|
122
|
+
checkboxInput: {
|
|
123
|
+
valueOnClear: CheckboxInputProps["valueOnClear"];
|
|
124
|
+
};
|
|
93
125
|
checkboxPopout: {
|
|
94
126
|
validateEvent: boolean;
|
|
95
127
|
};
|
|
@@ -117,12 +149,18 @@ export declare const defaultConfig: {
|
|
|
117
149
|
type: string;
|
|
118
150
|
calendar: "solar";
|
|
119
151
|
};
|
|
152
|
+
datetimePickerInput: {
|
|
153
|
+
valueOnClear: DatetimePickerInputProps["valueOnClear"];
|
|
154
|
+
};
|
|
120
155
|
datetimePickerPopout: {
|
|
121
156
|
validateEvent: boolean;
|
|
122
157
|
};
|
|
123
158
|
datetimeRangePicker: {
|
|
124
159
|
type: string;
|
|
125
160
|
};
|
|
161
|
+
datetimeRangePickerInput: {
|
|
162
|
+
valueOnClear: DatetimeRangePickerInputProps["valueOnClear"];
|
|
163
|
+
};
|
|
126
164
|
datetimeRangePickerPopout: {
|
|
127
165
|
validateEvent: boolean;
|
|
128
166
|
};
|
|
@@ -187,6 +225,7 @@ export declare const defaultConfig: {
|
|
|
187
225
|
icon: {
|
|
188
226
|
name: string;
|
|
189
227
|
family: string;
|
|
228
|
+
separate: IconProps["separate"];
|
|
190
229
|
};
|
|
191
230
|
indexes: {
|
|
192
231
|
hintDuration: number;
|
|
@@ -254,6 +293,9 @@ export declare const defaultConfig: {
|
|
|
254
293
|
picker: {
|
|
255
294
|
immediateChange: boolean;
|
|
256
295
|
};
|
|
296
|
+
pickerInput: {
|
|
297
|
+
valueOnClear: PickerInputProps["valueOnClear"];
|
|
298
|
+
};
|
|
257
299
|
pickerPopout: {
|
|
258
300
|
validateEvent: boolean;
|
|
259
301
|
};
|
|
@@ -307,9 +349,12 @@ export declare const defaultConfig: {
|
|
|
307
349
|
direction: RadioGroupProps["direction"];
|
|
308
350
|
validateEvent: boolean;
|
|
309
351
|
};
|
|
352
|
+
radioInput: {
|
|
353
|
+
valueOnClear: RadioInputProps["valueOnClear"];
|
|
354
|
+
};
|
|
310
355
|
radioPopout: {
|
|
311
356
|
validateEvent: boolean;
|
|
312
|
-
type:
|
|
357
|
+
type: RadioPopoutProps["type"];
|
|
313
358
|
};
|
|
314
359
|
rate: {
|
|
315
360
|
count: number;
|
|
@@ -2,6 +2,23 @@
|
|
|
2
2
|
export const defaultConfig = {
|
|
3
3
|
// 全局初始 zIndex
|
|
4
4
|
initialZIndex: 1000,
|
|
5
|
+
/**
|
|
6
|
+
* 设置点击清除按钮后的值
|
|
7
|
+
*
|
|
8
|
+
* - 类型:() => any
|
|
9
|
+
* - 默认值:() = undefined
|
|
10
|
+
*
|
|
11
|
+
* 支持以下组件:
|
|
12
|
+
*
|
|
13
|
+
* - CalendarInput
|
|
14
|
+
* - DatetimePickerInput
|
|
15
|
+
* - DatetimeRangePickerInput
|
|
16
|
+
* - CascaderInput
|
|
17
|
+
* - CheckboxInput
|
|
18
|
+
* - PickerInput
|
|
19
|
+
* - RadioInput
|
|
20
|
+
*/
|
|
21
|
+
valueOnClear: undefined,
|
|
5
22
|
actionSheet: {
|
|
6
23
|
overlayClosable: true,
|
|
7
24
|
duration: 250,
|
|
@@ -36,6 +53,7 @@ export const defaultConfig = {
|
|
|
36
53
|
},
|
|
37
54
|
calendarInput: {
|
|
38
55
|
outletFormat: 'YYYY-MM-DD',
|
|
56
|
+
valueOnClear: undefined,
|
|
39
57
|
},
|
|
40
58
|
calendarPopout: {
|
|
41
59
|
showConfirm: true,
|
|
@@ -45,6 +63,9 @@ export const defaultConfig = {
|
|
|
45
63
|
showConfirm: true,
|
|
46
64
|
validateEvent: true,
|
|
47
65
|
},
|
|
66
|
+
cascaderInput: {
|
|
67
|
+
valueOnClear: undefined,
|
|
68
|
+
},
|
|
48
69
|
checkbox: {
|
|
49
70
|
validateEvent: true,
|
|
50
71
|
},
|
|
@@ -52,6 +73,9 @@ export const defaultConfig = {
|
|
|
52
73
|
direction: 'vertical',
|
|
53
74
|
validateEvent: true,
|
|
54
75
|
},
|
|
76
|
+
checkboxInput: {
|
|
77
|
+
valueOnClear: undefined,
|
|
78
|
+
},
|
|
55
79
|
checkboxPopout: {
|
|
56
80
|
validateEvent: true,
|
|
57
81
|
},
|
|
@@ -79,12 +103,18 @@ export const defaultConfig = {
|
|
|
79
103
|
type: 'yMd',
|
|
80
104
|
calendar: 'solar',
|
|
81
105
|
},
|
|
106
|
+
datetimePickerInput: {
|
|
107
|
+
valueOnClear: undefined,
|
|
108
|
+
},
|
|
82
109
|
datetimePickerPopout: {
|
|
83
110
|
validateEvent: true,
|
|
84
111
|
},
|
|
85
112
|
datetimeRangePicker: {
|
|
86
113
|
type: 'yMd',
|
|
87
114
|
},
|
|
115
|
+
datetimeRangePickerInput: {
|
|
116
|
+
valueOnClear: undefined,
|
|
117
|
+
},
|
|
88
118
|
datetimeRangePickerPopout: {
|
|
89
119
|
validateEvent: true,
|
|
90
120
|
},
|
|
@@ -149,6 +179,7 @@ export const defaultConfig = {
|
|
|
149
179
|
icon: {
|
|
150
180
|
name: '',
|
|
151
181
|
family: 'sari',
|
|
182
|
+
separate: false,
|
|
152
183
|
},
|
|
153
184
|
indexes: {
|
|
154
185
|
hintDuration: 300,
|
|
@@ -216,6 +247,9 @@ export const defaultConfig = {
|
|
|
216
247
|
picker: {
|
|
217
248
|
immediateChange: false,
|
|
218
249
|
},
|
|
250
|
+
pickerInput: {
|
|
251
|
+
valueOnClear: undefined,
|
|
252
|
+
},
|
|
219
253
|
pickerPopout: {
|
|
220
254
|
validateEvent: true,
|
|
221
255
|
},
|
|
@@ -269,6 +303,9 @@ export const defaultConfig = {
|
|
|
269
303
|
direction: 'vertical',
|
|
270
304
|
validateEvent: true,
|
|
271
305
|
},
|
|
306
|
+
radioInput: {
|
|
307
|
+
valueOnClear: undefined,
|
|
308
|
+
},
|
|
272
309
|
radioPopout: {
|
|
273
310
|
validateEvent: true,
|
|
274
311
|
type: 'circle',
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
---
|
|
2
|
+
nav: 组件
|
|
3
|
+
title: CountDown
|
|
4
|
+
subtitle: 倒计时
|
|
5
|
+
group: 数据展示
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## 介绍
|
|
9
|
+
|
|
10
|
+
倒计时的展示 ,以便告知用户在一定时间后可以进行某些操作。
|
|
11
|
+
|
|
12
|
+
```ts
|
|
13
|
+
import CountDown from 'sard-uniapp/components/count-down/count-down.vue'
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## 代码演示
|
|
17
|
+
|
|
18
|
+
## 引入
|
|
19
|
+
|
|
20
|
+
### 基础使用
|
|
21
|
+
|
|
22
|
+
使用 `time` 属性配置倒计时总时长(单位毫秒)。
|
|
23
|
+
|
|
24
|
+
@code('${DEMO_PATH}/count-down/demo/Basic.vue')
|
|
25
|
+
|
|
26
|
+
### 自定义格式
|
|
27
|
+
|
|
28
|
+
默认格式为 `HH:mm:ss` ,也可以使用 `format` 自定义人任意想要的格式。
|
|
29
|
+
|
|
30
|
+
@code('${DEMO_PATH}/count-down/demo/Format.vue')
|
|
31
|
+
|
|
32
|
+
### 毫秒级别的渲染
|
|
33
|
+
|
|
34
|
+
默认每隔一秒渲染一次,使用 `millisecond` 属性可以设置毫秒级别渲染。
|
|
35
|
+
|
|
36
|
+
@code('${DEMO_PATH}/count-down/demo/Millisecond.vue')
|
|
37
|
+
|
|
38
|
+
### 自定义样式
|
|
39
|
+
|
|
40
|
+
如果想获取时分秒等数据分别渲染不同的样式,可以使用默认插槽提供的 `time` 属性来获取数据(`time` 类型为:`CountDownCurrentTime`)。
|
|
41
|
+
|
|
42
|
+
@code('${DEMO_PATH}/count-down/demo/Style.vue')
|
|
43
|
+
|
|
44
|
+
### 手动控制
|
|
45
|
+
|
|
46
|
+
当倒计时结束时便会停止,通过组件提供的方法可以控制倒计时的开始、暂停或进行重置。
|
|
47
|
+
|
|
48
|
+
@code('${DEMO_PATH}/count-down/demo/Control.vue')
|
|
49
|
+
|
|
50
|
+
### 验证码倒计时
|
|
51
|
+
|
|
52
|
+
下面代码演示了获取验证码场景中倒计时配合按钮的使用。
|
|
53
|
+
|
|
54
|
+
@code('${DEMO_PATH}/count-down/demo/Captcha.vue')
|
|
55
|
+
|
|
56
|
+
## API
|
|
57
|
+
|
|
58
|
+
### CountDownProps
|
|
59
|
+
|
|
60
|
+
| 属性 | 描述 | 类型 | 默认值 |
|
|
61
|
+
| ----------- | ---------------------- | ------- | ---------- |
|
|
62
|
+
| time | 倒计时总时长,单位毫秒 | number | 0 |
|
|
63
|
+
| auto-start | 是否自动开始倒计时 | boolean | true |
|
|
64
|
+
| format | 时间格式 | string | 'HH:mm:ss' |
|
|
65
|
+
| millisecond | 是否开启毫秒级别渲染 | boolean | false |
|
|
66
|
+
|
|
67
|
+
### CountDownSlots
|
|
68
|
+
|
|
69
|
+
| 插槽 | 描述 | 属性 |
|
|
70
|
+
| ------- | -------------- | ------------------------------ |
|
|
71
|
+
| default | 自定义默认内容 | { time: CountDownCurrentTime } |
|
|
72
|
+
|
|
73
|
+
### CountDownEmits
|
|
74
|
+
|
|
75
|
+
| 事件 | 描述 | 类型 |
|
|
76
|
+
| ------ | ---------------- | ------------------------------------ |
|
|
77
|
+
| change | 倒计时变化时触发 | (time: CountDownCurrentTime) => void |
|
|
78
|
+
| finish | 倒计时结束时触发 | () => void |
|
|
79
|
+
|
|
80
|
+
### CountDownExpose
|
|
81
|
+
|
|
82
|
+
| 属性 | 描述 | 类型 |
|
|
83
|
+
| ----- | ---------- | ---------- |
|
|
84
|
+
| start | 开始倒计时 | () => void |
|
|
85
|
+
| pause | 暂停倒计时 | () => void |
|
|
86
|
+
| reset | 重置倒计时 | () => void |
|
|
87
|
+
|
|
88
|
+
### CountDownCurrentTime
|
|
89
|
+
|
|
90
|
+
| 属性 | 描述 | 类型 |
|
|
91
|
+
| ------------ | ---------------------- | ------ |
|
|
92
|
+
| milliseconds | 剩余毫秒 | number |
|
|
93
|
+
| seconds | 剩余秒数 | number |
|
|
94
|
+
| minutes | 剩余分钟 | number |
|
|
95
|
+
| hours | 剩余小时 | number |
|
|
96
|
+
| days | 剩余天数 | number |
|
|
97
|
+
| total | 剩余总时间(单位毫秒) | number |
|
|
@@ -14,6 +14,14 @@ import {
|
|
|
14
14
|
formatTime,
|
|
15
15
|
defaultCountDownProps
|
|
16
16
|
} from "./common";
|
|
17
|
+
/**
|
|
18
|
+
* @property {number} time 倒计时总时长,单位毫秒,默认值:0。
|
|
19
|
+
* @property {boolean} autoStart 是否自动开始倒计时,默认值:true。
|
|
20
|
+
* @property {string} format 时间格式,默认值:'HH:mm:ss'。
|
|
21
|
+
* @property {boolean} millisecond 是否开启毫秒级别渲染,默认值:false。
|
|
22
|
+
* @event {(time: CountDownCurrentTime) => void} change 倒计时变化时触发
|
|
23
|
+
* @event {() => void} finish 倒计时结束时触发
|
|
24
|
+
*/
|
|
17
25
|
export default _defineComponent({
|
|
18
26
|
...{
|
|
19
27
|
options: {
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
---
|
|
2
|
+
nav: 组件
|
|
3
|
+
title: CountTo
|
|
4
|
+
subtitle: 数字滚动
|
|
5
|
+
group: 数据展示
|
|
6
|
+
version: 1.2+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 介绍
|
|
10
|
+
|
|
11
|
+
从某一个数值动态递增或递减到另一个数值。
|
|
12
|
+
|
|
13
|
+
## 引入
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
import CountTo from 'sard-uniapp/components/count-to/count-to.vue'
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## 代码演示
|
|
20
|
+
|
|
21
|
+
### 基础使用
|
|
22
|
+
|
|
23
|
+
给 `value` 属性一个数字值即可启动滚动功能。
|
|
24
|
+
|
|
25
|
+
@code('${DEMO_PATH}/count-to/demo/Basic.vue')
|
|
26
|
+
|
|
27
|
+
### 小数位数
|
|
28
|
+
|
|
29
|
+
使用 `precision` 属性设置小数位数。
|
|
30
|
+
|
|
31
|
+
@code('${DEMO_PATH}/count-to/demo/Precision.vue')
|
|
32
|
+
|
|
33
|
+
### 分隔符
|
|
34
|
+
|
|
35
|
+
使用 `separator` 属性设置千分位分隔符。
|
|
36
|
+
|
|
37
|
+
@code('${DEMO_PATH}/count-to/demo/Separator.vue')
|
|
38
|
+
|
|
39
|
+
### 持续时间
|
|
40
|
+
|
|
41
|
+
使用 `duration` 属性设置滚动时长。
|
|
42
|
+
|
|
43
|
+
@code('${DEMO_PATH}/count-to/demo/Duration.vue')
|
|
44
|
+
|
|
45
|
+
### 随机数字
|
|
46
|
+
|
|
47
|
+
`value` 属性改变时会自动滚动到最新的值。
|
|
48
|
+
|
|
49
|
+
@code('${DEMO_PATH}/count-to/demo/Random.vue')
|
|
50
|
+
|
|
51
|
+
## API
|
|
52
|
+
|
|
53
|
+
### CountToProps
|
|
54
|
+
|
|
55
|
+
| 属性 | 描述 | 类型 | 默认值 |
|
|
56
|
+
| -------------- | -------------------------------------- | ------ | ------ |
|
|
57
|
+
| value | 滚动到的目标数值 | number | 0 |
|
|
58
|
+
| precision | 精度,即小数位数 | number | 0 |
|
|
59
|
+
| separator | 千分位分隔符 | string | - |
|
|
60
|
+
| separatorDigit | 默认每三位插入一个分隔符,也可以自定义 | number | 3 |
|
|
61
|
+
| duration | 滚动到目标值持续时间,单位 ms | number | 2000 |
|
|
@@ -7,6 +7,13 @@ import { mergeDefaults as _mergeDefaults, defineComponent as _defineComponent }
|
|
|
7
7
|
import { computed, onUnmounted, ref, watch } from "vue";
|
|
8
8
|
import { addSeparator, createAnimation } from "../../utils";
|
|
9
9
|
import { defaultCountToProps } from "./common";
|
|
10
|
+
/**
|
|
11
|
+
* @property {number} value 滚动到的目标数值,默认值:0。
|
|
12
|
+
* @property {number} precision 精度,即小数位数,默认值:0。
|
|
13
|
+
* @property {string} separator 千分位分隔符,默认值:-。
|
|
14
|
+
* @property {number} separatorDigit 默认每三位插入一个分隔符,也可以自定义,默认值:3。
|
|
15
|
+
* @property {number} duration 滚动到目标值持续时间,单位 ms,默认值:2000。
|
|
16
|
+
*/
|
|
10
17
|
export default _defineComponent({
|
|
11
18
|
...{
|
|
12
19
|
options: {
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
---
|
|
2
|
+
nav: 组件
|
|
3
|
+
title: CropImage
|
|
4
|
+
subtitle: 裁剪图片
|
|
5
|
+
group:
|
|
6
|
+
title: 工具组件
|
|
7
|
+
order: 7
|
|
8
|
+
version: 1.12+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## 介绍
|
|
12
|
+
|
|
13
|
+
对图片进行裁剪。
|
|
14
|
+
|
|
15
|
+
## 引入
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import CropImage from 'sard-uniapp/components/crop-image/crop-image.vue'
|
|
19
|
+
import CropImageAgent from 'sard-uniapp/components/crop-image-agent/crop-image-agent.vue'
|
|
20
|
+
import { cropImage } from 'sard-uniapp'
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## 代码演示
|
|
24
|
+
|
|
25
|
+
### 基础使用
|
|
26
|
+
|
|
27
|
+
先在页面放置代理组件。
|
|
28
|
+
|
|
29
|
+
接着便可以使用 `cropImage` 方法对图片进行裁剪。
|
|
30
|
+
|
|
31
|
+
```tsx
|
|
32
|
+
<sar-crop-image-agent />
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
@code('${DEMO_PATH}/crop-image/demo/Basic.vue')
|
|
36
|
+
|
|
37
|
+
### 裁剪比例
|
|
38
|
+
|
|
39
|
+
可以通过 `cropScale` 属性设置任意比例。
|
|
40
|
+
|
|
41
|
+
@code('${DEMO_PATH}/crop-image/demo/CropScale.vue')
|
|
42
|
+
|
|
43
|
+
### 修改裁剪尺寸
|
|
44
|
+
|
|
45
|
+
可以通过 `beforeCrop` 方法修改裁剪尺寸,接收实际宽高,通过返回缩放比例来修改裁剪大小。
|
|
46
|
+
|
|
47
|
+
@code('${DEMO_PATH}/crop-image/demo/BeforeCrop.vue')
|
|
48
|
+
|
|
49
|
+
## API
|
|
50
|
+
|
|
51
|
+
### CropImageProps
|
|
52
|
+
|
|
53
|
+
| 属性 | 描述 | 类型 | 默认值 |
|
|
54
|
+
| ----------- | ------------------------------------------------------ | ----------------------------------------- | ------ |
|
|
55
|
+
| root-class | 组件根元素类名 | string | - |
|
|
56
|
+
| root-style | 组件根元素样式 | StyleValue | - |
|
|
57
|
+
| visible | 是否显示裁剪弹框 | boolean | false |
|
|
58
|
+
| src | 要裁剪的图片 | string | false |
|
|
59
|
+
| crop-scale | 裁剪的比例 | string | '1:1' |
|
|
60
|
+
| type | 导出图片类型 | 'png' \| 'jpg' | 'png' |
|
|
61
|
+
| quality | 导出图片的质量 | number | 0.92 |
|
|
62
|
+
| duration | 弹窗显隐过渡时间(单位 ms) | number | 150 |
|
|
63
|
+
| success | 裁剪成功回调 | (filePath: string) => void | - |
|
|
64
|
+
| fail | 裁剪成功回调 | (err: any) => void | - |
|
|
65
|
+
| complete | 裁剪成功或失败回调 | () => void | - |
|
|
66
|
+
| before-crop | 裁剪前回调,可以修改裁剪的尺寸;接收宽高,返回缩放比例 | (width: number, height: number) => number | - |
|
|
67
|
+
|
|
68
|
+
### CropImageEmits
|
|
69
|
+
|
|
70
|
+
| 事件 | 描述 | 类型 |
|
|
71
|
+
| -------------- | ---------------- | -------------------------- |
|
|
72
|
+
| update:visible | 弹出框显隐时触发 | (visible: boolean) => void |
|
|
73
|
+
|
|
74
|
+
### CropImageAgentProps / CropImageOptions
|
|
75
|
+
|
|
76
|
+
继承 [`CropImageProps`](#CropImageProps) 并有以下额外属性。
|
|
77
|
+
|
|
78
|
+
| 属性 | 描述 | 类型 | 默认值 |
|
|
79
|
+
| ---- | ------------- | ------ | ----------- |
|
|
80
|
+
| id | 裁剪组件的 id | string | 'cropImage' |
|
|
81
|
+
|
|
82
|
+
### 命令式方法
|
|
83
|
+
|
|
84
|
+
| 名称 | 描述 | 类型 |
|
|
85
|
+
| --------- | -------- | ----------------------------------- |
|
|
86
|
+
| cropImage | 裁剪图片 | (options: CropImageOptions) => void |
|
|
@@ -118,6 +118,21 @@ import SarLoading from "../loading/loading.vue";
|
|
|
118
118
|
const minGapX = 20;
|
|
119
119
|
const bounceCoeff = 4;
|
|
120
120
|
const maxScale = 5;
|
|
121
|
+
/**
|
|
122
|
+
* @property {string} rootClass 组件根元素类名,默认值:-。
|
|
123
|
+
* @property {StyleValue} rootStyle 组件根元素样式,默认值:-。
|
|
124
|
+
* @property {boolean} visible 是否显示裁剪弹框,默认值:false。
|
|
125
|
+
* @property {string} src 要裁剪的图片,默认值:false。
|
|
126
|
+
* @property {string} cropScale 裁剪的比例,默认值:'1:1'。
|
|
127
|
+
* @property {'png' | 'jpg'} type 导出图片类型,默认值:'png'。
|
|
128
|
+
* @property {number} quality 导出图片的质量,默认值:0.92。
|
|
129
|
+
* @property {number} duration 弹窗显隐过渡时间(单位 ms),默认值:150。
|
|
130
|
+
* @property {(filePath: string) => void} success 裁剪成功回调,默认值:-。
|
|
131
|
+
* @property {(err: any) => void} fail 裁剪成功回调,默认值:-。
|
|
132
|
+
* @property {() => void} complete 裁剪成功或失败回调,默认值:-。
|
|
133
|
+
* @property {(width: number, height: number) => number} beforeCrop 裁剪前回调,可以修改裁剪的尺寸;接收宽高,返回缩放比例,默认值:-。
|
|
134
|
+
* @event {(visible: boolean) => void} update 弹出框显隐时触发
|
|
135
|
+
*/
|
|
121
136
|
export default _defineComponent({
|
|
122
137
|
components: {
|
|
123
138
|
SarPopup,
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
---
|
|
2
|
+
nav: 组件
|
|
3
|
+
title: DatetimePicker
|
|
4
|
+
subtitle: 日期时间选择器
|
|
5
|
+
group: 表单组件
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## 介绍
|
|
9
|
+
|
|
10
|
+
用于选择日期时间。
|
|
11
|
+
|
|
12
|
+
## 引入
|
|
13
|
+
|
|
14
|
+
```ts
|
|
15
|
+
import DatetimePicker from 'sard-uniapp/components/datetime-picker/datetime-picker.vue'
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## 代码演示
|
|
19
|
+
|
|
20
|
+
### 基础使用
|
|
21
|
+
|
|
22
|
+
通过 `v-model` 绑定当前值,通过 `type` 属性设置要展示的列类型。
|
|
23
|
+
|
|
24
|
+
@code('${DEMO_PATH}/datetime-picker/demo/Basic.vue')
|
|
25
|
+
|
|
26
|
+
更多案例,请参考 [DatetimePickerPopout 组件](./datetime-picker-popout)
|
|
27
|
+
|
|
28
|
+
## API
|
|
29
|
+
|
|
30
|
+
### DatetimePickerProps
|
|
31
|
+
|
|
32
|
+
| 属性 | 描述 | 类型 | 默认值 |
|
|
33
|
+
| ----------------------------- | -------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | ------- |
|
|
34
|
+
| root-class | 组件根元素类名 | string | - |
|
|
35
|
+
| root-style | 组件根元素样式 | StyleValue | - |
|
|
36
|
+
| type | 设置每一列要展示的数据类型,每个字母对应一列 | string [详见特殊符号](#DatetimeLetter) | 'yMd' |
|
|
37
|
+
| calendar <sup>1.18+</sup> | 历法类型,可选公历或农历 | 'solar' \| 'lunar' | 'solar' |
|
|
38
|
+
| min | 可选的最小日期 | Date | 十年前 |
|
|
39
|
+
| max | 可选的最大日期 | Date | 十年后 |
|
|
40
|
+
| model-value | 当前选中的日期 | Date \| string | - |
|
|
41
|
+
| filter | 选项的过滤函数 | (letter: DatetimeLetter, value: number, date: Date, index: number) => boolean | - |
|
|
42
|
+
| formatter | 选项的格式化函数 | (letter: DatetimeLetter, option: DatetimeColumnOption, date: Date, index: number) => string \| void \|undefined | - |
|
|
43
|
+
| value-format <sup>1.10+</sup> | 绑定值的格式,不指定则绑定值为 Date 对象 | string [详见特殊符号](../guide/date#日期格式特殊符号) | - |
|
|
44
|
+
|
|
45
|
+
### DatetimePickerEmits
|
|
46
|
+
|
|
47
|
+
| 事件 | 描述 | 类型 |
|
|
48
|
+
| ------------------------ | -------------------- | ------------------------------ |
|
|
49
|
+
| update:model-value | 选中的选项改变时触发 | (date: Date \| string) => void |
|
|
50
|
+
| change <sup>1.9.2+</sup> | 选中的选项改变时触发 | (date: Date \| string) => void |
|
|
51
|
+
|
|
52
|
+
### DatetimeLetter
|
|
53
|
+
|
|
54
|
+
```ts
|
|
55
|
+
type DatetimeLetter = 'y' | 'M' | 'd' | 'h' | 'm' | 's'
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
上面每个字母分别代表“年月日时分秒”。
|
|
59
|
+
|
|
60
|
+
### DatetimeColumnOption
|
|
61
|
+
|
|
62
|
+
| 属性 | 描述 | 类型 |
|
|
63
|
+
| -------- | -------------------------------------------------- | --------------------------- |
|
|
64
|
+
| value | 选项值,如果是农历闰月,此值会为负数 | number |
|
|
65
|
+
| label | 展示的文本,默认中文会在值的后面加上“年月日时分秒” | string \| number \| boolean |
|
|
66
|
+
| zerofill | 填充前置 0 后的选项值字符串,可在格式化时使用 | string |
|
|
67
|
+
|
|
68
|
+
### 农历相关API <sup>1.18+</sup>
|
|
69
|
+
|
|
70
|
+
#### solarToLunar
|
|
71
|
+
|
|
72
|
+
```ts
|
|
73
|
+
function solarToLunar(
|
|
74
|
+
year: number,
|
|
75
|
+
month: number,
|
|
76
|
+
day: number,
|
|
77
|
+
): {
|
|
78
|
+
year: number
|
|
79
|
+
month: number
|
|
80
|
+
day: number
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
接收公历的年月日(月份从1开始),返回农历的年月日。如果返回的月份为负数,则为闰月。
|
|
85
|
+
|
|
86
|
+
#### lunarToSolar
|
|
87
|
+
|
|
88
|
+
```ts
|
|
89
|
+
function lunarToSolar(
|
|
90
|
+
year: number,
|
|
91
|
+
month: number,
|
|
92
|
+
day: number,
|
|
93
|
+
): {
|
|
94
|
+
year: number
|
|
95
|
+
month: number
|
|
96
|
+
day: number
|
|
97
|
+
}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
接收农历的年月日(月份从1开始),返回公历的年月日。如果农历月份为闰月,需传递负数。
|
|
101
|
+
|
|
102
|
+
#### getLunarYearName
|
|
103
|
+
|
|
104
|
+
```ts
|
|
105
|
+
function getLunarYearName(year: number): string
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
接收数字年份,返回中文数字年份,例如:`2025 -> '二零二五年'`。
|
|
109
|
+
|
|
110
|
+
#### getLunarMonthName
|
|
111
|
+
|
|
112
|
+
```ts
|
|
113
|
+
function getLunarMonthName(month: number, isLeapMonth?: boolean): string
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
- 参数
|
|
117
|
+
- month: 农历月份,从1开始;
|
|
118
|
+
- isLeapMonth: 是否为闰月。
|
|
119
|
+
|
|
120
|
+
获取农历月份名称。
|
|
121
|
+
|
|
122
|
+
#### getLunarDayName
|
|
123
|
+
|
|
124
|
+
```ts
|
|
125
|
+
function getLunarDayName(day: number): string
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
获取农历日期名称。
|
|
129
|
+
|
|
130
|
+
#### getLunarHourName
|
|
131
|
+
|
|
132
|
+
```ts
|
|
133
|
+
function getLunarHourName(hour: number): string
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
获取农历时辰名称。
|
|
@@ -31,6 +31,20 @@ import {
|
|
|
31
31
|
defaultDatetimePickerProps
|
|
32
32
|
} from "./common";
|
|
33
33
|
import { useTranslate } from "../locale";
|
|
34
|
+
/**
|
|
35
|
+
* @property {string} rootClass 组件根元素类名,默认值:-。
|
|
36
|
+
* @property {StyleValue} rootStyle 组件根元素样式,默认值:-。
|
|
37
|
+
* @property {string [详见特殊符号](#DatetimeLetter)} type 设置每一列要展示的数据类型,每个字母对应一列,默认值:'yMd'。
|
|
38
|
+
* @property {'solar' | 'lunar'} calendar 历法类型,可选公历或农历,默认值:'solar'。
|
|
39
|
+
* @property {Date} min 可选的最小日期,默认值:十年前。
|
|
40
|
+
* @property {Date} max 可选的最大日期,默认值:十年后。
|
|
41
|
+
* @property {Date | string} modelValue 当前选中的日期,默认值:-。
|
|
42
|
+
* @property {(letter: DatetimeLetter, value: number, date: Date, index: number) => boolean} filter 选项的过滤函数,默认值:-。
|
|
43
|
+
* @property {(letter: DatetimeLetter, option: DatetimeColumnOption, date: Date, index: number) => string | void |undefined} formatter 选项的格式化函数,默认值:-。
|
|
44
|
+
* @property {string [详见特殊符号](../guide/date#日期格式特殊符号)} valueFormat 绑定值的格式,不指定则绑定值为 Date 对象,默认值:-。
|
|
45
|
+
* @event {(date: Date | string) => void} update 选中的选项改变时触发
|
|
46
|
+
* @event {(date: Date | string) => void} change 选中的选项改变时触发
|
|
47
|
+
*/
|
|
34
48
|
export default _defineComponent({
|
|
35
49
|
components: {
|
|
36
50
|
SarPicker,
|