@touchvue/ui 1.0.0-beta.52 → 1.0.0-beta.54
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/es/components/calendar/src/calendar.d.ts +8 -1
- package/es/components/calendar/src/calendar.vue.d.ts +9 -0
- package/es/components/cascader/src/cascader-item.vue.d.ts +5 -1
- package/es/components/cascader/src/cascader.vue.d.ts +0 -7
- package/es/components/datepicker/src/DatePicker.vue.d.ts +9 -0
- package/es/components/datepicker/src/Picker.vue.d.ts +9 -0
- package/es/components/datepicker/src/date-picker.d.ts +1 -1
- package/es/components/datepicker/src/use-date-picker.d.ts +1 -0
- package/es/components/float/index.d.ts +15 -0
- package/es/components/float/src/Float.vue.d.ts +9 -0
- package/es/components/float/src/float.d.ts +4 -0
- package/es/components/icon/src/icon.vue.d.ts +2 -0
- package/es/components/slide/src/slide.vue.d.ts +4 -0
- package/es/components/tab/src/tab-item.vue.d.ts +2 -0
- package/es/components/timeline/src/timeline.vue.d.ts +5 -0
- package/es/directives/index.d.ts +2 -1
- package/es/directives/press/index.d.ts +2 -0
- package/es/directives/press/src/press.d.ts +20 -0
- package/es/index.d.mjs +1 -0
- package/es/index.d.mjs.map +1 -1
- package/es/index.mjs +1 -0
- package/es/index.mjs.map +1 -1
- package/es/packages/components/calendar/src/calendar.mjs +7 -0
- package/es/packages/components/calendar/src/calendar.mjs.map +1 -1
- package/es/packages/components/calendar/src/calendar.vue2.mjs +31 -38
- package/es/packages/components/calendar/src/calendar.vue2.mjs.map +1 -1
- package/es/packages/components/cascader/src/cascader-item.vue2.mjs +36 -84
- package/es/packages/components/cascader/src/cascader-item.vue2.mjs.map +1 -1
- package/es/packages/components/cascader/src/cascader.vue2.mjs +86 -28
- package/es/packages/components/cascader/src/cascader.vue2.mjs.map +1 -1
- package/es/packages/components/checkboxes/src/Checkboxes.vue2.mjs +2 -3
- package/es/packages/components/checkboxes/src/Checkboxes.vue2.mjs.map +1 -1
- package/es/packages/components/datepicker/src/DatePicker.vue2.mjs +9 -3
- package/es/packages/components/datepicker/src/DatePicker.vue2.mjs.map +1 -1
- package/es/packages/components/datepicker/src/Picker.vue2.mjs +4 -0
- package/es/packages/components/datepicker/src/Picker.vue2.mjs.map +1 -1
- package/es/packages/components/datepicker/src/date-picker.mjs.map +1 -1
- package/es/packages/components/datepicker/src/use-date-picker.mjs +8 -8
- package/es/packages/components/datepicker/src/use-date-picker.mjs.map +1 -1
- package/es/packages/components/float/src/Float.vue2.mjs +10 -3
- package/es/packages/components/float/src/Float.vue2.mjs.map +1 -1
- package/es/packages/components/float/src/float.mjs +1 -0
- package/es/packages/components/float/src/float.mjs.map +1 -1
- package/es/packages/components/header/src/header.vue2.mjs +1 -0
- package/es/packages/components/header/src/header.vue2.mjs.map +1 -1
- package/es/packages/components/icon/src/icon.vue2.mjs +7 -3
- package/es/packages/components/icon/src/icon.vue2.mjs.map +1 -1
- package/es/packages/components/index.d.mjs +1 -0
- package/es/packages/components/index.d.mjs.map +1 -1
- package/es/packages/components/index.mjs +1 -0
- package/es/packages/components/index.mjs.map +1 -1
- package/es/packages/components/input/src/input.vue2.mjs +9 -9
- package/es/packages/components/input/src/input.vue2.mjs.map +1 -1
- package/es/packages/components/select/src/select.vue2.mjs +0 -9
- package/es/packages/components/select/src/select.vue2.mjs.map +1 -1
- package/es/packages/components/slide/src/slide.vue2.mjs +3 -1
- package/es/packages/components/slide/src/slide.vue2.mjs.map +1 -1
- package/es/packages/components/tab/src/tab-item.vue2.mjs +3 -1
- package/es/packages/components/tab/src/tab-item.vue2.mjs.map +1 -1
- package/es/packages/components/tab/src/tab.vue2.mjs +54 -9
- package/es/packages/components/tab/src/tab.vue2.mjs.map +1 -1
- package/es/packages/components/tree/src/tree.vue2.mjs +2 -0
- package/es/packages/components/tree/src/tree.vue2.mjs.map +1 -1
- package/es/packages/directives/index.d.mjs +1 -0
- package/es/packages/directives/index.d.mjs.map +1 -1
- package/es/packages/directives/index.mjs +3 -3
- package/es/packages/directives/index.mjs.map +1 -1
- package/es/packages/directives/press/index.d.mjs +2 -0
- package/es/packages/directives/press/index.mjs +2 -0
- package/es/packages/directives/press/src/press.d.mjs +2 -0
- package/es/packages/directives/press/src/press.d.mjs.map +1 -0
- package/es/packages/directives/press/src/press.mjs +100 -0
- package/es/packages/directives/press/src/press.mjs.map +1 -0
- package/es/packages/locale/lang/en-US.mjs +6 -0
- package/es/packages/locale/lang/en-US.mjs.map +1 -1
- package/es/packages/locale/lang/zh-CN.mjs +6 -0
- package/es/packages/locale/lang/zh-CN.mjs.map +1 -1
- package/es/packages/utils/validate.mjs.map +1 -1
- package/lib/components/calendar/src/calendar.d.ts +8 -1
- package/lib/components/calendar/src/calendar.vue.d.ts +9 -0
- package/lib/components/cascader/src/cascader-item.vue.d.ts +5 -1
- package/lib/components/cascader/src/cascader.vue.d.ts +0 -7
- package/lib/components/datepicker/src/DatePicker.vue.d.ts +9 -0
- package/lib/components/datepicker/src/Picker.vue.d.ts +9 -0
- package/lib/components/datepicker/src/date-picker.d.ts +1 -1
- package/lib/components/datepicker/src/use-date-picker.d.ts +1 -0
- package/lib/components/float/index.d.ts +15 -0
- package/lib/components/float/src/Float.vue.d.ts +9 -0
- package/lib/components/float/src/float.d.ts +4 -0
- package/lib/components/icon/src/icon.vue.d.ts +2 -0
- package/lib/components/slide/src/slide.vue.d.ts +4 -0
- package/lib/components/tab/src/tab-item.vue.d.ts +2 -0
- package/lib/components/timeline/src/timeline.vue.d.ts +5 -0
- package/lib/directives/index.d.ts +2 -1
- package/lib/directives/press/index.d.ts +2 -0
- package/lib/directives/press/src/press.d.ts +20 -0
- package/lib/index.d.js +2 -0
- package/lib/index.d.js.map +1 -1
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -1
- package/lib/packages/components/calendar/src/calendar.js +7 -0
- package/lib/packages/components/calendar/src/calendar.js.map +1 -1
- package/lib/packages/components/calendar/src/calendar.vue2.js +31 -38
- package/lib/packages/components/calendar/src/calendar.vue2.js.map +1 -1
- package/lib/packages/components/cascader/src/cascader-item.vue2.js +35 -83
- package/lib/packages/components/cascader/src/cascader-item.vue2.js.map +1 -1
- package/lib/packages/components/cascader/src/cascader.vue2.js +85 -27
- package/lib/packages/components/cascader/src/cascader.vue2.js.map +1 -1
- package/lib/packages/components/checkboxes/src/Checkboxes.vue2.js +1 -2
- package/lib/packages/components/checkboxes/src/Checkboxes.vue2.js.map +1 -1
- package/lib/packages/components/datepicker/src/DatePicker.vue2.js +9 -3
- package/lib/packages/components/datepicker/src/DatePicker.vue2.js.map +1 -1
- package/lib/packages/components/datepicker/src/Picker.vue2.js +4 -0
- package/lib/packages/components/datepicker/src/Picker.vue2.js.map +1 -1
- package/lib/packages/components/datepicker/src/date-picker.js.map +1 -1
- package/lib/packages/components/datepicker/src/use-date-picker.js +8 -8
- package/lib/packages/components/datepicker/src/use-date-picker.js.map +1 -1
- package/lib/packages/components/float/src/Float.vue2.js +9 -2
- package/lib/packages/components/float/src/Float.vue2.js.map +1 -1
- package/lib/packages/components/float/src/float.js +1 -0
- package/lib/packages/components/float/src/float.js.map +1 -1
- package/lib/packages/components/header/src/header.vue2.js +1 -0
- package/lib/packages/components/header/src/header.vue2.js.map +1 -1
- package/lib/packages/components/icon/src/icon.vue2.js +7 -3
- package/lib/packages/components/icon/src/icon.vue2.js.map +1 -1
- package/lib/packages/components/index.d.js +2 -0
- package/lib/packages/components/index.d.js.map +1 -1
- package/lib/packages/components/index.js +2 -0
- package/lib/packages/components/index.js.map +1 -1
- package/lib/packages/components/input/src/input.vue2.js +9 -9
- package/lib/packages/components/input/src/input.vue2.js.map +1 -1
- package/lib/packages/components/select/src/select.vue2.js +0 -9
- package/lib/packages/components/select/src/select.vue2.js.map +1 -1
- package/lib/packages/components/slide/src/slide.vue2.js +3 -1
- package/lib/packages/components/slide/src/slide.vue2.js.map +1 -1
- package/lib/packages/components/tab/src/tab-item.vue2.js +3 -1
- package/lib/packages/components/tab/src/tab-item.vue2.js.map +1 -1
- package/lib/packages/components/tab/src/tab.vue2.js +53 -8
- package/lib/packages/components/tab/src/tab.vue2.js.map +1 -1
- package/lib/packages/components/tree/src/tree.vue2.js +2 -0
- package/lib/packages/components/tree/src/tree.vue2.js.map +1 -1
- package/lib/packages/directives/index.d.js +2 -0
- package/lib/packages/directives/index.d.js.map +1 -1
- package/lib/packages/directives/index.js +3 -2
- package/lib/packages/directives/index.js.map +1 -1
- package/lib/packages/directives/press/index.d.js +8 -0
- package/lib/packages/directives/press/index.js +8 -0
- package/lib/packages/directives/press/src/press.d.js +3 -0
- package/lib/packages/directives/press/src/press.d.js.map +1 -0
- package/lib/packages/directives/press/src/press.js +102 -0
- package/lib/packages/directives/press/src/press.js.map +1 -0
- package/lib/packages/locale/lang/en-US.js +6 -0
- package/lib/packages/locale/lang/en-US.js.map +1 -1
- package/lib/packages/locale/lang/zh-CN.js +6 -0
- package/lib/packages/locale/lang/zh-CN.js.map +1 -1
- package/lib/packages/utils/validate.js.map +1 -1
- package/package.json +1 -1
- package/theme/components/index.css +74 -18
- package/theme/index.css +74 -18
- package/theme/skin/default.css +74 -18
- package/es/directives/longtap/index.d.ts +0 -2
- package/es/directives/longtap/src/longtap.d.ts +0 -7
- package/es/packages/directives/longtap/index.d.mjs +0 -2
- package/es/packages/directives/longtap/index.mjs +0 -2
- package/es/packages/directives/longtap/src/longtap.d.mjs +0 -2
- package/es/packages/directives/longtap/src/longtap.d.mjs.map +0 -1
- package/es/packages/directives/longtap/src/longtap.mjs +0 -80
- package/es/packages/directives/longtap/src/longtap.mjs.map +0 -1
- package/lib/directives/longtap/index.d.ts +0 -2
- package/lib/directives/longtap/src/longtap.d.ts +0 -7
- package/lib/packages/directives/longtap/index.d.js +0 -8
- package/lib/packages/directives/longtap/index.js +0 -8
- package/lib/packages/directives/longtap/src/longtap.d.js +0 -3
- package/lib/packages/directives/longtap/src/longtap.d.js.map +0 -1
- package/lib/packages/directives/longtap/src/longtap.js +0 -82
- package/lib/packages/directives/longtap/src/longtap.js.map +0 -1
- /package/es/packages/directives/{longtap → press}/index.d.mjs.map +0 -0
- /package/es/packages/directives/{longtap → press}/index.mjs.map +0 -0
- /package/lib/packages/directives/{longtap → press}/index.d.js.map +0 -0
- /package/lib/packages/directives/{longtap → press}/index.js.map +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export type DatePickerType = 'date' | '
|
|
1
|
+
export type DatePickerType = 'date' | 'datetime' | 'month' | 'time';
|
|
2
2
|
export type DatePickerValue = Date | string;
|
|
3
3
|
export declare const getDefaultFormat: (type: DatePickerType) => "yyyy-MM-dd HH:mm:ss" | "HH:mm:ss" | "yyyy-MM" | "yyyy-MM-dd";
|
|
@@ -4,6 +4,10 @@ export declare const ToFloat: import("@touchvue/ui/lib/utils").SFCWithInstall<{
|
|
|
4
4
|
type: BooleanConstructor;
|
|
5
5
|
default: boolean;
|
|
6
6
|
};
|
|
7
|
+
show: {
|
|
8
|
+
type: BooleanConstructor;
|
|
9
|
+
default: boolean;
|
|
10
|
+
};
|
|
7
11
|
lazy: {
|
|
8
12
|
type: BooleanConstructor;
|
|
9
13
|
default: boolean;
|
|
@@ -96,6 +100,7 @@ export declare const ToFloat: import("@touchvue/ui/lib/utils").SFCWithInstall<{
|
|
|
96
100
|
closeOnBlur: boolean;
|
|
97
101
|
zIndex: number;
|
|
98
102
|
height: string | number;
|
|
103
|
+
show: boolean;
|
|
99
104
|
global: boolean;
|
|
100
105
|
top: string | number;
|
|
101
106
|
beforeClose: Function;
|
|
@@ -118,6 +123,10 @@ export declare const ToFloat: import("@touchvue/ui/lib/utils").SFCWithInstall<{
|
|
|
118
123
|
type: BooleanConstructor;
|
|
119
124
|
default: boolean;
|
|
120
125
|
};
|
|
126
|
+
show: {
|
|
127
|
+
type: BooleanConstructor;
|
|
128
|
+
default: boolean;
|
|
129
|
+
};
|
|
121
130
|
lazy: {
|
|
122
131
|
type: BooleanConstructor;
|
|
123
132
|
default: boolean;
|
|
@@ -210,6 +219,7 @@ export declare const ToFloat: import("@touchvue/ui/lib/utils").SFCWithInstall<{
|
|
|
210
219
|
closeOnBlur: boolean;
|
|
211
220
|
zIndex: number;
|
|
212
221
|
height: string | number;
|
|
222
|
+
show: boolean;
|
|
213
223
|
global: boolean;
|
|
214
224
|
top: string | number;
|
|
215
225
|
beforeClose: Function;
|
|
@@ -229,6 +239,10 @@ export declare const ToFloat: import("@touchvue/ui/lib/utils").SFCWithInstall<{
|
|
|
229
239
|
type: BooleanConstructor;
|
|
230
240
|
default: boolean;
|
|
231
241
|
};
|
|
242
|
+
show: {
|
|
243
|
+
type: BooleanConstructor;
|
|
244
|
+
default: boolean;
|
|
245
|
+
};
|
|
232
246
|
lazy: {
|
|
233
247
|
type: BooleanConstructor;
|
|
234
248
|
default: boolean;
|
|
@@ -321,6 +335,7 @@ export declare const ToFloat: import("@touchvue/ui/lib/utils").SFCWithInstall<{
|
|
|
321
335
|
closeOnBlur: boolean;
|
|
322
336
|
zIndex: number;
|
|
323
337
|
height: string | number;
|
|
338
|
+
show: boolean;
|
|
324
339
|
global: boolean;
|
|
325
340
|
top: string | number;
|
|
326
341
|
beforeClose: Function;
|
|
@@ -10,6 +10,10 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
10
10
|
type: BooleanConstructor;
|
|
11
11
|
default: boolean;
|
|
12
12
|
};
|
|
13
|
+
show: {
|
|
14
|
+
type: BooleanConstructor;
|
|
15
|
+
default: boolean;
|
|
16
|
+
};
|
|
13
17
|
lazy: {
|
|
14
18
|
type: BooleanConstructor;
|
|
15
19
|
default: boolean;
|
|
@@ -96,6 +100,10 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
96
100
|
type: BooleanConstructor;
|
|
97
101
|
default: boolean;
|
|
98
102
|
};
|
|
103
|
+
show: {
|
|
104
|
+
type: BooleanConstructor;
|
|
105
|
+
default: boolean;
|
|
106
|
+
};
|
|
99
107
|
lazy: {
|
|
100
108
|
type: BooleanConstructor;
|
|
101
109
|
default: boolean;
|
|
@@ -183,6 +191,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
183
191
|
closeOnBlur: boolean;
|
|
184
192
|
zIndex: number;
|
|
185
193
|
height: string | number;
|
|
194
|
+
show: boolean;
|
|
186
195
|
global: boolean;
|
|
187
196
|
top: string | number;
|
|
188
197
|
beforeClose: Function;
|
|
@@ -13,8 +13,10 @@ declare const __VLS_component: import("vue").DefineComponent<Props, {
|
|
|
13
13
|
el: import("vue").Ref<any, any>;
|
|
14
14
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
15
15
|
click: (evt: MouseEvent) => any;
|
|
16
|
+
mousedown: (evt: MouseEvent) => any;
|
|
16
17
|
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
17
18
|
onClick?: (evt: MouseEvent) => any;
|
|
19
|
+
onMousedown?: (evt: MouseEvent) => any;
|
|
18
20
|
}>, {
|
|
19
21
|
value: string;
|
|
20
22
|
mode: string;
|
|
@@ -5,6 +5,8 @@ interface Props {
|
|
|
5
5
|
pagerPosition?: string;
|
|
6
6
|
flex?: boolean;
|
|
7
7
|
}
|
|
8
|
+
declare function next(): void;
|
|
9
|
+
declare function prev(): void;
|
|
8
10
|
declare function adjust(): void;
|
|
9
11
|
declare function reset(): void;
|
|
10
12
|
declare function __VLS_template(): {
|
|
@@ -13,6 +15,8 @@ declare function __VLS_template(): {
|
|
|
13
15
|
declare const __VLS_component: import("vue").DefineComponent<Props, {
|
|
14
16
|
reset: typeof reset;
|
|
15
17
|
adjust: typeof adjust;
|
|
18
|
+
prev: typeof prev;
|
|
19
|
+
next: typeof next;
|
|
16
20
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
17
21
|
mode: string;
|
|
18
22
|
flex: boolean;
|
|
@@ -8,6 +8,7 @@ interface TabItemProps {
|
|
|
8
8
|
lazy?: boolean;
|
|
9
9
|
on?: boolean;
|
|
10
10
|
disabled?: boolean;
|
|
11
|
+
count?: string | number;
|
|
11
12
|
}
|
|
12
13
|
declare function __VLS_template(): {
|
|
13
14
|
default?(_: {}): any;
|
|
@@ -20,6 +21,7 @@ declare const __VLS_component: import("vue").DefineComponent<TabItemProps, {}, {
|
|
|
20
21
|
label: string;
|
|
21
22
|
icon: string;
|
|
22
23
|
disabled: boolean;
|
|
24
|
+
count: string | number;
|
|
23
25
|
pic: string;
|
|
24
26
|
on: boolean;
|
|
25
27
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -93,10 +93,12 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
93
93
|
ToIcon: import("@touchvue/ui/lib/utils").SFCWithInstall<{
|
|
94
94
|
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("@touchvue/ui/index.ts").Props> & Readonly<{
|
|
95
95
|
onClick?: (evt: MouseEvent) => any;
|
|
96
|
+
onMousedown?: (evt: MouseEvent) => any;
|
|
96
97
|
}>, {
|
|
97
98
|
el: import("vue").Ref<any, any>;
|
|
98
99
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
99
100
|
click: (evt: MouseEvent) => any;
|
|
101
|
+
mousedown: (evt: MouseEvent) => any;
|
|
100
102
|
}, import("vue").PublicProps, {
|
|
101
103
|
value: string;
|
|
102
104
|
mode: string;
|
|
@@ -113,6 +115,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
113
115
|
Defaults: {};
|
|
114
116
|
}, Readonly<import("@touchvue/ui/index.ts").Props> & Readonly<{
|
|
115
117
|
onClick?: (evt: MouseEvent) => any;
|
|
118
|
+
onMousedown?: (evt: MouseEvent) => any;
|
|
116
119
|
}>, {
|
|
117
120
|
el: import("vue").Ref<any, any>;
|
|
118
121
|
}, {}, {}, {}, {
|
|
@@ -128,10 +131,12 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
128
131
|
__isSuspense?: never;
|
|
129
132
|
} & import("vue").ComponentOptionsBase<Readonly<import("@touchvue/ui/index.ts").Props> & Readonly<{
|
|
130
133
|
onClick?: (evt: MouseEvent) => any;
|
|
134
|
+
onMousedown?: (evt: MouseEvent) => any;
|
|
131
135
|
}>, {
|
|
132
136
|
el: import("vue").Ref<any, any>;
|
|
133
137
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
134
138
|
click: (evt: MouseEvent) => any;
|
|
139
|
+
mousedown: (evt: MouseEvent) => any;
|
|
135
140
|
}, string, {
|
|
136
141
|
value: string;
|
|
137
142
|
mode: string;
|
|
@@ -6,8 +6,9 @@ import { vAlign } from './align';
|
|
|
6
6
|
import { vTip } from './tip';
|
|
7
7
|
import { vLoading } from './loading';
|
|
8
8
|
import { vHide } from './hide';
|
|
9
|
+
import { vPress } from './press';
|
|
9
10
|
declare const _default: {
|
|
10
11
|
install: (app: App) => void;
|
|
11
12
|
};
|
|
12
13
|
export default _default;
|
|
13
|
-
export { vAlign, vColor, vDis, vLoading, vSize, vTip, vHide };
|
|
14
|
+
export { vAlign, vColor, vDis, vLoading, vSize, vTip, vHide, vPress };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ObjectDirective } from 'vue';
|
|
2
|
+
type PressHandler = (event: PointerEvent) => void;
|
|
3
|
+
export interface PressOptions {
|
|
4
|
+
handler: PressHandler;
|
|
5
|
+
interval?: number;
|
|
6
|
+
delay?: number;
|
|
7
|
+
immediate?: boolean;
|
|
8
|
+
}
|
|
9
|
+
interface PressElement extends HTMLElement {
|
|
10
|
+
_pressState?: {
|
|
11
|
+
options: PressOptions | null;
|
|
12
|
+
timer: ReturnType<typeof setInterval> | null;
|
|
13
|
+
delayTimer: ReturnType<typeof setTimeout> | null;
|
|
14
|
+
pointerId: number | null;
|
|
15
|
+
start: (event: PointerEvent) => void;
|
|
16
|
+
stop: (event?: PointerEvent) => void;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export declare const vPress: ObjectDirective<PressElement, PressHandler | PressOptions>;
|
|
20
|
+
export {};
|
package/lib/index.d.js
CHANGED
|
@@ -10,6 +10,7 @@ var loading = require('./packages/directives/loading/src/loading.js');
|
|
|
10
10
|
var size = require('./packages/directives/size/src/size.js');
|
|
11
11
|
var tip = require('./packages/directives/tip/src/tip.js');
|
|
12
12
|
var hide = require('./packages/directives/hide/src/hide.js');
|
|
13
|
+
var press = require('./packages/directives/press/src/press.js');
|
|
13
14
|
var index = require('./packages/components/button/index.js');
|
|
14
15
|
var index$1 = require('./packages/components/icon/index.js');
|
|
15
16
|
var icon = require('./packages/components/icon/src/icon.vue.js');
|
|
@@ -108,6 +109,7 @@ exports.vLoading = loading.default;
|
|
|
108
109
|
exports.vSize = size.default;
|
|
109
110
|
exports.vTip = tip.default;
|
|
110
111
|
exports.vHide = hide.vHide;
|
|
112
|
+
exports.vPress = press.vPress;
|
|
111
113
|
exports.ToButton = index.ToButton;
|
|
112
114
|
exports.ToIcon = index$1.ToIcon;
|
|
113
115
|
exports.Icon = icon.default;
|
package/lib/index.d.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.js","sources":["../../packages/ui/index.d.ts"],"sourcesContent":["import type { App } from 'vue';\nexport interface TouchVueUIOptions {\n ratio?: {\n base?: {\n pc?: number;\n pad?: number;\n phone?: number;\n };\n };\n zIndex?: number;\n input?: {\n spChars?: string;\n };\n lang?: string;\n}\nexport declare const defaultOptions: TouchVueUIOptions;\nexport declare let globalOptions: {\n ratio?: {\n base?: {\n pc?: number;\n pad?: number;\n phone?: number;\n };\n };\n zIndex?: number;\n input?: {\n spChars?: string;\n };\n lang?: string;\n};\nexport declare const getGlobalOptions: () => TouchVueUIOptions;\ndeclare const install: (app: App, options?: TouchVueUIOptions) => void;\nexport default install;\nexport * from '@touchvue/components';\nexport * from '@touchvue/directives';\nexport * from '@touchvue/locale';\nexport * from '@touchvue/utils';\nexport * from '@touchvue/hooks';\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.js","sources":["../../packages/ui/index.d.ts"],"sourcesContent":["import type { App } from 'vue';\nexport interface TouchVueUIOptions {\n ratio?: {\n base?: {\n pc?: number;\n pad?: number;\n phone?: number;\n };\n };\n zIndex?: number;\n input?: {\n spChars?: string;\n };\n lang?: string;\n}\nexport declare const defaultOptions: TouchVueUIOptions;\nexport declare let globalOptions: {\n ratio?: {\n base?: {\n pc?: number;\n pad?: number;\n phone?: number;\n };\n };\n zIndex?: number;\n input?: {\n spChars?: string;\n };\n lang?: string;\n};\nexport declare const getGlobalOptions: () => TouchVueUIOptions;\ndeclare const install: (app: App, options?: TouchVueUIOptions) => void;\nexport default install;\nexport * from '@touchvue/components';\nexport * from '@touchvue/directives';\nexport * from '@touchvue/locale';\nexport * from '@touchvue/utils';\nexport * from '@touchvue/hooks';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,gBAAe,OAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/lib/index.js
CHANGED
|
@@ -15,6 +15,7 @@ var loading = require('./packages/directives/loading/src/loading.js');
|
|
|
15
15
|
var size = require('./packages/directives/size/src/size.js');
|
|
16
16
|
var tip = require('./packages/directives/tip/src/tip.js');
|
|
17
17
|
var hide = require('./packages/directives/hide/src/hide.js');
|
|
18
|
+
var press = require('./packages/directives/press/src/press.js');
|
|
18
19
|
var index = require('./packages/components/button/index.js');
|
|
19
20
|
var index$1 = require('./packages/components/icon/index.js');
|
|
20
21
|
var icon = require('./packages/components/icon/src/icon.vue.js');
|
|
@@ -160,6 +161,7 @@ exports.vLoading = loading.default;
|
|
|
160
161
|
exports.vSize = size.default;
|
|
161
162
|
exports.vTip = tip.default;
|
|
162
163
|
exports.vHide = hide.vHide;
|
|
164
|
+
exports.vPress = press.vPress;
|
|
163
165
|
exports.ToButton = index.ToButton;
|
|
164
166
|
exports.ToIcon = index$1.ToIcon;
|
|
165
167
|
exports.Icon = icon.default;
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../packages/ui/index.ts"],"sourcesContent":["import type { App } from 'vue'\nimport { setRatio, getEm, setMedia, getMedia } from '@touchvue/utils'\nimport * as TouchVueComponents from '@touchvue/components'\nimport InstallDirective from '@touchvue/directives'\n// 添加语言包导入\nimport { use as useTouchvueLocale } from '@touchvue/locale'\nimport cnTouchvueLocale from '@touchvue/locale/lang/zh-CN.js'\nimport enTouchvueLocale from '@touchvue/locale/lang/en-US.js'\n\nexport interface TouchVueUIOptions {\n\tratio?: {\n\t\tbase?: {\n\t\t\tpc?: number\n\t\t\tpad?: number\n\t\t\tphone?: number\n\t\t}\n\t}\n\tzIndex?: number\n\tinput?: {\n\t\tspChars?: string\n\t}\n\t// 添加语言配置选项\n\tlang?: string\n}\n\n// 全局默认配置\nexport const defaultOptions: TouchVueUIOptions = {}\n\n// 全局配置\nexport let globalOptions = { ...defaultOptions }\n\n// 获取全局配置\nexport const getGlobalOptions = (): TouchVueUIOptions => {\n\treturn globalOptions\n}\n\nconst install = (app: App, options: TouchVueUIOptions = {}) => {\n\t// 合并配置项\n\tglobalOptions = {\n\t\t...defaultOptions,\n\t\t...options\n\t}\n\n\t// 处理国际化配置\n\tconst lang = options.lang || 'zh-CN'\n\tlet localeModule\n\tif (lang === 'en-US') {\n\t\tlocaleModule = enTouchvueLocale\n\t} else if (lang === 'zh-CN') {\n\t\tlocaleModule = cnTouchvueLocale\n\t} else {\n\t\t// 如果是其他语言,尝试从默认语言包开始,用户可能需要自己提供\n\t\tlocaleModule = cnTouchvueLocale\n\t}\n\t// 设置默认语言\n\tuseTouchvueLocale(localeModule)\n\n\t// 将配置注入到应用实例中,可以通过app.config.globalProperties.$TOUCHVUE_CONFIG访问\n\t// 工具\n\tapp.config.globalProperties.$getEm = getEm\n\tapp.config.globalProperties.$setMedia = setMedia\n\tapp.config.globalProperties.$getMedia = getMedia\n\n\tconst media = getMedia()\n\tapp.config.globalProperties.$phone = media === 'phone'\n\tapp.config.globalProperties.$pad = media === 'pad'\n\tapp.config.globalProperties.$pc = media === 'pc'\n\n\t// 全局默认配置\n\tapp.config.globalProperties.$TouchUI = {\n\t\tzIndex: globalOptions.zIndex || 2000, // 全局zIndex基数\n\t\tinput: globalOptions.input || {}\n\t}\n\t;(window as any).$TouchUI = {\n\t\tzIndex: 2000\n\t}\n\t// 初始化\n\tsetMedia(options)\n\tsetRatio(options)\n\n\t// 注册所有组件\n\tObject.values(TouchVueComponents).forEach(component => {\n\t\t// 确保是有效的Vue组件插件\n\t\tif (component && typeof component === 'object' && 'install' in component && typeof component.install === 'function') {\n\t\t\tapp.use(component as any)\n\t\t}\n\t})\n\n\tInstallDirective.install(app)\n}\n\n// export { install };\n\nexport default install\n\nexport * from '@touchvue/components'\nexport * from '@touchvue/directives'\nexport * from '@touchvue/locale'\nexport * from '@touchvue/utils'\nexport * from '@touchvue/hooks'\n"],"names":["globalOptions","enTouchvueLocale","cnTouchvueLocale","useTouchvueLocale","getEm","setMedia","getMedia","setRatio","TouchVueComponents","InstallDirective"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../packages/ui/index.ts"],"sourcesContent":["import type { App } from 'vue'\nimport { setRatio, getEm, setMedia, getMedia } from '@touchvue/utils'\nimport * as TouchVueComponents from '@touchvue/components'\nimport InstallDirective from '@touchvue/directives'\n// 添加语言包导入\nimport { use as useTouchvueLocale } from '@touchvue/locale'\nimport cnTouchvueLocale from '@touchvue/locale/lang/zh-CN.js'\nimport enTouchvueLocale from '@touchvue/locale/lang/en-US.js'\n\nexport interface TouchVueUIOptions {\n\tratio?: {\n\t\tbase?: {\n\t\t\tpc?: number\n\t\t\tpad?: number\n\t\t\tphone?: number\n\t\t}\n\t}\n\tzIndex?: number\n\tinput?: {\n\t\tspChars?: string\n\t}\n\t// 添加语言配置选项\n\tlang?: string\n}\n\n// 全局默认配置\nexport const defaultOptions: TouchVueUIOptions = {}\n\n// 全局配置\nexport let globalOptions = { ...defaultOptions }\n\n// 获取全局配置\nexport const getGlobalOptions = (): TouchVueUIOptions => {\n\treturn globalOptions\n}\n\nconst install = (app: App, options: TouchVueUIOptions = {}) => {\n\t// 合并配置项\n\tglobalOptions = {\n\t\t...defaultOptions,\n\t\t...options\n\t}\n\n\t// 处理国际化配置\n\tconst lang = options.lang || 'zh-CN'\n\tlet localeModule\n\tif (lang === 'en-US') {\n\t\tlocaleModule = enTouchvueLocale\n\t} else if (lang === 'zh-CN') {\n\t\tlocaleModule = cnTouchvueLocale\n\t} else {\n\t\t// 如果是其他语言,尝试从默认语言包开始,用户可能需要自己提供\n\t\tlocaleModule = cnTouchvueLocale\n\t}\n\t// 设置默认语言\n\tuseTouchvueLocale(localeModule)\n\n\t// 将配置注入到应用实例中,可以通过app.config.globalProperties.$TOUCHVUE_CONFIG访问\n\t// 工具\n\tapp.config.globalProperties.$getEm = getEm\n\tapp.config.globalProperties.$setMedia = setMedia\n\tapp.config.globalProperties.$getMedia = getMedia\n\n\tconst media = getMedia()\n\tapp.config.globalProperties.$phone = media === 'phone'\n\tapp.config.globalProperties.$pad = media === 'pad'\n\tapp.config.globalProperties.$pc = media === 'pc'\n\n\t// 全局默认配置\n\tapp.config.globalProperties.$TouchUI = {\n\t\tzIndex: globalOptions.zIndex || 2000, // 全局zIndex基数\n\t\tinput: globalOptions.input || {}\n\t}\n\t;(window as any).$TouchUI = {\n\t\tzIndex: 2000\n\t}\n\t// 初始化\n\tsetMedia(options)\n\tsetRatio(options)\n\n\t// 注册所有组件\n\tObject.values(TouchVueComponents).forEach(component => {\n\t\t// 确保是有效的Vue组件插件\n\t\tif (component && typeof component === 'object' && 'install' in component && typeof component.install === 'function') {\n\t\t\tapp.use(component as any)\n\t\t}\n\t})\n\n\tInstallDirective.install(app)\n}\n\n// export { install };\n\nexport default install\n\nexport * from '@touchvue/components'\nexport * from '@touchvue/directives'\nexport * from '@touchvue/locale'\nexport * from '@touchvue/utils'\nexport * from '@touchvue/hooks'\n"],"names":["globalOptions","enTouchvueLocale","cnTouchvueLocale","useTouchvueLocale","getEm","setMedia","getMedia","setRatio","TouchVueComponents","InstallDirective"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BO,MAAM,iBAAoC,GAAC;AAGvCA,qBAAA,GAAgB,EAAE,GAAG,cAAe,GAAA;AAGxC,MAAM,mBAAmB,MAAyB;AACxD,EAAO,OAAAA,qBAAA,CAAA;AACR,EAAA;AAEA,MAAM,OAAU,GAAA,CAAC,GAAU,EAAA,OAAA,GAA6B,EAAO,KAAA;AAE9D,EAAgBA,qBAAA,GAAA;AAAA,IACf,GAAG,cAAA;AAAA,IACH,GAAG,OAAA;AAAA,GACJ,CAAA;AAGA,EAAM,MAAA,IAAA,GAAO,QAAQ,IAAQ,IAAA,OAAA,CAAA;AAC7B,EAAI,IAAA,YAAA,CAAA;AACJ,EAAA,IAAI,SAAS,OAAS,EAAA;AACrB,IAAe,YAAA,GAAAC,YAAA,CAAA;AAAA,GAChB,MAAA,IAAW,SAAS,OAAS,EAAA;AAC5B,IAAe,YAAA,GAAAC,YAAA,CAAA;AAAA,GACT,MAAA;AAEN,IAAe,YAAA,GAAAA,YAAA,CAAA;AAAA,GAChB;AAEA,EAAAC,WAAA,CAAkB,YAAY,CAAA,CAAA;AAI9B,EAAI,GAAA,CAAA,MAAA,CAAO,iBAAiB,MAAS,GAAAC,WAAA,CAAA;AACrC,EAAI,GAAA,CAAA,MAAA,CAAO,iBAAiB,SAAY,GAAAC,cAAA,CAAA;AACxC,EAAI,GAAA,CAAA,MAAA,CAAO,iBAAiB,SAAY,GAAAC,cAAA,CAAA;AAExC,EAAA,MAAM,QAAQA,cAAS,EAAA,CAAA;AACvB,EAAI,GAAA,CAAA,MAAA,CAAO,gBAAiB,CAAA,MAAA,GAAS,KAAU,KAAA,OAAA,CAAA;AAC/C,EAAI,GAAA,CAAA,MAAA,CAAO,gBAAiB,CAAA,IAAA,GAAO,KAAU,KAAA,KAAA,CAAA;AAC7C,EAAI,GAAA,CAAA,MAAA,CAAO,gBAAiB,CAAA,GAAA,GAAM,KAAU,KAAA,IAAA,CAAA;AAG5C,EAAI,GAAA,CAAA,MAAA,CAAO,iBAAiB,QAAW,GAAA;AAAA,IACtC,MAAA,EAAQN,sBAAc,MAAU,IAAA,GAAA;AAAA;AAAA,IAChC,KAAA,EAAOA,qBAAc,CAAA,KAAA,IAAS,EAAC;AAAA,GAChC,CAAA;AACC,EAAC,OAAe,QAAW,GAAA;AAAA,IAC3B,MAAQ,EAAA,GAAA;AAAA,GACT,CAAA;AAEA,EAAAK,cAAA,CAAS,OAAO,CAAA,CAAA;AAChB,EAAAE,cAAA,CAAS,OAAO,CAAA,CAAA;AAGhB,EAAA,MAAA,CAAO,MAAO,CAAAC,OAAkB,CAAE,CAAA,OAAA,CAAQ,CAAa,SAAA,KAAA;AAEtD,IAAI,IAAA,SAAA,IAAa,OAAO,SAAc,KAAA,QAAA,IAAY,aAAa,SAAa,IAAA,OAAO,SAAU,CAAA,OAAA,KAAY,UAAY,EAAA;AACpH,MAAA,GAAA,CAAI,IAAI,SAAgB,CAAA,CAAA;AAAA,KACzB;AAAA,GACA,CAAA,CAAA;AAED,EAAAC,eAAA,CAAiB,QAAQ,GAAG,CAAA,CAAA;AAC7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendar.js","sources":["../../../../../../packages/components/calendar/src/calendar.ts"],"sourcesContent":["import { ExtractPropTypes, PropType } from 'vue'\n\n/**\n * 日历类型\n */\nexport type CalendarType = 'date' | '
|
|
1
|
+
{"version":3,"file":"calendar.js","sources":["../../../../../../packages/components/calendar/src/calendar.ts"],"sourcesContent":["import { ExtractPropTypes, PropType } from 'vue'\n\n/**\n * 日历类型\n */\nexport type CalendarType = 'date' | 'datetime' | 'time' | 'month' | string\n\n/**\n * 日历大小\n */\nexport type CalendarSize = 'large' | string\n\n/**\n * 范围类型\n */\nexport type CalendarRangeType = '' | 'end' | string\n\n/**\n * 重点日期数据类型\n */\nexport type CalendarPointData = {\n\t/**\n\t * 日期,格式:YYYY-MM-DD\n\t */\n\tday: string\n\t/**\n\t * 提示信息\n\t */\n\ttooltip?: string\n\t/**\n\t * 数量\n\t */\n\tcount?: number\n\t/**\n\t * 类型:-1=danger, 0=primary, 1=success\n\t */\n\ttype?: number\n}\n\n/**\n * 日历值类型\n */\nexport type CalendarValueType = string | Date\n\nexport const calendarProps = {\n\t/**\n\t * 假期,用于显示假期标识\n\t */\n\tholiday: {\n\t\ttype: Array as PropType<string[]>,\n\t\tdefault: () => []\n\t},\n\t/**\n\t * 重点日期(比如这天有待办之类的)\n\t */\n\tpoint: {\n\t\ttype: Array as PropType<CalendarPointData[]>,\n\t\tdefault: () => []\n\t},\n\t/**\n\t * 日历类型\n\t */\n\ttype: {\n\t\ttype: String as PropType<CalendarType>,\n\t\tdefault: ''\n\t},\n\t/**\n\t * 大小,支持 large\n\t */\n\tsize: {\n\t\ttype: String as PropType<CalendarSize>,\n\t\tdefault: ''\n\t},\n\t/**\n\t * 是否显示 point 提示信息\n\t */\n\tlegend: {\n\t\ttype: Boolean,\n\t\tdefault: false\n\t},\n\t/**\n\t * 绑定值\n\t */\n\tmodelValue: {\n\t\ttype: [String, Date] as PropType<CalendarValueType>,\n\t\tdefault: ''\n\t},\n\t/**\n\t * 范围类型\n\t * 开始:''\n\t * 结束:'end'\n\t */\n\trangeType: {\n\t\ttype: String as PropType<CalendarRangeType>,\n\t\tdefault: ''\n\t},\n\t/**\n\t * 是否为范围选择\n\t */\n\trange: {\n\t\ttype: Boolean,\n\t\tdefault: false\n\t},\n\t/**\n\t * 是否为多选\n\t */\n\tmultiple: {\n\t\ttype: Boolean,\n\t\tdefault: false\n\t},\n\t/**\n\t * 时间\n\t */\n\ttime: {\n\t\ttype: String,\n\t\tdefault: ''\n\t},\n\t/**\n\t * 变更前回调\n\t */\n\tbeforeChange: {\n\t\ttype: Function as PropType<(value: string) => boolean | Promise<boolean>>,\n\t\tdefault: null\n\t},\n\t/**\n\t * 最小值\n\t */\n\tmin: {\n\t\ttype: [String, Date, Number] as PropType<string | Date | number>,\n\t\tdefault: ''\n\t},\n\t/**\n\t * 最大值\n\t */\n\tmax: {\n\t\ttype: [String, Date, Number] as PropType<string | Date | number>,\n\t\tdefault: ''\n\t},\n\t/**\n\t * 禁用日期\n\t */\n\tdisabledDate: {\n\t\ttype: Function as PropType<(date: Date) => boolean>,\n\t\tdefault: null\n\t},\n\n\twidth: {\n\t\ttype: String,\n\t\tdefault: ''\n\t},\n\tmaxYear: {\n\t\ttype: [String, Number] as PropType<string | number>,\n\t\tdefault: 0\n\t},\n\tminYear: {\n\t\ttype: [String, Number] as PropType<string | number>,\n\t\tdefault: 0\n\t},\n\tflex: Boolean\n}\n\nexport type CalendarProps = ExtractPropTypes<typeof calendarProps>\n"],"names":[],"mappings":";;AA4CO,MAAM,aAAgB,GAAA;AAAA;AAAA;AAAA;AAAA,EAI5B,OAAS,EAAA;AAAA,IACR,IAAM,EAAA,KAAA;AAAA,IACN,OAAA,EAAS,MAAM,EAAC;AAAA,GACjB;AAAA;AAAA;AAAA;AAAA,EAIA,KAAO,EAAA;AAAA,IACN,IAAM,EAAA,KAAA;AAAA,IACN,OAAA,EAAS,MAAM,EAAC;AAAA,GACjB;AAAA;AAAA;AAAA;AAAA,EAIA,IAAM,EAAA;AAAA,IACL,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,EAAA;AAAA,GACV;AAAA;AAAA;AAAA;AAAA,EAIA,IAAM,EAAA;AAAA,IACL,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,EAAA;AAAA,GACV;AAAA;AAAA;AAAA;AAAA,EAIA,MAAQ,EAAA;AAAA,IACP,IAAM,EAAA,OAAA;AAAA,IACN,OAAS,EAAA,KAAA;AAAA,GACV;AAAA;AAAA;AAAA;AAAA,EAIA,UAAY,EAAA;AAAA,IACX,IAAA,EAAM,CAAC,MAAA,EAAQ,IAAI,CAAA;AAAA,IACnB,OAAS,EAAA,EAAA;AAAA,GACV;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,SAAW,EAAA;AAAA,IACV,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,EAAA;AAAA,GACV;AAAA;AAAA;AAAA;AAAA,EAIA,KAAO,EAAA;AAAA,IACN,IAAM,EAAA,OAAA;AAAA,IACN,OAAS,EAAA,KAAA;AAAA,GACV;AAAA;AAAA;AAAA;AAAA,EAIA,QAAU,EAAA;AAAA,IACT,IAAM,EAAA,OAAA;AAAA,IACN,OAAS,EAAA,KAAA;AAAA,GACV;AAAA;AAAA;AAAA;AAAA,EAIA,IAAM,EAAA;AAAA,IACL,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,EAAA;AAAA,GACV;AAAA;AAAA;AAAA;AAAA,EAIA,YAAc,EAAA;AAAA,IACb,IAAM,EAAA,QAAA;AAAA,IACN,OAAS,EAAA,IAAA;AAAA,GACV;AAAA;AAAA;AAAA;AAAA,EAIA,GAAK,EAAA;AAAA,IACJ,IAAM,EAAA,CAAC,MAAQ,EAAA,IAAA,EAAM,MAAM,CAAA;AAAA,IAC3B,OAAS,EAAA,EAAA;AAAA,GACV;AAAA;AAAA;AAAA;AAAA,EAIA,GAAK,EAAA;AAAA,IACJ,IAAM,EAAA,CAAC,MAAQ,EAAA,IAAA,EAAM,MAAM,CAAA;AAAA,IAC3B,OAAS,EAAA,EAAA;AAAA,GACV;AAAA;AAAA;AAAA;AAAA,EAIA,YAAc,EAAA;AAAA,IACb,IAAM,EAAA,QAAA;AAAA,IACN,OAAS,EAAA,IAAA;AAAA,GACV;AAAA,EAEA,KAAO,EAAA;AAAA,IACN,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,EAAA;AAAA,GACV;AAAA,EACA,OAAS,EAAA;AAAA,IACR,IAAA,EAAM,CAAC,MAAA,EAAQ,MAAM,CAAA;AAAA,IACrB,OAAS,EAAA,CAAA;AAAA,GACV;AAAA,EACA,OAAS,EAAA;AAAA,IACR,IAAA,EAAM,CAAC,MAAA,EAAQ,MAAM,CAAA;AAAA,IACrB,OAAS,EAAA,CAAA;AAAA,GACV;AAAA,EACA,IAAM,EAAA,OAAA;AACP;;;;"}
|
|
@@ -121,9 +121,9 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
121
121
|
const startVal = start.value.day || start.value.month ? getStringValue(start.value) : "";
|
|
122
122
|
const endVal = end.value.day || end.value.month ? getStringValue(end.value) : "";
|
|
123
123
|
return `${startVal},${endVal}`;
|
|
124
|
-
} else if (props.type === "
|
|
124
|
+
} else if (props.type === "month" && props.multiple) {
|
|
125
125
|
return monthsRangeData.value.join(",");
|
|
126
|
-
} else if (props.type === "
|
|
126
|
+
} else if (props.type === "date" && props.multiple) {
|
|
127
127
|
return daysRangeData.value.join(",");
|
|
128
128
|
} else {
|
|
129
129
|
return getStringValue();
|
|
@@ -235,7 +235,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
235
235
|
vue.watch(
|
|
236
236
|
() => props.modelValue,
|
|
237
237
|
(val) => {
|
|
238
|
-
if (props.type
|
|
238
|
+
if (!(props.type === "date" && props.multiple)) {
|
|
239
239
|
setData();
|
|
240
240
|
}
|
|
241
241
|
if (changeFrom.value === "out") {
|
|
@@ -279,7 +279,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
279
279
|
{ deep: true }
|
|
280
280
|
);
|
|
281
281
|
const commonSetDayVal = () => {
|
|
282
|
-
if (props.type === "
|
|
282
|
+
if (props.type === "date" && props.multiple) {
|
|
283
283
|
const mValue = props.modelValue;
|
|
284
284
|
const mArray = mValue.split(",");
|
|
285
285
|
if (!mArray.length)
|
|
@@ -350,7 +350,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
350
350
|
const imonth = `${yearVal}-${addZero(monthVal)}`;
|
|
351
351
|
const iday = dayVal !== null && dayVal !== void 0 ? `${addZero(dayVal)}` : "01";
|
|
352
352
|
const itime = `${hourVal}:${minuteVal}:${secondVal}`;
|
|
353
|
-
if (props.type === "month"
|
|
353
|
+
if (props.type === "month") {
|
|
354
354
|
return imonth;
|
|
355
355
|
} else if (props.type === "datetime" || props.type === "time") {
|
|
356
356
|
return `${imonth}-${iday} ${itime}`;
|
|
@@ -402,7 +402,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
402
402
|
if (props.rangeType === "end") {
|
|
403
403
|
year.value = year.value || (/* @__PURE__ */ new Date()).getFullYear();
|
|
404
404
|
if ((end.value.day || end.value.month) && isAnyDate(getStringValue(end.value))) {
|
|
405
|
-
if (props.type === "month"
|
|
405
|
+
if (props.type === "month") {
|
|
406
406
|
if (start.value.year === end.value.year) {
|
|
407
407
|
year.value = end.value.year + 1;
|
|
408
408
|
} else {
|
|
@@ -438,8 +438,8 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
438
438
|
}
|
|
439
439
|
}
|
|
440
440
|
} else {
|
|
441
|
-
if (props.modelValue && (!isNaN(new Date(props.modelValue).getTime()) || props.type === "
|
|
442
|
-
if (props.type === "
|
|
441
|
+
if (props.modelValue && (!isNaN(new Date(props.modelValue).getTime()) || props.type === "month" && props.multiple || props.type === "date" && props.multiple)) {
|
|
442
|
+
if (props.type === "month" && props.multiple || props.type === "date" && props.multiple) {
|
|
443
443
|
const mValue = props.modelValue;
|
|
444
444
|
const mArray = mValue.split(",");
|
|
445
445
|
if (!mArray.length)
|
|
@@ -450,13 +450,13 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
450
450
|
hour.value = String(new Date(mArray[mArray.length - 1]).getHours());
|
|
451
451
|
minute.value = String(new Date(mArray[mArray.length - 1]).getMinutes());
|
|
452
452
|
second.value = String(new Date(mArray[mArray.length - 1]).getSeconds());
|
|
453
|
-
if (props.type === "
|
|
453
|
+
if (props.type === "month" && props.multiple) {
|
|
454
454
|
monthsRangeData.value = mArray;
|
|
455
455
|
if (monthsRangeData.value.length > 0) {
|
|
456
456
|
setMonthsData();
|
|
457
457
|
}
|
|
458
458
|
}
|
|
459
|
-
if (props.type === "
|
|
459
|
+
if (props.type === "date" && props.multiple) {
|
|
460
460
|
daysRangeData.value = mArray;
|
|
461
461
|
if (daysRangeData.value.length > 0) {
|
|
462
462
|
setDaysData();
|
|
@@ -535,9 +535,9 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
535
535
|
if ((i + emptyLength) % 7 === 0) {
|
|
536
536
|
obj.sat = true;
|
|
537
537
|
}
|
|
538
|
-
const point = props.point.filter((item) => {
|
|
538
|
+
const point = Array.isArray(props.point) ? props.point.filter((item) => {
|
|
539
539
|
return item.day === `${year.value}-${addZero(month.value)}-${addZero(i)}`;
|
|
540
|
-
});
|
|
540
|
+
}) : [];
|
|
541
541
|
obj.point = point;
|
|
542
542
|
arr.push(obj);
|
|
543
543
|
}
|
|
@@ -577,7 +577,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
577
577
|
};
|
|
578
578
|
const selectMonth = (item) => {
|
|
579
579
|
if (item) {
|
|
580
|
-
if (props.range &&
|
|
580
|
+
if (props.range && props.type === "month") {
|
|
581
581
|
let startVal = {};
|
|
582
582
|
let endVal = {};
|
|
583
583
|
if (!start.value.month && !end.value.month) {
|
|
@@ -613,7 +613,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
613
613
|
end.value = JSON.parse(JSON.stringify(endVal));
|
|
614
614
|
submitValue.value = iValue.value;
|
|
615
615
|
} else {
|
|
616
|
-
if (props.type === "month"
|
|
616
|
+
if (props.type === "month") {
|
|
617
617
|
emit(
|
|
618
618
|
"beforeChange",
|
|
619
619
|
getStringValue({
|
|
@@ -696,14 +696,14 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
696
696
|
};
|
|
697
697
|
const selectMonthAction = (item) => {
|
|
698
698
|
month.value = item;
|
|
699
|
-
if (props.type === "month"
|
|
699
|
+
if (props.type === "month") {
|
|
700
700
|
const str = `${year.value || curYear}-${addZero(month.value)}`;
|
|
701
701
|
monthsRangeData.value = toggleString(monthsRangeData.value, str);
|
|
702
702
|
setMonthsData();
|
|
703
703
|
}
|
|
704
704
|
monthLayer.value = false;
|
|
705
705
|
setDayData();
|
|
706
|
-
if (props.type === "month"
|
|
706
|
+
if (props.type === "month") {
|
|
707
707
|
day.value = 1;
|
|
708
708
|
submitValue.value = iValue.value;
|
|
709
709
|
}
|
|
@@ -749,7 +749,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
749
749
|
let val = getStringValue({
|
|
750
750
|
day: item.value
|
|
751
751
|
});
|
|
752
|
-
if (!props.type || props.type === "date" || props.type === "
|
|
752
|
+
if (!props.type || props.type === "date" || props.type === "date" && props.multiple) {
|
|
753
753
|
emit("beforeChange", val);
|
|
754
754
|
beforeChange.handleBeforeChange(
|
|
755
755
|
props.beforeChange,
|
|
@@ -823,8 +823,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
823
823
|
const setYearClass = (item) => {
|
|
824
824
|
return {
|
|
825
825
|
"is-cur": curYear.value === item,
|
|
826
|
-
"is-on": year.value === item
|
|
827
|
-
"is-checked": (props.type === "months" || props.type === "dates") && yearsData.value.includes(item)
|
|
826
|
+
"is-on": year.value === item || (props.type === "month" && props.multiple || props.type === "date" && props.multiple) && yearsData.value.includes(item)
|
|
828
827
|
};
|
|
829
828
|
};
|
|
830
829
|
const setMonthClass = (item) => {
|
|
@@ -832,7 +831,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
832
831
|
if (year.value === curYear.value && curMonth.value === item) {
|
|
833
832
|
arr.push("is-cur");
|
|
834
833
|
}
|
|
835
|
-
if (props.range &&
|
|
834
|
+
if (props.range && props.type === "month") {
|
|
836
835
|
if (year.value === start.value.year && item === start.value.month) {
|
|
837
836
|
if (end.value.month) {
|
|
838
837
|
arr.push("is-start");
|
|
@@ -860,12 +859,9 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
860
859
|
if (month.value === item && (props.type === "month" || props.type === "date" || !props.type)) {
|
|
861
860
|
arr.push("is-on");
|
|
862
861
|
}
|
|
863
|
-
if ((props.type === "
|
|
862
|
+
if ((props.type === "month" && props.multiple || props.type === "date" && props.multiple) && yearsData.value.length > 0) {
|
|
864
863
|
if (yearsData.value.includes(year.value) && years.value.includes(year.value) && monthsRangeData.value.includes(`${year.value}-${addZero(item)}`)) {
|
|
865
|
-
arr.push("is-
|
|
866
|
-
if (month.value === item) {
|
|
867
|
-
arr.push("is-on");
|
|
868
|
-
}
|
|
864
|
+
arr.push("is-on");
|
|
869
865
|
}
|
|
870
866
|
}
|
|
871
867
|
}
|
|
@@ -933,14 +929,11 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
933
929
|
arr.push("is-range");
|
|
934
930
|
}
|
|
935
931
|
} else {
|
|
936
|
-
if (day.value === item.value && props.type
|
|
932
|
+
if (day.value === item.value && !(props.type === "date" && props.multiple)) {
|
|
937
933
|
arr.push("is-on");
|
|
938
|
-
} else if (props.type === "
|
|
934
|
+
} else if (props.type === "date" && props.multiple) {
|
|
939
935
|
if (yearsData.value.includes(year.value) && monthsData.value.includes(addZero(month.value)) && daysRangeData.value.includes(`${year.value}-${addZero(month.value)}-${addZero(item.value)}`)) {
|
|
940
|
-
arr.push("is-
|
|
941
|
-
if (day.value === item.value) {
|
|
942
|
-
arr.push("is-on");
|
|
943
|
-
}
|
|
936
|
+
arr.push("is-on");
|
|
944
937
|
}
|
|
945
938
|
}
|
|
946
939
|
}
|
|
@@ -1109,7 +1102,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
1109
1102
|
vue.createElementVNode(
|
|
1110
1103
|
"div",
|
|
1111
1104
|
{
|
|
1112
|
-
class: vue.normalizeClass(["to-calendar-header-content", { "is-unfold": _ctx.type !== "month"
|
|
1105
|
+
class: vue.normalizeClass(["to-calendar-header-content", { "is-unfold": _ctx.type !== "month" }]),
|
|
1113
1106
|
onClick: vue.withModifiers(toggleMonthSelector, ["stop"])
|
|
1114
1107
|
},
|
|
1115
1108
|
[
|
|
@@ -1369,10 +1362,10 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
1369
1362
|
512
|
|
1370
1363
|
/* NEED_PATCH */
|
|
1371
1364
|
), [
|
|
1372
|
-
[vue.vShow, monthLayer.value || _ctx.type === "month"
|
|
1365
|
+
[vue.vShow, monthLayer.value || _ctx.type === "month"]
|
|
1373
1366
|
]),
|
|
1374
1367
|
vue.createCommentVNode(" \u5468 "),
|
|
1375
|
-
_ctx.type !== "month"
|
|
1368
|
+
_ctx.type !== "month" ? vue.withDirectives((vue.openBlock(), vue.createElementBlock(
|
|
1376
1369
|
"div",
|
|
1377
1370
|
{
|
|
1378
1371
|
key: 0,
|
|
@@ -1432,10 +1425,10 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
1432
1425
|
512
|
|
1433
1426
|
/* NEED_PATCH */
|
|
1434
1427
|
)), [
|
|
1435
|
-
[vue.vShow, !(monthLayer.value || _ctx.type === "month"
|
|
1428
|
+
[vue.vShow, !(monthLayer.value || _ctx.type === "month")]
|
|
1436
1429
|
]) : vue.createCommentVNode("v-if", true),
|
|
1437
1430
|
vue.createCommentVNode(" \u65E5 "),
|
|
1438
|
-
_ctx.type !== "month"
|
|
1431
|
+
_ctx.type !== "month" ? vue.withDirectives((vue.openBlock(), vue.createElementBlock(
|
|
1439
1432
|
"div",
|
|
1440
1433
|
{
|
|
1441
1434
|
key: 1,
|
|
@@ -1509,7 +1502,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
1509
1502
|
512
|
|
1510
1503
|
/* NEED_PATCH */
|
|
1511
1504
|
)), [
|
|
1512
|
-
[vue.vShow, !(monthLayer.value || _ctx.type === "month"
|
|
1505
|
+
[vue.vShow, !(monthLayer.value || _ctx.type === "month")]
|
|
1513
1506
|
]) : vue.createCommentVNode("v-if", true),
|
|
1514
1507
|
vue.createCommentVNode(" \u56FE\u4F8B "),
|
|
1515
1508
|
_ctx.legend ? vue.withDirectives((vue.openBlock(), vue.createElementBlock(
|
|
@@ -1526,7 +1519,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
1526
1519
|
512
|
|
1527
1520
|
/* NEED_PATCH */
|
|
1528
1521
|
)), [
|
|
1529
|
-
[vue.vShow, !(monthLayer.value || _ctx.type === "month"
|
|
1522
|
+
[vue.vShow, !(monthLayer.value || _ctx.type === "month")]
|
|
1530
1523
|
]) : vue.createCommentVNode("v-if", true)
|
|
1531
1524
|
])) : vue.createCommentVNode("v-if", true),
|
|
1532
1525
|
vue.createCommentVNode(" \u65F6\u95F4 "),
|