@nutui/nutui 4.1.0-beta.4 → 4.1.0-beta.5
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/dist/nutui.es.js +1 -1
- package/dist/nutui.js +4332 -4341
- package/dist/nutui.umd.js +1 -1
- package/dist/packages/_es/ActionSheet.js +2 -2
- package/dist/packages/_es/Address.js +2 -2
- package/dist/packages/_es/AddressList.js +1 -1
- package/dist/packages/_es/Animate.js +1 -1
- package/dist/packages/_es/Audio.js +2 -2
- package/dist/packages/_es/AudioOperate.js +3 -3
- package/dist/packages/_es/Avatar.js +1 -1
- package/dist/packages/_es/AvatarGroup.js +3 -4
- package/dist/packages/_es/Backtop.js +1 -1
- package/dist/packages/_es/Badge.js +1 -1
- package/dist/packages/_es/Barrage.js +1 -1
- package/dist/packages/_es/Button.js +2 -2
- package/dist/packages/_es/Calendar.js +3 -3
- package/dist/packages/_es/CalendarItem.js +2 -2
- package/dist/packages/_es/Card.js +2 -2
- package/dist/packages/_es/Cascader.js +4 -3
- package/dist/packages/_es/Category.js +3 -3
- package/dist/packages/_es/CategoryPane.js +2 -2
- package/dist/packages/_es/Cell.js +1 -1
- package/dist/packages/_es/CellGroup.js +1 -1
- package/dist/packages/_es/Checkbox.js +2 -2
- package/dist/packages/_es/CheckboxGroup.js +1 -1
- package/dist/packages/_es/CircleProgress.js +1 -1
- package/dist/packages/_es/Col.js +1 -1
- package/dist/packages/_es/Collapse.js +1 -1
- package/dist/packages/_es/CollapseItem.js +1 -1
- package/dist/packages/_es/Comment.js +4 -4
- package/dist/packages/_es/ConfigProvider.js +4 -4
- package/dist/packages/_es/Countdown.js +4 -4
- package/dist/packages/_es/Countup.js +9 -12
- package/dist/packages/_es/DatePicker.js +3 -3
- package/dist/packages/_es/Dialog.js +4 -4
- package/dist/packages/_es/Divider.js +1 -1
- package/dist/packages/_es/Drag.js +1 -1
- package/dist/packages/_es/Ecard.js +1 -1
- package/dist/packages/_es/Elevator.js +1 -1
- package/dist/packages/_es/Ellipsis.js +1 -1
- package/dist/packages/_es/Empty.js +2 -2
- package/dist/packages/_es/FixedNav.js +1 -1
- package/dist/packages/_es/Form.js +1 -1
- package/dist/packages/_es/FormItem.js +3 -3
- package/dist/packages/_es/Grid.js +2 -2
- package/dist/packages/_es/GridItem.js +2 -2
- package/dist/packages/_es/Image.js +2 -2
- package/dist/packages/_es/ImagePreview.js +4 -4
- package/dist/packages/_es/Indicator.js +1 -1
- package/dist/packages/_es/InfiniteLoading.js +2 -2
- package/dist/packages/_es/Input.js +2 -4
- package/dist/packages/_es/InputNumber.js +1 -1
- package/dist/packages/_es/{Interceptor-5415601e.js → Interceptor-883a3078.js} +1 -1
- package/dist/packages/_es/Invoice.js +3 -3
- package/dist/packages/_es/Layout.js +1 -1
- package/dist/packages/_es/List.js +1 -1
- package/dist/packages/_es/Menu.js +2 -2
- package/dist/packages/_es/MenuItem.js +2 -2
- package/dist/packages/_es/Navbar.js +1 -1
- package/dist/packages/_es/Noticebar.js +5 -5
- package/dist/packages/_es/Notify.js +2 -2
- package/dist/packages/_es/NumberKeyboard.js +2 -2
- package/dist/packages/_es/Overlay.js +3 -1
- package/dist/packages/_es/Pagination.js +1 -1
- package/dist/packages/_es/Picker.js +7 -7
- package/dist/packages/_es/Popover.js +7 -7
- package/dist/packages/_es/Popup.js +2 -2
- package/dist/packages/_es/Price.js +1 -1
- package/dist/packages/_es/Progress.js +1 -1
- package/dist/packages/_es/PullRefresh.js +3 -2
- package/dist/packages/_es/Radio.js +2 -2
- package/dist/packages/_es/RadioGroup.js +2 -2
- package/dist/packages/_es/Range.js +1 -1
- package/dist/packages/_es/Rate.js +4 -4
- package/dist/packages/_es/Row.js +1 -1
- package/dist/packages/_es/Searchbar.js +1 -1
- package/dist/packages/_es/ShortPassword.js +2 -2
- package/dist/packages/_es/SideNavbar.js +1 -1
- package/dist/packages/_es/SideNavbarItem.js +1 -1
- package/dist/packages/_es/Signature.js +1 -1
- package/dist/packages/_es/Skeleton.js +1 -1
- package/dist/packages/_es/Sku.js +8 -8
- package/dist/packages/_es/Step.js +1 -1
- package/dist/packages/_es/Steps.js +1 -1
- package/dist/packages/_es/Sticky.js +125 -5
- package/dist/packages/_es/SubSideNavbar.js +1 -1
- package/dist/packages/_es/Swipe.js +1 -1
- package/dist/packages/_es/Swiper.js +2 -2
- package/dist/packages/_es/SwiperItem.js +2 -2
- package/dist/packages/_es/Switch.js +1 -1
- package/dist/packages/_es/TabPane.js +2 -2
- package/dist/packages/_es/Tabbar.js +2 -2
- package/dist/packages/_es/TabbarItem.js +2 -2
- package/dist/packages/_es/Table.js +12 -6
- package/dist/packages/_es/Tabs.js +5 -4
- package/dist/packages/_es/Tag.js +1 -1
- package/dist/packages/_es/Textarea.js +1 -1
- package/dist/packages/_es/TimeDetail.js +1 -1
- package/dist/packages/_es/TimePannel.js +1 -1
- package/dist/packages/_es/TimeSelect.js +2 -2
- package/dist/packages/_es/Toast.js +2 -2
- package/dist/packages/_es/Tour.js +2 -2
- package/dist/packages/_es/TrendArrow.js +1 -1
- package/dist/packages/_es/Uploader.js +5 -4
- package/dist/packages/_es/Video.js +1 -1
- package/dist/packages/_es/Watermark.js +2 -2
- package/dist/packages/_es/{common-21e9de3d.js → common-3cfd9c50.js} +1 -1
- package/dist/packages/_es/{component-8f0be7eb.js → component-470275dd.js} +1 -1
- package/dist/packages/_es/{index-c9b21ed1.js → index-02204c4b.js} +2 -1
- package/dist/packages/_es/{index-dc2ebe90.js → index-412323a0.js} +2 -2
- package/dist/packages/_es/{index-43c34ac6.js → index-97b44e6c.js} +1 -0
- package/dist/packages/_es/{index.vue_vue_type_script_lang-dba4283d.js → index.vue_vue_type_script_lang-0b4f12ed.js} +1 -1
- package/dist/packages/_es/{index.vue_vue_type_script_lang-7b265520.js → index.vue_vue_type_script_lang-9ebe2e75.js} +2 -2
- package/dist/packages/_es/{mountComponent-f2c53efb.js → mountComponent-f893becf.js} +1 -1
- package/dist/packages/sticky/index.scss +0 -10
- package/dist/smartips/web-types.json +4 -10
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +51 -51
- package/dist/styles/themes/jdb.scss +51 -51
- package/dist/styles/themes/jddkh.scss +51 -51
- package/dist/styles/themes/jdt.scss +51 -51
- package/dist/types/__VUE/calendaritem/type.d.ts +0 -7
- package/dist/types/__VUE/circleprogress/index.vue.d.ts +3 -3
- package/dist/types/__VUE/configprovider/index.vue.d.ts +3 -4
- package/dist/types/__VUE/formitem/types.d.ts +2 -2
- package/dist/types/__VUE/picker/common.d.ts +4 -4
- package/dist/types/__VUE/picker/index.vue.d.ts +9 -10
- package/dist/types/__VUE/pullrefresh/index.vue.d.ts +1 -1
- package/dist/types/__VUE/rate/index.vue.d.ts +2 -2
- package/dist/types/__VUE/sticky/index.vue.d.ts +11 -8
- package/dist/types/__VUE/swipe/index.vue.d.ts +2 -2
- package/dist/types/__VUE/swiper/index.vue.d.ts +1 -1
- package/dist/types/__VUE/table/common.d.ts +21 -6
- package/dist/types/__VUE/table/renderColumn.d.ts +20 -6
- package/dist/types/__VUE/tabs/hooks.d.ts +2 -2
- package/dist/types/__VUE/tabs/index.vue.d.ts +2 -2
- package/dist/types/__VUE/uploader/index.vue.d.ts +2 -2
- package/dist/types/utils/useTaroRect/index.d.ts +1 -1
- package/dist/types/utils/useTouch/index.d.ts +2 -2
- package/package.json +1 -1
- package/dist/packages/_es/index.vue_vue_type_script_lang-89366761.js +0 -151
|
@@ -58,13 +58,6 @@ export interface DateInfo {
|
|
|
58
58
|
month: string;
|
|
59
59
|
day: string;
|
|
60
60
|
}
|
|
61
|
-
export interface MonthInfo {
|
|
62
|
-
curData: string[] | string;
|
|
63
|
-
title: string;
|
|
64
|
-
monthData: Day[];
|
|
65
|
-
cssHeight: number;
|
|
66
|
-
cssScrollHeight: number;
|
|
67
|
-
}
|
|
68
61
|
export interface CalendarRef extends HTMLElement {
|
|
69
62
|
scrollToDate: (date: string) => void;
|
|
70
63
|
initPosition: () => void;
|
|
@@ -21,7 +21,7 @@ declare const _default: Install< import("vue").DefineComponent<{
|
|
|
21
21
|
default: number;
|
|
22
22
|
};
|
|
23
23
|
strokeLinecap: {
|
|
24
|
-
type: PropType<
|
|
24
|
+
type: PropType<"round" | "butt" | "square">;
|
|
25
25
|
default: string;
|
|
26
26
|
};
|
|
27
27
|
color: {
|
|
@@ -66,7 +66,7 @@ declare const _default: Install< import("vue").DefineComponent<{
|
|
|
66
66
|
default: number;
|
|
67
67
|
};
|
|
68
68
|
strokeLinecap: {
|
|
69
|
-
type: PropType<
|
|
69
|
+
type: PropType<"round" | "butt" | "square">;
|
|
70
70
|
default: string;
|
|
71
71
|
};
|
|
72
72
|
color: {
|
|
@@ -85,7 +85,7 @@ declare const _default: Install< import("vue").DefineComponent<{
|
|
|
85
85
|
color: string | Record<string, any>;
|
|
86
86
|
radius: string | number;
|
|
87
87
|
strokeWidth: string | number;
|
|
88
|
-
strokeLinecap:
|
|
88
|
+
strokeLinecap: "round" | "butt" | "square";
|
|
89
89
|
pathColor: string;
|
|
90
90
|
clockwise: boolean;
|
|
91
91
|
}, {}>>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { PropType } from 'vue';
|
|
2
1
|
|
|
3
2
|
declare type Install<T> = T & {
|
|
4
3
|
install(app: import('vue').App): void;
|
|
@@ -13,7 +12,7 @@ declare const _default: Install< import("vue").DefineComponent<{
|
|
|
13
12
|
default: {};
|
|
14
13
|
};
|
|
15
14
|
tag: {
|
|
16
|
-
type:
|
|
15
|
+
type: StringConstructor;
|
|
17
16
|
default: string;
|
|
18
17
|
};
|
|
19
18
|
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
@@ -28,11 +27,11 @@ declare const _default: Install< import("vue").DefineComponent<{
|
|
|
28
27
|
default: {};
|
|
29
28
|
};
|
|
30
29
|
tag: {
|
|
31
|
-
type:
|
|
30
|
+
type: StringConstructor;
|
|
32
31
|
default: string;
|
|
33
32
|
};
|
|
34
33
|
}>>, {
|
|
35
|
-
tag:
|
|
34
|
+
tag: string;
|
|
36
35
|
theme: string;
|
|
37
36
|
themeVars: Record<string, any>;
|
|
38
37
|
}, {}>>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export
|
|
1
|
+
export interface FormItemRuleWithoutValidator {
|
|
2
2
|
regex?: RegExp;
|
|
3
3
|
required?: boolean;
|
|
4
4
|
message: string;
|
|
5
5
|
[key: string]: any;
|
|
6
6
|
}
|
|
7
|
-
export
|
|
7
|
+
export interface FormItemRule extends FormItemRuleWithoutValidator {
|
|
8
8
|
validator?: (value: any, ruleCfg: FormItemRuleWithoutValidator) => boolean | Promise<string | boolean>;
|
|
9
9
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CSSProperties } from 'vue';
|
|
2
2
|
export declare const componentWeb: {
|
|
3
3
|
components: {
|
|
4
|
-
[x:
|
|
4
|
+
[x: number]: any;
|
|
5
5
|
};
|
|
6
6
|
props: {
|
|
7
7
|
modelValue: {
|
|
@@ -47,7 +47,7 @@ export declare const componentWeb: {
|
|
|
47
47
|
};
|
|
48
48
|
emits: string[];
|
|
49
49
|
setup(props: any, { emit }: any): {
|
|
50
|
-
column:
|
|
50
|
+
column: any;
|
|
51
51
|
columnsType: import("vue").ComputedRef<"multiple" | "single" | "cascade">;
|
|
52
52
|
columnsList: import("vue").ComputedRef<import("./types").PickerOption[][]>;
|
|
53
53
|
cancel: () => void;
|
|
@@ -76,7 +76,7 @@ export declare const componentWeb: {
|
|
|
76
76
|
};
|
|
77
77
|
export declare const componentWeapp: {
|
|
78
78
|
components: {
|
|
79
|
-
[x:
|
|
79
|
+
[x: number]: any;
|
|
80
80
|
};
|
|
81
81
|
props: {
|
|
82
82
|
modelValue: {
|
|
@@ -122,7 +122,7 @@ export declare const componentWeapp: {
|
|
|
122
122
|
};
|
|
123
123
|
emits: string[];
|
|
124
124
|
setup(props: any, { emit }: any): {
|
|
125
|
-
column:
|
|
125
|
+
column: any;
|
|
126
126
|
columnsType: import("vue").ComputedRef<"multiple" | "single" | "cascade">;
|
|
127
127
|
columnsList: import("vue").ComputedRef<import("./types").PickerOption[][]>;
|
|
128
128
|
cancel: () => void;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { PickerOption } from './types';
|
|
1
|
+
import { CSSProperties } from 'vue';
|
|
3
2
|
|
|
4
3
|
declare type Install<T> = T & {
|
|
5
4
|
install(app: import('vue').App): void;
|
|
6
5
|
};
|
|
7
6
|
declare const _default: Install< import("vue").DefineComponent<{
|
|
8
7
|
modelValue: {
|
|
9
|
-
type: PropType<(string | number)[]>;
|
|
8
|
+
type: import("vue").PropType<(string | number)[]>;
|
|
10
9
|
default: () => never[];
|
|
11
10
|
};
|
|
12
11
|
title: {
|
|
@@ -22,7 +21,7 @@ declare const _default: Install< import("vue").DefineComponent<{
|
|
|
22
21
|
default: string;
|
|
23
22
|
};
|
|
24
23
|
columns: {
|
|
25
|
-
type: PropType<(PickerOption | PickerOption[])[]>;
|
|
24
|
+
type: import("vue").PropType<(import("./types").PickerOption | import("./types").PickerOption[])[]>;
|
|
26
25
|
default: () => never[];
|
|
27
26
|
};
|
|
28
27
|
threeDimensional: {
|
|
@@ -49,11 +48,11 @@ declare const _default: Install< import("vue").DefineComponent<{
|
|
|
49
48
|
classes: import("vue").ComputedRef<{
|
|
50
49
|
[x: string]: boolean;
|
|
51
50
|
}>;
|
|
52
|
-
column:
|
|
51
|
+
column: any;
|
|
53
52
|
columnsType: import("vue").ComputedRef<"multiple" | "single" | "cascade">;
|
|
54
|
-
columnsList: import("vue").ComputedRef<PickerOption[][]>;
|
|
53
|
+
columnsList: import("vue").ComputedRef<import("./types").PickerOption[][]>;
|
|
55
54
|
cancel: () => void;
|
|
56
|
-
changeHandler: (columnIndex: number, option: PickerOption) => void;
|
|
55
|
+
changeHandler: (columnIndex: number, option: import("./types").PickerOption) => void;
|
|
57
56
|
confirmHandler: () => void;
|
|
58
57
|
defaultValues: import("vue").Ref<(string | number)[]>;
|
|
59
58
|
translate: (keyPath: string, ...args: unknown[]) => string;
|
|
@@ -62,7 +61,7 @@ declare const _default: Install< import("vue").DefineComponent<{
|
|
|
62
61
|
columnStyle: import("vue").ComputedRef<CSSProperties>;
|
|
63
62
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("cancel" | "change" | "update:modelValue" | "confirm")[], "cancel" | "change" | "update:modelValue" | "confirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
64
63
|
modelValue: {
|
|
65
|
-
type: PropType<(string | number)[]>;
|
|
64
|
+
type: import("vue").PropType<(string | number)[]>;
|
|
66
65
|
default: () => never[];
|
|
67
66
|
};
|
|
68
67
|
title: {
|
|
@@ -78,7 +77,7 @@ declare const _default: Install< import("vue").DefineComponent<{
|
|
|
78
77
|
default: string;
|
|
79
78
|
};
|
|
80
79
|
columns: {
|
|
81
|
-
type: PropType<(PickerOption | PickerOption[])[]>;
|
|
80
|
+
type: import("vue").PropType<(import("./types").PickerOption | import("./types").PickerOption[])[]>;
|
|
82
81
|
default: () => never[];
|
|
83
82
|
};
|
|
84
83
|
threeDimensional: {
|
|
@@ -111,7 +110,7 @@ declare const _default: Install< import("vue").DefineComponent<{
|
|
|
111
110
|
modelValue: (string | number)[];
|
|
112
111
|
cancelText: string;
|
|
113
112
|
okText: string;
|
|
114
|
-
columns: (PickerOption | PickerOption[])[];
|
|
113
|
+
columns: (import("./types").PickerOption | import("./types").PickerOption[])[];
|
|
115
114
|
threeDimensional: boolean;
|
|
116
115
|
swipeDuration: string | number;
|
|
117
116
|
showToolbar: boolean;
|
|
@@ -46,7 +46,7 @@ declare const _default: Install< import("vue").DefineComponent<{
|
|
|
46
46
|
[name: string]: import("vue").Slot<any> | undefined;
|
|
47
47
|
}>;
|
|
48
48
|
getHeightStyle: import("vue").ComputedRef<CSSProperties>;
|
|
49
|
-
getPullStatus: import("vue").ComputedRef<string
|
|
49
|
+
getPullStatus: import("vue").ComputedRef<string>;
|
|
50
50
|
isPullRefresh: import("vue").Ref<{
|
|
51
51
|
valueOf: () => boolean;
|
|
52
52
|
}>;
|
|
@@ -111,8 +111,8 @@ declare const _default: Install< import("vue").DefineComponent<{
|
|
|
111
111
|
[key: string]: any;
|
|
112
112
|
}>;
|
|
113
113
|
slots: any;
|
|
114
|
-
onTouchStart(event:
|
|
115
|
-
onTouchMove(event:
|
|
114
|
+
onTouchStart(event: TouchEvent): void;
|
|
115
|
+
onTouchMove(event: TouchEvent): void;
|
|
116
116
|
classes: import("vue").ComputedRef<{
|
|
117
117
|
[x: string]: boolean;
|
|
118
118
|
}>;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { PropType } from 'vue';
|
|
1
|
+
import { PropType, CSSProperties } from 'vue';
|
|
2
|
+
type StickyPosition = 'top' | 'bottom';
|
|
2
3
|
|
|
3
4
|
declare type Install<T> = T & {
|
|
4
5
|
install(app: import('vue').App): void;
|
|
5
6
|
};
|
|
6
7
|
declare const _default: Install< import("vue").DefineComponent<{
|
|
7
8
|
position: {
|
|
8
|
-
type:
|
|
9
|
+
type: PropType<StickyPosition>;
|
|
9
10
|
default: string;
|
|
10
11
|
};
|
|
11
12
|
top: {
|
|
@@ -23,11 +24,14 @@ declare const _default: Install< import("vue").DefineComponent<{
|
|
|
23
24
|
type: (NumberConstructor | StringConstructor)[];
|
|
24
25
|
default: number;
|
|
25
26
|
};
|
|
26
|
-
},
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
}, {
|
|
28
|
+
rootRef: import("vue").Ref<HTMLElement | undefined>;
|
|
29
|
+
rootStyle: import("vue").ComputedRef<CSSProperties | undefined>;
|
|
30
|
+
stickyRef: import("vue").Ref<HTMLElement | undefined>;
|
|
31
|
+
stickyStyle: import("vue").ComputedRef<CSSProperties>;
|
|
32
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "change"[], "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
29
33
|
position: {
|
|
30
|
-
type:
|
|
34
|
+
type: PropType<StickyPosition>;
|
|
31
35
|
default: string;
|
|
32
36
|
};
|
|
33
37
|
top: {
|
|
@@ -47,12 +51,11 @@ declare const _default: Install< import("vue").DefineComponent<{
|
|
|
47
51
|
};
|
|
48
52
|
}>> & {
|
|
49
53
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
50
|
-
onScroll?: ((...args: any[]) => any) | undefined;
|
|
51
54
|
}, {
|
|
52
55
|
zIndex: string | number;
|
|
53
56
|
bottom: string | number;
|
|
54
57
|
top: string | number;
|
|
55
|
-
position:
|
|
58
|
+
position: StickyPosition;
|
|
56
59
|
}, {}>>;
|
|
57
60
|
export default _default;
|
|
58
61
|
|
|
@@ -26,8 +26,8 @@ declare const _default: Install< import("vue").DefineComponent<{
|
|
|
26
26
|
rightRef: Ref<HTMLElement | undefined>;
|
|
27
27
|
open: (p?: SwipePosition) => void;
|
|
28
28
|
close: () => void;
|
|
29
|
-
onTouchStart(event:
|
|
30
|
-
onTouchMove(event:
|
|
29
|
+
onTouchStart(event: TouchEvent): void;
|
|
30
|
+
onTouchMove(event: TouchEvent): void;
|
|
31
31
|
onTouchEnd(): void;
|
|
32
32
|
classes: import("vue").ComputedRef<{
|
|
33
33
|
[x: string]: boolean;
|
|
@@ -99,7 +99,7 @@ declare const _default: Install< import("vue").DefineComponent<{
|
|
|
99
99
|
activePagination: import("vue").ComputedRef<number>;
|
|
100
100
|
onTouchStart: (e: TouchEvent) => void;
|
|
101
101
|
onTouchMove: (e: TouchEvent) => void;
|
|
102
|
-
onTouchEnd: (
|
|
102
|
+
onTouchEnd: () => void;
|
|
103
103
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "change"[], "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
104
104
|
width: {
|
|
105
105
|
type: (NumberConstructor | StringConstructor)[];
|
|
@@ -3,14 +3,29 @@ import { TableColumnProps } from './types';
|
|
|
3
3
|
export declare const component: (componentName: string, translate: Function) => {
|
|
4
4
|
components: {
|
|
5
5
|
RenderColumn: import("vue").DefineComponent<{
|
|
6
|
-
slots:
|
|
7
|
-
|
|
6
|
+
slots: {
|
|
7
|
+
type: ArrayConstructor;
|
|
8
|
+
default: () => never[];
|
|
9
|
+
};
|
|
10
|
+
record: {
|
|
11
|
+
type: ObjectConstructor;
|
|
12
|
+
default: () => {};
|
|
13
|
+
};
|
|
8
14
|
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
9
15
|
[key: string]: any;
|
|
10
16
|
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
11
|
-
slots:
|
|
12
|
-
|
|
13
|
-
|
|
17
|
+
slots: {
|
|
18
|
+
type: ArrayConstructor;
|
|
19
|
+
default: () => never[];
|
|
20
|
+
};
|
|
21
|
+
record: {
|
|
22
|
+
type: ObjectConstructor;
|
|
23
|
+
default: () => {};
|
|
24
|
+
};
|
|
25
|
+
}>>, {
|
|
26
|
+
slots: unknown[];
|
|
27
|
+
record: Record<string, any>;
|
|
28
|
+
}, {}>;
|
|
14
29
|
DownArrow: import("vue").DefineComponent<{
|
|
15
30
|
class: {
|
|
16
31
|
type: StringConstructor;
|
|
@@ -90,7 +105,7 @@ export declare const component: (componentName: string, translate: Function) =>
|
|
|
90
105
|
};
|
|
91
106
|
};
|
|
92
107
|
emits: string[];
|
|
93
|
-
setup(props: any, { emit
|
|
108
|
+
setup(props: any, { emit }: any): {
|
|
94
109
|
classes: import("vue").ComputedRef<{
|
|
95
110
|
[x: string]: boolean;
|
|
96
111
|
}>;
|
|
@@ -1,17 +1,31 @@
|
|
|
1
|
-
import { PropType } from 'vue';
|
|
2
1
|
|
|
3
2
|
declare type Install<T> = T & {
|
|
4
3
|
install(app: import('vue').App): void;
|
|
5
4
|
};
|
|
6
5
|
declare const _default: Install< import("vue").DefineComponent<{
|
|
7
|
-
slots:
|
|
8
|
-
|
|
6
|
+
slots: {
|
|
7
|
+
type: ArrayConstructor;
|
|
8
|
+
default: () => never[];
|
|
9
|
+
};
|
|
10
|
+
record: {
|
|
11
|
+
type: ObjectConstructor;
|
|
12
|
+
default: () => {};
|
|
13
|
+
};
|
|
9
14
|
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
10
15
|
[key: string]: any;
|
|
11
16
|
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
12
|
-
slots:
|
|
13
|
-
|
|
14
|
-
|
|
17
|
+
slots: {
|
|
18
|
+
type: ArrayConstructor;
|
|
19
|
+
default: () => never[];
|
|
20
|
+
};
|
|
21
|
+
record: {
|
|
22
|
+
type: ObjectConstructor;
|
|
23
|
+
default: () => {};
|
|
24
|
+
};
|
|
25
|
+
}>>, {
|
|
26
|
+
slots: unknown[];
|
|
27
|
+
record: Record<string, any>;
|
|
28
|
+
}, {}>>;
|
|
15
29
|
export default _default;
|
|
16
30
|
|
|
17
31
|
declare module 'vue' {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const useTabContentTouch: (props: any, tabMethods: any, taro?: any, useTaroRect?: any) => {
|
|
2
2
|
touchMethods: {
|
|
3
|
-
onTouchStart(event:
|
|
4
|
-
onTouchMove(event:
|
|
3
|
+
onTouchStart(event: TouchEvent): void;
|
|
4
|
+
onTouchMove(event: TouchEvent): void;
|
|
5
5
|
onTouchEnd(): void;
|
|
6
6
|
};
|
|
7
7
|
touchState: {
|
|
@@ -69,8 +69,8 @@ declare const _default: Install< import("vue").DefineComponent<{
|
|
|
69
69
|
default: number;
|
|
70
70
|
};
|
|
71
71
|
}, {
|
|
72
|
-
onTouchStart(event:
|
|
73
|
-
onTouchMove(event:
|
|
72
|
+
onTouchStart(event: TouchEvent): void;
|
|
73
|
+
onTouchMove(event: TouchEvent): void;
|
|
74
74
|
onTouchEnd(): void;
|
|
75
75
|
isBegin: () => boolean;
|
|
76
76
|
isEnd: () => boolean;
|
|
@@ -96,7 +96,7 @@ declare const _default: Install< import("vue").DefineComponent<{
|
|
|
96
96
|
};
|
|
97
97
|
beforeDelete: {
|
|
98
98
|
type: PropType<Interceptor>;
|
|
99
|
-
default: (
|
|
99
|
+
default: () => boolean;
|
|
100
100
|
};
|
|
101
101
|
onChange: {
|
|
102
102
|
type: FunctionConstructor;
|
|
@@ -205,7 +205,7 @@ declare const _default: Install< import("vue").DefineComponent<{
|
|
|
205
205
|
};
|
|
206
206
|
beforeDelete: {
|
|
207
207
|
type: PropType<Interceptor>;
|
|
208
|
-
default: (
|
|
208
|
+
default: () => boolean;
|
|
209
209
|
};
|
|
210
210
|
onChange: {
|
|
211
211
|
type: FunctionConstructor;
|
|
@@ -7,4 +7,4 @@ export interface rectTaro {
|
|
|
7
7
|
width: number;
|
|
8
8
|
height: number;
|
|
9
9
|
}
|
|
10
|
-
export declare const useTaroRect: (elementRef: (Element | Window | any) | Ref<Element | Window | any
|
|
10
|
+
export declare const useTaroRect: (elementRef: (Element | Window | any) | Ref<Element | Window | any>) => any;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
type Direction = '' | 'vertical' | 'horizontal';
|
|
2
2
|
export declare function useTouch(): {
|
|
3
|
-
move:
|
|
4
|
-
start:
|
|
3
|
+
move: (event: TouchEvent) => void;
|
|
4
|
+
start: (event: TouchEvent) => void;
|
|
5
5
|
reset: () => void;
|
|
6
6
|
startX: import("vue").Ref<number>;
|
|
7
7
|
startY: import("vue").Ref<number>;
|
package/package.json
CHANGED
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
import { ref, reactive, computed, watch, onMounted, onUnmounted, h, unref } from "vue";
|
|
2
|
-
import { c as createComponent } from "./component-8f0be7eb.js";
|
|
3
|
-
import { u as useRect } from "./index-29892cda.js";
|
|
4
|
-
const { componentName, create } = createComponent("sticky");
|
|
5
|
-
const _sfc_main = create({
|
|
6
|
-
props: {
|
|
7
|
-
position: {
|
|
8
|
-
type: String,
|
|
9
|
-
default: "top"
|
|
10
|
-
},
|
|
11
|
-
top: {
|
|
12
|
-
type: [Number, String],
|
|
13
|
-
default: 0
|
|
14
|
-
},
|
|
15
|
-
bottom: {
|
|
16
|
-
type: [Number, String],
|
|
17
|
-
default: 0
|
|
18
|
-
},
|
|
19
|
-
container: {
|
|
20
|
-
type: Object
|
|
21
|
-
},
|
|
22
|
-
zIndex: {
|
|
23
|
-
type: [Number, String],
|
|
24
|
-
default: 2e3
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
emits: ["change", "scroll"],
|
|
28
|
-
setup(props, { emit, slots }) {
|
|
29
|
-
const root = ref();
|
|
30
|
-
const state = reactive({
|
|
31
|
-
width: 0,
|
|
32
|
-
height: 0,
|
|
33
|
-
fixed: false,
|
|
34
|
-
transform: 0
|
|
35
|
-
});
|
|
36
|
-
const rootStyle = computed(() => {
|
|
37
|
-
const { fixed, width, height } = state;
|
|
38
|
-
if (fixed) {
|
|
39
|
-
return {
|
|
40
|
-
width: `${width}px`,
|
|
41
|
-
height: `${height}px`
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
const stickyStyle = computed(() => {
|
|
46
|
-
if (!state.fixed)
|
|
47
|
-
return;
|
|
48
|
-
const style = {
|
|
49
|
-
width: `${state.width}px`,
|
|
50
|
-
height: `${state.height}px`,
|
|
51
|
-
[props.position]: `${offset.value}px`,
|
|
52
|
-
zIndex: +props.zIndex
|
|
53
|
-
};
|
|
54
|
-
if (state.transform)
|
|
55
|
-
style.transform = `translate3d(0, ${state.transform}px, 0)`;
|
|
56
|
-
return style;
|
|
57
|
-
});
|
|
58
|
-
const offset = computed(() => {
|
|
59
|
-
return props.position === "top" ? props.top : props.bottom;
|
|
60
|
-
});
|
|
61
|
-
const isHidden = (elementRef) => {
|
|
62
|
-
const el = unref(elementRef);
|
|
63
|
-
if (!el)
|
|
64
|
-
return false;
|
|
65
|
-
const style = window.getComputedStyle(el);
|
|
66
|
-
const hidden = style.display === "none";
|
|
67
|
-
const parentHidden = el.offsetParent === null && style.position !== "fixed";
|
|
68
|
-
return hidden || parentHidden;
|
|
69
|
-
};
|
|
70
|
-
const isExistRoot = () => {
|
|
71
|
-
if (!root.value || isHidden(root))
|
|
72
|
-
return false;
|
|
73
|
-
return true;
|
|
74
|
-
};
|
|
75
|
-
const getScrollTop = (el) => {
|
|
76
|
-
return Math.max(0, "scrollTop" in el ? el.scrollTop : el.pageYOffset);
|
|
77
|
-
};
|
|
78
|
-
const renderFixed = () => {
|
|
79
|
-
var _a;
|
|
80
|
-
return h(
|
|
81
|
-
"view",
|
|
82
|
-
{
|
|
83
|
-
style: stickyStyle.value,
|
|
84
|
-
class: state.fixed ? `${componentName} nut-sticky--fixed` : componentName
|
|
85
|
-
},
|
|
86
|
-
(_a = slots.default) == null ? void 0 : _a.call(slots)
|
|
87
|
-
);
|
|
88
|
-
};
|
|
89
|
-
const onScroll = () => {
|
|
90
|
-
if (!isExistRoot())
|
|
91
|
-
return;
|
|
92
|
-
const { container, position } = props;
|
|
93
|
-
const scrollTop = getScrollTop(window);
|
|
94
|
-
const rootRect = useRect(root);
|
|
95
|
-
if (rootRect.width || rootRect.height) {
|
|
96
|
-
state.width = rootRect.width;
|
|
97
|
-
state.height = rootRect.height;
|
|
98
|
-
}
|
|
99
|
-
if (position === "top") {
|
|
100
|
-
if (container) {
|
|
101
|
-
const containerRect = useRect(container);
|
|
102
|
-
const diff = containerRect.bottom - +offset.value - state.height;
|
|
103
|
-
state.fixed = +offset.value > rootRect.top && containerRect.bottom > 0;
|
|
104
|
-
state.transform = diff < 0 ? diff : 0;
|
|
105
|
-
} else {
|
|
106
|
-
state.fixed = offset.value > rootRect.top;
|
|
107
|
-
}
|
|
108
|
-
} else if (position === "bottom") {
|
|
109
|
-
const clientHeight = document.documentElement.clientHeight;
|
|
110
|
-
if (container) {
|
|
111
|
-
const containerRect = useRect(container);
|
|
112
|
-
const diff = clientHeight - containerRect.top - +offset.value - state.height;
|
|
113
|
-
state.fixed = clientHeight - +offset.value < rootRect.bottom && clientHeight > containerRect.top;
|
|
114
|
-
state.transform = diff < 0 ? -diff : 0;
|
|
115
|
-
} else {
|
|
116
|
-
state.fixed = clientHeight - +offset.value < rootRect.bottom;
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
emit("scroll", {
|
|
120
|
-
top: scrollTop,
|
|
121
|
-
fixed: state.fixed
|
|
122
|
-
});
|
|
123
|
-
};
|
|
124
|
-
watch(
|
|
125
|
-
() => state.fixed,
|
|
126
|
-
(val) => {
|
|
127
|
-
emit("change", val);
|
|
128
|
-
}
|
|
129
|
-
);
|
|
130
|
-
onMounted(() => {
|
|
131
|
-
window.addEventListener("scroll", onScroll);
|
|
132
|
-
onScroll();
|
|
133
|
-
});
|
|
134
|
-
onUnmounted(() => {
|
|
135
|
-
window.removeEventListener("scroll", onScroll);
|
|
136
|
-
});
|
|
137
|
-
return () => {
|
|
138
|
-
return h(
|
|
139
|
-
"view",
|
|
140
|
-
{
|
|
141
|
-
style: rootStyle.value,
|
|
142
|
-
ref: root
|
|
143
|
-
},
|
|
144
|
-
[renderFixed()]
|
|
145
|
-
);
|
|
146
|
-
};
|
|
147
|
-
}
|
|
148
|
-
});
|
|
149
|
-
export {
|
|
150
|
-
_sfc_main as _
|
|
151
|
-
};
|