@nutui/nutui 3.1.21 → 3.1.22-beta.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (233) hide show
  1. package/dist/nutui.es.js +4203 -19263
  2. package/dist/nutui.umd.js +4208 -19368
  3. package/dist/packages/_es/ActionSheet.js +17 -167
  4. package/dist/packages/_es/Address.js +110 -552
  5. package/dist/packages/_es/AddressList.js +113 -613
  6. package/dist/packages/_es/Animate.js +22 -0
  7. package/dist/packages/_es/Audio.js +53 -274
  8. package/dist/packages/_es/AudioOperate.js +13 -121
  9. package/dist/packages/_es/Avatar.js +38 -177
  10. package/dist/packages/_es/AvatarGroup.js +14 -73
  11. package/dist/packages/_es/BackTop.js +43 -156
  12. package/dist/packages/_es/Badge.js +14 -86
  13. package/dist/packages/_es/Barrage.js +41 -120
  14. package/dist/packages/_es/Button.js +23 -128
  15. package/dist/packages/_es/Calendar.js +30 -237
  16. package/dist/packages/_es/CalendarItem.js +2 -1
  17. package/dist/packages/_es/Card.js +10 -107
  18. package/dist/packages/_es/Cascader.js +147 -523
  19. package/dist/packages/_es/Category.js +15 -58
  20. package/dist/packages/_es/CategoryPane.js +11 -111
  21. package/dist/packages/_es/Cell.js +21 -100
  22. package/dist/packages/_es/CellGroup.js +9 -44
  23. package/dist/packages/_es/Checkbox.js +31 -113
  24. package/dist/packages/_es/CheckboxGroup.js +29 -58
  25. package/dist/packages/_es/CircleProgress.js +28 -151
  26. package/dist/packages/_es/Col.js +14 -56
  27. package/dist/packages/_es/Collapse.js +32 -84
  28. package/dist/packages/_es/CollapseItem.js +59 -272
  29. package/dist/packages/_es/Comment.js +64 -434
  30. package/dist/packages/_es/ConfigProvider.js +13 -0
  31. package/dist/packages/_es/CountDown.js +56 -256
  32. package/dist/packages/_es/CountUp.js +140 -556
  33. package/dist/packages/_es/DatePicker.js +98 -332
  34. package/dist/packages/_es/Dialog.js +60 -271
  35. package/dist/packages/_es/Divider.js +13 -82
  36. package/dist/packages/_es/Drag.js +56 -197
  37. package/dist/packages/_es/Ecard.js +24 -159
  38. package/dist/packages/_es/Elevator.js +58 -212
  39. package/dist/packages/_es/Ellipsis.js +64 -0
  40. package/dist/packages/_es/Empty.js +12 -71
  41. package/dist/packages/_es/FixedNav.js +15 -122
  42. package/dist/packages/_es/Form.js +64 -151
  43. package/dist/packages/_es/FormItem.js +15 -110
  44. package/dist/packages/_es/Grid.js +5 -6
  45. package/dist/packages/_es/GridItem.js +33 -144
  46. package/dist/packages/_es/Icon.js +15 -40
  47. package/dist/packages/_es/Image.js +31 -0
  48. package/dist/packages/_es/ImagePreview.js +77 -309
  49. package/dist/packages/_es/Indicator.js +15 -62
  50. package/dist/packages/_es/InfiniteLoading.js +57 -268
  51. package/dist/packages/_es/Input.js +51 -413
  52. package/dist/packages/_es/InputNumber.js +41 -160
  53. package/dist/packages/_es/Layout.js +4 -5
  54. package/dist/packages/_es/List.js +18 -124
  55. package/dist/packages/_es/Menu.js +45 -118
  56. package/dist/packages/_es/MenuItem.js +37 -162
  57. package/dist/packages/_es/Navbar.js +30 -192
  58. package/dist/packages/_es/NoticeBar.js +74 -397
  59. package/dist/packages/_es/Notify.js +72 -246
  60. package/dist/packages/_es/NumberKeyboard.js +41 -272
  61. package/dist/packages/_es/OldPicker.js +131 -474
  62. package/dist/packages/_es/OverLay.js +24 -113
  63. package/dist/packages/_es/Pagination.js +39 -157
  64. package/dist/packages/_es/Picker.js +129 -469
  65. package/dist/packages/_es/Popover.js +318 -975
  66. package/dist/packages/_es/Popup.js +55 -313
  67. package/dist/packages/_es/Price.js +16 -118
  68. package/dist/packages/_es/Progress.js +14 -146
  69. package/dist/packages/_es/PullRefresh.js +84 -354
  70. package/dist/packages/_es/Radio.js +22 -90
  71. package/dist/packages/_es/RadioGroup.js +8 -37
  72. package/dist/packages/_es/Range.js +83 -427
  73. package/dist/packages/_es/Rate.js +35 -137
  74. package/dist/packages/_es/Row.js +22 -64
  75. package/dist/packages/_es/SearchBar.js +37 -257
  76. package/dist/packages/_es/ShortPassword.js +35 -225
  77. package/dist/packages/_es/SideNavBar.js +24 -99
  78. package/dist/packages/_es/SideNavBarItem.js +11 -46
  79. package/dist/packages/_es/Signature.js +41 -179
  80. package/dist/packages/_es/Skeleton.js +20 -136
  81. package/dist/packages/_es/Sku.js +84 -509
  82. package/dist/packages/_es/Step.js +20 -133
  83. package/dist/packages/_es/Steps.js +18 -53
  84. package/dist/packages/_es/Sticky.js +53 -138
  85. package/dist/packages/_es/SubSideNavBar.js +17 -100
  86. package/dist/packages/_es/Swipe.js +41 -197
  87. package/dist/packages/_es/Swiper.js +121 -433
  88. package/dist/packages/_es/SwiperItem.js +22 -53
  89. package/dist/packages/_es/Switch.js +21 -116
  90. package/dist/packages/_es/TabPane.js +12 -39
  91. package/dist/packages/_es/Tabbar.js +17 -72
  92. package/dist/packages/_es/TabbarItem.js +29 -151
  93. package/dist/packages/_es/Table.js +18 -196
  94. package/dist/packages/_es/Tabs.js +43 -217
  95. package/dist/packages/_es/Tag.js +20 -97
  96. package/dist/packages/_es/TextArea.js +42 -160
  97. package/dist/packages/_es/TimeDetail.js +18 -98
  98. package/dist/packages/_es/TimePannel.js +14 -66
  99. package/dist/packages/_es/TimeSelect.js +15 -103
  100. package/dist/packages/_es/Toast.js +71 -329
  101. package/dist/packages/_es/Uploader.js +104 -468
  102. package/dist/packages/_es/Video.js +74 -350
  103. package/dist/packages/_es/common.js +38 -128
  104. package/dist/packages/_es/component.js +35 -76
  105. package/dist/packages/_es/index.js +5 -6
  106. package/dist/packages/_es/index2.js +9 -30
  107. package/dist/packages/_es/index3.js +6 -8
  108. package/dist/packages/_es/index4.js +13 -58
  109. package/dist/packages/_es/index5.js +164 -682
  110. package/dist/packages/_es/plugin-vue_export-helper.js +7 -8
  111. package/dist/packages/_es/pxCheck.js +3 -5
  112. package/dist/packages/_es/raf.js +8 -15
  113. package/dist/packages/animate/index.scss +299 -0
  114. package/dist/packages/button/index.scss +2 -1
  115. package/dist/packages/cell/index.scss +18 -1
  116. package/dist/packages/checkbox/index.scss +16 -0
  117. package/dist/packages/configprovider/index.scss +2 -0
  118. package/dist/packages/dialog/index.scss +1 -0
  119. package/dist/packages/elevator/index.scss +21 -0
  120. package/dist/packages/ellipsis/index.scss +12 -0
  121. package/dist/packages/formitem/index.scss +12 -0
  122. package/dist/packages/griditem/index.scss +11 -0
  123. package/dist/packages/image/index.scss +39 -0
  124. package/dist/packages/imagepreview/index.scss +21 -2
  125. package/dist/packages/input/index.scss +26 -1
  126. package/dist/packages/inputnumber/index.scss +21 -0
  127. package/dist/packages/locale/lang/baseLang.d.ts +1 -0
  128. package/dist/packages/locale/lang/baseLang.js +3 -3
  129. package/dist/packages/locale/lang/en-US.d.ts +8 -0
  130. package/dist/packages/locale/lang/en-US.js +5 -97
  131. package/dist/packages/locale/lang/id-ID.d.ts +8 -0
  132. package/dist/packages/locale/lang/id-ID.js +5 -97
  133. package/dist/packages/locale/lang/index.js +16 -38
  134. package/dist/packages/locale/lang/zh-CN.d.ts +8 -0
  135. package/dist/packages/locale/lang/zh-CN.js +5 -97
  136. package/dist/packages/locale/lang/zh-TW.d.ts +8 -0
  137. package/dist/packages/locale/lang/zh-TW.js +5 -97
  138. package/dist/packages/menu/index.scss +45 -36
  139. package/dist/packages/menuitem/index.scss +4 -0
  140. package/dist/packages/navbar/index.scss +9 -0
  141. package/dist/packages/pagination/index.scss +19 -0
  142. package/dist/packages/radio/index.scss +19 -0
  143. package/dist/packages/range/index.scss +19 -0
  144. package/dist/packages/rate/index.scss +1 -1
  145. package/dist/packages/searchbar/index.scss +21 -0
  146. package/dist/packages/switch/index.scss +4 -3
  147. package/dist/packages/tabbar/index.scss +5 -0
  148. package/dist/packages/tabbaritem/index.scss +7 -0
  149. package/dist/packages/tabpane/index.scss +6 -0
  150. package/dist/packages/tabs/index.scss +22 -0
  151. package/dist/packages/textarea/index.scss +8 -0
  152. package/dist/smartips/attributes.json +192 -12
  153. package/dist/smartips/tags.json +70 -10
  154. package/dist/smartips/web-types.json +6945 -0
  155. package/dist/style.css +1 -1
  156. package/dist/style.es.js +1 -1
  157. package/dist/styles/font/config.json +3 -1
  158. package/dist/styles/font/demo_index.html +49 -3
  159. package/dist/styles/font/iconfont.css +11 -3
  160. package/dist/styles/font/iconfont.js +15 -15
  161. package/dist/styles/font/iconfont.json +14 -0
  162. package/dist/styles/font/iconfont.ttf +0 -0
  163. package/dist/styles/font/iconfont.woff +0 -0
  164. package/dist/styles/font/iconfont.woff2 +0 -0
  165. package/dist/styles/themes/default.scss +54 -50
  166. package/dist/styles/themes/jdb.scss +54 -50
  167. package/dist/styles/themes/jdt.scss +54 -50
  168. package/dist/styles/variables-jdb.scss +19 -1
  169. package/dist/styles/variables-jdt.scss +19 -1
  170. package/dist/styles/variables.scss +22 -1
  171. package/dist/types/__VUE/address/index.vue.d.ts +2 -2
  172. package/dist/types/__VUE/addresslist/components/ItemContents.vue.d.ts +1 -0
  173. package/dist/types/__VUE/animate/index.vue.d.ts +48 -0
  174. package/dist/types/__VUE/animate/type.d.ts +6 -0
  175. package/dist/types/__VUE/audiooperate/index.vue.d.ts +1 -0
  176. package/dist/types/__VUE/avatar/index.vue.d.ts +7 -7
  177. package/dist/types/__VUE/backtop/index.vue.d.ts +2 -2
  178. package/dist/types/__VUE/badge/index.vue.d.ts +2 -2
  179. package/dist/types/__VUE/button/index.vue.d.ts +2 -2
  180. package/dist/types/__VUE/calendaritem/index.vue.d.ts +10 -2
  181. package/dist/types/__VUE/cell/index.vue.d.ts +13 -6
  182. package/dist/types/__VUE/checkbox/common.d.ts +59 -0
  183. package/dist/types/__VUE/checkbox/index.vue.d.ts +20 -7
  184. package/dist/types/__VUE/checkboxgroup/index.vue.d.ts +7 -0
  185. package/dist/types/__VUE/circleprogress/index.vue.d.ts +2 -2
  186. package/dist/types/__VUE/collapse/index.vue.d.ts +5 -3
  187. package/dist/types/__VUE/collapseitem/index.vue.d.ts +2 -2
  188. package/dist/types/__VUE/configprovider/common.d.ts +20 -0
  189. package/dist/types/__VUE/configprovider/index.vue.d.ts +33 -0
  190. package/dist/types/__VUE/datepicker/index.vue.d.ts +5 -5
  191. package/dist/types/__VUE/datepicker/type.d.ts +6 -0
  192. package/dist/types/__VUE/dialog/index.d.ts +9 -2
  193. package/dist/types/__VUE/dialog/index.vue.d.ts +26 -17
  194. package/dist/types/__VUE/ecard/index.vue.d.ts +3 -3
  195. package/dist/types/__VUE/elevator/index.vue.d.ts +29 -0
  196. package/dist/types/__VUE/ellipsis/index.vue.d.ts +72 -0
  197. package/dist/types/__VUE/empty/index.vue.d.ts +2 -2
  198. package/dist/types/__VUE/formitem/index.vue.d.ts +3 -10
  199. package/dist/types/__VUE/grid/common.d.ts +3 -3
  200. package/dist/types/__VUE/grid/index.vue.d.ts +5 -5
  201. package/dist/types/__VUE/griditem/index.vue.d.ts +1 -1
  202. package/dist/types/__VUE/image/index.vue.d.ts +105 -0
  203. package/dist/types/__VUE/image/type.d.ts +6 -0
  204. package/dist/types/__VUE/imagepreview/index.vue.d.ts +36 -2
  205. package/dist/types/__VUE/infiniteloading/index.vue.d.ts +6 -6
  206. package/dist/types/__VUE/input/index.vue.d.ts +4 -4
  207. package/dist/types/__VUE/menu/index.vue.d.ts +29 -2
  208. package/dist/types/__VUE/menuitem/index.vue.d.ts +16 -7
  209. package/dist/types/__VUE/menuitem/type.d.ts +8 -0
  210. package/dist/types/__VUE/noticebar/index.vue.d.ts +3 -3
  211. package/dist/types/__VUE/picker/Column.vue.d.ts +1 -1
  212. package/dist/types/__VUE/picker/index.vue.d.ts +1 -1
  213. package/dist/types/__VUE/popover/index.vue.d.ts +2 -2
  214. package/dist/types/__VUE/range/index.vue.d.ts +1 -1
  215. package/dist/types/__VUE/rate/common.d.ts +149 -0
  216. package/dist/types/__VUE/rate/index.vue.d.ts +17 -7
  217. package/dist/types/__VUE/searchbar/index.vue.d.ts +2 -2
  218. package/dist/types/__VUE/skeleton/common.d.ts +2 -4
  219. package/dist/types/__VUE/step/index.vue.d.ts +2 -2
  220. package/dist/types/__VUE/swiper/index.vue.d.ts +4 -4
  221. package/dist/types/__VUE/switch/index.vue.d.ts +2 -2
  222. package/dist/types/__VUE/tabbaritem/index.vue.d.ts +2 -2
  223. package/dist/types/__VUE/tabs/common.d.ts +2 -2
  224. package/dist/types/__VUE/textarea/index.vue.d.ts +2 -2
  225. package/dist/types/__VUE/timeselect/index.vue.d.ts +8 -0
  226. package/dist/types/__VUE/toast/index.vue.d.ts +2 -2
  227. package/dist/types/__VUE/uploader/index.vue.d.ts +4 -4
  228. package/dist/types/__VUE/uploader/type.d.ts +2 -1
  229. package/dist/types/__VUE/uploader/uploader.d.ts +1 -0
  230. package/dist/types/__VUE/video/index.vue.d.ts +1 -1
  231. package/dist/types/index.d.ts +1 -1
  232. package/dist/types/nutui.d.ts +5 -1
  233. package/package.json +7 -3
