@nutui/nutui 3.1.22-beta.0 → 3.1.22

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 (237) hide show
  1. package/CHANGELOG.md +48 -0
  2. package/README.md +3 -4
  3. package/dist/nutui.es.js +4203 -19263
  4. package/dist/nutui.umd.js +4208 -19368
  5. package/dist/packages/_es/ActionSheet.js +17 -167
  6. package/dist/packages/_es/Address.js +110 -552
  7. package/dist/packages/_es/AddressList.js +113 -613
  8. package/dist/packages/_es/Animate.js +22 -0
  9. package/dist/packages/_es/Audio.js +53 -274
  10. package/dist/packages/_es/AudioOperate.js +13 -121
  11. package/dist/packages/_es/Avatar.js +38 -177
  12. package/dist/packages/_es/AvatarGroup.js +14 -73
  13. package/dist/packages/_es/BackTop.js +43 -156
  14. package/dist/packages/_es/Badge.js +14 -86
  15. package/dist/packages/_es/Barrage.js +41 -120
  16. package/dist/packages/_es/Button.js +23 -128
  17. package/dist/packages/_es/Calendar.js +30 -237
  18. package/dist/packages/_es/CalendarItem.js +2 -1
  19. package/dist/packages/_es/Card.js +10 -107
  20. package/dist/packages/_es/Cascader.js +147 -523
  21. package/dist/packages/_es/Category.js +15 -58
  22. package/dist/packages/_es/CategoryPane.js +11 -111
  23. package/dist/packages/_es/Cell.js +21 -100
  24. package/dist/packages/_es/CellGroup.js +9 -44
  25. package/dist/packages/_es/Checkbox.js +31 -113
  26. package/dist/packages/_es/CheckboxGroup.js +29 -58
  27. package/dist/packages/_es/CircleProgress.js +28 -151
  28. package/dist/packages/_es/Col.js +14 -56
  29. package/dist/packages/_es/Collapse.js +32 -84
  30. package/dist/packages/_es/CollapseItem.js +59 -272
  31. package/dist/packages/_es/Comment.js +64 -434
  32. package/dist/packages/_es/ConfigProvider.js +13 -0
  33. package/dist/packages/_es/CountDown.js +56 -256
  34. package/dist/packages/_es/CountUp.js +140 -556
  35. package/dist/packages/_es/DatePicker.js +98 -332
  36. package/dist/packages/_es/Dialog.js +60 -271
  37. package/dist/packages/_es/Divider.js +13 -82
  38. package/dist/packages/_es/Drag.js +56 -197
  39. package/dist/packages/_es/Ecard.js +24 -159
  40. package/dist/packages/_es/Elevator.js +58 -212
  41. package/dist/packages/_es/Ellipsis.js +64 -0
  42. package/dist/packages/_es/Empty.js +12 -71
  43. package/dist/packages/_es/FixedNav.js +15 -122
  44. package/dist/packages/_es/Form.js +64 -151
  45. package/dist/packages/_es/FormItem.js +15 -110
  46. package/dist/packages/_es/Grid.js +5 -6
  47. package/dist/packages/_es/GridItem.js +33 -144
  48. package/dist/packages/_es/Icon.js +15 -40
  49. package/dist/packages/_es/Image.js +31 -0
  50. package/dist/packages/_es/ImagePreview.js +77 -309
  51. package/dist/packages/_es/Indicator.js +15 -62
  52. package/dist/packages/_es/InfiniteLoading.js +57 -268
  53. package/dist/packages/_es/Input.js +51 -413
  54. package/dist/packages/_es/InputNumber.js +41 -160
  55. package/dist/packages/_es/Layout.js +4 -5
  56. package/dist/packages/_es/List.js +18 -124
  57. package/dist/packages/_es/Menu.js +45 -118
  58. package/dist/packages/_es/MenuItem.js +37 -162
  59. package/dist/packages/_es/Navbar.js +30 -192
  60. package/dist/packages/_es/NoticeBar.js +74 -397
  61. package/dist/packages/_es/Notify.js +72 -246
  62. package/dist/packages/_es/NumberKeyboard.js +41 -272
  63. package/dist/packages/_es/OldPicker.js +131 -474
  64. package/dist/packages/_es/OverLay.js +24 -113
  65. package/dist/packages/_es/Pagination.js +39 -157
  66. package/dist/packages/_es/Picker.js +129 -469
  67. package/dist/packages/_es/Popover.js +318 -975
  68. package/dist/packages/_es/Popup.js +55 -313
  69. package/dist/packages/_es/Price.js +16 -118
  70. package/dist/packages/_es/Progress.js +14 -146
  71. package/dist/packages/_es/PullRefresh.js +84 -354
  72. package/dist/packages/_es/Radio.js +22 -90
  73. package/dist/packages/_es/RadioGroup.js +8 -37
  74. package/dist/packages/_es/Range.js +83 -427
  75. package/dist/packages/_es/Rate.js +35 -137
  76. package/dist/packages/_es/Row.js +22 -64
  77. package/dist/packages/_es/SearchBar.js +37 -257
  78. package/dist/packages/_es/ShortPassword.js +35 -225
  79. package/dist/packages/_es/SideNavBar.js +24 -99
  80. package/dist/packages/_es/SideNavBarItem.js +11 -46
  81. package/dist/packages/_es/Signature.js +41 -179
  82. package/dist/packages/_es/Skeleton.js +20 -136
  83. package/dist/packages/_es/Sku.js +84 -509
  84. package/dist/packages/_es/Step.js +20 -133
  85. package/dist/packages/_es/Steps.js +18 -53
  86. package/dist/packages/_es/Sticky.js +53 -138
  87. package/dist/packages/_es/SubSideNavBar.js +17 -100
  88. package/dist/packages/_es/Swipe.js +41 -197
  89. package/dist/packages/_es/Swiper.js +121 -433
  90. package/dist/packages/_es/SwiperItem.js +22 -53
  91. package/dist/packages/_es/Switch.js +21 -116
  92. package/dist/packages/_es/TabPane.js +12 -39
  93. package/dist/packages/_es/Tabbar.js +17 -72
  94. package/dist/packages/_es/TabbarItem.js +29 -151
  95. package/dist/packages/_es/Table.js +18 -196
  96. package/dist/packages/_es/Tabs.js +43 -217
  97. package/dist/packages/_es/Tag.js +20 -97
  98. package/dist/packages/_es/TextArea.js +42 -160
  99. package/dist/packages/_es/TimeDetail.js +18 -98
  100. package/dist/packages/_es/TimePannel.js +14 -66
  101. package/dist/packages/_es/TimeSelect.js +15 -103
  102. package/dist/packages/_es/Toast.js +71 -329
  103. package/dist/packages/_es/Uploader.js +104 -468
  104. package/dist/packages/_es/Video.js +74 -350
  105. package/dist/packages/_es/common.js +38 -128
  106. package/dist/packages/_es/component.js +35 -76
  107. package/dist/packages/_es/index.js +5 -6
  108. package/dist/packages/_es/index2.js +9 -30
  109. package/dist/packages/_es/index3.js +6 -8
  110. package/dist/packages/_es/index4.js +13 -58
  111. package/dist/packages/_es/index5.js +164 -682
  112. package/dist/packages/_es/plugin-vue_export-helper.js +7 -8
  113. package/dist/packages/_es/pxCheck.js +3 -5
  114. package/dist/packages/_es/raf.js +8 -15
  115. package/dist/packages/animate/index.scss +299 -0
  116. package/dist/packages/button/index.scss +2 -1
  117. package/dist/packages/cell/index.scss +18 -1
  118. package/dist/packages/checkbox/index.scss +16 -0
  119. package/dist/packages/configprovider/index.scss +2 -0
  120. package/dist/packages/dialog/index.scss +1 -0
  121. package/dist/packages/elevator/index.scss +21 -0
  122. package/dist/packages/ellipsis/index.scss +12 -0
  123. package/dist/packages/formitem/index.scss +12 -0
  124. package/dist/packages/griditem/index.scss +11 -0
  125. package/dist/packages/image/index.scss +39 -0
  126. package/dist/packages/imagepreview/index.scss +21 -2
  127. package/dist/packages/input/index.scss +26 -1
  128. package/dist/packages/inputnumber/index.scss +21 -0
  129. package/dist/packages/locale/lang/baseLang.d.ts +1 -0
  130. package/dist/packages/locale/lang/baseLang.js +3 -3
  131. package/dist/packages/locale/lang/en-US.d.ts +8 -0
  132. package/dist/packages/locale/lang/en-US.js +5 -97
  133. package/dist/packages/locale/lang/id-ID.d.ts +8 -0
  134. package/dist/packages/locale/lang/id-ID.js +5 -97
  135. package/dist/packages/locale/lang/index.js +16 -38
  136. package/dist/packages/locale/lang/zh-CN.d.ts +8 -0
  137. package/dist/packages/locale/lang/zh-CN.js +5 -97
  138. package/dist/packages/locale/lang/zh-TW.d.ts +8 -0
  139. package/dist/packages/locale/lang/zh-TW.js +5 -97
  140. package/dist/packages/menu/index.scss +45 -36
  141. package/dist/packages/menuitem/index.scss +4 -0
  142. package/dist/packages/navbar/index.scss +9 -0
  143. package/dist/packages/pagination/index.scss +19 -0
  144. package/dist/packages/radio/index.scss +19 -0
  145. package/dist/packages/range/index.scss +19 -0
  146. package/dist/packages/rate/index.scss +1 -1
  147. package/dist/packages/searchbar/index.scss +21 -0
  148. package/dist/packages/switch/index.scss +4 -3
  149. package/dist/packages/tabbar/index.scss +5 -0
  150. package/dist/packages/tabbaritem/index.scss +7 -0
  151. package/dist/packages/tabpane/index.scss +6 -0
  152. package/dist/packages/tabs/index.scss +22 -0
  153. package/dist/packages/textarea/index.scss +8 -0
  154. package/dist/smartips/attributes.json +192 -12
  155. package/dist/smartips/tags.json +70 -10
  156. package/dist/smartips/web-types.json +6945 -0
  157. package/dist/style.css +1 -1
  158. package/dist/style.es.js +1 -1
  159. package/dist/styles/font/config.json +3 -1
  160. package/dist/styles/font/demo_index.html +49 -3
  161. package/dist/styles/font/iconfont.css +11 -3
  162. package/dist/styles/font/iconfont.js +15 -15
  163. package/dist/styles/font/iconfont.json +14 -0
  164. package/dist/styles/font/iconfont.ttf +0 -0
  165. package/dist/styles/font/iconfont.woff +0 -0
  166. package/dist/styles/font/iconfont.woff2 +0 -0
  167. package/dist/styles/themes/default.scss +54 -50
  168. package/dist/styles/themes/jdb.scss +54 -50
  169. package/dist/styles/themes/jdt.scss +54 -50
  170. package/dist/styles/variables-jdb.scss +22 -1
  171. package/dist/styles/variables-jdt.scss +22 -1
  172. package/dist/styles/variables.scss +22 -1
  173. package/dist/types/__VUE/actionsheet/index.vue.d.ts +2 -2
  174. package/dist/types/__VUE/address/index.vue.d.ts +4 -4
  175. package/dist/types/__VUE/addresslist/components/ItemContents.vue.d.ts +1 -0
  176. package/dist/types/__VUE/animate/index.vue.d.ts +48 -0
  177. package/dist/types/__VUE/animate/type.d.ts +6 -0
  178. package/dist/types/__VUE/audiooperate/index.vue.d.ts +1 -0
  179. package/dist/types/__VUE/avatar/index.vue.d.ts +5 -5
  180. package/dist/types/__VUE/avatargroup/index.vue.d.ts +2 -2
  181. package/dist/types/__VUE/badge/index.vue.d.ts +4 -4
  182. package/dist/types/__VUE/button/index.vue.d.ts +6 -6
  183. package/dist/types/__VUE/calendaritem/index.vue.d.ts +10 -2
  184. package/dist/types/__VUE/cascader/index.vue.d.ts +3 -3
  185. package/dist/types/__VUE/cell/index.vue.d.ts +11 -4
  186. package/dist/types/__VUE/checkbox/common.d.ts +59 -0
  187. package/dist/types/__VUE/checkbox/index.vue.d.ts +20 -7
  188. package/dist/types/__VUE/checkboxgroup/index.vue.d.ts +7 -0
  189. package/dist/types/__VUE/circleprogress/index.vue.d.ts +2 -2
  190. package/dist/types/__VUE/collapse/index.vue.d.ts +3 -1
  191. package/dist/types/__VUE/comment/index.vue.d.ts +2 -2
  192. package/dist/types/__VUE/configprovider/common.d.ts +20 -0
  193. package/dist/types/__VUE/configprovider/index.vue.d.ts +33 -0
  194. package/dist/types/__VUE/datepicker/index.vue.d.ts +2 -2
  195. package/dist/types/__VUE/dialog/index.d.ts +9 -2
  196. package/dist/types/__VUE/dialog/index.vue.d.ts +25 -10
  197. package/dist/types/__VUE/ecard/index.vue.d.ts +3 -3
  198. package/dist/types/__VUE/elevator/index.vue.d.ts +29 -0
  199. package/dist/types/__VUE/ellipsis/index.vue.d.ts +72 -0
  200. package/dist/types/__VUE/empty/index.vue.d.ts +2 -2
  201. package/dist/types/__VUE/fixednav/index.vue.d.ts +2 -2
  202. package/dist/types/__VUE/formitem/index.vue.d.ts +3 -10
  203. package/dist/types/__VUE/grid/index.vue.d.ts +4 -4
  204. package/dist/types/__VUE/griditem/index.vue.d.ts +1 -1
  205. package/dist/types/__VUE/image/index.vue.d.ts +105 -0
  206. package/dist/types/__VUE/image/type.d.ts +6 -0
  207. package/dist/types/__VUE/imagepreview/index.vue.d.ts +36 -2
  208. package/dist/types/__VUE/input/index.vue.d.ts +6 -6
  209. package/dist/types/__VUE/inputnumber/index.vue.d.ts +2 -2
  210. package/dist/types/__VUE/menu/index.vue.d.ts +29 -2
  211. package/dist/types/__VUE/menuitem/index.vue.d.ts +12 -3
  212. package/dist/types/__VUE/noticebar/index.vue.d.ts +3 -3
  213. package/dist/types/__VUE/notify/index.vue.d.ts +2 -2
  214. package/dist/types/__VUE/oldpicker/index.vue.d.ts +2 -2
  215. package/dist/types/__VUE/picker/Column.vue.d.ts +1 -1
  216. package/dist/types/__VUE/picker/index.vue.d.ts +3 -3
  217. package/dist/types/__VUE/popover/index.vue.d.ts +6 -6
  218. package/dist/types/__VUE/popup/index.vue.d.ts +2 -2
  219. package/dist/types/__VUE/radio/index.vue.d.ts +4 -4
  220. package/dist/types/__VUE/range/index.vue.d.ts +4 -4
  221. package/dist/types/__VUE/rate/common.d.ts +149 -0
  222. package/dist/types/__VUE/rate/index.vue.d.ts +15 -5
  223. package/dist/types/__VUE/skeleton/index.vue.d.ts +4 -4
  224. package/dist/types/__VUE/sku/index.vue.d.ts +2 -2
  225. package/dist/types/__VUE/step/index.vue.d.ts +2 -2
  226. package/dist/types/__VUE/sticky/index.vue.d.ts +4 -4
  227. package/dist/types/__VUE/swiper/index.vue.d.ts +4 -4
  228. package/dist/types/__VUE/tabbar/index.vue.d.ts +2 -2
  229. package/dist/types/__VUE/tag/index.vue.d.ts +2 -2
  230. package/dist/types/__VUE/timeselect/index.vue.d.ts +10 -2
  231. package/dist/types/__VUE/toast/index.vue.d.ts +5 -5
  232. package/dist/types/__VUE/uploader/index.vue.d.ts +6 -6
  233. package/dist/types/__VUE/uploader/uploader.d.ts +1 -0
  234. package/dist/types/__VUE/video/index.vue.d.ts +1 -1
  235. package/dist/types/index.d.ts +1 -1
  236. package/dist/types/nutui.d.ts +5 -1
  237. package/package.json +6 -3
