@nutui/nutui 4.2.3 → 4.2.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.
Files changed (84) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/dist/nutui.es.js +1 -1
  3. package/dist/nutui.js +5566 -5532
  4. package/dist/nutui.umd.js +1 -1
  5. package/dist/packages/address/Address.js +0 -1
  6. package/dist/packages/calendar/Calendar.js +3 -4
  7. package/dist/packages/calendaritem/CalendarItem.js +1 -2
  8. package/dist/packages/cascader/Cascader.js +3 -3
  9. package/dist/packages/cascader/index.css +1 -1
  10. package/dist/packages/checkbox/Checkbox.js +148 -152
  11. package/dist/packages/checkboxgroup/CheckboxGroup.js +2 -3
  12. package/dist/packages/divider/Divider.js +2 -2
  13. package/dist/packages/elevator/Elevator.js +5 -6
  14. package/dist/packages/form/Form.js +9 -2
  15. package/dist/packages/formitem/FormItem.js +30 -3
  16. package/dist/packages/formitem/index.css +1 -1
  17. package/dist/packages/formitem/index.scss +25 -0
  18. package/dist/packages/imagepreview/ImagePreview.js +0 -1
  19. package/dist/packages/{index-cDNmNOtI.js → index-NLe0VBkN.js} +2 -3
  20. package/dist/packages/{index.vue_vue_type_script_lang-Lc2BXA17.js → index.vue_vue_type_script_lang-54PRh3YM.js} +0 -1
  21. package/dist/packages/{index.vue_vue_type_script_lang-KuoPcQZs.js → index.vue_vue_type_script_lang-MJYVRFbp.js} +10 -6
  22. package/dist/packages/inputnumber/InputNumber.js +1 -1
  23. package/dist/packages/invoice/Invoice.js +2 -2
  24. package/dist/packages/invoice/index.css +1 -1
  25. package/dist/packages/navbar/index.css +1 -1
  26. package/dist/packages/navbar/index.scss +5 -16
  27. package/dist/packages/popover/Popover.js +3 -2
  28. package/dist/packages/radio/Radio.js +1 -1
  29. package/dist/packages/radio/index.css +1 -1
  30. package/dist/packages/radio/index.scss +21 -0
  31. package/dist/packages/radiogroup/RadioGroup.js +1 -1
  32. package/dist/packages/radiogroup/index.scss +0 -5
  33. package/dist/packages/range/Range.js +0 -2
  34. package/dist/packages/swiper/Swiper.js +2 -3
  35. package/dist/packages/swiperitem/SwiperItem.js +7 -2
  36. package/dist/packages/tabs/Tabs.js +4 -6
  37. package/dist/packages/tabs/index.css +1 -1
  38. package/dist/packages/tabs/index.scss +116 -115
  39. package/dist/packages/textarea/index.css +1 -1
  40. package/dist/packages/textarea/index.scss +1 -0
  41. package/dist/packages/watermark/Watermark.js +8 -2
  42. package/dist/smartips/web-types.json +32 -5
  43. package/dist/style.css +1 -1
  44. package/dist/types/__VUE/address/index.vue.d.ts +3 -3
  45. package/dist/types/__VUE/avatargroup/index.vue.d.ts +1 -1
  46. package/dist/types/__VUE/cell/index.vue.d.ts +1 -1
  47. package/dist/types/__VUE/checkbox/index.vue.d.ts +72 -1
  48. package/dist/types/__VUE/collapse/index.vue.d.ts +3 -28
  49. package/dist/types/__VUE/collapseitem/index.vue.d.ts +1 -1
  50. package/dist/types/__VUE/countup/index.vue.d.ts +2 -2
  51. package/dist/types/__VUE/divider/index.vue.d.ts +15 -1
  52. package/dist/types/__VUE/drag/index.vue.d.ts +5 -3
  53. package/dist/types/__VUE/drag/types.d.ts +1 -0
  54. package/dist/types/__VUE/form/common.d.ts +9 -1
  55. package/dist/types/__VUE/form/index.vue.d.ts +18 -0
  56. package/dist/types/__VUE/form/types.d.ts +3 -1
  57. package/dist/types/__VUE/formitem/index.vue.d.ts +21 -1
  58. package/dist/types/__VUE/formitem/types.d.ts +2 -0
  59. package/dist/types/__VUE/image/index.vue.d.ts +1 -1
  60. package/dist/types/__VUE/navbar/index.vue.d.ts +1 -1
  61. package/dist/types/__VUE/pagination/index.vue.d.ts +6 -4
  62. package/dist/types/__VUE/pagination/types.d.ts +1 -0
  63. package/dist/types/__VUE/radio/index.vue.d.ts +14 -3
  64. package/dist/types/__VUE/radio/types.d.ts +4 -0
  65. package/dist/types/__VUE/radiogroup/index.vue.d.ts +8 -6
  66. package/dist/types/__VUE/searchbar/index.vue.d.ts +8 -7
  67. package/dist/types/__VUE/searchbar/types.d.ts +3 -0
  68. package/dist/types/__VUE/sku/components/SkuStepper.vue.d.ts +1 -1
  69. package/dist/types/__VUE/sku/index.vue.d.ts +1 -1
  70. package/dist/types/__VUE/steps/index.vue.d.ts +5 -3
  71. package/dist/types/__VUE/steps/types.d.ts +1 -0
  72. package/dist/types/__VUE/table/types.d.ts +2 -2
  73. package/dist/types/__VUE/tabs/index.vue.d.ts +11 -11
  74. package/dist/types/__VUE/tabs/types.d.ts +3 -0
  75. package/dist/types/__VUE/toast/index.vue.d.ts +1 -1
  76. package/dist/types/__VUE/uploader/index.vue.d.ts +2 -28
  77. package/dist/types/__VUE/watermark/index.vue.d.ts +29 -3
  78. package/dist/types/index.d.ts +1 -1
  79. package/package.json +1 -1
  80. package/dist/packages/index-nRNEaTqA.js +0 -10
  81. package/dist/types/__VUE/checkbox/common.d.ts +0 -2
  82. package/dist/types/__VUE/picker/common.d.ts +0 -406
  83. package/dist/types/__VUE/searchbar/type.d.ts +0 -1
  84. package/dist/types/__VUE/table/common.d.ts +0 -125