@@ -1,165 +1,46 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.21 Mon May 30 2022 20:20:01 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.22-beta.5 Fri Jun 24 2022 15:10:09 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
- import { computed, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, createVNode, createElementVNode } from "vue";
7
- import { c as createComponent } from "./component.js";
8
- import { p as pxCheck } from "./pxCheck.js";
9
- import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
6
+ import { computed as e, resolveComponent as u, openBlock as l, createElementBlock as t, normalizeClass as a, normalizeStyle as n, createVNode as r, createElementVNode as d } from "vue";
7
+ import { c as i } from "./component.js";
8
+ import { p as m } from "./pxCheck.js";
9
+ import { _ as o } from "./plugin-vue_export-helper.js";
10
10
  import "../locale/lang";
11
- const { componentName, create } = createComponent("inputnumber");
12
- const _sfc_main = create({
13
- props: {
14
- modelValue: {
15
- type: [Number, String],
16
- default: 0
17
- },
18
- inputWidth: {
19
- type: [Number, String],
20
- default: ""
21
- },
22
- buttonSize: {
23
- type: [Number, String],
24
- default: ""
25
- },
26
- min: {
27
- type: [Number, String],
28
- default: 1
29
- },
30
- max: {
31
- type: [Number, String],
32
- default: 9999
33
- },
34
- step: {
35
- type: [Number, String],
36
- default: 1
37
- },
38
- decimalPlaces: {
39
- type: [Number, String],
40
- default: 0
41
- },
42
- disabled: {
43
- type: Boolean,
44
- default: false
45
- },
46
- readonly: {
47
- type: Boolean,
48
- default: false
49
- }
50
- },
51
- emits: ["update:modelValue", "change", "blur", "focus", "reduce", "add", "overlimit"],
52
- setup(props, { emit }) {
53
- const classes = computed(() => {
54
- const prefixCls = componentName;
55
- return {
56
- [prefixCls]: true,
57
- [`${prefixCls}--disabled`]: props.disabled
58
- };
59
- });
60
- const fixedDecimalPlaces = (v) => {
61
- return Number(v).toFixed(Number(props.decimalPlaces));
62
- };
63
- const change = (event) => {
64
- const input = event.target;
65
- emit("update:modelValue", input.valueAsNumber, event);
66
- };
67
- const emitChange = (value, event) => {
68
- let output_value = fixedDecimalPlaces(value);
69
- emit("update:modelValue", output_value, event);
70
- emit("change", output_value, event);
71
- };
72
- const addAllow = (value = Number(props.modelValue)) => {
73
- return value < Number(props.max) && !props.disabled;
74
- };
75
- const reduceAllow = (value = Number(props.modelValue)) => {
76
- return value > Number(props.min) && !props.disabled;
77
- };
78
- const reduce = (event) => {
79
- emit("reduce", event);
80
- if (reduceAllow()) {
81
- let output_value = Number(props.modelValue) - Number(props.step);
82
- emitChange(output_value, event);
83
- } else {
84
- emit("overlimit", event, "reduce");
85
- }
86
- };
87
- const add = (event) => {
88
- emit("add", event);
89
- if (addAllow()) {
90
- let output_value = Number(props.modelValue) + Number(props.step);
91
- emitChange(output_value, event);
92
- } else {
93
- emit("overlimit", event, "add");
94
- }
95
- };
96
- const focus = (event) => {
97
- if (props.disabled)
98
- return;
99
- if (props.readonly)
100
- return;
101
- emit("focus", event);
102
- };
103
- const blur = (event) => {
104
- if (props.disabled)
105
- return;
106
- if (props.readonly)
107
- return;
108
- const input = event.target;
109
- let value = input.valueAsNumber;
110
- if (value < Number(props.min)) {
111
- value = Number(props.min);
112
- } else if (value > Number(props.max)) {
113
- value = Number(props.max);
114
- }
115
- emitChange(value, event);
116
- emit("blur", event);
117
- };
118
- return {
119
- classes,
120
- change,
121
- blur,
122
- focus,
123
- add,
124
- addAllow,
125
- reduce,
126
- reduceAllow,
127
- pxCheck
128
- };
129
- }
130
- });
131
- const _hoisted_1 = ["min", "max", "disabled", "readonly", "value"];
132
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
133
- const _component_nut_icon = resolveComponent("nut-icon");
134
- return openBlock(), createElementBlock("view", {
135
- class: normalizeClass(_ctx.classes),
136
- style: normalizeStyle({ height: _ctx.pxCheck(_ctx.buttonSize) })
137
- }, [
138
- createVNode(_component_nut_icon, {
139
- name: "minus",
140
- class: normalizeClass(["nut-inputnumber__icon", { "nut-inputnumber__icon--disabled": !_ctx.reduceAllow() }]),
141
- size: _ctx.buttonSize,
142
- onClick: _ctx.reduce
143
- }, null, 8, ["class", "size", "onClick"]),
144
- createElementVNode("input", {
145
- type: "number",
146
- min: _ctx.min,
147
- max: _ctx.max,
148
- style: normalizeStyle({ width: _ctx.pxCheck(_ctx.inputWidth) }),
149
- disabled: _ctx.disabled,
150
- readonly: _ctx.readonly,
151
- value: _ctx.modelValue,
152
- onInput: _cache[0] || (_cache[0] = (...args) => _ctx.change && _ctx.change(...args)),
153
- onBlur: _cache[1] || (_cache[1] = (...args) => _ctx.blur && _ctx.blur(...args)),
154
- onFocus: _cache[2] || (_cache[2] = (...args) => _ctx.focus && _ctx.focus(...args))
155
- }, null, 44, _hoisted_1),
156
- createVNode(_component_nut_icon, {
157
- name: "plus",
158
- class: normalizeClass(["nut-inputnumber__icon", { "nut-inputnumber__icon--disabled": !_ctx.addAllow() }]),
159
- size: _ctx.buttonSize,
160
- onClick: _ctx.add
161
- }, null, 8, ["class", "size", "onClick"])
162
- ], 6);
163
- }
164
- var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
165
- export { index as default };
11
+ const { componentName: s, create: c } = i("inputnumber"), b = c({ props: { modelValue: { type: [Number, String], default: 0 }, inputWidth: { type: [Number, String], default: "" }, buttonSize: { type: [Number, String], default: "" }, min: { type: [Number, String], default: 1 }, max: { type: [Number, String], default: 9999 }, step: { type: [Number, String], default: 1 }, decimalPlaces: { type: [Number, String], default: 0 }, disabled: { type: Boolean, default: false }, readonly: { type: Boolean, default: false } }, emits: ["update:modelValue", "change", "blur", "focus", "reduce", "add", "overlimit"], setup(u2, { emit: l2 }) {
12
+ const t2 = e(() => ({ [s]: true, [`${s}--disabled`]: u2.disabled })), a2 = (e2, t3) => {
13
+ let a3 = Number(e2).toFixed(Number(u2.decimalPlaces));
14
+ l2("update:modelValue", a3, t3), l2("change", a3, t3);
15
+ }, n2 = (e2 = Number(u2.modelValue)) => e2 < Number(u2.max) && !u2.disabled, r2 = (e2 = Number(u2.modelValue)) => e2 > Number(u2.min) && !u2.disabled;
16
+ return { classes: t2, change: (e2) => {
17
+ const u3 = e2.target;
18
+ l2("update:modelValue", u3.valueAsNumber, e2);
19
+ }, blur: (e2) => {
20
+ if (u2.disabled)
21
+ return;
22
+ if (u2.readonly)
23
+ return;
24
+ let t3 = e2.target.valueAsNumber;
25
+ t3 < Number(u2.min) ? t3 = Number(u2.min) : t3 > Number(u2.max) && (t3 = Number(u2.max)), a2(t3, e2), l2("blur", e2);
26
+ }, focus: (e2) => {
27
+ u2.disabled || u2.readonly || l2("focus", e2);
28
+ }, add: (e2) => {
29
+ if (l2("add", e2), n2()) {
30
+ let l3 = Number(u2.modelValue) + Number(u2.step);
31
+ a2(l3, e2);
32
+ } else
33
+ l2("overlimit", e2, "add");
34
+ }, addAllow: n2, reduce: (e2) => {
35
+ if (l2("reduce", e2), r2()) {
36
+ let l3 = Number(u2.modelValue) - Number(u2.step);
37
+ a2(l3, e2);
38
+ } else
39
+ l2("overlimit", e2, "reduce");
40
+ }, reduceAllow: r2, pxCheck: m };
41
+ } }), p = ["min", "max", "disabled", "readonly", "value"];
42
+ var f = o(b, [["render", function(e2, i2, m2, o2, s2, c2) {
43
+ const b2 = u("nut-icon");
44
+ return l(), t("view", { class: a(e2.classes), style: n({ height: e2.pxCheck(e2.buttonSize) }) }, [r(b2, { name: "minus", class: a(["nut-inputnumber__icon", { "nut-inputnumber__icon--disabled": !e2.reduceAllow() }]), size: e2.buttonSize, onClick: e2.reduce }, null, 8, ["class", "size", "onClick"]), d("input", { type: "number", min: e2.min, max: e2.max, style: n({ width: e2.pxCheck(e2.inputWidth) }), disabled: e2.disabled, readonly: e2.readonly, value: e2.modelValue, onInput: i2[0] || (i2[0] = (...u2) => e2.change && e2.change(...u2)), onBlur: i2[1] || (i2[1] = (...u2) => e2.blur && e2.blur(...u2)), onFocus: i2[2] || (i2[2] = (...u2) => e2.focus && e2.focus(...u2)) }, null, 44, p), r(b2, { name: "plus", class: a(["nut-inputnumber__icon", { "nut-inputnumber__icon--disabled": !e2.addAllow() }]), size: e2.buttonSize, onClick: e2.add }, null, 8, ["class", "size", "onClick"])], 6);
45
+ }]]);
46
+ export { f as default };
@@ -1,11 +1,10 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.21 Mon May 30 2022 20:20:01 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.22-beta.5 Fri Jun 24 2022 15:10:09 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
- import { c as createComponent } from "./component.js";
6
+ import { c as o } from "./component.js";
7
7
  import "vue";
