@nutui/nutui 3.2.6 → 3.2.7

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 (189) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/README.md +11 -1
  3. package/dist/nutui.es.js +682 -1156
  4. package/dist/nutui.umd.js +689 -1164
  5. package/dist/packages/_es/ActionSheet.js +1 -1
  6. package/dist/packages/_es/Address.js +1 -1
  7. package/dist/packages/_es/AddressList.js +1 -1
  8. package/dist/packages/_es/Animate.js +1 -1
  9. package/dist/packages/_es/Audio.js +1 -1
  10. package/dist/packages/_es/AudioOperate.js +1 -1
  11. package/dist/packages/_es/Avatar.js +1 -1
  12. package/dist/packages/_es/AvatarGroup.js +1 -1
  13. package/dist/packages/_es/BackTop.js +1 -1
  14. package/dist/packages/_es/Badge.js +1 -1
  15. package/dist/packages/_es/Barrage.js +1 -1
  16. package/dist/packages/_es/Button.js +1 -1
  17. package/dist/packages/_es/Calendar.js +11 -4
  18. package/dist/packages/_es/CalendarItem.js +1 -1
  19. package/dist/packages/_es/Card.js +1 -1
  20. package/dist/packages/_es/Cascader.js +1 -1
  21. package/dist/packages/_es/Category.js +1 -1
  22. package/dist/packages/_es/CategoryPane.js +1 -1
  23. package/dist/packages/_es/Cell.js +1 -1
  24. package/dist/packages/_es/CellGroup.js +1 -1
  25. package/dist/packages/_es/Checkbox.js +1 -1
  26. package/dist/packages/_es/CheckboxGroup.js +1 -1
  27. package/dist/packages/_es/CircleProgress.js +1 -1
  28. package/dist/packages/_es/Col.js +1 -1
  29. package/dist/packages/_es/Collapse.js +1 -1
  30. package/dist/packages/_es/CollapseItem.js +9 -12
  31. package/dist/packages/_es/Comment.js +1 -1
  32. package/dist/packages/_es/ConfigProvider.js +1 -1
  33. package/dist/packages/_es/CountDown.js +1 -1
  34. package/dist/packages/_es/CountUp.js +1 -1
  35. package/dist/packages/_es/DatePicker.js +1 -1
  36. package/dist/packages/_es/Dialog.js +1 -1
  37. package/dist/packages/_es/Divider.js +1 -1
  38. package/dist/packages/_es/Drag.js +1 -1
  39. package/dist/packages/_es/Ecard.js +1 -1
  40. package/dist/packages/_es/Elevator.js +8 -2
  41. package/dist/packages/_es/Ellipsis.js +3 -3
  42. package/dist/packages/_es/Empty.js +1 -1
  43. package/dist/packages/_es/FixedNav.js +1 -1
  44. package/dist/packages/_es/Form.js +1 -1
  45. package/dist/packages/_es/FormItem.js +1 -1
  46. package/dist/packages/_es/Grid.js +1 -1
  47. package/dist/packages/_es/GridItem.js +1 -1
  48. package/dist/packages/_es/Icon.js +1 -1
  49. package/dist/packages/_es/Image.js +1 -1
  50. package/dist/packages/_es/ImagePreview.js +16 -5
  51. package/dist/packages/_es/Indicator.js +1 -1
  52. package/dist/packages/_es/InfiniteLoading.js +9 -2
  53. package/dist/packages/_es/Input.js +5 -12
  54. package/dist/packages/_es/InputNumber.js +1 -1
  55. package/dist/packages/_es/Invoice.js +1 -1
  56. package/dist/packages/_es/Layout.js +1 -1
  57. package/dist/packages/_es/List.js +1 -1
  58. package/dist/packages/_es/Menu.js +1 -1
  59. package/dist/packages/_es/MenuItem.js +5 -2
  60. package/dist/packages/_es/Navbar.js +1 -1
  61. package/dist/packages/_es/NoticeBar.js +1 -1
  62. package/dist/packages/_es/Notify.js +1 -1
  63. package/dist/packages/_es/NumberKeyboard.js +1 -1
  64. package/dist/packages/_es/OverLay.js +1 -1
  65. package/dist/packages/_es/Pagination.js +1 -1
  66. package/dist/packages/_es/Picker.js +1 -1
  67. package/dist/packages/_es/Popover.js +1 -1
  68. package/dist/packages/_es/Popup.js +6 -47
  69. package/dist/packages/_es/Price.js +1 -1
  70. package/dist/packages/_es/Progress.js +1 -1
  71. package/dist/packages/_es/PullRefresh.js +1 -1
  72. package/dist/packages/_es/Radio.js +1 -1
  73. package/dist/packages/_es/RadioGroup.js +1 -1
  74. package/dist/packages/_es/Range.js +1 -1
  75. package/dist/packages/_es/Rate.js +1 -1
  76. package/dist/packages/_es/Row.js +1 -1
  77. package/dist/packages/_es/SearchBar.js +1 -1
  78. package/dist/packages/_es/ShortPassword.js +1 -1
  79. package/dist/packages/_es/SideNavBar.js +1 -1
  80. package/dist/packages/_es/SideNavBarItem.js +1 -1
  81. package/dist/packages/_es/Signature.js +1 -1
  82. package/dist/packages/_es/Skeleton.js +19 -24
  83. package/dist/packages/_es/Sku.js +1 -1
  84. package/dist/packages/_es/Step.js +1 -1
  85. package/dist/packages/_es/Steps.js +1 -1
  86. package/dist/packages/_es/Sticky.js +1 -1
  87. package/dist/packages/_es/SubSideNavBar.js +1 -1
  88. package/dist/packages/_es/Swipe.js +1 -1
  89. package/dist/packages/_es/Swiper.js +1 -1
  90. package/dist/packages/_es/SwiperItem.js +1 -1
  91. package/dist/packages/_es/Switch.js +1 -1
  92. package/dist/packages/_es/TabPane.js +1 -1
  93. package/dist/packages/_es/Tabbar.js +1 -1
  94. package/dist/packages/_es/TabbarItem.js +24 -10
  95. package/dist/packages/_es/Table.js +1 -1
  96. package/dist/packages/_es/Tabs.js +1 -1
  97. package/dist/packages/_es/Tag.js +1 -1
  98. package/dist/packages/_es/TextArea.js +1 -1
  99. package/dist/packages/_es/TimeDetail.js +1 -1
  100. package/dist/packages/_es/TimePannel.js +1 -1
  101. package/dist/packages/_es/TimeSelect.js +1 -1
  102. package/dist/packages/_es/Toast.js +1 -1
  103. package/dist/packages/_es/TrendArrow.js +1 -1
  104. package/dist/packages/_es/Uploader.js +6 -6
  105. package/dist/packages/_es/Video.js +3 -2
  106. package/dist/packages/_es/WaterMark.js +1 -1
  107. package/dist/packages/_es/common.js +1 -1
  108. package/dist/packages/_es/component.js +1 -1
  109. package/dist/packages/_es/index.js +1 -1
  110. package/dist/packages/_es/index2.js +1 -1
  111. package/dist/packages/_es/index3.js +1 -1
  112. package/dist/packages/_es/index4.js +1 -1
  113. package/dist/packages/_es/index5.js +8 -2
  114. package/dist/packages/_es/plugin-vue_export-helper.js +1 -1
  115. package/dist/packages/_es/pxCheck.js +1 -1
  116. package/dist/packages/_es/raf.js +1 -1
  117. package/dist/packages/address/index.scss +5 -1
  118. package/dist/packages/card/index.scss +1 -0
  119. package/dist/packages/ellipsis/index.scss +4 -0
  120. package/dist/packages/formitem/index.scss +2 -0
  121. package/dist/packages/imagepreview/index.scss +5 -0
  122. package/dist/packages/locale/lang/baseLang.js +1 -1
  123. package/dist/packages/locale/lang/en-US.js +1 -1
  124. package/dist/packages/locale/lang/id-ID.js +1 -1
  125. package/dist/packages/locale/lang/index.js +1 -1
  126. package/dist/packages/locale/lang/zh-CN.js +1 -1
  127. package/dist/packages/locale/lang/zh-TW.js +1 -1
  128. package/dist/packages/menuitem/index.scss +1 -0
  129. package/dist/packages/signature/index.scss +6 -2
  130. package/dist/packages/skeleton/index.scss +21 -19
  131. package/dist/packages/sticky/index.scss +3 -0
  132. package/dist/packages/tabbaritem/index.scss +4 -0
  133. package/dist/packages/timeselect/index.scss +0 -1
  134. package/dist/smartips/attributes.json +32 -56
  135. package/dist/smartips/tags.json +6 -16
  136. package/dist/smartips/web-types.json +48 -109
  137. package/dist/style.css +1 -1
  138. package/dist/styles/font/config.json +4 -0
  139. package/dist/styles/font/demo_index.html +118 -26
  140. package/dist/styles/font/iconfont.css +23 -7
  141. package/dist/styles/font/iconfont.js +6 -6
  142. package/dist/styles/font/iconfont.json +35 -7
  143. package/dist/styles/font/iconfont.ttf +0 -0
  144. package/dist/styles/font/iconfont.woff +0 -0
  145. package/dist/styles/font/iconfont.woff2 +0 -0
  146. package/dist/styles/themes/default.scss +51 -52
  147. package/dist/styles/themes/jdb.scss +51 -52
  148. package/dist/styles/themes/jddkh.scss +51 -52
  149. package/dist/styles/themes/jdt.scss +51 -52
  150. package/dist/styles/variables-jdb.scss +8 -1
  151. package/dist/styles/variables-jddkh.scss +8 -1
  152. package/dist/styles/variables-jdt.scss +8 -1
  153. package/dist/styles/variables.scss +8 -1
  154. package/dist/types/__VUE/address/index.vue.d.ts +1 -1
  155. package/dist/types/__VUE/audio/index.vue.d.ts +4 -4
  156. package/dist/types/__VUE/calendar/index.vue.d.ts +11 -0
  157. package/dist/types/__VUE/calendaritem/index.vue.d.ts +15 -5
  158. package/dist/types/__VUE/cell/index.vue.d.ts +2 -2
  159. package/dist/types/__VUE/countup/index.vue.d.ts +2 -2
  160. package/dist/types/__VUE/elevator/index.vue.d.ts +2 -1
  161. package/dist/types/__VUE/grid/index.vue.d.ts +1 -1
  162. package/dist/types/__VUE/imagepreview/index.vue.d.ts +1 -1
  163. package/dist/types/__VUE/input/index.vue.d.ts +0 -1
  164. package/dist/types/__VUE/inputnumber/index.vue.d.ts +1 -1
  165. package/dist/types/__VUE/menuitem/index.vue.d.ts +3 -1
  166. package/dist/types/__VUE/navbar/index.vue.d.ts +1 -1
  167. package/dist/types/__VUE/noticebar/index.vue.d.ts +2 -2
  168. package/dist/types/__VUE/picker/Column.vue.d.ts +4 -4
  169. package/dist/types/__VUE/picker/index.vue.d.ts +4 -4
  170. package/dist/types/__VUE/popover/index.vue.d.ts +1 -1
  171. package/dist/types/__VUE/range/index.vue.d.ts +7 -7
  172. package/dist/types/__VUE/rate/index.vue.d.ts +1 -1
  173. package/dist/types/__VUE/searchbar/index.vue.d.ts +1 -1
  174. package/dist/types/__VUE/skeleton/common.d.ts +2 -3
  175. package/dist/types/__VUE/skeleton/index.vue.d.ts +2 -3
  176. package/dist/types/__VUE/swiper/index.vue.d.ts +1 -1
  177. package/dist/types/__VUE/switch/index.vue.d.ts +1 -1
  178. package/dist/types/__VUE/tabbaritem/index.vue.d.ts +1 -0
  179. package/dist/types/__VUE/uploader/index.vue.d.ts +14 -5
  180. package/dist/types/__VUE/video/index.vue.d.ts +2 -2
  181. package/dist/types/index.d.ts +1 -1
  182. package/dist/types/nutui.d.ts +1 -2
  183. package/package.json +2 -1
  184. package/dist/packages/_es/OldPicker.js +0 -486
  185. package/dist/packages/oldpicker/index.scss +0 -133
  186. package/dist/types/__VUE/oldpicker/Column.vue.d.ts +0 -96
  187. package/dist/types/__VUE/oldpicker/commonProps.d.ts +0 -22
  188. package/dist/types/__VUE/oldpicker/index.vue.d.ts +0 -369
  189. package/dist/types/__VUE/oldpicker/types.d.ts +0 -24