@@ -1,166 +1,48 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.22-beta.0 Tue May 31 2022 21:47:10 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.22 Fri Jun 24 2022 18:11:16 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
- import { ref, computed, onMounted, nextTick, watch, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle, toDisplayString, createCommentVNode } from "vue";
7
- import { c as createComponent } from "./component.js";
8
- import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
6
+ import { ref as e, computed as t, onMounted as a, nextTick as l, watch as o, openBlock as u, createElementBlock as r, normalizeClass as n, createElementVNode as s, normalizeStyle as d, toDisplayString as i, createCommentVNode as m } from "vue";
7
+ import { c } from "./component.js";
8
+ import { _ as g } from "./plugin-vue_export-helper.js";
9
9
  import "../locale/lang";
10
- const { componentName, create, translate } = createComponent("textarea");
11
- const _sfc_main = create({
12
- props: {
13
- modelValue: {
14
- type: [String, Number],
15
- default: ""
16
- },
17
- textAlign: {
18
- type: String,
19
- default: ""
20
- },
21
- limitShow: {
22
- type: Boolean,
23
- default: false
24
- },
25
- maxLength: {
26
- type: [String, Number],
27
- default: ""
28
- },
29
- rows: {
30
- type: [String, Number],
31
- default: "2"
32
- },
33
- placeholder: {
34
- type: String,
35
- default: ""
36
- },
37
- readonly: {
38
- type: Boolean,
39
- default: false
40
- },
41
- disabled: {
42
- type: Boolean,
43
- default: false
44
- },
45
- autosize: {
46
- type: [Boolean, Object],
47
- default: false
48
- },
49
- autofocus: {
50
- type: Boolean,
51
- default: false
10
+ const { componentName: p, create: h, translate: f } = c("textarea"), x = h({ props: { modelValue: { type: [String, Number], default: "" }, textAlign: { type: String, default: "" }, limitShow: { type: Boolean, default: false }, maxLength: { type: [String, Number], default: "" }, rows: { type: [String, Number], default: "2" }, placeholder: { type: String, default: "" }, readonly: { type: Boolean, default: false }, disabled: { type: Boolean, default: false }, autosize: { type: [Boolean, Object], default: false }, autofocus: { type: Boolean, default: false } }, emits: ["update:modelValue", "change", "blur", "focus"], setup(u2, { emit: r2 }) {
11
+ const n2 = e(), s2 = t(() => ({ [p]: true, [`${p}--disabled`]: u2.disabled }));
12
+ a(() => {
13
+ u2.modelValue && m2(String(u2.modelValue)), u2.autosize && l(i2);
14
+ });
15
+ const d2 = t(() => ({ textAlign: u2.textAlign })), i2 = () => {
16
+ let e2 = n2.value;
17
+ e2.style.height = "auto";
18
+ let t2 = e2.scrollHeight;
19
+ if (typeof u2.autosize == "object") {
20
+ const { maxHeight: e3, minHeight: a2 } = u2.autosize;
21
+ e3 !== void 0 && (t2 = Math.min(t2, e3)), a2 !== void 0 && (t2 = Math.max(t2, a2));
52
22
  }
53
- },
54
- emits: ["update:modelValue", "change", "blur", "focus"],
55
- setup(props, { emit }) {
56
- const textareaRef = ref();
57
- const classes = computed(() => {
58
- const prefixCls = componentName;
59
- return {
60
- [prefixCls]: true,
61
- [`${prefixCls}--disabled`]: props.disabled
62
- };
63
- });
64
- onMounted(() => {
65
- if (props.modelValue) {
66
- emitChange(String(props.modelValue));
67
- }
68
- if (props.autosize) {
69
- nextTick(getContentHeight);
70
- }
71
- });
72
- const styles = computed(() => {
73
- return {
74
- textAlign: props.textAlign
75
- };
76
- });
77
- const getContentHeight = () => {
78
- let textarea = textareaRef.value;
79
- textarea.style.height = "auto";
80
- let height = textarea.scrollHeight;
81
- if (typeof props.autosize === "object") {
82
- const { maxHeight, minHeight } = props.autosize;
83
- if (maxHeight !== void 0) {
84
- height = Math.min(height, maxHeight);
85
- }
86
- if (minHeight !== void 0) {
87
- height = Math.max(height, minHeight);
88
- }
89
- }
90
- if (height) {
91
- textarea.style.height = height + "px";
92
- }
93
- };
94
- watch(() => props.modelValue, () => {
95
- if (props.autosize) {
96
- nextTick(getContentHeight);
97
- }
98
- });
99
- const emitChange = (value, event) => {
100
- if (props.maxLength && value.length > Number(props.maxLength)) {
101
- value = value.substring(0, Number(props.maxLength));
102
- }
103
- emit("update:modelValue", value, event);
104
- emit("change", value, event);
105
- };
106
- const change = (event) => {
107
- const input = event.target;
108
- emitChange(input.value, event);
109
- };
110
- const focus = (event) => {
111
- if (props.disabled)
112
- return;
113
- if (props.readonly)
114
- return;
115
- emit("focus", event);
116
- };
117
- const blur = (event) => {
118
- if (props.disabled)
119
- return;
120
- if (props.readonly)
121
- return;
122
- const input = event.target;
123
- let value = input.value;
124
- emitChange(value, event);
125
- emit("blur", { value, event });
126
- };
127
- return {
128
- textareaRef,
129
- classes,
130
- styles,
131
- change,
132
- focus,
133
- blur,
134
- translate
135
- };
136
- }
137
- });
138
- const _hoisted_1 = ["rows", "disabled", "readonly", "value", "maxlength", "placeholder", "autofocus"];
139
- const _hoisted_2 = {
140
- key: 0,
141
- class: "nut-textarea__limit"
142
- };
143
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
144
- return openBlock(), createElementBlock("view", {
145
- class: normalizeClass(_ctx.classes)
146
- }, [
147
- createElementVNode("textarea", {
148
- ref: "textareaRef",
149
- class: "nut-textarea__textarea",
150
- style: normalizeStyle(_ctx.styles),
151
- rows: _ctx.rows,
152
- disabled: _ctx.disabled,
153
- readonly: _ctx.readonly,
154
- value: _ctx.modelValue,
155
- onInput: _cache[0] || (_cache[0] = (...args) => _ctx.change && _ctx.change(...args)),
156
- onBlur: _cache[1] || (_cache[1] = (...args) => _ctx.blur && _ctx.blur(...args)),
157
- onFocus: _cache[2] || (_cache[2] = (...args) => _ctx.focus && _ctx.focus(...args)),
158
- maxlength: _ctx.maxLength,
159
- placeholder: _ctx.placeholder || _ctx.translate("placeholder"),
160
- autofocus: _ctx.autofocus
161
- }, null, 44, _hoisted_1),
162
- _ctx.limitShow ? (openBlock(), createElementBlock("view", _hoisted_2, toDisplayString(_ctx.modelValue ? _ctx.modelValue.length : 0) + "/" + toDisplayString(_ctx.maxLength), 1)) : createCommentVNode("", true)
163
- ], 2);
164
- }
165
- var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
166
- export { index as default };
23
+ t2 && (e2.style.height = t2 + "px");
24
+ };
25
+ o(() => u2.modelValue, () => {
26
+ u2.autosize && l(i2);
27
+ });
28
+ const m2 = (e2, t2) => {
29
+ u2.maxLength && e2.length > Number(u2.maxLength) && (e2 = e2.substring(0, Number(u2.maxLength))), r2("update:modelValue", e2, t2), r2("change", e2, t2);
30
+ };
31
+ return { textareaRef: n2, classes: s2, styles: d2, change: (e2) => {
32
+ const t2 = e2.target;
33
+ m2(t2.value, e2);
34
+ }, focus: (e2) => {
35
+ u2.disabled || u2.readonly || r2("focus", e2);
36
+ }, blur: (e2) => {
37
+ if (u2.disabled)
38
+ return;
39
+ if (u2.readonly)
40
+ return;
41
+ let t2 = e2.target.value;
42
+ m2(t2, e2), r2("blur", { value: t2, event: e2 });
43
+ }, translate: f };
44
+ } }), y = ["rows", "disabled", "readonly", "value", "maxlength", "placeholder", "autofocus"], b = { key: 0, class: "nut-textarea__limit" };
45
+ var v = g(x, [["render", function(e2, t2, a2, l2, o2, c2) {
46
+ return u(), r("view", { class: n(e2.classes) }, [s("textarea", { ref: "textareaRef", class: "nut-textarea__textarea", style: d(e2.styles), rows: e2.rows, disabled: e2.disabled, readonly: e2.readonly, value: e2.modelValue, onInput: t2[0] || (t2[0] = (...t3) => e2.change && e2.change(...t3)), onBlur: t2[1] || (t2[1] = (...t3) => e2.blur && e2.blur(...t3)), onFocus: t2[2] || (t2[2] = (...t3) => e2.focus && e2.focus(...t3)), maxlength: e2.maxLength, placeholder: e2.placeholder || e2.translate("placeholder"), autofocus: e2.autofocus }, null, 44, y), e2.limitShow ? (u(), r("view", b, i(e2.modelValue ? e2.modelValue.length : 0) + "/" + i(e2.maxLength), 1)) : m("", true)], 2);
47
+ }]]);
48
+ export { v as default };
@@ -1,103 +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.22-beta.0 Tue May 31 2022 21:47:10 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.22 Fri Jun 24 2022 18:11:16 GMT+0800 (中国标准时间)
22
3
  * (c) 2022 @jdf2e.