8
8
  import "../locale/lang";
9
- const { create } = createComponent("layout");
10
- const _sfc_main = create({});
11
- export { _sfc_main as default };
9
+ const { create: t } = o("layout"), a = t({});
10
+ export { a as default };
@@ -1,129 +1,23 @@
1
- var __defProp = Object.defineProperty;
2
- var __defProps = Object.defineProperties;
3
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
- var __spreadValues = (a, b) => {
9
- for (var prop in b || (b = {}))
10
- if (__hasOwnProp.call(b, prop))
11
- __defNormalProp(a, prop, b[prop]);
12
- if (__getOwnPropSymbols)
13
- for (var prop of __getOwnPropSymbols(b)) {
14
- if (__propIsEnum.call(b, prop))
15
- __defNormalProp(a, prop, b[prop]);
16
- }
17
- return a;
18
- };
19
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
1
  /*!
21
- * @nutui/nutui v3.1.21 Mon May 30 2022 20:20:01 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.22-beta.5 Fri Jun 24 2022 15:10:09 GMT+0800 (中国标准时间)
22
3
  * (c) 2022 @jdf2e.
23
4
  * Released under the MIT License.
24
5
  */
25
- import { ref, reactive, computed, watch, toRefs, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle, Fragment, renderList, renderSlot } from "vue";
26
- import { c as createComponent } from "./component.js";
27
- import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
6
+ import { ref as t, reactive as e, computed as l, watch as s, toRefs as i, openBlock as a, createElementBlock as r, normalizeClass as n, createElementVNode as o, normalizeStyle as c, Fragment as h, renderList as m, renderSlot as u } from "vue";
7
+ import { c as g } from "./component.js";
8
+ import { _ as p } from "./plugin-vue_export-helper.js";
28
9
  import "../locale/lang";