@@ -52,10 +52,9 @@ export declare const component: {
52
52
  [x: string]: any;
53
53
  avatarClass: boolean;
54
54
  }>;
55
- blockClass: import("vue").ComputedRef<{
55
+ getBlockClass: (prefixCls: string) => {
56
56
  [x: string]: any;
57
- blockClass: boolean;
58
- }>;
57
+ };
59
58
  getStyle: () => import('vue').CSSProperties;
60
59
  };
61
60
  };
@@ -49,10 +49,9 @@ declare const _sfc_main: Install< import("vue").DefineComponent<{
49
49
  [x: string]: any;
50
50
  avatarClass: boolean;
51
51
  }>;
52
- blockClass: import("vue").ComputedRef<{
52
+ getBlockClass: (prefixCls: string) => {
53
53
  [x: string]: any;
54
- blockClass: boolean;
55
- }>;
54
+ };
56
55
  getStyle: () => import("vue").CSSProperties;
57
56
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
58
57
  width: {
@@ -76,7 +76,7 @@ declare const _sfc_main: Install< import("vue").DefineComponent<{
76
76
  offset: number;
77
77
  touchTime: number;
78
78
  autoplayTimer: number | undefined;
79
- children: ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>>[];
79
+ children: ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}>[];
80
80
  childrenVNode: VNode<import("vue").RendererNode, import("vue").RendererElement, {
81
81
  [key: string]: any;
82
82
  }>[];
@@ -117,9 +117,9 @@ declare const _sfc_main: Install< import("vue").DefineComponent<{
117
117
  size: string | number;
118
118
  color: string;
119
119
  loading: boolean;
120
+ modelValue: string | number | boolean;
120
121
  activeColor: string;
121
122
  activeText: string;
122
- modelValue: string | number | boolean;
123
123
  inactiveColor: string;
124
124
  disable: boolean;
125
125
  inactiveText: string;
@@ -52,6 +52,7 @@ declare const _sfc_main: Install< import("vue").DefineComponent<{
52
52
  index: number;
53
53
  };
54
54
  active: import("vue").ComputedRef<boolean>;
55
+ isHaveSlot: (slot: string) => import("vue").Slot | undefined;
55
56
  change: () => void;
56
57
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
57
58
  tabTitle: {
@@ -91,6 +91,10 @@ declare const _sfc_main: Install< import("vue").DefineComponent<{
91
91
  type: BooleanConstructor;
92
92
  default: boolean;
93
93
  };
94
+ deleteIcon: {
95
+ type: StringConstructor;
96
+ default: string;
97
+ };
94
98
  beforeUpload: {
95
99
  type: FunctionConstructor;
96
100
  default: null;
@@ -101,7 +105,7 @@ declare const _sfc_main: Install< import("vue").DefineComponent<{
101
105
  };
102
106
  beforeDelete: {
103
107
  type: FunctionConstructor;
104
- default: (file: import('./type').FileItem, files: import('./type').FileItem[]) => true;
108
+ default: (file: import('./type').FileItem, files: import('./type').FileItem[]) => boolean;
105
109
  };
106
110
  onChange: {
107
111
  type: FunctionConstructor;
@@ -116,7 +120,7 @@ declare const _sfc_main: Install< import("vue").DefineComponent<{
116
120
  fileItemClick: (fileItem: import('./type').FileItem) => void;
117
121
  clearUploadQueue: (index?: number) => void;
118
122
  submit: () => void;
119
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("progress" | "success" | "start" | "change" | "delete" | "oversize" | "failure" | "update:fileList" | "file-item-click")[], "progress" | "success" | "start" | "change" | "delete" | "oversize" | "failure" | "update:fileList" | "file-item-click", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
123
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("progress" | "success" | "start" | "change" | "failure" | "oversize" | "delete" | "update:fileList" | "file-item-click")[], "progress" | "success" | "start" | "change" | "failure" | "oversize" | "delete" | "update:fileList" | "file-item-click", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
120
124
  name: {
121
125
  type: StringConstructor;
122
126
  default: string;
@@ -205,6 +209,10 @@ declare const _sfc_main: Install< import("vue").DefineComponent<{
205
209
  type: BooleanConstructor;
206
210
  default: boolean;
207
211
  };
212
+ deleteIcon: {
213
+ type: StringConstructor;
214
+ default: string;
215
+ };
208
216
  beforeUpload: {
209
217
  type: FunctionConstructor;
210
218
  default: null;
@@ -215,19 +223,19 @@ declare const _sfc_main: Install< import("vue").DefineComponent<{
215
223
  };
216
224
  beforeDelete: {
217
225
  type: FunctionConstructor;
218
- default: (file: import('./type').FileItem, files: import('./type').FileItem[]) => true;
226
+ default: (file: import('./type').FileItem, files: import('./type').FileItem[]) => boolean;
219
227
  };
220
228
  onChange: {
221
229
  type: FunctionConstructor;
222
230
  };
223
231
  }>> & {
224
232
  onChange?: ((...args: any[]) => any) | undefined;
225
- onDelete?: ((...args: any[]) => any) | undefined;
226
233
  onProgress?: ((...args: any[]) => any) | undefined;
227
234
  onSuccess?: ((...args: any[]) => any) | undefined;
228
235
  onStart?: ((...args: any[]) => any) | undefined;
229
- onOversize?: ((...args: any[]) => any) | undefined;
230
236
  onFailure?: ((...args: any[]) => any) | undefined;
237
+ onOversize?: ((...args: any[]) => any) | undefined;
238
+ onDelete?: ((...args: any[]) => any) | undefined;
231
239
  "onUpdate:fileList"?: ((...args: any[]) => any) | undefined;
232
240
  "onFile-item-click"?: ((...args: any[]) => any) | undefined;
233
241
  }, {
@@ -253,6 +261,7 @@ declare const _sfc_main: Install< import("vue").DefineComponent<{
253
261
  xhrState: string | number;
254
262
  withCredentials: boolean;
255
263
  autoUpload: boolean;
264
+ deleteIcon: string;
256
265
  beforeUpload: Function;
257
266
  beforeXhrUpload: Function;
258
267
  beforeDelete: Function;
@@ -71,13 +71,13 @@ declare const _sfc_main: Install< import("vue").DefineComponent<{
71
71
  }>;
72
72
  showTouchMask: import("vue").Ref<boolean>;
73
73
  source: import("vue").Ref<Record<string, any>>;
74
- onClick: import("vue").Ref<((...args: any[]) => any) | undefined>;
75
74
  options: import("vue").Ref<Record<string, any>>;
75
+ model: import("vue").Ref<string>;
76
+ onClick: import("vue").Ref<((...args: any[]) => any) | undefined>;
76
77
  onPlay: import("vue").Ref<((...args: any[]) => any) | undefined>;
77
78
  onTime: import("vue").Ref<((...args: any[]) => any) | undefined>;
78
79
  onPause: import("vue").Ref<((...args: any[]) => any) | undefined>;
79
80
  onPlayend: import("vue").Ref<((...args: any[]) => any) | undefined>;
80
- model: import("vue").Ref<string>;
81
81
  root: import("vue").Ref<null>;
82
82
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("time" | "click" | "pause" | "play" | "playend")[], "time" | "click" | "pause" | "play" | "playend", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
83
83
  source: {
@@ -3,6 +3,6 @@ declare namespace _default {
3
3
  export { version };
4
4
  }
5
5
  export function install(app: any): void;
6
- export const version: '3.2.6';
6
+ export const version: '3.2.7';
7
7
  export default _default;
8
8
  export * from './nutui';
@@ -48,7 +48,6 @@ import Uploader from './__VUE/uploader/index.vue';
48
48
  import NumberKeyboard from './__VUE/numberkeyboard/index.vue';
49
49
  import Form from './__VUE/form/index.vue';
50
50
  import FormItem from './__VUE/formitem/index.vue';
51
- import OldPicker from './__VUE/oldpicker/index.vue';
52
51
  import Swipe from './__VUE/swipe/index.vue';
53
52
  import ActionSheet from './__VUE/actionsheet/index.vue';
54
53
  import BackTop from './__VUE/backtop/index.vue';
@@ -103,4 +102,4 @@ import CategoryPane from './__VUE/categorypane/index.vue';
103
102
  import Comment from './__VUE/comment/index.vue';
104
103
  import Invoice from './__VUE/invoice/index.vue';
105
104
 
106
- export { Locale,Button,Cell,CellGroup,Icon,OverLay,Popup,ConfigProvider,Image,Layout,Col,Row,Sticky,Divider,Grid,GridItem,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,OldPicker,Swipe,ActionSheet,BackTop,Drag,Dialog,InfiniteLoading,Notify,PullRefresh,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,Address,Barrage,Signature,TimeSelect,TimePannel,TimeDetail,Sku,Card,Ecard,AddressList,Category,CategoryPane,Comment,Invoice };
105
+ export { Locale,Button,Cell,CellGroup,Icon,OverLay,Popup,ConfigProvider,Image,Layout,Col,Row,Sticky,Divider,Grid,GridItem,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,ActionSheet,BackTop,Drag,Dialog,InfiniteLoading,Notify,PullRefresh,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,Address,Barrage,Signature,TimeSelect,TimePannel,TimeDetail,Sku,Card,Ecard,AddressList,Category,CategoryPane,Comment,Invoice };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nutui/nutui",
3
- "version": "3.2.6",
3
+ "version": "3.2.7",
4
4
  "description": "京东风格的轻量级移动端 Vue2、Vue3 组件库(支持小程序开发)",
5
5
  "main": "dist/nutui.umd.js",
6
6
  "module": "dist/nutui.es.js",
@@ -75,6 +75,7 @@
75
75
  },
76
76
  "dependencies": {
77
77
  "@tarojs/components": "3.5.6",
78
+ "consola": "2.15.3",
78
79
  "sass": "^1.50.0",
79
80
  "vscode": "^1.1.37",
80
81
  "vue-router": "^4.0.12"
@@ -1,486 +0,0 @@
1
- /*!
2
- * @nutui/nutui v3.2.6 Fri Nov 04 2022 18:06:53 GMT+0800 (中国标准时间)
3
- * (c) 2022 @jdf2e.
4
- * Released under the MIT License.
5
- */
6
- import { ref, reactive, computed, watch, onMounted, toRefs, openBlock, createElementBlock, createElementVNode, normalizeStyle, Fragment, renderList, normalizeClass, toDisplayString, createCommentVNode, onBeforeUnmount, toRaw, resolveComponent, createVNode, withCtx } from "vue";
7
- import { c as createComponent } from "./component.js";
8
- import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
9
- import Popup, { popupProps } from "./Popup.js";
10
- import "../locale/lang";
11
- import "./OverLay.js";
12
- import "./Icon.js";
13
- import "./pxCheck.js";
14
- const { create: create$1 } = createComponent("oldpicker-column");
15
- const _sfc_main$1 = create$1({
16
- props: {
17
- dataType: String,
18
- itemShow: {
19
- type: Boolean,
20
- default: false
21
- },
22
- listData: {
23
- type: Object,
24
- default: () => {
25
- return {};
26
- }
27
- },
28
- readonly: {
29
- type: Boolean,
30
- default: false
31
- },
32
- defaultIndex: {
33
- type: [Number, String],
34
- default: 0
35
- }
36
- },
37
- emits: ["click", "change"],
38
- setup(props, { emit }) {
39
- const wrapper = ref();
40
- const state = reactive({
41
- touchParams: {
42
- startY: 0,
43
- endY: 0,
44
- startTime: 0,
45
- endTime: 0,
46
- lastY: 0
47
- },
48
- currIndex: 1,
49
- transformY: 0,
50
- scrollDistance: 0,
51
- lineSpacing: 36,
52
- rotation: 20,
53
- timer: null
54
- });
55
- const roller = ref(null);
56
- const list = ref(null);
57
- const listItem = ref(null);
58
- const touchDeg = ref(0);
59
- const touchTime = ref(0);
60
- const touchTranslateY = ref(0);
61
- const touchListStyle = computed(() => {
62
- return {
63
- transition: `transform ${touchTime.value}ms cubic-bezier(0.19, 1, 0.22, 1)`,
64
- transform: `translate3d(0, ${state.scrollDistance}px, 0)`
65
- };
66
- });
67
- const touchRollerStyle = computed(() => {
68
- return {
69
- transition: `transform ${touchTime.value}ms cubic-bezier(0.19, 1, 0.22, 1)`,
70
- transform: `rotate3d(1, 0, 0, ${touchDeg.value})`
71
- };
72
- });
73
- const onTouchStart = (event) => {
74
- event.preventDefault();
75
- let changedTouches = event.changedTouches[0];
76
- state.touchParams.startY = changedTouches.pageY;
77
- state.touchParams.startTime = event.timeStamp || Date.now();
78
- state.transformY = state.scrollDistance;
79
- };
80
- const onTouchMove = (event) => {
81
- event.preventDefault();
82
- let changedTouches = event.changedTouches[0];
83
- state.touchParams.lastY = changedTouches.pageY;
84
- state.touchParams.lastTime = event.timeStamp || Date.now();
85
- let move = state.touchParams.lastY - state.touchParams.startY;
86
- setMove(move);
87
- };
88
- const onTouchEnd = (event) => {
89
- event.preventDefault();
90
- let changedTouches = event.changedTouches[0];
91
- state.touchParams.lastY = changedTouches.pageY;
92
- state.touchParams.lastTime = event.timestamp || Date.now();
93
- let move = state.touchParams.lastY - state.touchParams.startY;
94
- let moveTime = state.touchParams.lastTime - state.touchParams.startTime;
95
- if (moveTime <= 300) {
96
- move = move * 2;
97
- moveTime = moveTime + 1e3;
98
- setMove(move, "end", moveTime);
99
- } else {
100
- setMove(move, "end");
101
- }
102
- };
103
- const setRollerStyle = (index2) => {
104
- return `transform: rotate3d(1, 0, 0, ${-state.rotation * index2}deg) translate3d(0px, 0px, 104px)`;
105
- };
106
- const isHidden = (index2) => {
107
- if (index2 >= state.currIndex + 8 || index2 <= state.currIndex - 8) {
108
- return true;
109
- } else {
110
- return false;
111
- }
112
- };
113
- const setTransform = (translateY = 0, type, time = 1e3, deg) => {
114
- if (type === "end") {
115
- touchTime.value = time;
116
- } else {
117
- touchTime.value = 0;
118
- }
119
- touchDeg.value = deg;
120
- touchTranslateY.value = translateY;
121
- state.scrollDistance = translateY;
122
- };
123
- const setMove = (move, type, time) => {
124
- let updateMove = move + state.transformY;
125
- if (type === "end") {
126
- if (updateMove > 0) {
127
- updateMove = 0;
128
- }
129
- if (updateMove < -(props.listData.values.length - 1) * state.lineSpacing) {
130
- updateMove = -(props.listData.values.length - 1) * state.lineSpacing;
131
- }
132
- let endMove = Math.round(updateMove / state.lineSpacing) * state.lineSpacing;
133
- let deg = `${(Math.abs(Math.round(endMove / state.lineSpacing)) + 1) * state.rotation}deg`;
134
- setTransform(endMove, type, time, deg);
135
- let t = time ? time / 2 : 0;
136
- state.timer = setTimeout(() => {
137
- setChooseValue();
138
- }, t);
139
- state.currIndex = Math.abs(Math.round(endMove / state.lineSpacing)) + 1;
140
- } else {
141
- let deg = "0deg";
142
- if (updateMove < 0) {
143
- deg = `${(Math.abs(updateMove / state.lineSpacing) + 1) * state.rotation}deg`;
144
- } else {
145
- deg = `${(-updateMove / state.lineSpacing + 1) * state.rotation}deg`;
146
- }
147
- setTransform(updateMove, null, void 0, deg);
148
- state.currIndex = Math.abs(Math.round(updateMove / state.lineSpacing)) + 1;
149
- }
150
- };
151
- const setChooseValue = () => {
152
- emit("change", state.currIndex - 1);
153
- };
154
- const modifyStatus = (type) => {
155
- let index2 = props.defaultIndex;
156
- state.currIndex = index2 === -1 ? 1 : index2 + 1;
157
- let move = index2 === -1 ? 0 : index2 * state.lineSpacing;
158
- type && setChooseValue();
159
- setMove(-move);
160
- };
161
- watch(
162
- () => props.listData,
163
- (val) => {
164
- state.transformY = 0;
165
- modifyStatus(false);
166
- },
167
- {
168
- deep: true
169
- }
170
- );
171
- watch(
172
- () => props.defaultIndex,
173
- (val) => {
174
- state.transformY = 0;
175
- modifyStatus(false);
176
- }
177
- );
178
- onMounted(() => {
179
- modifyStatus(true);
180
- });
181
- return {
182
- ...toRefs(state),
183
- ...toRefs(props),
184
- wrapper,
185
- setRollerStyle,
186
- isHidden,
187
- roller,
188
- list,
189
- listItem,
190
- onTouchStart,
191
- onTouchMove,
192
- onTouchEnd,
193
- touchRollerStyle,
194
- touchListStyle,
195
- setMove
196
- };
197
- }
198
- });
199
- const _hoisted_1$1 = { class: "nut-oldpicker-content" };
200
- const _hoisted_2$1 = {
201
- key: 0,
202
- class: "nut-oldpicker-placeholder"
203
- };
204
- function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
205
- return openBlock(), createElementBlock("view", {
206
- class: "nut-oldpicker__list",
207
- onTouchstart: _cache[0] || (_cache[0] = (...args) => _ctx.onTouchStart && _ctx.onTouchStart(...args)),
208
- onTouchmove: _cache[1] || (_cache[1] = (...args) => _ctx.onTouchMove && _ctx.onTouchMove(...args)),
209
- onTouchend: _cache[2] || (_cache[2] = (...args) => _ctx.onTouchEnd && _ctx.onTouchEnd(...args))
210
- }, [
211
- createElementVNode("view", {
212
- class: "nut-oldpicker-roller",
213
- ref: "roller",
214
- style: normalizeStyle(_ctx.touchRollerStyle)
215
- }, [
216
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.listData.values, (item, index2) => {
217
- return openBlock(), createElementBlock("view", {
218
- class: normalizeClass(["nut-oldpicker-roller-item", { "nut-oldpicker-roller-item-hidden": _ctx.isHidden(index2 + 1) }]),
219
- style: normalizeStyle(_ctx.setRollerStyle(index2 + 1)),
220
- key: item.label ? item.label : index2
221
- }, toDisplayString(_ctx.dataType === "cascade" ? item.text : item), 7);
222
- }), 128))
223
- ], 4),
224
- createElementVNode("view", _hoisted_1$1, [
225
- createElementVNode("view", {
226
- class: "nut-oldpicker-list-panel",
227
- ref: "list",
228
- style: normalizeStyle(_ctx.touchListStyle)
229
- }, [
230
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.listData.values, (item, index2) => {
231
- return openBlock(), createElementBlock("view", {
232
- class: "nut-oldpicker-item nut-oldpicker-item-ref",
233
- key: item.label ? item.label : index2
234
- }, toDisplayString(_ctx.dataType === "cascade" ? item.text : item), 1);
235
- }), 128)),
236
- _ctx.listData && _ctx.listData.length === 1 ? (openBlock(), createElementBlock("view", _hoisted_2$1)) : createCommentVNode("", true)
237
- ], 4)
238
- ])
239
- ], 32);
240
- }
241
- var column = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1]]);
242
- const { create, componentName } = createComponent("oldpicker");
243
- const _sfc_main = create({
244
- components: {
245
- [column.name]: column,
246
- [Popup.name]: Popup
247
- },
248
- props: {
249
- ...popupProps,
250
- title: {
251
- type: String,
252
- default: ""
253
- },
254
- cancelText: {
255
- type: String,
256
- default: "\u53D6\u6D88"
257
- },
258
- okText: {
259
- type: String,
260
- default: "\u786E\u5B9A"
261
- },
262
- listData: {
263
- type: Array,
264
- default: () => {
265
- return [];
266
- }
267
- },
268
- readonly: {
269
- type: Boolean,
270
- default: false
271
- },
272
- defaultIndex: {
273
- type: [Number, String],
274
- default: 0
275
- }
276
- },
277
- emits: ["close", "change", "confirm", "update:visible"],
278
- setup(props, { emit }) {
279
- const childrenKey = "children";
280
- const valuesKey = "values";
281
- const state = reactive({
282
- show: false,
283
- formattedColumns: props.listData,
284
- defaultIndex: props.defaultIndex
285
- });
286
- let _defaultIndex = props.defaultIndex;
287
- let defaultIndexList = [];
288
- const classes = computed(() => {
289
- const prefixCls = componentName;
290
- return {
291
- [prefixCls]: true
292
- };
293
- });
294
- const dataType = computed(() => {
295
- const firstColumn = state.formattedColumns[0];
296
- if (typeof firstColumn === "object") {
297
- if (firstColumn[childrenKey]) {
298
- return "cascade";
299
- } else if (firstColumn == null ? void 0 : firstColumn[valuesKey]) {
300
- addDefaultIndexList(props.listData);
301
- return "multipleColumns";
302
- }
303
- }
304
- return "text";
305
- });
306
- const columnList = computed(() => {
307
- if (dataType.value === "text") {
308
- return [{ values: state.formattedColumns, defaultIndex: state.defaultIndex }];
309
- } else if (dataType.value === "multipleColumns") {
310
- return state.formattedColumns;
311
- } else if (dataType.value === "cascade") {
312
- return formatCascade(state.formattedColumns, state.defaultIndex);
313
- }
314
- return state.formattedColumns;
315
- });
316
- const addDefaultIndexList = (listData) => {
317
- defaultIndexList = [];
318
- listData.forEach((res) => {
319
- defaultIndexList.push(res.defaultIndex || 0);
320
- });
321
- };
322
- const formatCascade = (listData, defaultIndex) => {
323
- const formatted = [];
324
- let children = listData;
325
- children.defaultIndex = defaultIndex;
326
- while (children) {
327
- formatted.push({
328
- values: children,
329
- defaultIndex: children.defaultIndex || 0
330
- });
331
- children = children == null ? void 0 : children[children.defaultIndex || 0].children;
332
- }
333
- addDefaultIndexList(formatted);
334
- return formatted;
335
- };
336
- const getCascadeData = (listData, defaultIndex) => {
337
- var _a;
338
- let arr = listData;
339
- arr.defaultIndex = defaultIndex;
340
- const dataList = [];
341
- while (arr) {
342
- const item = arr[(_a = arr.defaultIndex) != null ? _a : 0];
343
- dataList.push(item.text);
344
- arr = item.children;
345
- }
346
- return dataList;
347
- };
348
- const close = () => {
349
- emit("close");
350
- emit("update:visible", false);
351
- };
352
- const changeHandler = (columnIndex, dataIndex) => {
353
- if (dataType.value === "cascade") {
354
- let cursor = state.formattedColumns;
355
- if (columnIndex === 0) {
356
- state.defaultIndex = dataIndex;
357
- }
358
- let i = 0;
359
- while (cursor) {
360
- if (i === columnIndex) {
361
- cursor.defaultIndex = dataIndex;
362
- } else if (i > columnIndex) {
363
- cursor.defaultIndex = 0;
364
- }
365
- cursor = cursor[cursor.defaultIndex || 0].children;
366
- i++;
367
- }
368
- } else if (dataType.value === "text") {
369
- _defaultIndex = dataIndex;
370
- } else if (dataType.value === "multipleColumns") {
371
- defaultIndexList[columnIndex] = dataIndex;
372
- const val = defaultIndexList.map(
373
- (res, i) => toRaw(state.formattedColumns)[i].values[res]
374
- );
375
- emit("change", val, columnIndex, dataIndex);
376
- }
377
- };
378
- const confirm = () => {
379
- if (dataType.value === "text") {
380
- state.defaultIndex = _defaultIndex;
381
- emit("confirm", state.formattedColumns[_defaultIndex]);
382
- } else if (dataType.value === "multipleColumns") {
383
- for (let i = 0; i < defaultIndexList.length; i++) {
384
- state.formattedColumns[i].defaultIndex = defaultIndexList[i];
385
- }
386
- const checkedArr = toRaw(state.formattedColumns).map(
387
- (res) => res.values && res.values[res.defaultIndex]
388
- );
389
- emit("confirm", checkedArr);
390
- } else if (dataType.value === "cascade") {
391
- emit("confirm", getCascadeData(toRaw(state.formattedColumns), state.defaultIndex));
392
- }
393
- emit("update:visible", false);
394
- };
395
- onMounted(() => {
396
- if (props.visible)
397
- state.show = props.visible;
398
- });
399
- onBeforeUnmount(() => {
400
- if (props.visible)
401
- state.show = false;
402
- });
403
- watch(
404
- () => props.visible,
405
- (val) => {
406
- state.show = val;
407
- }
408
- );
409
- watch(
410
- () => props.listData,
411
- (val) => {
412
- state.formattedColumns = val;
413
- }
414
- );
415
- return {
416
- classes,
417
- ...toRefs(state),
418
- column,
419
- dataType,
420
- columnList,
421
- close,
422
- changeHandler,
423
- confirm
424
- };
425
- }
426
- });
427
- const _hoisted_1 = { class: "nut-oldpicker__bar" };
428
- const _hoisted_2 = { class: "nut-oldpicker__title" };
429
- const _hoisted_3 = { class: "nut-oldpicker__column" };
430
- const _hoisted_4 = /* @__PURE__ */ createElementVNode("view", { class: "nut-oldpicker__hairline" }, null, -1);
431
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
432
- const _component_nut_oldpicker_column = resolveComponent("nut-oldpicker-column");
433
- const _component_nut_popup = resolveComponent("nut-popup");
434
- return openBlock(), createElementBlock("view", {
435
- class: normalizeClass(_ctx.classes)
436
- }, [
437
- createVNode(_component_nut_popup, {
438
- position: "bottom",
439
- visible: _ctx.show,
440
- "onUpdate:visible": _cache[2] || (_cache[2] = ($event) => _ctx.show = $event),
441
- teleport: _ctx.teleport,
442
- "lock-scroll": _ctx.lockScroll,
443
- "close-on-click-overlay": _ctx.closeOnClickOverlay,
444
- onClose: _ctx.close,
445
- round: true,
446
- isWrapTeleport: _ctx.isWrapTeleport
447
- }, {
448
- default: withCtx(() => [
449
- createElementVNode("view", _hoisted_1, [
450
- createElementVNode("view", {
451
- class: "nut-oldpicker__cancel nut-oldpicker__left nut-oldpicker__button",
452
- onClick: _cache[0] || (_cache[0] = (...args) => _ctx.close && _ctx.close(...args))
453
- }, toDisplayString(_ctx.cancelText), 1),
454
- createElementVNode("view", _hoisted_2, toDisplayString(_ctx.title), 1),
455
- createElementVNode("view", {
456
- class: "nut-oldpicker__confirm nut-oldpicker__button nut-oldpicker__right",
457
- onClick: _cache[1] || (_cache[1] = ($event) => _ctx.confirm())
458
- }, toDisplayString(_ctx.okText), 1)
459
- ]),
460
- createElementVNode("view", _hoisted_3, [
461
- _hoisted_4,
462
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.columnList, (item, columnIndex) => {
463
- return openBlock(), createElementBlock("view", {
464
- class: "nut-oldpicker__columnitem",
465
- key: columnIndex
466
- }, [
467
- createVNode(_component_nut_oldpicker_column, {
468
- itemShow: _ctx.show,
469
- "list-data": item,
470
- readonly: _ctx.readonly,
471
- "default-index": item.defaultIndex,
472
- "data-type": _ctx.dataType,
473
- onChange: (dataIndex) => {
474
- _ctx.changeHandler(columnIndex, dataIndex);
475
- }
476
- }, null, 8, ["itemShow", "list-data", "readonly", "default-index", "data-type", "onChange"])
477
- ]);
478
- }), 128))
479
- ])
480
- ]),
481
- _: 1
482
- }, 8, ["visible", "teleport", "lock-scroll", "close-on-click-overlay", "onClose", "isWrapTeleport"])
483
- ], 2);
484
- }
485
- var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
486
- export { index as default };