23
4
  * Released under the MIT License.
24
5
  */
25
- import { inject, reactive, computed, toRefs, openBlock, createElementBlock, normalizeClass, createElementVNode, Fragment, renderList, toDisplayString } from "vue";
26
- import { c as createComponent } from "./component.js";
27
- import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
6
+ import { inject as e, reactive as t, computed as i, toRefs as r, openBlock as l, createElementBlock as a, normalizeClass as n, createElementVNode as s, Fragment as m, renderList as c, toDisplayString as u } from "vue";
7
+ import { c as d } from "./component.js";
8
+ import { _ } from "./plugin-vue_export-helper.js";
28
9
  import "../locale/lang";
29
- const { componentName, create } = createComponent("timedetail");
30
- const _sfc_main = create({
31
- name: "timedetail",
32
- props: {
33
- times: {
34
- type: Array,
35
- default: () => {
36
- return [];
37
- }
38
- },
39
- detailKey: {
40
- type: [Number, String],
41
- default: 0
42
- }
43
- },
44
- emits: ["select"],
45
- setup: (props, context) => {
46
- const currentKey = inject("currentKey");
47
- const currentTime = inject("currentTime");
48
- const state = reactive({
49
- currentKey,
50
- currentTime
51
- });
52
- const classes = computed(() => {
53
- const prefixCls = componentName;
54
- return {
55
- [prefixCls]: true
56
- };
57
- });
58
- const getClass = (item) => {
59
- let find = state.currentTime.find((item2) => item2.key == state.currentKey);
60
- if (find) {
61
- return {
62
- "nut-timedetail__detail__list__item": true,
63
- "nut-timedetail__detail__list__item--curr": find.list.filter((value) => value === item).length > 0
64
- };
65
- }
66
- };
67
- const renderData = computed(() => {
68
- return props.times.find((time) => time.key == state.currentKey)["list"];
69
- });
70
- const handleTime = (time) => {
71
- context.emit("select", time);
72
- };
73
- return __spreadProps(__spreadValues({
74
- classes
75
- }, toRefs(state)), {
76
- getClass,
77
- renderData,
78
- handleTime
79
- });
80
- }
81
- });
82
- const _hoisted_1 = { class: "nut-timedetail__detail nut-timedetail__detail--moring" };
83
- const _hoisted_2 = { class: "nut-timedetail__detail__list" };
84
- const _hoisted_3 = ["onClick"];
85
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
86
- return openBlock(), createElementBlock("view", {
87
- class: normalizeClass(_ctx.classes)
88
- }, [
89
- createElementVNode("view", _hoisted_1, [
90
- createElementVNode("view", _hoisted_2, [
91
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.renderData, (item) => {
92
- return openBlock(), createElementBlock("view", {
93
- class: normalizeClass(_ctx.getClass(item)),
94
- key: item,
95
- onClick: ($event) => _ctx.handleTime(item)
96
- }, toDisplayString(item), 11, _hoisted_3);
97
- }), 128))
98
- ])
99
- ])
100
- ], 2);
101
- }
102
- var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
103
- export { index as default };
10
+ const { componentName: o, create: p } = d("timedetail"), f = p({ name: "timedetail", props: { times: { type: Array, default: () => [] }, detailKey: { type: [Number, String], default: 0 } }, emits: ["select"], setup: (l2, a2) => {
11
+ const n2 = e("currentKey"), s2 = e("currentTime"), m2 = t({ currentKey: n2, currentTime: s2 }), c2 = i(() => ({ [o]: true })), u2 = i(() => l2.times.find((e2) => e2.key == m2.currentKey).list);
12
+ return { classes: c2, ...r(m2), getClass: (e2) => {
13
+ let t2 = m2.currentTime.find((e3) => e3.key == m2.currentKey);
14
+ if (t2)
15
+ return { "nut-timedetail__detail__list__item": true, "nut-timedetail__detail__list__item--curr": t2.list.filter((t3) => t3 === e2).length > 0 };
16
+ }, renderData: u2, handleTime: (e2) => {
17
+ a2.emit("select", e2);
18
+ } };
19
+ } }), y = { class: "nut-timedetail__detail nut-timedetail__detail--moring" }, g = { class: "nut-timedetail__detail__list" }, v = ["onClick"];
20
+ var k = _(f, [["render", function(e2, t2, i2, r2, d2, _2) {
21
+ return l(), a("view", { class: n(e2.classes) }, [s("view", y, [s("view", g, [(l(true), a(m, null, c(e2.renderData, (t3) => (l(), a("view", { class: n(e2.getClass(t3)), key: t3, onClick: (i3) => e2.handleTime(t3) }, u(t3), 11, v))), 128))])])], 2);
22
+ }]]);
23
+ export { k as default };
@@ -1,71 +1,19 @@
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.22-beta.0 Tue May 31 2022 21:47:10 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.22 Fri Jun 24 2022 18:11:16 GMT+0800 (中国标准时间)
22
3
  * (c) 2022 @jdf2e.