@@ -1,10 +1,12 @@
1
+ import { PropType } from 'vue';
2
+ import { StepsDirection } from './types';
1
3
 
2
4
  declare type Install<T> = T & {
3
5
  install(app: import('vue').App): void;
4
6
  };
5
7
  declare const _default: Install< import("vue").DefineComponent<{
6
8
  direction: {
7
- type: StringConstructor;
9
+ type: PropType<StepsDirection>;
8
10
  default: string;
9
11
  };
10
12
  current: {
@@ -19,7 +21,7 @@ declare const _default: Install< import("vue").DefineComponent<{
19
21
  [key: string]: any;
20
22
  }>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "clickStep"[], "clickStep", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
21
23
  direction: {
22
- type: StringConstructor;
24
+ type: PropType<StepsDirection>;
23
25
  default: string;
24
26
  };
25
27
  current: {
@@ -33,7 +35,7 @@ declare const _default: Install< import("vue").DefineComponent<{
33
35
  }>> & {
34
36
  onClickStep?: ((...args: any[]) => any) | undefined;
35
37
  }, {
36
- direction: string;
38
+ direction: StepsDirection;
37
39
  current: string | number;
38
40
  progressDot: boolean;
39
41
  }, {}>>;
@@ -1 +1,2 @@
1
1
  export declare const STEPS_KEY: unique symbol;
2
+ export type StepsDirection = 'horizontal' | 'vertical';
@@ -5,8 +5,8 @@ export interface TableColumns {
5
5
  align?: string;
6
6
  stylehead?: string;
7
7
  stylecolumn?: string;
8
- sorter?: Function;
9
- render?: (rowData?: object, rowIndex?: number) => VNodeChild | string | VNode;
8
+ sorter?: Function | 'default';
9
+ render?: (rowData?: any, rowIndex?: number) => VNodeChild | string | VNode;
10
10
  }
11
11
  export interface TableProps {
12
12
  bordered: true;
@@ -1,4 +1,5 @@
1
- import { VNode, Ref, CSSProperties } from 'vue';
1
+ import { VNode, Ref, CSSProperties, PropType } from 'vue';
2
+ import type { TabsDirection, TabsSize, TabsType } from './types';
2
3
  export declare class Title {
3
4
  title: string;
4
5
  titleSlot?: VNode[];
@@ -6,7 +7,6 @@ export declare class Title {
6
7
  disabled: boolean;
7
8
  constructor();
8
9
  }
9
- export type TabsSize = 'large' | 'normal' | 'small';
10
10
 
11
11
  declare type Install<T> = T & {
12
12
  install(app: import('vue').App): void;
@@ -21,15 +21,15 @@ declare const _default: Install< import("vue").DefineComponent<{
21
21
  default: string;
22
22
  };
23
23
  direction: {
24
- type: StringConstructor;
24
+ type: PropType<TabsDirection>;
25
25
  default: string;
26
26
  };
27
27
  size: {
28
- type: import("vue").PropType<TabsSize>;
28
+ type: PropType<TabsSize>;
29
29
  default: string;
30
30
  };
31
31
  type: {
32
- type: StringConstructor;
32
+ type: PropType<TabsType>;
33
33
  default: string;
34
34
  };
35
35
  titleScroll: {
@@ -106,7 +106,7 @@ declare const _default: Install< import("vue").DefineComponent<{
106
106
  color: any;
107
107
  background: any;
108
108
  }>;
109
- container: any;
109
+ container: Ref<any>;
110
110
  getScrollY: import("vue").ComputedRef<any>;
111
111
  onStickyScroll: (params: {
112
112
  top: number;
@@ -122,15 +122,15 @@ declare const _default: Install< import("vue").DefineComponent<{
122
122
  default: string;
123
123
  };
124
124
  direction: {
125
- type: StringConstructor;
125
+ type: PropType<TabsDirection>;
126
126
  default: string;
127
127
  };
128
128
  size: {
129
- type: import("vue").PropType<TabsSize>;
129
+ type: PropType<TabsSize>;
130
130
  default: string;
131
131
  };
132
132
  type: {
133
- type: StringConstructor;
133
+ type: PropType<TabsType>;
134
134
  default: string;
135
135
  };
136
136
  titleScroll: {
@@ -174,7 +174,7 @@ declare const _default: Install< import("vue").DefineComponent<{
174
174
  onChange?: ((...args: any[]) => any) | undefined;
175
175
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
176
176
  }, {
177
- type: string;
177
+ type: TabsType;
178
178
  color: string;
179
179
  top: number;
180
180
  ellipsis: boolean;
@@ -182,7 +182,7 @@ declare const _default: Install< import("vue").DefineComponent<{
182
182
  sticky: boolean;
183
183
  modelValue: string | number;
184
184
  background: string;
185
- direction: string;
185
+ direction: TabsDirection;
186
186
  titleScroll: boolean;
187
187
  swipeable: boolean;
188
188
  autoHeight: boolean;
@@ -10,3 +10,6 @@ export type RectItem = {
10
10
  top: number;
11
11
  width: number;
12
12
  };
13
+ export type TabsDirection = 'horizontal' | 'vertical';
14
+ export type TabsSize = 'large' | 'normal' | 'small';
15
+ export type TabsType = 'line' | 'smile';
@@ -142,8 +142,8 @@ declare const _default: Install< import("vue").DefineComponent<{
142
142
  duration: number;
143
143
  closeOnClickOverlay: boolean;
144
144
  type: string;
145
- bottom: string;
146
145
  cover: boolean;
146
+ bottom: string;
147
147
  size: string | number;
148
148
  icon: Component;
149
149
  bgColor: string;
@@ -19,20 +19,7 @@ declare const _default: Install< import("vue").DefineComponent<{
19
19
  default: number;
20
20
  };
21
21
  fileList: {
22
- type: {
23
- (arrayLength: number): any[];
24
- (...items: any[]): any[];
25
- new (arrayLength: number): any[];
26
- new (...items: any[]): any[];
27
- isArray(arg: any): arg is any[];
28
- readonly prototype: any[];
29
- from<T>(arrayLike: ArrayLike<T>): T[];
30
- from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
31
- from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
32
- from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
33
- of<T_4>(...items: T_4[]): T_4[];
34
- readonly [Symbol.species]: ArrayConstructor;
35
- };
22
+ type: PropType<any[]>;
36
23
  default: () => never[];
37
24
  };
38
25
  isPreview: {
@@ -148,20 +135,7 @@ declare const _default: Install< import("vue").DefineComponent<{
148
135
  default: number;
149
136
  };
150
137
  fileList: {
151
- type: {
152
- (arrayLength: number): any[];
153
- (...items: any[]): any[];
154
- new (arrayLength: number): any[];
155
- new (...items: any[]): any[];
156
- isArray(arg: any): arg is any[];
157
- readonly prototype: any[];
158
- from<T>(arrayLike: ArrayLike<T>): T[];
159
- from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
160
- from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
161
- from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
162
- of<T_4>(...items: T_4[]): T_4[];
163
- readonly [Symbol.species]: ArrayConstructor;
164
- };
138
+ type: PropType<any[]>;
165
139
  default: () => never[];
166
140
  };
167
141
  isPreview: {
@@ -44,7 +44,20 @@ declare const _default: Install< import("vue").DefineComponent<{
44
44
  default: number;
45
45
  };
46
46
  content: {
47
- type: StringConstructor;
47
+ type: (StringConstructor | {
48
+ (arrayLength: number): string[];
49
+ (...items: string[]): string[];
50
+ new (arrayLength: number): string[];
51
+ new (...items: string[]): string[];
52
+ isArray(arg: any): arg is any[];
53
+ readonly prototype: any[];
54
+ from<T>(arrayLike: ArrayLike<T>): T[];
55
+ from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
56
+ from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
57
+ from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
58
+ of<T_4>(...items: T_4[]): T_4[];
59
+ readonly [Symbol.species]: ArrayConstructor;
60
+ })[];
48
61
  default: string;
49
62
  };
50
63
  fontColor: {
@@ -118,7 +131,20 @@ declare const _default: Install< import("vue").DefineComponent<{
118
131
  default: number;
119
132
  };
120
133
  content: {
121
- type: StringConstructor;
134
+ type: (StringConstructor | {
135
+ (arrayLength: number): string[];
136
+ (...items: string[]): string[];
137
+ new (arrayLength: number): string[];
138
+ new (...items: string[]): string[];
139
+ isArray(arg: any): arg is any[];
140
+ readonly prototype: any[];
141
+ from<T>(arrayLike: ArrayLike<T>): T[];
142
+ from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
143
+ from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
144
+ from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
145
+ of<T_4>(...items: T_4[]): T_4[];
146
+ readonly [Symbol.species]: ArrayConstructor;
147
+ })[];
122
148
  default: string;
123
149
  };
124
150
  fontColor: {
@@ -151,7 +177,7 @@ declare const _default: Install< import("vue").DefineComponent<{
151
177
  name: string;
152
178
  image: string;
153
179
  zIndex: number;
154
- content: string;
180
+ content: string | string[];
155
181
  width: number;
156
182
  height: number;
157
183
  rotate: number;
@@ -110,7 +110,7 @@ import Comment from './__VUE/comment/index.vue';
110
110
  import Invoice from './__VUE/invoice/index.vue';
111
111
  import AvatarCropper from './__VUE/avatarcropper/index.vue';
112
112
  declare function install(app: App): void;
113
- declare const version = "4.2.3";
113
+ declare const version = "4.2.5";
114
114
  export { install, version, Locale, Button, Cell, CellGroup, Overlay, Popup, ConfigProvider, Image, Layout, Col, Row, Sticky, Divider, Grid, GridItem, Space, Navbar, FixedNav, Menu, MenuItem, Tabbar, TabbarItem, Elevator, Pagination, Tabs, TabPane, Indicator, SideNavbar, SideNavbarItem, SubSideNavbar, Range, Searchbar, Cascader, Calendar, Checkbox, CheckboxGroup, DatePicker, InputNumber, Input, Radio, RadioGroup, Rate, CalendarItem, Picker, ShortPassword, Textarea, Uploader, NumberKeyboard, Form, FormItem, Swipe, SwipeGroup, ActionSheet, Backtop, Drag, Dialog, InfiniteLoading, PullRefresh, Notify, Switch, Toast, Audio, AudioOperate, Avatar, AvatarGroup, List, Progress, CircleProgress, Noticebar, Empty, Video, Steps, Step, Swiper, SwiperItem, Price, ImagePreview, Countup, Countdown, Badge, Tag, Popover, Skeleton, Collapse, CollapseItem, Table, Animate, Ellipsis, Watermark, TrendArrow, Tour, Address, Barrage, Signature, TimeSelect, TimePannel, TimeDetail, Sku, Card, Ecard, AddressList, Category, CategoryPane, Comment, Invoice, AvatarCropper, showDialog, showNotify, showToast, showImagePreview };
115
115
  declare const _default: {
116
116
  install: typeof install;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nutui/nutui",
3
- "version": "4.2.3",
3
+ "version": "4.2.5",
4
4
  "description": "京东风格的轻量级移动端 Vue2、Vue3 组件库(支持小程序开发)",
5
5
  "main": "dist/nutui.umd.js",
6
6
  "module": "dist/nutui.es.js",
@@ -1,10 +0,0 @@
1
- import { getCurrentInstance } from "vue";
2
- function useExpose(apis) {
3
- const instance = getCurrentInstance();
4
- if (instance) {
5
- Object.assign(instance.proxy, apis);
6
- }
7
- }
8
- export {
9
- useExpose as u
10
- };
@@ -1,2 +0,0 @@
1
- import { Component } from 'vue';
2
- export declare const component: (componentName: string, components: Record<string, Component>) => any;