@nutui/nutui 4.3.0 → 4.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +45 -0
- package/dist/nutui.es.js +1 -1
- package/dist/nutui.js +5980 -6124
- package/dist/nutui.umd.js +1 -1
- package/dist/packages/actionsheet/ActionSheet.js +1 -3
- package/dist/packages/address/Address.js +1 -4
- package/dist/packages/addresslist/AddressList.js +0 -4
- package/dist/packages/animate/Animate.js +51 -44
- package/dist/packages/audio/Audio.js +0 -3
- package/dist/packages/audiooperate/AudioOperate.js +0 -4
- package/dist/packages/avatar/Avatar.js +0 -1
- package/dist/packages/avatarcropper/AvatarCropper.js +0 -1
- package/dist/packages/calendar/Calendar.js +1 -7
- package/dist/packages/calendarcard/CalendarCard.js +0 -2
- package/dist/packages/calendaritem/CalendarItem.js +0 -2
- package/dist/packages/card/Card.js +2 -3
- package/dist/packages/cascader/Cascader.js +1 -10
- package/dist/packages/checkbox/Checkbox.js +4 -2
- package/dist/packages/col/Col.js +41 -30
- package/dist/packages/collapse/Collapse.js +40 -28
- package/dist/packages/collapseitem/CollapseItem.js +112 -125
- package/dist/packages/comment/Comment.js +0 -5
- package/dist/packages/common-FZL3qC99.js +16 -0
- package/dist/packages/countdown/Countdown.js +3 -4
- package/dist/packages/datepicker/DatePicker.js +0 -4
- package/dist/packages/dialog/Dialog.js +1 -5
- package/dist/packages/ecard/Ecard.js +0 -4
- package/dist/packages/empty/Empty.js +0 -2
- package/dist/packages/fixednav/FixedNav.js +0 -2
- package/dist/packages/form/Form.js +163 -157
- package/dist/packages/formitem/FormItem.js +77 -108
- package/dist/packages/grid/Grid.js +0 -1
- package/dist/packages/imagepreview/ImagePreview.js +1 -5
- package/dist/packages/{index-wY4t0zYt.js → index-BqB5dTeo.js} +29 -17
- package/dist/packages/{index.vue_vue_type_script_lang-MJYVRFbp.js → index.vue_vue_type_script_lang-n0HbjvfF.js} +6 -4
- package/dist/packages/infiniteloading/InfiniteLoading.js +0 -1
- package/dist/packages/input/Input.js +10 -7
- package/dist/packages/inputnumber/InputNumber.js +11 -8
- package/dist/packages/invoice/Invoice.js +10 -21
- package/dist/packages/layout/Layout.js +3 -0
- package/dist/packages/locale/lang/index.js +0 -1
- package/dist/packages/menuitem/MenuItem.js +1 -3
- package/dist/packages/notify/Notify.js +1 -4
- package/dist/packages/numberkeyboard/NumberKeyboard.js +1 -5
- package/dist/packages/pagination/Pagination.js +0 -2
- package/dist/packages/picker/Picker.js +10 -5
- package/dist/packages/popover/Popover.js +1 -4
- package/dist/packages/popup/Popup.js +1 -5
- package/dist/packages/price/Price.js +69 -77
- package/dist/packages/pullrefresh/PullRefresh.js +0 -1
- package/dist/packages/radio/Radio.js +1 -6
- package/dist/packages/radiogroup/RadioGroup.js +0 -3
- package/dist/packages/range/Range.js +10 -7
- package/dist/packages/rate/Rate.js +6 -3
- package/dist/packages/row/Row.js +43 -39
- package/dist/packages/searchbar/Searchbar.js +5 -4
- package/dist/packages/shortpassword/ShortPassword.js +1 -4
- package/dist/packages/signature/Signature.js +0 -4
- package/dist/packages/sku/Sku.js +8 -12
- package/dist/packages/switch/Switch.js +12 -2
- package/dist/packages/switch/index.css +1 -1
- package/dist/packages/switch/index.scss +1 -1
- package/dist/packages/table/Table.js +0 -2
- package/dist/packages/tabs/Tabs.js +0 -1
- package/dist/packages/textarea/Textarea.js +7 -6
- package/dist/packages/timepannel/TimePannel.js +2 -2
- package/dist/packages/timeselect/TimeSelect.js +1 -5
- package/dist/packages/toast/Toast.js +3 -3
- package/dist/packages/tour/Tour.js +0 -4
- package/dist/packages/uploader/Uploader.js +7 -5
- package/dist/packages/video/Video.js +0 -2
- package/dist/smartips/web-types.json +21 -3
- package/dist/style.css +1 -1
- package/dist/types/__VUE/address/index.vue.d.ts +43 -3
- package/dist/types/__VUE/animate/animate.vue.d.ts +75 -0
- package/dist/types/__VUE/animate/index.d.ts +6 -0
- package/dist/types/__VUE/col/col.vue.d.ts +53 -0
- package/dist/types/__VUE/col/index.d.ts +5 -0
- package/dist/types/__VUE/collapse/collapse.vue.d.ts +60 -0
- package/dist/types/__VUE/collapse/index.d.ts +6 -0
- package/dist/types/__VUE/collapse/types.d.ts +3 -2
- package/dist/types/__VUE/collapseitem/collapse-item.vue.d.ts +201 -0
- package/dist/types/__VUE/collapseitem/index.d.ts +5 -0
- package/dist/types/__VUE/countdown/index.vue.d.ts +23 -1
- package/dist/types/__VUE/fixednav/index.vue.d.ts +2 -2
- package/dist/types/__VUE/form/common.d.ts +4 -30
- package/dist/types/__VUE/form/form.vue.d.ts +80 -0
- package/dist/types/__VUE/form/index.d.ts +6 -0
- package/dist/types/__VUE/form/types.d.ts +12 -5
- package/dist/types/__VUE/formitem/form-item.vue.d.ts +97 -0
- package/dist/types/__VUE/formitem/index.d.ts +5 -0
- package/dist/types/__VUE/input/index.vue.d.ts +1 -0
- package/dist/types/__VUE/inputnumber/index.vue.d.ts +1 -0
- package/dist/types/__VUE/layout/index.d.ts +4 -0
- package/dist/types/__VUE/layout/layout.vue.d.ts +10 -0
- package/dist/types/__VUE/picker/index.vue.d.ts +1 -0
- package/dist/types/__VUE/picker/types.d.ts +1 -0
- package/dist/types/__VUE/picker/usePicker.d.ts +1 -0
- package/dist/types/__VUE/price/index.d.ts +6 -0
- package/dist/types/__VUE/price/price.vue.d.ts +83 -0
- package/dist/types/__VUE/range/index.vue.d.ts +1 -1
- package/dist/types/__VUE/rate/index.vue.d.ts +1 -0
- package/dist/types/__VUE/row/index.d.ts +5 -0
- package/dist/types/__VUE/row/row.vue.d.ts +71 -0
- package/dist/types/__VUE/searchbar/index.vue.d.ts +1 -0
- package/dist/types/__VUE/skeleton/index.vue.d.ts +3 -3
- package/dist/types/__VUE/sku/components/SkuStepper.vue.d.ts +1 -1
- package/dist/types/__VUE/sku/index.vue.d.ts +1 -1
- package/dist/types/__VUE/switch/index.vue.d.ts +9 -0
- package/dist/types/__VUE/table/index.vue.d.ts +4 -4
- package/dist/types/__VUE/tabs/index.vue.d.ts +4 -4
- package/dist/types/__VUE/textarea/index.vue.d.ts +1 -0
- package/dist/types/__VUE/toast/index.vue.d.ts +21 -1
- package/dist/types/index.d.ts +19 -10
- package/dist/types/utils/index.d.ts +1 -0
- package/package.json +1 -1
- package/dist/packages/types-Ynmct7na.js +0 -4
- package/dist/types/__VUE/animate/index.vue.d.ts +0 -71
- package/dist/types/__VUE/col/index.vue.d.ts +0 -42
- package/dist/types/__VUE/collapse/index.vue.d.ts +0 -39
- package/dist/types/__VUE/collapseitem/index.vue.d.ts +0 -212
- package/dist/types/__VUE/form/index.vue.d.ts +0 -58
- package/dist/types/__VUE/formitem/index.vue.d.ts +0 -134
- package/dist/types/__VUE/formitem/types.d.ts +0 -11
- package/dist/types/__VUE/layout/index.vue.d.ts +0 -12
- package/dist/types/__VUE/price/index.vue.d.ts +0 -97
- package/dist/types/__VUE/row/index.vue.d.ts +0 -62
- /package/dist/types/__VUE/animate/{type.d.ts → types.d.ts} +0 -0
|
@@ -138,11 +138,51 @@ declare const _default: Install< import("vue").DefineComponent<{
|
|
|
138
138
|
};
|
|
139
139
|
}, {
|
|
140
140
|
translate: (keyPath: string, ...args: unknown[]) => any;
|
|
141
|
-
regionList: import("vue").ComputedRef<
|
|
141
|
+
regionList: import("vue").ComputedRef<AddressData[]>;
|
|
142
142
|
transformData: (data: AddressData[]) => CustomRegionData[];
|
|
143
143
|
scrollDom: Ref<HTMLElement | null>;
|
|
144
|
-
|
|
145
|
-
|
|
144
|
+
round: Ref<boolean>;
|
|
145
|
+
type: Ref<string>;
|
|
146
|
+
height: Ref<string | number>;
|
|
147
|
+
style: Ref<Record<string, any>>;
|
|
148
|
+
transition: Ref<string>;
|
|
149
|
+
overlay: Ref<boolean>;
|
|
150
|
+
visible: Ref<boolean>;
|
|
151
|
+
zIndex: Ref<string | number>;
|
|
152
|
+
duration: Ref<string | number>;
|
|
153
|
+
lockScroll: Ref<boolean>;
|
|
154
|
+
overlayClass: Ref<string>;
|
|
155
|
+
overlayStyle: Ref<Record<string, any>>;
|
|
156
|
+
closeOnClickOverlay: Ref<boolean>;
|
|
157
|
+
position: Ref<import("../popup/types").PopupPosition>;
|
|
158
|
+
popClass: Ref<string>;
|
|
159
|
+
closeable: Ref<boolean>;
|
|
160
|
+
closeIconPosition: Ref<import("../popup/types").PopupCloseIconPosition>;
|
|
161
|
+
destroyOnClose: Ref<boolean>;
|
|
162
|
+
teleport: Ref<string | Element>;
|
|
163
|
+
teleportDisable: Ref<boolean>;
|
|
164
|
+
safeAreaInsetBottom: Ref<boolean>;
|
|
165
|
+
modelValue: Ref<unknown[]>;
|
|
166
|
+
customAddressTitle: Ref<string>;
|
|
167
|
+
province: Ref<AddressData[]>;
|
|
168
|
+
city: Ref<AddressData[]>;
|
|
169
|
+
country: Ref<AddressData[]>;
|
|
170
|
+
town: Ref<AddressData[]>;
|
|
171
|
+
isShowCustomAddress: Ref<boolean>;
|
|
172
|
+
existAddress: Ref<existRegionData[]>;
|
|
173
|
+
existAddressTitle: Ref<string>;
|
|
174
|
+
customAndExistTitle: Ref<string>;
|
|
175
|
+
columnsPlaceholder: Ref<string | unknown[]>;
|
|
176
|
+
onChange: Ref<((...args: any[]) => any) | undefined>;
|
|
177
|
+
onClose: Ref<((...args: any[]) => any) | undefined>;
|
|
178
|
+
"onUpdate:visible": Ref<((...args: any[]) => any) | undefined>;
|
|
179
|
+
onSelected: Ref<((...args: any[]) => any) | undefined>;
|
|
180
|
+
"onUpdate:modelValue": Ref<((...args: any[]) => any) | undefined>;
|
|
181
|
+
onType: Ref<((...args: any[]) => any) | undefined>;
|
|
182
|
+
onCloseMask: Ref<((...args: any[]) => any) | undefined>;
|
|
183
|
+
onSwitchModule: Ref<((...args: any[]) => any) | undefined>;
|
|
184
|
+
showPopup: Ref<boolean>;
|
|
185
|
+
privateType: Ref<string>;
|
|
146
186
|
tabIndex: Ref<number>;
|
|
147
187
|
tabName: Ref<string[]>;
|
|
148
188
|
selectedRegion: Ref<{
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import type { WithInstall } from '../../utils';
|
|
2
|
+
import type { AnimateType, AnimateAction } from './types';
|
|
3
|
+
export type AnimateProps = Partial<{
|
|
4
|
+
type: AnimateType;
|
|
5
|
+
show: boolean;
|
|
6
|
+
action: AnimateAction;
|
|
7
|
+
loop: boolean;
|
|
8
|
+
duration: string | number;
|
|
9
|
+
}>;
|
|
10
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Partial<{
|
|
11
|
+
type: AnimateType;
|
|
12
|
+
show: boolean;
|
|
13
|
+
action: AnimateAction;
|
|
14
|
+
loop: boolean;
|
|
15
|
+
duration: string | number;
|
|
16
|
+
}>>, {
|
|
17
|
+
show: boolean;
|
|
18
|
+
action: string;
|
|
19
|
+
loop: boolean;
|
|
20
|
+
duration: number;
|
|
21
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
22
|
+
click: (...args: any[]) => void;
|
|
23
|
+
animate: (...args: any[]) => void;
|
|
24
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Partial<{
|
|
25
|
+
type: AnimateType;
|
|
26
|
+
show: boolean;
|
|
27
|
+
action: AnimateAction;
|
|
28
|
+
loop: boolean;
|
|
29
|
+
duration: string | number;
|
|
30
|
+
}>>, {
|
|
31
|
+
show: boolean;
|
|
32
|
+
action: string;
|
|
33
|
+
loop: boolean;
|
|
34
|
+
duration: number;
|
|
35
|
+
}>>> & {
|
|
36
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
37
|
+
onAnimate?: ((...args: any[]) => any) | undefined;
|
|
38
|
+
}, {
|
|
39
|
+
duration: string | number;
|
|
40
|
+
show: boolean;
|
|
41
|
+
action: AnimateAction;
|
|
42
|
+
loop: boolean;
|
|
43
|
+
}, {}>, {
|
|
44
|
+
default?(_: {}): any;
|
|
45
|
+
}>;
|
|
46
|
+
declare const _nut_default: WithInstall<typeof _default>;
|
|
47
|
+
export default _nut_default;
|
|
48
|
+
|
|
49
|
+
declare module 'vue' {
|
|
50
|
+
interface GlobalComponents {
|
|
51
|
+
NutAnimate: typeof _default;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
55
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
56
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
57
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
58
|
+
} : {
|
|
59
|
+
type: import('vue').PropType<T[K]>;
|
|
60
|
+
required: true;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
type __VLS_WithDefaults<P, D> = {
|
|
64
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
65
|
+
default: D[K];
|
|
66
|
+
}> : P[K];
|
|
67
|
+
};
|
|
68
|
+
type __VLS_Prettify<T> = {
|
|
69
|
+
[K in keyof T]: T[K];
|
|
70
|
+
} & {};
|
|
71
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
72
|
+
new (): {
|
|
73
|
+
$slots: S;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import Animate from './animate.vue';
|
|
2
|
+
import type { ComponentPublicInstance } from 'vue';
|
|
3
|
+
export type { AnimateProps } from './animate.vue';
|
|
4
|
+
export type { AnimateType, AnimateAction } from './types';
|
|
5
|
+
export type AnimateInstance = ComponentPublicInstance & InstanceType<typeof Animate>;
|
|
6
|
+
export { Animate, Animate as default };
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { WithInstall } from '../../utils';
|
|
2
|
+
export type ColProps = Partial<{
|
|
3
|
+
span: string | number;
|
|
4
|
+
offset: string | number;
|
|
5
|
+
}>;
|
|
6
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Partial<{
|
|
7
|
+
span: string | number;
|
|
8
|
+
offset: string | number;
|
|
9
|
+
}>>, {
|
|
10
|
+
span: number;
|
|
11
|
+
offset: number;
|
|
12
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Partial<{
|
|
13
|
+
span: string | number;
|
|
14
|
+
offset: string | number;
|
|
15
|
+
}>>, {
|
|
16
|
+
span: number;
|
|
17
|
+
offset: number;
|
|
18
|
+
}>>>, {
|
|
19
|
+
span: string | number;
|
|
20
|
+
offset: string | number;
|
|
21
|
+
}, {}>, {
|
|
22
|
+
default?(_: {}): any;
|
|
23
|
+
}>;
|
|
24
|
+
declare const _nut_default: WithInstall<typeof _default>;
|
|
25
|
+
export default _nut_default;
|
|
26
|
+
|
|
27
|
+
declare module 'vue' {
|
|
28
|
+
interface GlobalComponents {
|
|
29
|
+
NutCol: typeof _default;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
33
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
34
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
35
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
36
|
+
} : {
|
|
37
|
+
type: import('vue').PropType<T[K]>;
|
|
38
|
+
required: true;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
type __VLS_WithDefaults<P, D> = {
|
|
42
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
43
|
+
default: D[K];
|
|
44
|
+
}> : P[K];
|
|
45
|
+
};
|
|
46
|
+
type __VLS_Prettify<T> = {
|
|
47
|
+
[K in keyof T]: T[K];
|
|
48
|
+
} & {};
|
|
49
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
50
|
+
new (): {
|
|
51
|
+
$slots: S;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { WithInstall } from '../../utils';
|
|
2
|
+
import { type CollapseValue } from './types';
|
|
3
|
+
export type CollapseProps = Partial<{
|
|
4
|
+
modelValue: CollapseValue;
|
|
5
|
+
accordion: boolean;
|
|
6
|
+
}>;
|
|
7
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Partial<{
|
|
8
|
+
modelValue: CollapseValue;
|
|
9
|
+
accordion: boolean;
|
|
10
|
+
}>>, {
|
|
11
|
+
modelValue: string;
|
|
12
|
+
accordion: boolean;
|
|
13
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
14
|
+
change: (...args: any[]) => void;
|
|
15
|
+
"update:modelValue": (...args: any[]) => void;
|
|
16
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Partial<{
|
|
17
|
+
modelValue: CollapseValue;
|
|
18
|
+
accordion: boolean;
|
|
19
|
+
}>>, {
|
|
20
|
+
modelValue: string;
|
|
21
|
+
accordion: boolean;
|
|
22
|
+
}>>> & {
|
|
23
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
24
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
25
|
+
}, {
|
|
26
|
+
modelValue: CollapseValue;
|
|
27
|
+
accordion: boolean;
|
|
28
|
+
}, {}>, {
|
|
29
|
+
default?(_: {}): any;
|
|
30
|
+
}>;
|
|
31
|
+
declare const _nut_default: WithInstall<typeof _default>;
|
|
32
|
+
export default _nut_default;
|
|
33
|
+
|
|
34
|
+
declare module 'vue' {
|
|
35
|
+
interface GlobalComponents {
|
|
36
|
+
NutCollapse: typeof _default;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
40
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
41
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
42
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
43
|
+
} : {
|
|
44
|
+
type: import('vue').PropType<T[K]>;
|
|
45
|
+
required: true;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
type __VLS_WithDefaults<P, D> = {
|
|
49
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
50
|
+
default: D[K];
|
|
51
|
+
}> : P[K];
|
|
52
|
+
};
|
|
53
|
+
type __VLS_Prettify<T> = {
|
|
54
|
+
[K in keyof T]: T[K];
|
|
55
|
+
} & {};
|
|
56
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
57
|
+
new (): {
|
|
58
|
+
$slots: S;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import Collapse from './collapse.vue';
|
|
2
|
+
import type { ComponentPublicInstance } from 'vue';
|
|
3
|
+
export type { CollapseProps } from './collapse.vue';
|
|
4
|
+
export type { CollapseValue } from './types';
|
|
5
|
+
export type CollapseInstance = ComponentPublicInstance & InstanceType<typeof Collapse>;
|
|
6
|
+
export { Collapse, Collapse as default };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { InjectionKey } from 'vue';
|
|
2
2
|
export declare const COLLAPSE_KEY: InjectionKey<{
|
|
3
|
-
updateVal:
|
|
4
|
-
isExpanded:
|
|
3
|
+
updateVal: (name: string | number) => void;
|
|
4
|
+
isExpanded: (name: string | number) => boolean;
|
|
5
5
|
}>;
|
|
6
|
+
export type CollapseValue = string | number | (string | number)[];
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import type { WithInstall } from '../../utils';
|
|
2
|
+
export type CollapseItemProps = Partial<{
|
|
3
|
+
title: string;
|
|
4
|
+
value: string;
|
|
5
|
+
label: string;
|
|
6
|
+
disabled: boolean;
|
|
7
|
+
name: string | number;
|
|
8
|
+
border: boolean;
|
|
9
|
+
icon: any;
|
|
10
|
+
rotate: string | number;
|
|
11
|
+
}>;
|
|
12
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Partial<{
|
|
13
|
+
title: string;
|
|
14
|
+
value: string;
|
|
15
|
+
label: string;
|
|
16
|
+
disabled: boolean;
|
|
17
|
+
name: string | number;
|
|
18
|
+
border: boolean;
|
|
19
|
+
icon: any;
|
|
20
|
+
rotate: string | number;
|
|
21
|
+
}>>, {
|
|
22
|
+
title: string;
|
|
23
|
+
value: string;
|
|
24
|
+
label: string;
|
|
25
|
+
disabled: boolean;
|
|
26
|
+
name: number;
|
|
27
|
+
border: boolean;
|
|
28
|
+
icon: () => import("vue").DefineComponent<{
|
|
29
|
+
class: {
|
|
30
|
+
type: StringConstructor;
|
|
31
|
+
default: string;
|
|
32
|
+
};
|
|
33
|
+
name: {
|
|
34
|
+
type: StringConstructor;
|
|
35
|
+
default: string;
|
|
36
|
+
};
|
|
37
|
+
color: {
|
|
38
|
+
type: StringConstructor;
|
|
39
|
+
default: string;
|
|
40
|
+
};
|
|
41
|
+
width: {
|
|
42
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
43
|
+
default: string;
|
|
44
|
+
};
|
|
45
|
+
height: {
|
|
46
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
47
|
+
default: string;
|
|
48
|
+
};
|
|
49
|
+
}, {
|
|
50
|
+
classes: import("vue").ComputedRef<{
|
|
51
|
+
[x: string]: string | boolean;
|
|
52
|
+
"nut-icon": boolean;
|
|
53
|
+
}>;
|
|
54
|
+
style: import("vue").ComputedRef<import("vue").CSSProperties>;
|
|
55
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
56
|
+
class: {
|
|
57
|
+
type: StringConstructor;
|
|
58
|
+
default: string;
|
|
59
|
+
};
|
|
60
|
+
name: {
|
|
61
|
+
type: StringConstructor;
|
|
62
|
+
default: string;
|
|
63
|
+
};
|
|
64
|
+
color: {
|
|
65
|
+
type: StringConstructor;
|
|
66
|
+
default: string;
|
|
67
|
+
};
|
|
68
|
+
width: {
|
|
69
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
70
|
+
default: string;
|
|
71
|
+
};
|
|
72
|
+
height: {
|
|
73
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
74
|
+
default: string;
|
|
75
|
+
};
|
|
76
|
+
}>>, {
|
|
77
|
+
name: string;
|
|
78
|
+
width: string | number;
|
|
79
|
+
height: string | number;
|
|
80
|
+
color: string;
|
|
81
|
+
class: string;
|
|
82
|
+
}>;
|
|
83
|
+
rotate: number;
|
|
84
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Partial<{
|
|
85
|
+
title: string;
|
|
86
|
+
value: string;
|
|
87
|
+
label: string;
|
|
88
|
+
disabled: boolean;
|
|
89
|
+
name: string | number;
|
|
90
|
+
border: boolean;
|
|
91
|
+
icon: any;
|
|
92
|
+
rotate: string | number;
|
|
93
|
+
}>>, {
|
|
94
|
+
title: string;
|
|
95
|
+
value: string;
|
|
96
|
+
label: string;
|
|
97
|
+
disabled: boolean;
|
|
98
|
+
name: number;
|
|
99
|
+
border: boolean;
|
|
100
|
+
icon: () => import("vue").DefineComponent<{
|
|
101
|
+
class: {
|
|
102
|
+
type: StringConstructor;
|
|
103
|
+
default: string;
|
|
104
|
+
};
|
|
105
|
+
name: {
|
|
106
|
+
type: StringConstructor;
|
|
107
|
+
default: string;
|
|
108
|
+
};
|
|
109
|
+
color: {
|
|
110
|
+
type: StringConstructor;
|
|
111
|
+
default: string;
|
|
112
|
+
};
|
|
113
|
+
width: {
|
|
114
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
115
|
+
default: string;
|
|
116
|
+
};
|
|
117
|
+
height: {
|
|
118
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
119
|
+
default: string;
|
|
120
|
+
};
|
|
121
|
+
}, {
|
|
122
|
+
classes: import("vue").ComputedRef<{
|
|
123
|
+
[x: string]: string | boolean;
|
|
124
|
+
"nut-icon": boolean;
|
|
125
|
+
}>;
|
|
126
|
+
style: import("vue").ComputedRef<import("vue").CSSProperties>;
|
|
127
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
128
|
+
class: {
|
|
129
|
+
type: StringConstructor;
|
|
130
|
+
default: string;
|
|
131
|
+
};
|
|
132
|
+
name: {
|
|
133
|
+
type: StringConstructor;
|
|
134
|
+
default: string;
|
|
135
|
+
};
|
|
136
|
+
color: {
|
|
137
|
+
type: StringConstructor;
|
|
138
|
+
default: string;
|
|
139
|
+
};
|
|
140
|
+
width: {
|
|
141
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
142
|
+
default: string;
|
|
143
|
+
};
|
|
144
|
+
height: {
|
|
145
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
146
|
+
default: string;
|
|
147
|
+
};
|
|
148
|
+
}>>, {
|
|
149
|
+
name: string;
|
|
150
|
+
width: string | number;
|
|
151
|
+
height: string | number;
|
|
152
|
+
color: string;
|
|
153
|
+
class: string;
|
|
154
|
+
}>;
|
|
155
|
+
rotate: number;
|
|
156
|
+
}>>>, {
|
|
157
|
+
name: string | number;
|
|
158
|
+
disabled: boolean;
|
|
159
|
+
label: string;
|
|
160
|
+
title: string;
|
|
161
|
+
icon: any;
|
|
162
|
+
border: boolean;
|
|
163
|
+
value: string;
|
|
164
|
+
rotate: string | number;
|
|
165
|
+
}, {}>, {
|
|
166
|
+
title?(_: {}): any;
|
|
167
|
+
value?(_: {}): any;
|
|
168
|
+
icon?(_: {}): any;
|
|
169
|
+
extra?(_: {}): any;
|
|
170
|
+
default?(_: {}): any;
|
|
171
|
+
}>;
|
|
172
|
+
declare const _nut_default: WithInstall<typeof _default>;
|
|
173
|
+
export default _nut_default;
|
|
174
|
+
|
|
175
|
+
declare module 'vue' {
|
|
176
|
+
interface GlobalComponents {
|
|
177
|
+
NutCollapseItem: typeof _default;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
181
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
182
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
183
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
184
|
+
} : {
|
|
185
|
+
type: import('vue').PropType<T[K]>;
|
|
186
|
+
required: true;
|
|
187
|
+
};
|
|
188
|
+
};
|
|
189
|
+
type __VLS_WithDefaults<P, D> = {
|
|
190
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
191
|
+
default: D[K];
|
|
192
|
+
}> : P[K];
|
|
193
|
+
};
|
|
194
|
+
type __VLS_Prettify<T> = {
|
|
195
|
+
[K in keyof T]: T[K];
|
|
196
|
+
} & {};
|
|
197
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
198
|
+
new (): {
|
|
199
|
+
$slots: S;
|
|
200
|
+
};
|
|
201
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import CollapseItem from './collapse-item.vue';
|
|
2
|
+
import type { ComponentPublicInstance } from 'vue';
|
|
3
|
+
export type { CollapseItemProps } from './collapse-item.vue';
|
|
4
|
+
export type CollapseItemInstance = ComponentPublicInstance & InstanceType<typeof CollapseItem>;
|
|
5
|
+
export { CollapseItem, CollapseItem as default };
|
|
@@ -41,9 +41,31 @@ declare const _default: Install< import("vue").DefineComponent<{
|
|
|
41
41
|
}>;
|
|
42
42
|
start: () => void;
|
|
43
43
|
pause: () => void;
|
|
44
|
-
renderTime: import("vue").ComputedRef<
|
|
44
|
+
renderTime: import("vue").ComputedRef<string | {
|
|
45
|
+
d: number;
|
|
46
|
+
h: number;
|
|
47
|
+
m: number;
|
|
48
|
+
s: number;
|
|
49
|
+
ms: number;
|
|
50
|
+
}>;
|
|
45
51
|
translate: (keyPath: string, ...args: unknown[]) => any;
|
|
46
52
|
reset: () => void;
|
|
53
|
+
time: import("vue").Ref<string | number>;
|
|
54
|
+
paused: import("vue").Ref<boolean>;
|
|
55
|
+
modelValue: import("vue").Ref<Record<string, any>>;
|
|
56
|
+
millisecond: import("vue").Ref<boolean>;
|
|
57
|
+
format: import("vue").Ref<string>;
|
|
58
|
+
autoStart: import("vue").Ref<boolean>;
|
|
59
|
+
startTime: import("vue").Ref<string | number | undefined>;
|
|
60
|
+
endTime: import("vue").Ref<string | number | undefined>;
|
|
61
|
+
onInput: import("vue").Ref<((...args: any[]) => any) | undefined>;
|
|
62
|
+
"onUpdate:modelValue": import("vue").Ref<((...args: any[]) => any) | undefined>;
|
|
63
|
+
onEnd: import("vue").Ref<((...args: any[]) => any) | undefined>;
|
|
64
|
+
onRestart: import("vue").Ref<((...args: any[]) => any) | undefined>;
|
|
65
|
+
onPaused: import("vue").Ref<((...args: any[]) => any) | undefined>;
|
|
66
|
+
onOnEnd: import("vue").Ref<((...args: any[]) => any) | undefined>;
|
|
67
|
+
onOnRestart: import("vue").Ref<((...args: any[]) => any) | undefined>;
|
|
68
|
+
onOnPaused: import("vue").Ref<((...args: any[]) => any) | undefined>;
|
|
47
69
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("input" | "end" | "paused" | "update:modelValue" | "restart" | "onEnd" | "onRestart" | "onPaused")[], "input" | "end" | "paused" | "update:modelValue" | "restart" | "onEnd" | "onRestart" | "onPaused", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
48
70
|
modelValue: {
|
|
49
71
|
type: ObjectConstructor;
|
|
@@ -41,9 +41,9 @@ declare const _default: Install< import("vue").DefineComponent<{
|
|
|
41
41
|
};
|
|
42
42
|
}, {
|
|
43
43
|
classes: import("vue").ComputedRef<{
|
|
44
|
-
[x:
|
|
44
|
+
[x: string]: boolean;
|
|
45
45
|
"nut-fixed-nav": boolean;
|
|
46
|
-
active:
|
|
46
|
+
active: boolean;
|
|
47
47
|
}>;
|
|
48
48
|
updateValue: (value?: boolean) => void;
|
|
49
49
|
selected: (item: any, event: Event) => void;
|
|
@@ -1,30 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export declare const
|
|
4
|
-
|
|
5
|
-
modelValue: {
|
|
6
|
-
type: ObjectConstructor;
|
|
7
|
-
default: () => {};
|
|
8
|
-
};
|
|
9
|
-
rules: {
|
|
10
|
-
type: PropType<FormRules>;
|
|
11
|
-
default: () => {};
|
|
12
|
-
};
|
|
13
|
-
labelPosition: {
|
|
14
|
-
type: PropType<import("../formitem/types").FormItemLabelPosition>;
|
|
15
|
-
default: string;
|
|
16
|
-
};
|
|
17
|
-
starPosition: {
|
|
18
|
-
type: PropType<import("../formitem/types").FormItemStarPosition>;
|
|
19
|
-
default: string;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
components: any;
|
|
23
|
-
emits: string[];
|
|
24
|
-
setup(props: any, { emit }: any): {
|
|
25
|
-
validate: (customProp?: string) => Promise<unknown>;
|
|
26
|
-
reset: () => void;
|
|
27
|
-
submit: () => boolean;
|
|
28
|
-
formErrorTip: import("vue").ComputedRef<any>;
|
|
29
|
-
};
|
|
30
|
-
};
|
|
1
|
+
import type { ComputedRef, Ref } from 'vue';
|
|
2
|
+
export declare const FORM_KEY: unique symbol;
|
|
3
|
+
export declare const FORM_DISABLED_KEY: unique symbol;
|
|
4
|
+
export declare const useFormDisabled: (disabled: Ref<boolean>) => ComputedRef<boolean>;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import type { WithInstall } from '../../utils';
|
|
2
|
+
import type { FormLabelPosition, FormRules, FormStarPosition } from './types';
|
|
3
|
+
export type FormProps = Partial<{
|
|
4
|
+
modelValue: any;
|
|
5
|
+
rules: FormRules;
|
|
6
|
+
disabled: boolean;
|
|
7
|
+
labelPosition: FormLabelPosition;
|
|
8
|
+
starPosition: FormStarPosition;
|
|
9
|
+
}>;
|
|
10
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Partial<{
|
|
11
|
+
modelValue: any;
|
|
12
|
+
rules: FormRules;
|
|
13
|
+
disabled: boolean;
|
|
14
|
+
labelPosition: FormLabelPosition;
|
|
15
|
+
starPosition: FormStarPosition;
|
|
16
|
+
}>>, {
|
|
17
|
+
modelValue: () => {};
|
|
18
|
+
rules: () => {};
|
|
19
|
+
disabled: boolean;
|
|
20
|
+
labelPosition: string;
|
|
21
|
+
starPosition: string;
|
|
22
|
+
}>, {
|
|
23
|
+
submit: () => boolean;
|
|
24
|
+
reset: () => void;
|
|
25
|
+
validate: (customProp?: string) => Promise<unknown>;
|
|
26
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
27
|
+
validate: (...args: any[]) => void;
|
|
28
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Partial<{
|
|
29
|
+
modelValue: any;
|
|
30
|
+
rules: FormRules;
|
|
31
|
+
disabled: boolean;
|
|
32
|
+
labelPosition: FormLabelPosition;
|
|
33
|
+
starPosition: FormStarPosition;
|
|
34
|
+
}>>, {
|
|
35
|
+
modelValue: () => {};
|
|
36
|
+
rules: () => {};
|
|
37
|
+
disabled: boolean;
|
|
38
|
+
labelPosition: string;
|
|
39
|
+
starPosition: string;
|
|
40
|
+
}>>> & {
|
|
41
|
+
onValidate?: ((...args: any[]) => any) | undefined;
|
|
42
|
+
}, {
|
|
43
|
+
disabled: boolean;
|
|
44
|
+
modelValue: any;
|
|
45
|
+
rules: FormRules;
|
|
46
|
+
labelPosition: FormLabelPosition;
|
|
47
|
+
starPosition: FormStarPosition;
|
|
48
|
+
}, {}>, {
|
|
49
|
+
default?(_: {}): any;
|
|
50
|
+
}>;
|
|
51
|
+
declare const _nut_default: WithInstall<typeof _default>;
|
|
52
|
+
export default _nut_default;
|
|
53
|
+
|
|
54
|
+
declare module 'vue' {
|
|
55
|
+
interface GlobalComponents {
|
|
56
|
+
NutForm: typeof _default;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
60
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
61
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
62
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
63
|
+
} : {
|
|
64
|
+
type: import('vue').PropType<T[K]>;
|
|
65
|
+
required: true;
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
type __VLS_WithDefaults<P, D> = {
|
|
69
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
70
|
+
default: D[K];
|
|
71
|
+
}> : P[K];
|
|
72
|
+
};
|
|
73
|
+
type __VLS_Prettify<T> = {
|
|
74
|
+
[K in keyof T]: T[K];
|
|
75
|
+
} & {};
|
|
76
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
77
|
+
new (): {
|
|
78
|
+
$slots: S;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import Form from './form.vue';
|
|
2
|
+
import type { ComponentPublicInstance } from 'vue';
|
|
3
|
+
export type { FormProps } from './form.vue';
|
|
4
|
+
export type { FormErrorMessage, FormLabelPosition, FormStarPosition } from './types';
|
|
5
|
+
export type FormInstance = ComponentPublicInstance & InstanceType<typeof Form>;
|
|
6
|
+
export { Form, Form as default };
|
|
@@ -1,5 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export interface FormItemRuleWithoutValidator {
|
|
2
|
+
[key: string]: any;
|
|
3
|
+
regex?: RegExp;
|
|
4
|
+
required?: boolean;
|
|
5
|
+
message?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface FormItemRule extends FormItemRuleWithoutValidator {
|
|
8
|
+
validator?: (value: any, ruleCfg: FormItemRuleWithoutValidator) => boolean | Promise<string> | Promise<boolean> | Promise<void> | Promise<unknown>;
|
|
9
|
+
}
|
|
3
10
|
export type FormRules = {
|
|
4
11
|
[key: string]: FormItemRule[];
|
|
5
12
|
};
|
|
@@ -7,9 +14,9 @@ export type FormRule = {
|
|
|
7
14
|
prop: string;
|
|
8
15
|
rules: FormItemRule[];
|
|
9
16
|
};
|
|
10
|
-
export type
|
|
17
|
+
export type FormErrorMessage = {
|
|
11
18
|
prop: string;
|
|
12
19
|
message: string;
|
|
13
20
|
};
|
|
14
|
-
export type FormLabelPosition =
|
|
15
|
-
export type FormStarPosition =
|
|
21
|
+
export type FormLabelPosition = 'left' | 'right' | 'top';
|
|
22
|
+
export type FormStarPosition = 'left' | 'right';
|