sard 1.0.7 → 1.0.9
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/components/back-top/back-top.d.ts +1 -1
- package/components/calendar-input/calendar-input.d.ts +2 -2
- package/components/calendar-input/calendar-input.js +2 -2
- package/components/calendar-popout/calendar-popout.d.ts +2 -2
- package/components/calendar-popout/common.d.ts +1 -1
- package/components/cascader-input/cascader-input.d.ts +2 -2
- package/components/cascader-input/cascader-input.js +2 -2
- package/components/cascader-popout/cascader-popout.d.ts +2 -2
- package/components/cascader-popout/common.d.ts +1 -1
- package/components/checkbox-input/checkbox-input.d.ts +2 -2
- package/components/checkbox-input/checkbox-input.js +2 -2
- package/components/checkbox-popout/checkbox-popout.d.ts +2 -2
- package/components/checkbox-popout/common.d.ts +1 -1
- package/components/color-picker-input/color-picker-input.d.ts +2 -2
- package/components/color-picker-input/color-picker-input.js +2 -2
- package/components/color-picker-popout/color-picker-popout.d.ts +2 -2
- package/components/color-picker-popout/common.d.ts +1 -1
- package/components/datetime-picker-input/datetime-picker-input.d.ts +2 -2
- package/components/datetime-picker-input/datetime-picker-input.js +2 -2
- package/components/datetime-picker-popout/common.d.ts +1 -1
- package/components/datetime-picker-popout/datetime-picker-popout.d.ts +2 -2
- package/components/datetime-range-picker-input/datetime-range-picker-input.d.ts +2 -2
- package/components/datetime-range-picker-input/datetime-range-picker-input.js +2 -2
- package/components/datetime-range-picker-popout/common.d.ts +1 -1
- package/components/datetime-range-picker-popout/datetime-range-picker-popout.d.ts +2 -2
- package/components/infinite-list/index.css +1 -1
- package/components/infinite-list/infinite-list.js +4 -10
- package/components/load-more/useLoadMore.d.ts +1 -1
- package/components/pull-down-refresh/common.d.ts +0 -1
- package/components/pull-down-refresh/index.css +1 -1
- package/components/pull-down-refresh/pull-down-refresh.js +14 -9
- package/components/radio-input/radio-input.d.ts +2 -2
- package/components/radio-input/radio-input.js +2 -2
- package/components/radio-popout/common.d.ts +1 -1
- package/components/radio-popout/radio-popout.d.ts +2 -2
- package/components/select-input/select-input.d.ts +2 -2
- package/components/select-input/select-input.js +2 -2
- package/components/select-popout/common.d.ts +1 -1
- package/components/select-popout/select-popout.d.ts +2 -2
- package/index.css +1 -1
- package/index.js +2 -2
- package/package.json +1 -1
- package/use/useIntersectionObserver.d.ts +2 -2
- package/use/useIntersectionObserver.js +5 -1
- package/use/useScrollParent.d.ts +5 -0
- package/use/useScrollParent.js +25 -0
- package/utils/dom.d.ts +2 -0
- package/utils/dom.js +5 -1
- package/utils/index.js +2 -2
|
@@ -5,9 +5,9 @@ declare const __VLS_base: import("vue").DefineComponent<BackTopProps, {}, {}, {}
|
|
|
5
5
|
}, string, import("vue").PublicProps, Readonly<BackTopProps> & Readonly<{
|
|
6
6
|
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
7
7
|
}>, {
|
|
8
|
+
scrollTop: number;
|
|
8
9
|
right: string;
|
|
9
10
|
bottom: string;
|
|
10
|
-
scrollTop: number;
|
|
11
11
|
visibleHeight: number;
|
|
12
12
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
13
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -14,7 +14,7 @@ declare const __VLS_base: import("vue").DefineComponent<CalendarInputProps, {},
|
|
|
14
14
|
"visible-hook": (name: import("../index.ts").MotionHookName, el: Element) => any;
|
|
15
15
|
"update:visible": (visible: boolean) => any;
|
|
16
16
|
"update:modelValue": (value: string | string[] | Date | Date[] | undefined) => any;
|
|
17
|
-
confirm: () => any;
|
|
17
|
+
confirm: (value: string | string[] | Date | Date[] | undefined) => any;
|
|
18
18
|
}, string, import("vue").PublicProps, Readonly<CalendarInputProps> & Readonly<{
|
|
19
19
|
onChange?: ((value: string | string[] | Date | Date[] | undefined) => any) | undefined;
|
|
20
20
|
"onBefore-enter"?: ((el: Element) => any) | undefined;
|
|
@@ -28,7 +28,7 @@ declare const __VLS_base: import("vue").DefineComponent<CalendarInputProps, {},
|
|
|
28
28
|
"onVisible-hook"?: ((name: import("../index.ts").MotionHookName, el: Element) => any) | undefined;
|
|
29
29
|
"onUpdate:visible"?: ((visible: boolean) => any) | undefined;
|
|
30
30
|
"onUpdate:modelValue"?: ((value: string | string[] | Date | Date[] | undefined) => any) | undefined;
|
|
31
|
-
onConfirm?: (() => any) | undefined;
|
|
31
|
+
onConfirm?: ((value: string | string[] | Date | Date[] | undefined) => any) | undefined;
|
|
32
32
|
}>, {
|
|
33
33
|
title: string;
|
|
34
34
|
min: Date;
|
|
@@ -175,8 +175,8 @@ var calendar_input_default = /*@__PURE__*/ defineComponent({
|
|
|
175
175
|
watch(innerValue, () => {
|
|
176
176
|
inputValue.value = getInputValue();
|
|
177
177
|
}, { immediate: true });
|
|
178
|
-
const onConfirm = () => {
|
|
179
|
-
emit("confirm");
|
|
178
|
+
const onConfirm = (value) => {
|
|
179
|
+
emit("confirm", value);
|
|
180
180
|
};
|
|
181
181
|
return (_ctx, _cache) => {
|
|
182
182
|
return openBlock(), createBlock(popout_input_default, mergeProps(unref(partitionedProps)[0], {
|
|
@@ -13,7 +13,7 @@ declare const __VLS_base: import("vue").DefineComponent<CalendarPopoutProps, {},
|
|
|
13
13
|
"visible-hook": (name: import("../index.ts").MotionHookName, el: Element) => any;
|
|
14
14
|
"update:visible": (visible: boolean) => any;
|
|
15
15
|
"update:modelValue": (value: string | string[] | Date | Date[] | undefined) => any;
|
|
16
|
-
confirm: () => any;
|
|
16
|
+
confirm: (value: string | string[] | Date | Date[] | undefined) => any;
|
|
17
17
|
}, string, import("vue").PublicProps, Readonly<CalendarPopoutProps> & Readonly<{
|
|
18
18
|
onChange?: ((value: string | string[] | Date | Date[] | undefined) => any) | undefined;
|
|
19
19
|
"onBefore-enter"?: ((el: Element) => any) | undefined;
|
|
@@ -27,7 +27,7 @@ declare const __VLS_base: import("vue").DefineComponent<CalendarPopoutProps, {},
|
|
|
27
27
|
"onVisible-hook"?: ((name: import("../index.ts").MotionHookName, el: Element) => any) | undefined;
|
|
28
28
|
"onUpdate:visible"?: ((visible: boolean) => any) | undefined;
|
|
29
29
|
"onUpdate:modelValue"?: ((value: string | string[] | Date | Date[] | undefined) => any) | undefined;
|
|
30
|
-
onConfirm?: (() => any) | undefined;
|
|
30
|
+
onConfirm?: ((value: string | string[] | Date | Date[] | undefined) => any) | undefined;
|
|
31
31
|
}>, {
|
|
32
32
|
title: string;
|
|
33
33
|
min: Date;
|
|
@@ -14,7 +14,7 @@ export interface CalendarPopoutEmits extends MotionEmits {
|
|
|
14
14
|
(e: 'update:visible', visible: boolean): void;
|
|
15
15
|
(e: 'update:modelValue', value: Date | Date[] | string | string[] | undefined): void;
|
|
16
16
|
(e: 'change', value: Date | Date[] | string | string[] | undefined): void;
|
|
17
|
-
(e: 'confirm'): void;
|
|
17
|
+
(e: 'confirm', value: Date | Date[] | string | string[] | undefined): void;
|
|
18
18
|
}
|
|
19
19
|
export interface CalendarPopoutExpose {
|
|
20
20
|
}
|
|
@@ -15,7 +15,7 @@ declare const __VLS_base: import("vue").DefineComponent<CascaderInputProps, {},
|
|
|
15
15
|
"visible-hook": (name: import("../index.ts").MotionHookName, el: Element) => any;
|
|
16
16
|
"update:visible": (visible: boolean) => any;
|
|
17
17
|
"update:modelValue": (value: any, selectedOptions: CascaderOption[]) => any;
|
|
18
|
-
confirm: () => any;
|
|
18
|
+
confirm: (value: any, selectedOptions: CascaderOption[]) => any;
|
|
19
19
|
}, string, import("vue").PublicProps, Readonly<CascaderInputProps> & Readonly<{
|
|
20
20
|
onSelect?: ((option: CascaderOption, tabIndex: number) => any) | undefined;
|
|
21
21
|
onChange?: ((value: any, selectedOptions: CascaderOption[]) => any) | undefined;
|
|
@@ -30,7 +30,7 @@ declare const __VLS_base: import("vue").DefineComponent<CascaderInputProps, {},
|
|
|
30
30
|
"onVisible-hook"?: ((name: import("../index.ts").MotionHookName, el: Element) => any) | undefined;
|
|
31
31
|
"onUpdate:visible"?: ((visible: boolean) => any) | undefined;
|
|
32
32
|
"onUpdate:modelValue"?: ((value: any, selectedOptions: CascaderOption[]) => any) | undefined;
|
|
33
|
-
onConfirm?: (() => any) | undefined;
|
|
33
|
+
onConfirm?: ((value: any, selectedOptions: CascaderOption[]) => any) | undefined;
|
|
34
34
|
}>, {
|
|
35
35
|
title: string;
|
|
36
36
|
multiple: boolean;
|
|
@@ -184,8 +184,8 @@ var cascader_input_default = /*@__PURE__*/ defineComponent({
|
|
|
184
184
|
watch([innerValue, renderedOptions], () => {
|
|
185
185
|
inputValue.value = getMayMultilineText(getInputValue(renderedOptions.value));
|
|
186
186
|
}, { immediate: true });
|
|
187
|
-
const onConfirm = () => {
|
|
188
|
-
emit("confirm");
|
|
187
|
+
const onConfirm = (value, selectedOptions) => {
|
|
188
|
+
emit("confirm", value, selectedOptions);
|
|
189
189
|
};
|
|
190
190
|
return (_ctx, _cache) => {
|
|
191
191
|
return openBlock(), createBlock(popout_input_default, mergeProps(unref(partitionedProps)[0], {
|
|
@@ -14,7 +14,7 @@ declare const __VLS_base: import("vue").DefineComponent<CascaderPopoutProps, {},
|
|
|
14
14
|
"visible-hook": (name: import("../index.ts").MotionHookName, el: Element) => any;
|
|
15
15
|
"update:visible": (visible: boolean) => any;
|
|
16
16
|
"update:modelValue": (value: any, selectedOptions: import("../index.ts").CascaderOption[]) => any;
|
|
17
|
-
confirm: () => any;
|
|
17
|
+
confirm: (value: any, selectedOptions: import("../index.ts").CascaderOption[]) => any;
|
|
18
18
|
}, string, import("vue").PublicProps, Readonly<CascaderPopoutProps> & Readonly<{
|
|
19
19
|
onSelect?: ((option: import("../index.ts").CascaderOption, tabIndex: number) => any) | undefined;
|
|
20
20
|
onChange?: ((value: any, selectedOptions: import("../index.ts").CascaderOption[]) => any) | undefined;
|
|
@@ -29,7 +29,7 @@ declare const __VLS_base: import("vue").DefineComponent<CascaderPopoutProps, {},
|
|
|
29
29
|
"onVisible-hook"?: ((name: import("../index.ts").MotionHookName, el: Element) => any) | undefined;
|
|
30
30
|
"onUpdate:visible"?: ((visible: boolean) => any) | undefined;
|
|
31
31
|
"onUpdate:modelValue"?: ((value: any, selectedOptions: import("../index.ts").CascaderOption[]) => any) | undefined;
|
|
32
|
-
onConfirm?: (() => any) | undefined;
|
|
32
|
+
onConfirm?: ((value: any, selectedOptions: import("../index.ts").CascaderOption[]) => any) | undefined;
|
|
33
33
|
}>, {
|
|
34
34
|
title: string;
|
|
35
35
|
multiple: boolean;
|
|
@@ -15,7 +15,7 @@ export interface CascaderPopoutEmits extends MotionEmits {
|
|
|
15
15
|
(e: 'update:modelValue', value: any, selectedOptions: CascaderOption[]): void;
|
|
16
16
|
(e: 'change', value: any, selectedOptions: CascaderOption[]): void;
|
|
17
17
|
(e: 'select', option: CascaderOption, tabIndex: number): void;
|
|
18
|
-
(e: 'confirm'): void;
|
|
18
|
+
(e: 'confirm', value: any, selectedOptions: CascaderOption[]): void;
|
|
19
19
|
}
|
|
20
20
|
export interface CascaderPopoutExpose {
|
|
21
21
|
}
|
|
@@ -13,7 +13,7 @@ declare const __VLS_base: import("vue").DefineComponent<CheckboxInputProps, {},
|
|
|
13
13
|
"visible-hook": (name: import("../index.ts").MotionHookName, el: Element) => any;
|
|
14
14
|
"update:visible": (visible: boolean) => any;
|
|
15
15
|
"update:modelValue": (value: any) => any;
|
|
16
|
-
confirm: () => any;
|
|
16
|
+
confirm: (value: any) => any;
|
|
17
17
|
}, string, import("vue").PublicProps, Readonly<CheckboxInputProps> & Readonly<{
|
|
18
18
|
onChange?: ((value: any) => any) | undefined;
|
|
19
19
|
"onBefore-enter"?: ((el: Element) => any) | undefined;
|
|
@@ -27,7 +27,7 @@ declare const __VLS_base: import("vue").DefineComponent<CheckboxInputProps, {},
|
|
|
27
27
|
"onVisible-hook"?: ((name: import("../index.ts").MotionHookName, el: Element) => any) | undefined;
|
|
28
28
|
"onUpdate:visible"?: ((visible: boolean) => any) | undefined;
|
|
29
29
|
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
30
|
-
onConfirm?: (() => any) | undefined;
|
|
30
|
+
onConfirm?: ((value: any) => any) | undefined;
|
|
31
31
|
}>, {
|
|
32
32
|
title: string;
|
|
33
33
|
options: import("../checkbox/common.ts").CheckboxGroupOption[];
|
|
@@ -139,8 +139,8 @@ var checkbox_input_default = /*@__PURE__*/ defineComponent({
|
|
|
139
139
|
watch([innerValue, () => props.options], () => {
|
|
140
140
|
inputValue.value = getInputValue();
|
|
141
141
|
}, { immediate: true });
|
|
142
|
-
const onConfirm = () => {
|
|
143
|
-
emit("confirm");
|
|
142
|
+
const onConfirm = (value) => {
|
|
143
|
+
emit("confirm", value);
|
|
144
144
|
};
|
|
145
145
|
return (_ctx, _cache) => {
|
|
146
146
|
return openBlock(), createBlock(popout_input_default, mergeProps(unref(partitionedProps)[0], {
|
|
@@ -13,7 +13,7 @@ declare const __VLS_base: import("vue").DefineComponent<CheckboxPopoutProps, {},
|
|
|
13
13
|
"visible-hook": (name: import("../index.ts").MotionHookName, el: Element) => any;
|
|
14
14
|
"update:visible": (visible: boolean) => any;
|
|
15
15
|
"update:modelValue": (value: any) => any;
|
|
16
|
-
confirm: () => any;
|
|
16
|
+
confirm: (value: any) => any;
|
|
17
17
|
}, string, import("vue").PublicProps, Readonly<CheckboxPopoutProps> & Readonly<{
|
|
18
18
|
onChange?: ((value: any) => any) | undefined;
|
|
19
19
|
"onBefore-enter"?: ((el: Element) => any) | undefined;
|
|
@@ -27,7 +27,7 @@ declare const __VLS_base: import("vue").DefineComponent<CheckboxPopoutProps, {},
|
|
|
27
27
|
"onVisible-hook"?: ((name: import("../index.ts").MotionHookName, el: Element) => any) | undefined;
|
|
28
28
|
"onUpdate:visible"?: ((visible: boolean) => any) | undefined;
|
|
29
29
|
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
30
|
-
onConfirm?: (() => any) | undefined;
|
|
30
|
+
onConfirm?: ((value: any) => any) | undefined;
|
|
31
31
|
}>, {
|
|
32
32
|
title: string;
|
|
33
33
|
options: import("../checkbox/common.ts").CheckboxGroupOption[];
|
|
@@ -16,7 +16,7 @@ export interface CheckboxPopoutEmits extends MotionEmits {
|
|
|
16
16
|
(e: 'update:visible', visible: boolean): void;
|
|
17
17
|
(e: 'update:modelValue', value: any): void;
|
|
18
18
|
(e: 'change', value: any): void;
|
|
19
|
-
(e: 'confirm'): void;
|
|
19
|
+
(e: 'confirm', value: any): void;
|
|
20
20
|
}
|
|
21
21
|
export interface CheckboxPopoutExpose {
|
|
22
22
|
}
|
|
@@ -13,7 +13,7 @@ declare const __VLS_base: import("vue").DefineComponent<ColorPickerInputProps, C
|
|
|
13
13
|
"visible-hook": (name: import("../index.ts").MotionHookName, el: Element) => any;
|
|
14
14
|
"update:visible": (visible: boolean) => any;
|
|
15
15
|
"update:modelValue": (value: string) => any;
|
|
16
|
-
confirm: () => any;
|
|
16
|
+
confirm: (value: string) => any;
|
|
17
17
|
}, string, import("vue").PublicProps, Readonly<ColorPickerInputProps> & Readonly<{
|
|
18
18
|
onChange?: ((value: string) => any) | undefined;
|
|
19
19
|
"onBefore-enter"?: ((el: Element) => any) | undefined;
|
|
@@ -27,7 +27,7 @@ declare const __VLS_base: import("vue").DefineComponent<ColorPickerInputProps, C
|
|
|
27
27
|
"onVisible-hook"?: ((name: import("../index.ts").MotionHookName, el: Element) => any) | undefined;
|
|
28
28
|
"onUpdate:visible"?: ((visible: boolean) => any) | undefined;
|
|
29
29
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
30
|
-
onConfirm?: (() => any) | undefined;
|
|
30
|
+
onConfirm?: ((value: string) => any) | undefined;
|
|
31
31
|
}>, {
|
|
32
32
|
title: string;
|
|
33
33
|
format: import("../index.ts").ColorFormat;
|
|
@@ -118,8 +118,8 @@ var color_picker_input_default = /*@__PURE__*/ defineComponent({
|
|
|
118
118
|
const previewStyle = computed(() => {
|
|
119
119
|
return { background: innerValue.value };
|
|
120
120
|
});
|
|
121
|
-
const onConfirm = () => {
|
|
122
|
-
emit("confirm");
|
|
121
|
+
const onConfirm = (value) => {
|
|
122
|
+
emit("confirm", value);
|
|
123
123
|
};
|
|
124
124
|
__expose({});
|
|
125
125
|
return (_ctx, _cache) => {
|
|
@@ -13,7 +13,7 @@ declare const __VLS_base: import("vue").DefineComponent<ColorPickerPopoutProps,
|
|
|
13
13
|
"visible-hook": (name: import("../index.ts").MotionHookName, el: Element) => any;
|
|
14
14
|
"update:visible": (visible: boolean) => any;
|
|
15
15
|
"update:modelValue": (value: string) => any;
|
|
16
|
-
confirm: () => any;
|
|
16
|
+
confirm: (value: string) => any;
|
|
17
17
|
}, string, import("vue").PublicProps, Readonly<ColorPickerPopoutProps> & Readonly<{
|
|
18
18
|
onChange?: ((value: string) => any) | undefined;
|
|
19
19
|
"onBefore-enter"?: ((el: Element) => any) | undefined;
|
|
@@ -27,7 +27,7 @@ declare const __VLS_base: import("vue").DefineComponent<ColorPickerPopoutProps,
|
|
|
27
27
|
"onVisible-hook"?: ((name: import("../index.ts").MotionHookName, el: Element) => any) | undefined;
|
|
28
28
|
"onUpdate:visible"?: ((visible: boolean) => any) | undefined;
|
|
29
29
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
30
|
-
onConfirm?: (() => any) | undefined;
|
|
30
|
+
onConfirm?: ((value: string) => any) | undefined;
|
|
31
31
|
}>, {
|
|
32
32
|
title: string;
|
|
33
33
|
format: import("../index.ts").ColorFormat;
|
|
@@ -13,7 +13,7 @@ export interface ColorPickerPopoutEmits extends MotionEmits {
|
|
|
13
13
|
(e: 'update:visible', visible: boolean): void;
|
|
14
14
|
(e: 'update:modelValue', value: string): void;
|
|
15
15
|
(e: 'change', value: string): void;
|
|
16
|
-
(e: 'confirm'): void;
|
|
16
|
+
(e: 'confirm', value: string): void;
|
|
17
17
|
}
|
|
18
18
|
export interface ColorPickerPopoutExpose {
|
|
19
19
|
}
|
|
@@ -13,7 +13,7 @@ declare const __VLS_base: import("vue").DefineComponent<DatetimePickerInputProps
|
|
|
13
13
|
"visible-hook": (name: import("../index.ts").MotionHookName, el: Element) => any;
|
|
14
14
|
"update:visible": (visible: boolean) => any;
|
|
15
15
|
"update:modelValue": (date: string | Date | undefined) => any;
|
|
16
|
-
confirm: () => any;
|
|
16
|
+
confirm: (date: string | Date | undefined) => any;
|
|
17
17
|
}, string, import("vue").PublicProps, Readonly<DatetimePickerInputProps> & Readonly<{
|
|
18
18
|
onChange?: ((date: string | Date | undefined) => any) | undefined;
|
|
19
19
|
"onBefore-enter"?: ((el: Element) => any) | undefined;
|
|
@@ -27,7 +27,7 @@ declare const __VLS_base: import("vue").DefineComponent<DatetimePickerInputProps
|
|
|
27
27
|
"onVisible-hook"?: ((name: import("../index.ts").MotionHookName, el: Element) => any) | undefined;
|
|
28
28
|
"onUpdate:visible"?: ((visible: boolean) => any) | undefined;
|
|
29
29
|
"onUpdate:modelValue"?: ((date: string | Date | undefined) => any) | undefined;
|
|
30
|
-
onConfirm?: (() => any) | undefined;
|
|
30
|
+
onConfirm?: ((date: string | Date | undefined) => any) | undefined;
|
|
31
31
|
}>, {
|
|
32
32
|
filter: (letter: import("../index.ts").DatetimeLetter, value: number, date: Date, index: number) => boolean;
|
|
33
33
|
title: string;
|
|
@@ -131,8 +131,8 @@ var datetime_picker_input_default = /*@__PURE__*/ defineComponent({
|
|
|
131
131
|
watch(innerValue, () => {
|
|
132
132
|
inputValue.value = getInputValue();
|
|
133
133
|
}, { immediate: true });
|
|
134
|
-
const onConfirm = () => {
|
|
135
|
-
emit("confirm");
|
|
134
|
+
const onConfirm = (value) => {
|
|
135
|
+
emit("confirm", value);
|
|
136
136
|
};
|
|
137
137
|
return (_ctx, _cache) => {
|
|
138
138
|
return openBlock(), createBlock(popout_input_default, mergeProps(unref(partitionedProps)[0], {
|
|
@@ -11,7 +11,7 @@ export interface DatetimePickerPopoutEmits extends MotionEmits {
|
|
|
11
11
|
(e: 'update:visible', visible: boolean): void;
|
|
12
12
|
(e: 'update:modelValue', date: Date | string | undefined): void;
|
|
13
13
|
(e: 'change', date: Date | string | undefined): void;
|
|
14
|
-
(e: 'confirm'): void;
|
|
14
|
+
(e: 'confirm', date: Date | string | undefined): void;
|
|
15
15
|
}
|
|
16
16
|
export interface DatetimePickerPopoutExpose {
|
|
17
17
|
}
|
|
@@ -13,7 +13,7 @@ declare const __VLS_base: import("vue").DefineComponent<DatetimePickerPopoutProp
|
|
|
13
13
|
"visible-hook": (name: import("../index.ts").MotionHookName, el: Element) => any;
|
|
14
14
|
"update:visible": (visible: boolean) => any;
|
|
15
15
|
"update:modelValue": (date: string | Date | undefined) => any;
|
|
16
|
-
confirm: () => any;
|
|
16
|
+
confirm: (date: string | Date | undefined) => any;
|
|
17
17
|
}, string, import("vue").PublicProps, Readonly<DatetimePickerPopoutProps> & Readonly<{
|
|
18
18
|
onChange?: ((date: string | Date | undefined) => any) | undefined;
|
|
19
19
|
"onBefore-enter"?: ((el: Element) => any) | undefined;
|
|
@@ -27,7 +27,7 @@ declare const __VLS_base: import("vue").DefineComponent<DatetimePickerPopoutProp
|
|
|
27
27
|
"onVisible-hook"?: ((name: import("../index.ts").MotionHookName, el: Element) => any) | undefined;
|
|
28
28
|
"onUpdate:visible"?: ((visible: boolean) => any) | undefined;
|
|
29
29
|
"onUpdate:modelValue"?: ((date: string | Date | undefined) => any) | undefined;
|
|
30
|
-
onConfirm?: (() => any) | undefined;
|
|
30
|
+
onConfirm?: ((date: string | Date | undefined) => any) | undefined;
|
|
31
31
|
}>, {
|
|
32
32
|
filter: (letter: import("../index.ts").DatetimeLetter, value: number, date: Date, index: number) => boolean;
|
|
33
33
|
title: string;
|
|
@@ -13,7 +13,7 @@ declare const __VLS_base: import("vue").DefineComponent<DatetimeRangePickerInput
|
|
|
13
13
|
"visible-hook": (name: import("../index.ts").MotionHookName, el: Element) => any;
|
|
14
14
|
"update:visible": (visible: boolean) => any;
|
|
15
15
|
"update:modelValue": (date: (string | Date)[] | undefined) => any;
|
|
16
|
-
confirm: () => any;
|
|
16
|
+
confirm: (date: (string | Date)[] | undefined) => any;
|
|
17
17
|
}, string, import("vue").PublicProps, Readonly<DatetimeRangePickerInputProps> & Readonly<{
|
|
18
18
|
onChange?: ((date: (string | Date)[] | undefined) => any) | undefined;
|
|
19
19
|
"onBefore-enter"?: ((el: Element) => any) | undefined;
|
|
@@ -27,7 +27,7 @@ declare const __VLS_base: import("vue").DefineComponent<DatetimeRangePickerInput
|
|
|
27
27
|
"onVisible-hook"?: ((name: import("../index.ts").MotionHookName, el: Element) => any) | undefined;
|
|
28
28
|
"onUpdate:visible"?: ((visible: boolean) => any) | undefined;
|
|
29
29
|
"onUpdate:modelValue"?: ((date: (string | Date)[] | undefined) => any) | undefined;
|
|
30
|
-
onConfirm?: (() => any) | undefined;
|
|
30
|
+
onConfirm?: ((date: (string | Date)[] | undefined) => any) | undefined;
|
|
31
31
|
}>, {
|
|
32
32
|
filter: (letter: import("../index.ts").DatetimeLetter, value: number, date: Date, index: number) => boolean;
|
|
33
33
|
title: string;
|
|
@@ -141,8 +141,8 @@ var datetime_range_picker_input_default = /*@__PURE__*/ defineComponent({
|
|
|
141
141
|
watch(innerValue, () => {
|
|
142
142
|
inputValue.value = getInputValue();
|
|
143
143
|
}, { immediate: true });
|
|
144
|
-
const onConfirm = () => {
|
|
145
|
-
emit("confirm");
|
|
144
|
+
const onConfirm = (date) => {
|
|
145
|
+
emit("confirm", date);
|
|
146
146
|
};
|
|
147
147
|
return (_ctx, _cache) => {
|
|
148
148
|
return openBlock(), createBlock(popout_input_default, mergeProps(unref(partitionedProps)[0], {
|
|
@@ -11,7 +11,7 @@ export interface DatetimeRangePickerPopoutEmits extends MotionEmits {
|
|
|
11
11
|
(e: 'update:visible', visible: boolean): void;
|
|
12
12
|
(e: 'update:modelValue', date: (Date | string)[] | undefined): void;
|
|
13
13
|
(e: 'change', date: (Date | string)[] | undefined): void;
|
|
14
|
-
(e: 'confirm'): void;
|
|
14
|
+
(e: 'confirm', date: (Date | string)[] | undefined): void;
|
|
15
15
|
}
|
|
16
16
|
export interface DatetimeRangePickerPopoutExpose {
|
|
17
17
|
}
|
|
@@ -13,7 +13,7 @@ declare const __VLS_base: import("vue").DefineComponent<DatetimeRangePickerPopou
|
|
|
13
13
|
"visible-hook": (name: import("../index.ts").MotionHookName, el: Element) => any;
|
|
14
14
|
"update:visible": (visible: boolean) => any;
|
|
15
15
|
"update:modelValue": (date: (string | Date)[] | undefined) => any;
|
|
16
|
-
confirm: () => any;
|
|
16
|
+
confirm: (date: (string | Date)[] | undefined) => any;
|
|
17
17
|
}, string, import("vue").PublicProps, Readonly<DatetimeRangePickerPopoutProps> & Readonly<{
|
|
18
18
|
onChange?: ((date: (string | Date)[] | undefined) => any) | undefined;
|
|
19
19
|
"onBefore-enter"?: ((el: Element) => any) | undefined;
|
|
@@ -27,7 +27,7 @@ declare const __VLS_base: import("vue").DefineComponent<DatetimeRangePickerPopou
|
|
|
27
27
|
"onVisible-hook"?: ((name: import("../index.ts").MotionHookName, el: Element) => any) | undefined;
|
|
28
28
|
"onUpdate:visible"?: ((visible: boolean) => any) | undefined;
|
|
29
29
|
"onUpdate:modelValue"?: ((date: (string | Date)[] | undefined) => any) | undefined;
|
|
30
|
-
onConfirm?: (() => any) | undefined;
|
|
30
|
+
onConfirm?: ((date: (string | Date)[] | undefined) => any) | undefined;
|
|
31
31
|
}>, {
|
|
32
32
|
filter: (letter: import("../index.ts").DatetimeLetter, value: number, date: Date, index: number) => boolean;
|
|
33
33
|
title: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.s-infinite-list
|
|
1
|
+
.s-infinite-list .s-pull-down-refresh{min-height:100%}.s-infinite-list__load-more:is(.is-hidden){height:0;overflow:hidden;visibility:hidden;pointer-events:none}
|
|
@@ -2,6 +2,7 @@ import { createBem } from "../../utils/bem.js";
|
|
|
2
2
|
import loading_default from "../loading/loading.js";
|
|
3
3
|
import { useTranslateWithPrefix } from "../../locale/index.js";
|
|
4
4
|
import { defaultInfiniteListProps } from "./common.js";
|
|
5
|
+
import { useScrollParent } from "../../use/useScrollParent.js";
|
|
5
6
|
import pull_down_refresh_default from "../pull-down-refresh/pull-down-refresh.js";
|
|
6
7
|
import load_more_default from "../load-more/load-more.js";
|
|
7
8
|
import { useLoadMore } from "../load-more/useLoadMore.js";
|
|
@@ -38,11 +39,6 @@ var infinite_list_default = /*@__PURE__*/ defineComponent({
|
|
|
38
39
|
const bem = createBem("infinite-list");
|
|
39
40
|
const { t } = useTranslateWithPrefix("pullDownRefresh");
|
|
40
41
|
const doneText = ref("");
|
|
41
|
-
const scrollRef = useTemplateRef("scroll");
|
|
42
|
-
const pullDownRefresh = useTemplateRef("pull-down-refresh");
|
|
43
|
-
const onScroll = () => {
|
|
44
|
-
pullDownRefresh.value?.enableToRefresh(scrollRef.value.scrollTop === 0);
|
|
45
|
-
};
|
|
46
42
|
const onRefresh = () => {
|
|
47
43
|
refresh().then(() => {
|
|
48
44
|
doneText.value = t("doneSuccess");
|
|
@@ -53,7 +49,7 @@ var infinite_list_default = /*@__PURE__*/ defineComponent({
|
|
|
53
49
|
});
|
|
54
50
|
};
|
|
55
51
|
const { status, isLoading, isRefreshing, onLoadMore, onReload, refresh } = useLoadMore({
|
|
56
|
-
root:
|
|
52
|
+
root: useScrollParent(useTemplateRef("scroll")),
|
|
57
53
|
target: useTemplateRef("load-more"),
|
|
58
54
|
rootMargin: () => props.rootMargin,
|
|
59
55
|
request: async (page, isRefresh) => {
|
|
@@ -64,10 +60,8 @@ var infinite_list_default = /*@__PURE__*/ defineComponent({
|
|
|
64
60
|
return (_ctx, _cache) => {
|
|
65
61
|
return openBlock(), createElementBlock("div", {
|
|
66
62
|
ref: "scroll",
|
|
67
|
-
class: normalizeClass(unref(bem).b())
|
|
68
|
-
onScroll
|
|
63
|
+
class: normalizeClass(unref(bem).b())
|
|
69
64
|
}, [createVNode(pull_down_refresh_default, {
|
|
70
|
-
ref: "pull-down-refresh",
|
|
71
65
|
loading: unref(isRefreshing),
|
|
72
66
|
disabled: !__props.refreshable || unref(isLoading),
|
|
73
67
|
"done-duration": __props.doneDuration,
|
|
@@ -118,7 +112,7 @@ var infinite_list_default = /*@__PURE__*/ defineComponent({
|
|
|
118
112
|
"loading",
|
|
119
113
|
"disabled",
|
|
120
114
|
"done-duration"
|
|
121
|
-
])],
|
|
115
|
+
])], 2);
|
|
122
116
|
};
|
|
123
117
|
}
|
|
124
118
|
});
|
|
@@ -6,7 +6,7 @@ import type { LoadMoreStatus } from './common';
|
|
|
6
6
|
export interface UseLoadMoreOptions {
|
|
7
7
|
request: (page: number, isRefresh: boolean) => Promise<boolean>;
|
|
8
8
|
rootMargin?: MaybeRefOrGetter<string>;
|
|
9
|
-
root?: MaybeRefOrGetter<Element | Document | null>;
|
|
9
|
+
root?: MaybeRefOrGetter<Element | Document | Window | null | undefined>;
|
|
10
10
|
target?: MaybeRefOrGetter<Element | null>;
|
|
11
11
|
disabled?: MaybeRefOrGetter<boolean>;
|
|
12
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--s-pull-down-refresh-header-font-size:var(--s-font-size-sm);--s-pull-down-refresh-header-color:var(--s-text-color-tertiary);--s-pull-down-refresh-loading-font-size:18px}.s-pull-down-refresh{transition-property:transform}.s-pull-down-refresh__header{position:absolute;top:0;left:0;width:100%;display:flex;justify-content:center;align-items:center;transform:translateY(-100%);font-size:var(--s-pull-down-refresh-header-font-size);color:var(--s-pull-down-refresh-header-color)}.s-pull-down-refresh__loading{font-size:var(--s-pull-down-refresh-loading-font-size)}
|
|
1
|
+
:root{--s-pull-down-refresh-header-font-size:var(--s-font-size-sm);--s-pull-down-refresh-header-color:var(--s-text-color-tertiary);--s-pull-down-refresh-loading-font-size:18px}.s-pull-down-refresh{display:flex;flex-direction:column;overflow:hidden}.s-pull-down-refresh__gesture{min-height:100%;flex-grow:1;transition-property:transform}.s-pull-down-refresh__header{position:absolute;top:0;left:0;width:100%;display:flex;justify-content:center;align-items:center;transform:translateY(-100%);font-size:var(--s-pull-down-refresh-header-font-size);color:var(--s-pull-down-refresh-header-color)}.s-pull-down-refresh__loading{font-size:var(--s-pull-down-refresh-loading-font-size)}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { createBem } from "../../utils/bem.js";
|
|
2
|
+
import { getScrollTop } from "../../utils/dom.js";
|
|
2
3
|
import { useTimeout } from "../../use/useTimeout.js";
|
|
3
4
|
import { usePointerDown } from "../../use/usePointerDown.js";
|
|
4
5
|
import loading_default from "../loading/loading.js";
|
|
5
6
|
import { defaultPullDownRefreshProps } from "./common.js";
|
|
6
|
-
import {
|
|
7
|
+
import { useScrollParent } from "../../use/useScrollParent.js";
|
|
8
|
+
import { computed, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, mergeDefaults, normalizeClass, normalizeStyle, onMounted, openBlock, ref, renderSlot, unref, useTemplateRef, watch } from "vue";
|
|
7
9
|
//#region packages/sard/components/pull-down-refresh/pull-down-refresh.vue
|
|
8
10
|
var pull_down_refresh_default = /*@__PURE__*/ defineComponent({
|
|
9
11
|
__name: "pull-down-refresh",
|
|
@@ -38,6 +40,7 @@ var pull_down_refresh_default = /*@__PURE__*/ defineComponent({
|
|
|
38
40
|
const props = __props;
|
|
39
41
|
const emit = __emit;
|
|
40
42
|
const bem = createBem("pull-down-refresh");
|
|
43
|
+
const scrollParent = useScrollParent(useTemplateRef("root"));
|
|
41
44
|
const status = ref("initial");
|
|
42
45
|
const translateY = ref(0);
|
|
43
46
|
const progress = computed(() => {
|
|
@@ -76,8 +79,11 @@ var pull_down_refresh_default = /*@__PURE__*/ defineComponent({
|
|
|
76
79
|
let movable = false;
|
|
77
80
|
let lockDirection = "";
|
|
78
81
|
const isDragging = ref(false);
|
|
82
|
+
const checkScrollTop = () => {
|
|
83
|
+
return getScrollTop(scrollParent.value) === 0;
|
|
84
|
+
};
|
|
79
85
|
const onTouchStart = (event) => {
|
|
80
|
-
if (props.disabled || status.value !== "initial" || !
|
|
86
|
+
if (props.disabled || status.value !== "initial" || !checkScrollTop()) return;
|
|
81
87
|
startX = event.touches[0].clientX;
|
|
82
88
|
startY = event.touches[0].clientY;
|
|
83
89
|
movable = true;
|
|
@@ -111,10 +117,6 @@ var pull_down_refresh_default = /*@__PURE__*/ defineComponent({
|
|
|
111
117
|
}
|
|
112
118
|
};
|
|
113
119
|
const onPointerDown = usePointerDown(onTouchStart, onTouchMove, onTouchEnd);
|
|
114
|
-
const canRefresh = ref(true);
|
|
115
|
-
const enableToRefresh = (can) => {
|
|
116
|
-
canRefresh.value = can;
|
|
117
|
-
};
|
|
118
120
|
const pullDownRefreshStyle = computed(() => {
|
|
119
121
|
return {
|
|
120
122
|
transform: `translate3d(0,${translateY.value}px,0)`,
|
|
@@ -124,10 +126,13 @@ var pull_down_refresh_default = /*@__PURE__*/ defineComponent({
|
|
|
124
126
|
const headerStyle = computed(() => {
|
|
125
127
|
return { height: props.headerHeight + "px" };
|
|
126
128
|
});
|
|
127
|
-
__expose({
|
|
129
|
+
__expose({});
|
|
128
130
|
return (_ctx, _cache) => {
|
|
129
131
|
return openBlock(), createElementBlock("div", {
|
|
130
|
-
|
|
132
|
+
ref: "root",
|
|
133
|
+
class: normalizeClass(unref(bem).b())
|
|
134
|
+
}, [createElementVNode("div", {
|
|
135
|
+
class: normalizeClass(unref(bem).e("gesture")),
|
|
131
136
|
style: normalizeStyle(pullDownRefreshStyle.value),
|
|
132
137
|
onTouchstart: onTouchStart,
|
|
133
138
|
onTouchmove: onTouchMove,
|
|
@@ -152,7 +157,7 @@ var pull_down_refresh_default = /*@__PURE__*/ defineComponent({
|
|
|
152
157
|
}, null, 8, ["class"])]) : status.value === "loading" ? renderSlot(_ctx.$slots, "loading", { key: 2 }, () => [createVNode(loading_default, {
|
|
153
158
|
type: "clock",
|
|
154
159
|
class: normalizeClass(unref(bem).e("loading"))
|
|
155
|
-
}, null, 8, ["class"])]) : status.value === "done" ? renderSlot(_ctx.$slots, "done", { key: 3 }) : createCommentVNode("v-if", true)], 6), renderSlot(_ctx.$slots, "default")], 38);
|
|
160
|
+
}, null, 8, ["class"])]) : status.value === "done" ? renderSlot(_ctx.$slots, "done", { key: 3 }) : createCommentVNode("v-if", true)], 6), renderSlot(_ctx.$slots, "default")], 38)], 2);
|
|
156
161
|
};
|
|
157
162
|
}
|
|
158
163
|
});
|
|
@@ -13,7 +13,7 @@ declare const __VLS_base: import("vue").DefineComponent<RadioInputProps, {}, {},
|
|
|
13
13
|
"visible-hook": (name: import("../index.ts").MotionHookName, el: Element) => any;
|
|
14
14
|
"update:visible": (visible: boolean) => any;
|
|
15
15
|
"update:modelValue": (value: any) => any;
|
|
16
|
-
confirm: () => any;
|
|
16
|
+
confirm: (value: any) => any;
|
|
17
17
|
}, string, import("vue").PublicProps, Readonly<RadioInputProps> & Readonly<{
|
|
18
18
|
onChange?: ((value: any) => any) | undefined;
|
|
19
19
|
"onBefore-enter"?: ((el: Element) => any) | undefined;
|
|
@@ -27,7 +27,7 @@ declare const __VLS_base: import("vue").DefineComponent<RadioInputProps, {}, {},
|
|
|
27
27
|
"onVisible-hook"?: ((name: import("../index.ts").MotionHookName, el: Element) => any) | undefined;
|
|
28
28
|
"onUpdate:visible"?: ((visible: boolean) => any) | undefined;
|
|
29
29
|
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
30
|
-
onConfirm?: (() => any) | undefined;
|
|
30
|
+
onConfirm?: ((value: any) => any) | undefined;
|
|
31
31
|
}>, {
|
|
32
32
|
title: string;
|
|
33
33
|
options: import("../radio/common.ts").RadioGroupOption[];
|
|
@@ -136,8 +136,8 @@ var radio_input_default = /*@__PURE__*/ defineComponent({
|
|
|
136
136
|
watch([innerValue, () => props.options], () => {
|
|
137
137
|
inputValue.value = getInputValue();
|
|
138
138
|
}, { immediate: true });
|
|
139
|
-
const onConfirm = () => {
|
|
140
|
-
emit("confirm");
|
|
139
|
+
const onConfirm = (value) => {
|
|
140
|
+
emit("confirm", value);
|
|
141
141
|
};
|
|
142
142
|
return (_ctx, _cache) => {
|
|
143
143
|
return openBlock(), createBlock(popout_input_default, mergeProps(unref(partitionedProps)[0], {
|
|
@@ -15,7 +15,7 @@ export interface RadioPopoutEmits extends MotionEmits {
|
|
|
15
15
|
(e: 'update:visible', visible: boolean): void;
|
|
16
16
|
(e: 'update:modelValue', value: any): void;
|
|
17
17
|
(e: 'change', value: any): void;
|
|
18
|
-
(e: 'confirm'): void;
|
|
18
|
+
(e: 'confirm', value: any): void;
|
|
19
19
|
}
|
|
20
20
|
export interface RadioPopoutExpose {
|
|
21
21
|
}
|
|
@@ -13,7 +13,7 @@ declare const __VLS_base: import("vue").DefineComponent<RadioPopoutProps, {}, {}
|
|
|
13
13
|
"visible-hook": (name: import("../index.ts").MotionHookName, el: Element) => any;
|
|
14
14
|
"update:visible": (visible: boolean) => any;
|
|
15
15
|
"update:modelValue": (value: any) => any;
|
|
16
|
-
confirm: () => any;
|
|
16
|
+
confirm: (value: any) => any;
|
|
17
17
|
}, string, import("vue").PublicProps, Readonly<RadioPopoutProps> & Readonly<{
|
|
18
18
|
onChange?: ((value: any) => any) | undefined;
|
|
19
19
|
"onBefore-enter"?: ((el: Element) => any) | undefined;
|
|
@@ -27,7 +27,7 @@ declare const __VLS_base: import("vue").DefineComponent<RadioPopoutProps, {}, {}
|
|
|
27
27
|
"onVisible-hook"?: ((name: import("../index.ts").MotionHookName, el: Element) => any) | undefined;
|
|
28
28
|
"onUpdate:visible"?: ((visible: boolean) => any) | undefined;
|
|
29
29
|
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
30
|
-
onConfirm?: (() => any) | undefined;
|
|
30
|
+
onConfirm?: ((value: any) => any) | undefined;
|
|
31
31
|
}>, {
|
|
32
32
|
title: string;
|
|
33
33
|
options: import("../radio/common.ts").RadioGroupOption[];
|
|
@@ -13,7 +13,7 @@ declare const __VLS_base: import("vue").DefineComponent<SelectInputProps, Select
|
|
|
13
13
|
"visible-hook": (name: import("../index.ts").MotionHookName, el: Element) => any;
|
|
14
14
|
"update:visible": (visible: boolean) => any;
|
|
15
15
|
"update:modelValue": (value: any) => any;
|
|
16
|
-
confirm: () => any;
|
|
16
|
+
confirm: (value: any) => any;
|
|
17
17
|
}, string, import("vue").PublicProps, Readonly<SelectInputProps> & Readonly<{
|
|
18
18
|
onChange?: ((value: any) => any) | undefined;
|
|
19
19
|
"onBefore-enter"?: ((el: Element) => any) | undefined;
|
|
@@ -27,7 +27,7 @@ declare const __VLS_base: import("vue").DefineComponent<SelectInputProps, Select
|
|
|
27
27
|
"onVisible-hook"?: ((name: import("../index.ts").MotionHookName, el: Element) => any) | undefined;
|
|
28
28
|
"onUpdate:visible"?: ((visible: boolean) => any) | undefined;
|
|
29
29
|
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
30
|
-
onConfirm?: (() => any) | undefined;
|
|
30
|
+
onConfirm?: ((value: any) => any) | undefined;
|
|
31
31
|
}>, {
|
|
32
32
|
title: string;
|
|
33
33
|
multiple: boolean;
|
|
@@ -190,8 +190,8 @@ var select_input_default = /*@__PURE__*/ defineComponent({
|
|
|
190
190
|
], () => {
|
|
191
191
|
inputValue.value = getInputValue();
|
|
192
192
|
}, { immediate: true });
|
|
193
|
-
const onConfirm = () => {
|
|
194
|
-
emit("confirm");
|
|
193
|
+
const onConfirm = (value) => {
|
|
194
|
+
emit("confirm", value);
|
|
195
195
|
};
|
|
196
196
|
__expose({});
|
|
197
197
|
return (_ctx, _cache) => {
|
|
@@ -11,7 +11,7 @@ export interface SelectPopoutEmits extends MotionEmits {
|
|
|
11
11
|
(e: 'update:visible', visible: boolean): void;
|
|
12
12
|
(e: 'update:modelValue', value: any): void;
|
|
13
13
|
(e: 'change', value: any): void;
|
|
14
|
-
(e: 'confirm'): void;
|
|
14
|
+
(e: 'confirm', value: any): void;
|
|
15
15
|
}
|
|
16
16
|
export interface SelectPopoutExpose {
|
|
17
17
|
}
|