23
4
  * Released under the MIT License.
24
5
  */
25
- import { inject, reactive, computed, toRefs, openBlock, createElementBlock, normalizeClass, toDisplayString } from "vue";
26
- import { c as createComponent } from "./component.js";
27
- import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
6
+ import { inject as e, reactive as n, computed as t, toRefs as r, openBlock as a, createElementBlock as l, normalizeClass as p, toDisplayString as m } from "vue";
7
+ import { c as o } from "./component.js";
8
+ import { _ as c } from "./plugin-vue_export-helper.js";
28
9
  import "../locale/lang";
29
- const { componentName, create } = createComponent("timepannel");
30
- const _sfc_main = create({
31
- name: "timepannel",
32
- props: {
33
- name: {
34
- type: String,
35
- default: ""
36
- },
37
- pannelKey: {
38
- type: [Number, String],
39
- default: 0
40
- }
41
- },
42
- emits: ["change"],
43
- setup: (props, context) => {
44
- const currentKey = inject("currentKey");
45
- const state = reactive({
46
- currentKey
47
- });
48
- const classes = computed(() => {
49
- const prefixCls = componentName;
50
- return {
51
- [prefixCls]: true,
52
- "nut-timepannel--curr": state.currentKey == props.pannelKey
53
- };
54
- });
55
- const handlePannel = (pannelKey) => {
56
- context.emit("change", pannelKey);
57
- };
58
- return __spreadProps(__spreadValues({}, toRefs(state)), {
59
- classes,
60
- handlePannel
61
- });
62
- }
63
- });
64
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
65
- return openBlock(), createElementBlock("view", {
66
- class: normalizeClass(_ctx.classes),
67
- onClick: _cache[0] || (_cache[0] = ($event) => _ctx.handlePannel(_ctx.pannelKey))
68
- }, toDisplayString(_ctx.name), 3);
69
- }
70
- var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
71
- export { index as default };
10
+ const { componentName: s, create: u } = o("timepannel");
11
+ var i = c(u({ name: "timepannel", props: { name: { type: String, default: "" }, pannelKey: { type: [Number, String], default: 0 } }, emits: ["change"], setup: (a2, l2) => {
12
+ const p2 = e("currentKey"), m2 = n({ currentKey: p2 }), o2 = t(() => ({ [s]: true, "nut-timepannel--curr": m2.currentKey == a2.pannelKey }));
13
+ return { ...r(m2), classes: o2, handlePannel: (e2) => {
14
+ l2.emit("change", e2);
15
+ } };
16
+ } }), [["render", function(e2, n2, t2, r2, o2, c2) {
17
+ return a(), l("view", { class: p(e2.classes), onClick: n2[0] || (n2[0] = (n3) => e2.handlePannel(e2.pannelKey)) }, m(e2.name), 3);
18
+ }]]);
19
+ export { i as default };
@@ -1,108 +1,20 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.22-beta.0 Tue May 31 2022 21:47:10 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.22 Fri Jun 24 2022 18:11:16 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
- import { computed, provide, resolveComponent, openBlock, createBlock, normalizeStyle, withCtx, createElementVNode, normalizeClass, toDisplayString, renderSlot } from "vue";
7
- import { c as createComponent } from "./component.js";
8
- import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
6
+ import { computed as e, provide as t, resolveComponent as l, openBlock as s, createBlock as o, normalizeStyle as i, withCtx as r, createElementVNode as n, normalizeClass as c, createElementBlock as a, toDisplayString as p, renderSlot as u } from "vue";
7
+ import { c as m } from "./component.js";
8
+ import { _ as y } from "./plugin-vue_export-helper.js";
9
9
  import "../locale/lang";
