@nutui/nutui 4.2.4 → 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.
@@ -1,3 +1,5 @@
1
+ import { PropType } from 'vue';
2
+ import { DragDirection } from './types';
1
3
 
2
4
  declare type Install<T> = T & {
3
5
  install(app: import('vue').App): void;
@@ -8,7 +10,7 @@ declare const _default: Install< import("vue").DefineComponent<{
8
10
  default: boolean;
9
11
  };
10
12
  direction: {
11
- type: StringConstructor;
13
+ type: PropType<DragDirection>;
12
14
  default: string;
13
15
  };
14
16
  boundary: {
@@ -31,7 +33,7 @@ declare const _default: Install< import("vue").DefineComponent<{
31
33
  default: boolean;
32
34
  };
33
35
  direction: {
34
- type: StringConstructor;
36
+ type: PropType<DragDirection>;
35
37
  default: string;
36
38
  };
37
39
  boundary: {
@@ -44,7 +46,7 @@ declare const _default: Install< import("vue").DefineComponent<{
44
46
  };
45
47
  };
46
48
  }>>, {
47
- direction: string;
49
+ direction: DragDirection;
48
50
  attract: boolean;
49
51
  boundary: Record<string, any>;
50
52
  }, {}>>;
@@ -0,0 +1 @@
1
+ export type DragDirection = 'all' | 'x' | 'y';
@@ -1,3 +1,5 @@
1
+ import { PropType } from 'vue';
2
+ import { PaginationMode } from './types';
1
3
 
2
4
  declare type Install<T> = T & {
3
5
  install(app: import('vue').App): void;
@@ -8,7 +10,7 @@ declare const _default: Install< import("vue").DefineComponent<{
8
10
  default: number;
9
11
  };
10
12
  mode: {
11
- type: StringConstructor;
13
+ type: PropType<PaginationMode>;
12
14
  default: string;
13
15
  };
14
16
  prevText: {
@@ -43,7 +45,7 @@ declare const _default: Install< import("vue").DefineComponent<{
43
45
  modelValue: import("vue").Ref<number>;
44
46
  select: (curPage: number, isSelect: boolean) => void;
45
47
  countRef: import("vue").ComputedRef<number>;
46
- mode: import("vue").Ref<string>;
48
+ mode: import("vue").Ref<PaginationMode>;
47
49
  pages: import("vue").ComputedRef<{
48
50
  number: number;
49
51
  text: string | number;
@@ -57,7 +59,7 @@ declare const _default: Install< import("vue").DefineComponent<{
57
59
  default: number;
58
60
  };
59
61
  mode: {
60
- type: StringConstructor;
62
+ type: PropType<PaginationMode>;
61
63
  default: string;
62
64
  };
63
65
  prevText: {
@@ -93,7 +95,7 @@ declare const _default: Install< import("vue").DefineComponent<{
93
95
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
94
96
  }, {
95
97
  modelValue: number;
96
- mode: string;
98
+ mode: PaginationMode;
97
99
  prevText: string;
98
100
  nextText: string;
99
101
  pageCount: string | number;
@@ -0,0 +1 @@
1
+ export type PaginationMode = 'multi' | 'simple';
@@ -1,4 +1,5 @@
1
- import { Ref, CSSProperties } from 'vue';
1
+ import { Ref, CSSProperties, PropType } from 'vue';
2
+ import { SearchbarInputAlign, SearchbarShape } from './types';
2
3
 
3
4
  declare type Install<T> = T & {
4
5
  install(app: import('vue').App): void;
@@ -17,7 +18,7 @@ declare const _default: Install< import("vue").DefineComponent<{
17
18
  default: string;
18
19
  };
19
20
  shape: {
20
- type: StringConstructor;
21
+ type: PropType<SearchbarShape>;
21
22
  default: string;
22
23
  };
23
24
  maxLength: {
@@ -115,7 +116,7 @@ declare const _default: Install< import("vue").DefineComponent<{
115
116
  default: boolean;
116
117
  };
117
118
  inputAlign: {
118
- type: StringConstructor;
119
+ type: PropType<SearchbarInputAlign>;
119
120
  default: string;
120
121
  };
121
122
  safeAreaInsetBottom: {
@@ -159,7 +160,7 @@ declare const _default: Install< import("vue").DefineComponent<{
159
160
  default: string;
160
161
  };
161
162
  shape: {
162
- type: StringConstructor;
163
+ type: PropType<SearchbarShape>;
163
164
  default: string;
164
165
  };
165
166
  maxLength: {
@@ -257,7 +258,7 @@ declare const _default: Install< import("vue").DefineComponent<{
257
258
  default: boolean;
258
259
  };
259
260
  inputAlign: {
260
- type: StringConstructor;
261
+ type: PropType<SearchbarInputAlign>;
261
262
  default: string;
262
263
  };
263
264
  safeAreaInsetBottom: {
@@ -279,11 +280,11 @@ declare const _default: Install< import("vue").DefineComponent<{
279
280
  disabled: boolean;
280
281
  safeAreaInsetBottom: boolean;
281
282
  modelValue: string | number;
282
- shape: string;
283
+ shape: SearchbarShape;
283
284
  background: string;
284
285
  readonly: boolean;
285
286
  placeholder: string;
286
- inputAlign: string;
287
+ inputAlign: SearchbarInputAlign;
287
288
  maxLength: string | number;
288
289
  clearable: boolean;
289
290
  autofocus: boolean;
@@ -0,0 +1,3 @@
1
+ export type SearchbarInputAlign = 'start' | 'end' | 'left' | 'right' | 'center' | 'justify' | 'match-parent';
2
+ export type SearchbarConfirmType = 'send' | 'search' | 'next' | 'go' | 'done';
3
+ export type SearchbarShape = 'round' | 'square';
@@ -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: {
@@ -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';
@@ -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.4";
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.4",
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 +0,0 @@
1
- export type TextAlign = 'start' | 'end' | 'left' | 'right' | 'center' | 'justify' | 'match-parent';
@@ -1,125 +0,0 @@
1
- import { PropType } from 'vue';
2
- import { TableColumns } from './types';
3
- export declare const component: (componentName: string, translate: Function) => {
4
- components: {
5
- RenderColumn: import("vue").DefineComponent<{
6
- slots: {
7
- type: ArrayConstructor;
8
- default: () => never[];
9
- };
10
- record: {
11
- type: ObjectConstructor;
12
- default: () => {};
13
- };
14
- }, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
15
- [key: string]: any;
16
- }>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
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
- }, {}>;
29
- DownArrow: import("vue").DefineComponent<{
30
- class: {
31
- type: StringConstructor;
32
- default: string;
33
- };
34
- name: {
35
- type: StringConstructor;
36
- default: string;
37
- };
38
- color: {
39
- type: StringConstructor;
40
- default: string;
41
- };
42
- width: {
43
- type: (NumberConstructor | StringConstructor)[];
44
- default: string;
45
- };
46
- height: {
47
- type: (NumberConstructor | StringConstructor)[];
48
- default: string;
49
- };
50
- }, {
51
- classes: import("vue").ComputedRef<{
52
- [x: string]: string | boolean;
53
- "nut-icon": boolean;
54
- }>;
55
- style: import("vue").ComputedRef<import("vue").CSSProperties>;
56
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
57
- class: {
58
- type: StringConstructor;
59
- default: string;
60
- };
61
- name: {
62
- type: StringConstructor;
63
- default: string;
64
- };
65
- color: {
66
- type: StringConstructor;
67
- default: string;
68
- };
69
- width: {
70
- type: (NumberConstructor | StringConstructor)[];
71
- default: string;
72
- };
73
- height: {
74
- type: (NumberConstructor | StringConstructor)[];
75
- default: string;
76
- };
77
- }>>, {
78
- name: string;
79
- width: string | number;
80
- height: string | number;
81
- color: string;
82
- class: string;
83
- }>;
84
- };
85
- props: {
86
- bordered: {
87
- type: BooleanConstructor;
88
- default: boolean;
89
- };
90
- columns: {
91
- type: PropType<TableColumns[]>;
92
- default: () => never[];
93
- };
94
- data: {
95
- type: ObjectConstructor;
96
- default: () => {};
97
- };
98
- summary: {
99
- type: FunctionConstructor;
100
- default: null;
101
- };
102
- striped: {
103
- type: BooleanConstructor;
104
- default: boolean;
105
- };
106
- };
107
- emits: string[];
108
- setup(props: any, { emit }: any): {
109
- classes: import("vue").ComputedRef<{
110
- [x: string]: boolean;
111
- }>;
112
- cellClasses: (item: TableColumns) => {
113
- [x: string]: any;
114
- 'nut-table__main__head__tr--border': any;
115
- };
116
- getColumnItem: (value: string) => TableColumns;
117
- getColumnItemStyle: (value: string) => any;
118
- handleSorterClick: (item: TableColumns) => void;
119
- sortDataItem: () => any;
120
- translate: Function;
121
- stylehead: (item: TableColumns) => string;
122
- stylecolumn: (item: TableColumns) => string;
123
- curData: import("vue").Ref<any>;
124
- };
125
- };