29
- const { componentName, create } = createComponent("list");
30
- const _sfc_main = create({
31
- props: {
32
- height: {
33
- type: [Number],
34
- default: 50
35
- },
36
- listData: {
37
- type: Array,
38
- default: () => {
39
- return [];
40
- }
41
- },
42
- containerHeight: {
43
- type: [Number],
44
- default: document.documentElement.clientHeight || document.body.clientHeight || 667
45
- }
46
- },
47
- emits: ["scroll", "scroll-bottom"],
48
- setup(props, { emit }) {
49
- const list = ref(null);
50
- const state = reactive({
51
- startOffset: 0,
52
- start: 0,
53
- list: props.listData.slice()
54
- });
55
- const visibleCount = computed(() => {
56
- return Math.ceil(props.containerHeight / props.height);
57
- });
58
- const end = computed(() => {
59
- return state.start + visibleCount.value;
60
- });
61
- const getTransform = computed(() => {
62
- return `translate3d(0, ${state.startOffset}px, 0)`;
63
- });
64
- const classes = computed(() => {
65
- const prefixCls = componentName;
66
- return {
67
- [prefixCls]: true
68
- };
69
- });
70
- const listHeight = computed(() => {
71
- return state.list.length * props.height;
72
- });
73
- const visibleData = computed(() => {
74
- return state.list.slice(state.start, Math.min(end.value, state.list.length));
75
- });
76
- const handleScrollEvent = () => {
77
- var _a;
78
- const scrollTop = (_a = list.value) == null ? void 0 : _a.scrollTop;
79
- state.start = Math.floor(scrollTop / props.height);
80
- if (end.value > state.list.length) {
81
- emit("scroll");
82
- emit("scroll-bottom");
83
- }
84
- state.startOffset = scrollTop - scrollTop % props.height;
85
- };
86
- watch(() => props.listData, () => {
87
- state.list = props.listData.slice();
88
- });
89
- return __spreadProps(__spreadValues({}, toRefs(state)), {
90
- list,
91
- getTransform,
92
- listHeight,
93
- visibleData,
94
- classes,
95
- handleScrollEvent
96
- });
97
- }
98
- });
99
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
100
- return openBlock(), createElementBlock("view", {
101
- class: normalizeClass(_ctx.classes),
102
- onScrollPassive: _cache[0] || (_cache[0] = (...args) => _ctx.handleScrollEvent && _ctx.handleScrollEvent(...args)),
103
- ref: "list"
104
- }, [
105
- createElementVNode("div", {
106
- class: "nut-list-phantom",
107
- style: normalizeStyle({ height: _ctx.listHeight + "px" })
108
- }, null, 4),
109
- createElementVNode("div", {
110
- class: "nut-list-container",
111
- style: normalizeStyle({ transform: _ctx.getTransform })
112
- }, [
113
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.visibleData, (item, index2) => {
114
- return openBlock(), createElementBlock("div", {
115
- class: "nut-list-item",
116
- style: normalizeStyle({ height: _ctx.height + "px" }),
117
- key: item
118
- }, [
119
- renderSlot(_ctx.$slots, "default", {
120
- item,
121
- index: index2
122
- })
123
- ], 4);
124
- }), 128))
125
- ], 4)
126
- ], 34);
127
- }
128
- var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
129
- export { index as default };
10
+ const { componentName: f, create: d } = g("list");
11
+ var v = p(d({ props: { height: { type: [Number], default: 50 }, listData: { type: Array, default: () => [] }, containerHeight: { type: [Number], default: document.documentElement.clientHeight || document.body.clientHeight || 667 } }, emits: ["scroll", "scroll-bottom"], setup(a2, { emit: r2 }) {
12
+ const n2 = t(null), o2 = e({ startOffset: 0, start: 0, list: a2.listData.slice() }), c2 = l(() => Math.ceil(a2.containerHeight / a2.height)), h2 = l(() => o2.start + c2.value), m2 = l(() => `translate3d(0, ${o2.startOffset}px, 0)`), u2 = l(() => ({ [f]: true })), g2 = l(() => o2.list.length * a2.height), p2 = l(() => o2.list.slice(o2.start, Math.min(h2.value, o2.list.length)));
13
+ return s(() => a2.listData, () => {
14
+ o2.list = a2.listData.slice();
15
+ }), { ...i(o2), list: n2, getTransform: m2, listHeight: g2, visibleData: p2, classes: u2, handleScrollEvent: () => {
16
+ var _a;
17
+ const t2 = (_a = n2.value) == null ? void 0 : _a.scrollTop;
18
+ o2.start = Math.floor(t2 / a2.height), h2.value > o2.list.length && (r2("scroll"), r2("scroll-bottom")), o2.startOffset = t2 - t2 % a2.height;
19
+ } };
20
+ } }), [["render", function(t2, e2, l2, s2, i2, g2) {
21
+ return a(), r("view", { class: n(t2.classes), onScrollPassive: e2[0] || (e2[0] = (...e3) => t2.handleScrollEvent && t2.handleScrollEvent(...e3)), ref: "list" }, [o("div", { class: "nut-list-phantom", style: c({ height: t2.listHeight + "px" }) }, null, 4), o("div", { class: "nut-list-container", style: c({ transform: t2.getTransform }) }, [(a(true), r(h, null, m(t2.visibleData, (e3, l3) => (a(), r("div", { class: "nut-list-item", style: c({ height: t2.height + "px" }), key: e3 }, [u(t2.$slots, "default", { item: e3, index: l3 })], 4))), 128))], 4)], 34);
22
+ }]]);
23
+ export { v as default };
@@ -1,124 +1,51 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.21 Mon May 30 2022 20:20:01 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.22-beta.5 Fri Jun 24 2022 15:10:09 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
- import { ref, computed, reactive, provide, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, Fragment, renderList, normalizeStyle, toDisplayString, createVNode, renderSlot } from "vue";
7
- import { c as createComponent } from "./component.js";
8
- import { u as useRect } from "./index2.js";
9
- import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
6
+ import { ref as e, computed as t, onMounted as o, onUnmounted as l, reactive as n, provide as s, resolveComponent as r, openBlock as i, createElementBlock as a, normalizeClass as c, createElementVNode as u, Fragment as d, renderList as p, normalizeStyle as m, toDisplayString as f, createVNode as v, renderSlot as w } from "vue";
7
+ import { c as g } from "./component.js";
8
+ import { u as h } from "./index2.js";
9
+ import { _ as y } from "./plugin-vue_export-helper.js";
10
10
  import "../locale/lang";