10
- const { componentName, create, translate } = createComponent("timeselect");
11
- const _sfc_main = create({
12
- props: {
13
- visible: {
14
- type: Boolean,
15
- defalut: false
16
- },
17
- height: {
18
- type: [String],
19
- default: "20%"
20
- },
21
- title: {
22
- type: String,
23
- default: ""
24
- },
25
- currentKey: {
26
- type: [Number, String],
27
- default: 0
28
- },
29
- currentTime: {
30
- type: Array,
31
- default: () => {
32
- return [];
33
- }
34
- },
35
- isWrapTeleport: {
36
- type: Boolean,
37
- default: false
38
- }
39
- },
40
- emits: ["update:visible", "select"],
41
- setup: (props, context) => {
42
- const classes = computed(() => {
43
- const prefixCls = componentName;
44
- return {
45
- [prefixCls]: true
46
- };
47
- });
48
- const popStyle = computed(() => {
49
- return {
50
- width: "100%",
51
- height: props.height
52
- };
53
- });
54
- const currentKey = computed(() => props.currentKey);
55
- const currentTime = computed(() => props.currentTime);
56
- const close = () => {
57
- context.emit("update:visible", false);
58
- context.emit("select", currentTime.value);
59
- };
60
- provide("currentKey", currentKey);
61
- provide("currentTime", currentTime);
62
- return {
63
- classes,
64
- popStyle,
65
- close,
66
- translate
67
- };
68
- }
69
- });
70
- const _hoisted_1 = { class: "nut-timeselect__title" };
71
- const _hoisted_2 = { class: "nut-timeselect__title__fixed" };
72
- const _hoisted_3 = { class: "nut-timeselect__content" };
73
- const _hoisted_4 = { class: "nut-timeselect__content__pannel" };
74
- const _hoisted_5 = { class: "nut-timeselect__content__detail" };
75
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
76
- const _component_nut_popup = resolveComponent("nut-popup");
77
- return openBlock(), createBlock(_component_nut_popup, {
78
- position: "bottom",
79
- closeable: "",
80
- round: "",
81
- isWrapTeleport: _ctx.isWrapTeleport,
82
- visible: _ctx.visible,
83
- style: normalizeStyle(_ctx.popStyle),
84
- onClickOverlay: _ctx.close,
85
- onClickCloseIcon: _ctx.close
86
- }, {
87
- default: withCtx(() => [
88
- createElementVNode("view", {
89
- class: normalizeClass(_ctx.classes)
90
- }, [
91
- createElementVNode("view", _hoisted_1, [
92
- createElementVNode("view", _hoisted_2, toDisplayString(_ctx.title || _ctx.translate("pickupTime")), 1)
93
- ]),
94
- createElementVNode("view", _hoisted_3, [
95
- createElementVNode("view", _hoisted_4, [
96
- renderSlot(_ctx.$slots, "pannel")
97
- ]),
98
- createElementVNode("view", _hoisted_5, [
99
- renderSlot(_ctx.$slots, "detail")
100
- ])
101
- ])
102
- ], 2)
103
- ]),
104
- _: 3
105
- }, 8, ["isWrapTeleport", "visible", "style", "onClickOverlay", "onClickCloseIcon"]);
106
- }
107
- var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
108
- export { index as default };
10
+ const { componentName: _, create: v, translate: d } = m("timeselect"), f = v({ props: { visible: { type: Boolean, defalut: false }, height: { type: [String], default: "20%" }, title: { type: String, default: "" }, currentKey: { type: [Number, String], default: 0 }, currentTime: { type: Array, default: () => [] }, lockScroll: { type: [Boolean], default: false }, isWrapTeleport: { type: Boolean, default: false } }, emits: ["update:visible", "select"], setup: (l2, s2) => {
11
+ const o2 = e(() => ({ [_]: true })), i2 = e(() => ({ width: "100%", height: l2.height })), r2 = e(() => l2.currentKey), n2 = e(() => l2.currentTime);
12
+ return t("currentKey", r2), t("currentTime", n2), { classes: o2, popStyle: i2, props: l2, close: () => {
13
+ s2.emit("update:visible", false), s2.emit("select", n2.value);
14
+ }, translate: d };
15
+ } }), k = { class: "nut-timeselect__title" }, b = { class: "nut-timeselect__title__fixed" }, g = { key: 0 }, h = { class: "nut-timeselect__content" }, T = { class: "nut-timeselect__content__pannel" }, w = { class: "nut-timeselect__content__detail" };
16
+ var S = y(f, [["render", function(e2, t2, m2, y2, _2, v2) {
17
+ const d2 = l("nut-popup");
18
+ return s(), o(d2, { position: "bottom", closeable: "", round: "", isWrapTeleport: e2.isWrapTeleport, visible: e2.visible, style: i(e2.popStyle), "lock-scroll": e2.lockScroll, onClickOverlay: e2.close, onClickCloseIcon: e2.close }, { default: r(() => [n("view", { class: c(e2.classes) }, [n("view", k, [n("view", b, [e2.$slots.title ? u(e2.$slots, "title", { key: 1 }) : (s(), a("span", g, p(e2.title || e2.translate("pickupTime")), 1))])]), n("view", h, [n("view", T, [u(e2.$slots, "pannel")]), n("view", w, [u(e2.$slots, "detail")])])], 2)]), _: 3 }, 8, ["isWrapTeleport", "visible", "style", "lock-scroll", "onClickOverlay", "onClickCloseIcon"]);
19
+ }]]);
20
+ export { S as default };