11
- const { componentName, create } = createComponent("menu");
12
- const _sfc_main = create({
13
- props: {
14
- activeColor: {
15
- type: String,
16
- default: ""
17
- },
18
- overlay: {
19
- type: Boolean,
20
- default: true
21
- },
22
- duration: {
23
- type: [Number, String],
24
- default: 0
25
- },
26
- closeOnClickOverlay: {
27
- type: Boolean,
28
- default: true
29
- }
30
- },
31
- setup(props, { emit, slots }) {
32
- const barRef = ref();
33
- const offset = ref(0);
34
- const useChildren = () => {
35
- const publicChildren = reactive([]);
36
- const internalChildren = reactive([]);
37
- const linkChildren2 = (value) => {
38
- const link = (child) => {
39
- if (child.proxy) {
40
- internalChildren.push(child);
41
- publicChildren.push(child.proxy);
42
- }
43
- };
44
- provide("menuParent", Object.assign({
45
- link,
46
- children: publicChildren,
47
- internalChildren
48
- }, value));
49
- };
50
- return {
51
- children: publicChildren,
52
- linkChildren: linkChildren2
53
- };
54
- };
55
- const { children, linkChildren } = useChildren();
56
- const opened = computed(() => children.some((item) => item.state.showWrapper));
57
- const classes = computed(() => {
58
- const prefixCls = componentName;
59
- return {
60
- [prefixCls]: true
61
- };
62
- });
63
- const updateOffset = () => {
64
- if (barRef.value) {
65
- const rect = useRect(barRef);
66
- offset.value = rect.bottom;
67
- }
68
- };
69
- linkChildren({ props, offset });
70
- const toggleItem = (active) => {
71
- children.forEach((item, index2) => {
72
- if (index2 === active) {
73
- updateOffset();
74
- item.toggle();
75
- } else if (item.state.showPopup) {
76
- item.toggle(false, { immediate: true });
11
+ const { componentName: b, create: x } = g("menu"), C = x({ props: { activeColor: { type: String, default: "" }, overlay: { type: Boolean, default: true }, lockScroll: { type: Boolean, default: true }, duration: { type: [Number, String], default: 0 }, closeOnClickOverlay: { type: Boolean, default: true }, direction: { type: String, default: "down" }, scrollFixed: { type: [Boolean, String, Number], default: false }, titleClass: [String] }, setup(r2, { emit: i2, slots: a2 }) {
12
+ const c2 = e(), u2 = e(0), d2 = e(false), { children: p2, linkChildren: m2 } = (() => {
13
+ const e2 = n([]), t2 = n([]);
14
+ return { children: e2, linkChildren: (o2) => {
15
+ s("menuParent", Object.assign({ link: (o3) => {
16
+ o3.proxy && (t2.push(o3), e2.push(o3.proxy));
17
+ }, children: e2, internalChildren: t2 }, o2));
18
+ } };
19
+ })(), f2 = t(() => p2.some((e2) => e2.state.showWrapper)), v2 = t(() => ({ [b]: true, "scroll-fixed": d2.value }));
20
+ m2({ props: r2, offset: u2 });
21
+ const w2 = () => {
22
+ const { scrollFixed: e2 } = r2, t2 = (o2 = window, Math.max(0, "scrollTop" in o2 ? o2.scrollTop : o2.pageYOffset));
23
+ var o2;
24
+ d2.value = t2 > (typeof e2 == "boolean" ? 30 : Number(e2));
25
+ };
26
+ return o(() => {
27
+ const { scrollFixed: e2 } = r2;
28
+ e2 && window.addEventListener("scroll", w2);
29
+ }), l(() => {
30
+ const { scrollFixed: e2 } = r2;
31
+ e2 && window.removeEventListener("scroll", w2);
32
+ }), { toggleItem: (e2) => {
33
+ p2.forEach((t2, o2) => {
34
+ o2 === e2 ? ((() => {
35
+ if (c2.value) {
36
+ const e3 = h(c2);
37
+ r2.direction === "down" ? u2.value = e3.bottom : u2.value = window.innerHeight - e3.top;
77
38
  }
78
- });
79
- };
80
- return {
81
- toggleItem,
82
- children,
83
- opened,
84
- classes,
85
- barRef
86
- };
87
- }
88
- });
89
- const _hoisted_1 = ["onClick"];
90
- const _hoisted_2 = { class: "nut-menu__title-text" };
91
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
92
- const _component_nut_icon = resolveComponent("nut-icon");
93
- return openBlock(), createElementBlock("view", {
94
- class: normalizeClass(_ctx.classes)
95
- }, [
96
- createElementVNode("view", {
97
- class: normalizeClass(["nut-menu__bar", { opened: _ctx.opened }]),
98
- ref: "barRef"
99
- }, [
100
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.children, (item, index2) => {
101
- return openBlock(), createElementBlock("view", {
102
- key: index2,
103
- class: normalizeClass(["nut-menu__item", { disabled: item.disabled, active: item.state.showPopup }]),
104
- onClick: ($event) => !item.disabled && _ctx.toggleItem(index2),
105
- style: normalizeStyle({ color: item.state.showPopup ? _ctx.activeColor : "" })
106
- }, [
107
- createElementVNode("view", {
108
- class: normalizeClass(["nut-menu__title", { active: item.state.showPopup }])
109
- }, [
110
- createElementVNode("view", _hoisted_2, toDisplayString(item.renderTitle()), 1),
111
- createVNode(_component_nut_icon, {
112
- name: item.titleIcon,
113
- size: "10",
114
- class: "nut-menu__title-icon"
115
- }, null, 8, ["name"])
116
- ], 2)
117
- ], 14, _hoisted_1);
118
- }), 128))
119
- ], 2),
120
- renderSlot(_ctx.$slots, "default")
121
- ], 2);
122
- }
123
- var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
124
- export { index as default };
39
+ })(), t2.toggle()) : t2.state.showPopup && t2.toggle(false, { immediate: true });
40
+ });
41
+ }, children: p2, opened: f2, classes: v2, barRef: c2, getClasses: (e2) => {
42
+ let t2 = "";
43
+ const { titleClass: o2 } = r2;
44
+ return e2 && (t2 += "active"), o2 && (t2 += ` ${o2}`), t2;
45
+ } };
46
+ } }), _ = ["onClick"], k = { class: "nut-menu__title-text" };
47
+ var S = y(C, [["render", function(e2, t2, o2, l2, n2, s2) {
48
+ const g2 = r("nut-icon");
49
+ return i(), a("view", { class: c(e2.classes) }, [u("view", { class: c(["nut-menu__bar", { opened: e2.opened }]), ref: "barRef" }, [(i(true), a(d, null, p(e2.children, (t3, o3) => (i(), a("view", { key: o3, class: c(["nut-menu__item", { disabled: t3.disabled, active: t3.state.showPopup }]), onClick: (l3) => !t3.disabled && e2.toggleItem(o3), style: m({ color: t3.state.showPopup ? e2.activeColor : "" }) }, [u("view", { class: c(["nut-menu__title", e2.getClasses(t3.state.showPopup)]) }, [u("view", k, f(t3.renderTitle()), 1), v(g2, { name: t3.titleIcon || (e2.direction === "up" ? "arrow-up" : "down-arrow"), size: "10", class: "nut-menu__title-icon" }, null, 8, ["name"])], 2)], 14, _))), 128))], 2), w(e2.$slots, "default")], 2);
50
+ }]]);
51
+ export { S as default };