@nutui/nutui 4.0.0 → 4.0.1-2.beta-1

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 (285) hide show
  1. package/CHANGELOG.md +226 -0
  2. package/README.md +34 -65
  3. package/dist/nutui.es.js +10 -17
  4. package/dist/nutui.js +16202 -0
  5. package/dist/nutui.umd.js +1 -7
  6. package/dist/packages/_es/ActionSheet.js +79 -94
  7. package/dist/packages/_es/Address.js +260 -345
  8. package/dist/packages/_es/AddressList.js +269 -354
  9. package/dist/packages/_es/Animate.js +46 -38
  10. package/dist/packages/_es/Audio.js +128 -180
  11. package/dist/packages/_es/AudioOperate.js +60 -52
  12. package/dist/packages/_es/Avatar.js +67 -75
  13. package/dist/packages/_es/AvatarGroup.js +23 -31
  14. package/dist/packages/_es/Backtop.js +59 -99
  15. package/dist/packages/_es/Badge.js +39 -46
  16. package/dist/packages/_es/Barrage.js +68 -145
  17. package/dist/packages/_es/Button.js +47 -66
  18. package/dist/packages/_es/Calendar.js +135 -152
  19. package/dist/packages/_es/CalendarItem.js +6 -6
  20. package/dist/packages/_es/Card.js +42 -56
  21. package/dist/packages/_es/Cascader.js +323 -433
  22. package/dist/packages/_es/Category.js +29 -39
  23. package/dist/packages/_es/CategoryPane.js +57 -83
  24. package/dist/packages/_es/Cell.js +56 -71
  25. package/dist/packages/_es/CellGroup.js +19 -27
  26. package/dist/packages/_es/Checkbox.js +109 -138
  27. package/dist/packages/_es/CheckboxGroup.js +38 -61
  28. package/dist/packages/_es/CircleProgress.js +67 -96
  29. package/dist/packages/_es/Col.js +23 -31
  30. package/dist/packages/_es/Collapse.js +37 -67
  31. package/dist/packages/_es/CollapseItem.js +91 -184
  32. package/dist/packages/_es/Comment.js +207 -279
  33. package/dist/packages/_es/ConfigProvider.js +38 -56
  34. package/dist/packages/_es/Countdown.js +100 -194
  35. package/dist/packages/_es/Countup.js +232 -428
  36. package/dist/packages/_es/DatePicker.js +169 -245
  37. package/dist/packages/_es/Dialog.js +163 -188
  38. package/dist/packages/_es/Divider.js +42 -40
  39. package/dist/packages/_es/Drag.js +70 -153
  40. package/dist/packages/_es/Ecard.js +64 -104
  41. package/dist/packages/_es/Elevator.js +144 -201
  42. package/dist/packages/_es/Ellipsis.js +95 -159
  43. package/dist/packages/_es/Empty.js +23 -39
  44. package/dist/packages/_es/FixedNav.js +93 -116
  45. package/dist/packages/_es/Form.js +108 -164
  46. package/dist/packages/_es/FormItem.js +48 -61
  47. package/dist/packages/_es/Grid.js +5 -6
  48. package/dist/packages/_es/GridItem.js +58 -84
  49. package/dist/packages/_es/Image.js +98 -88
  50. package/dist/packages/_es/ImagePreview.js +262 -392
  51. package/dist/packages/_es/Indicator.js +30 -34
  52. package/dist/packages/_es/InfiniteLoading.js +83 -117
  53. package/dist/packages/_es/Input.js +176 -223
  54. package/dist/packages/_es/InputNumber.js +81 -117
  55. package/dist/packages/_es/Interceptor-6e26b757.js +18 -0
  56. package/dist/packages/_es/Invoice.js +105 -113
  57. package/dist/packages/_es/Layout.js +3 -4
  58. package/dist/packages/_es/List.js +147 -89
  59. package/dist/packages/_es/Menu.js +96 -152
  60. package/dist/packages/_es/MenuItem.js +117 -153
  61. package/dist/packages/_es/Navbar.js +103 -119
  62. package/dist/packages/_es/Noticebar.js +207 -273
  63. package/dist/packages/_es/Notify.js +110 -147
  64. package/dist/packages/_es/NumberKeyboard.js +127 -202
  65. package/dist/packages/_es/Overlay.js +53 -66
  66. package/dist/packages/_es/Pagination.js +70 -100
  67. package/dist/packages/_es/Picker.js +276 -425
  68. package/dist/packages/_es/Popover.js +122 -225
  69. package/dist/packages/_es/Popup.js +4 -4
  70. package/dist/packages/_es/Price.js +47 -80
  71. package/dist/packages/_es/Progress.js +63 -79
  72. package/dist/packages/_es/PullRefresh.js +96 -157
  73. package/dist/packages/_es/Radio.js +4 -4
  74. package/dist/packages/_es/RadioGroup.js +3 -3
  75. package/dist/packages/_es/Range.js +205 -329
  76. package/dist/packages/_es/Rate.js +93 -122
  77. package/dist/packages/_es/Row.js +21 -27
  78. package/dist/packages/_es/Searchbar.js +130 -160
  79. package/dist/packages/_es/ShortPassword.js +69 -93
  80. package/dist/packages/_es/SideNavbar.js +49 -59
  81. package/dist/packages/_es/SideNavbarItem.js +22 -32
  82. package/dist/packages/_es/Signature.js +83 -128
  83. package/dist/packages/_es/Skeleton.js +110 -130
  84. package/dist/packages/_es/Sku.js +251 -326
  85. package/dist/packages/_es/Step.js +60 -69
  86. package/dist/packages/_es/Steps.js +26 -31
  87. package/dist/packages/_es/Sticky.js +4 -4
  88. package/dist/packages/_es/SubSideNavbar.js +52 -56
  89. package/dist/packages/_es/Swipe.js +84 -137
  90. package/dist/packages/_es/Swiper.js +175 -310
  91. package/dist/packages/_es/SwiperItem.js +28 -44
  92. package/dist/packages/_es/Switch.js +55 -67
  93. package/dist/packages/_es/TabPane.js +32 -20
  94. package/dist/packages/_es/Tabbar.js +41 -52
  95. package/dist/packages/_es/TabbarItem.js +61 -81
  96. package/dist/packages/_es/Table.js +110 -148
  97. package/dist/packages/_es/Tabs.js +284 -205
  98. package/dist/packages/_es/Tag.js +44 -61
  99. package/dist/packages/_es/Textarea.js +80 -124
  100. package/dist/packages/_es/TimeDetail.js +49 -57
  101. package/dist/packages/_es/TimePannel.js +35 -31
  102. package/dist/packages/_es/TimeSelect.js +47 -68
  103. package/dist/packages/_es/Toast.js +150 -203
  104. package/dist/packages/_es/Tour.js +139 -175
  105. package/dist/packages/_es/TrendArrow.js +57 -58
  106. package/dist/packages/_es/Uploader.js +235 -359
  107. package/dist/packages/_es/Video.js +191 -298
  108. package/dist/packages/_es/Watermark.js +84 -98
  109. package/dist/packages/_es/_plugin-vue_export-helper-dad06003.js +9 -0
  110. package/dist/packages/_es/common-d218746f.js +116 -0
  111. package/dist/packages/_es/component-234624bc.js +89 -0
  112. package/dist/packages/_es/index-14dfadc4.js +561 -0
  113. package/dist/packages/_es/index-192a3ef6.js +29 -0
  114. package/dist/packages/_es/index-360c5092.js +210 -0
  115. package/dist/packages/_es/index-496e6e05.js +24 -0
  116. package/dist/packages/_es/index-50eed3d9.js +7 -0
  117. package/dist/packages/_es/index-53ec2d4d.js +34 -0
  118. package/dist/packages/_es/index-fadb0974.js +8 -0
  119. package/dist/packages/_es/index.vue_vue_type_script_lang-1139b29a.js +43 -0
  120. package/dist/packages/_es/index.vue_vue_type_script_lang-43b774dd.js +77 -0
  121. package/dist/packages/_es/index.vue_vue_type_script_lang-f44c159d.js +110 -0
  122. package/dist/packages/_es/mountComponent-6d4ff200.js +23 -0
  123. package/dist/packages/_es/pxCheck-38173291.js +4 -0
  124. package/dist/packages/_es/raf-a74f1a06.js +16 -0
  125. package/dist/packages/_es/renderIcon-47498b32.js +5 -0
  126. package/dist/packages/actionsheet/index.scss +2 -0
  127. package/dist/packages/actionsheet/style.mjs +0 -2
  128. package/dist/packages/address/index.scss +5 -2
  129. package/dist/packages/address/style.mjs +0 -3
  130. package/dist/packages/addresslist/index.scss +3 -0
  131. package/dist/packages/addresslist/style.mjs +0 -2
  132. package/dist/packages/audio/index.scss +2 -0
  133. package/dist/packages/audio/style.mjs +0 -1
  134. package/dist/packages/audiooperate/index.scss +2 -0
  135. package/dist/packages/audiooperate/style.mjs +0 -1
  136. package/dist/packages/badge/index.scss +3 -0
  137. package/dist/packages/button/index.scss +1 -1
  138. package/dist/packages/calendar/index.scss +3 -0
  139. package/dist/packages/calendar/style.mjs +0 -3
  140. package/dist/packages/card/index.scss +3 -0
  141. package/dist/packages/card/style.mjs +0 -2
  142. package/dist/packages/cascader/index.scss +4 -0
  143. package/dist/packages/cascader/style.mjs +0 -5
  144. package/dist/packages/cellgroup/index.scss +1 -1
  145. package/dist/packages/checkbox/index.scss +41 -0
  146. package/dist/packages/col/index.scss +2 -2
  147. package/dist/packages/comment/index.scss +2 -0
  148. package/dist/packages/comment/style.mjs +0 -1
  149. package/dist/packages/datepicker/index.scss +1 -2
  150. package/dist/packages/datepicker/style.mjs +0 -3
  151. package/dist/packages/dialog/index.scss +11 -0
  152. package/dist/packages/dialog/style.mjs +0 -3
  153. package/dist/packages/ecard/index.scss +2 -0
  154. package/dist/packages/ecard/style.mjs +0 -1
  155. package/dist/packages/fixednav/index.scss +2 -0
  156. package/dist/packages/fixednav/style.mjs +0 -1
  157. package/dist/packages/form/index.scss +1 -2
  158. package/dist/packages/form/style.mjs +0 -1
  159. package/dist/packages/formitem/index.scss +3 -0
  160. package/dist/packages/formitem/style.mjs +0 -1
  161. package/dist/packages/imagepreview/index.scss +5 -5
  162. package/dist/packages/imagepreview/style.mjs +0 -5
  163. package/dist/packages/input/index.scss +13 -13
  164. package/dist/packages/invoice/index.scss +6 -0
  165. package/dist/packages/invoice/style.mjs +0 -7
  166. package/dist/packages/list/index.scss +8 -8
  167. package/dist/packages/menuitem/index.scss +9 -10
  168. package/dist/packages/menuitem/style.mjs +0 -2
  169. package/dist/packages/navbar/index.scss +0 -1
  170. package/dist/packages/noticebar/index.scss +12 -2
  171. package/dist/packages/notify/index.scss +2 -0
  172. package/dist/packages/notify/style.mjs +0 -2
  173. package/dist/packages/numberkeyboard/index.scss +2 -0
  174. package/dist/packages/numberkeyboard/style.mjs +0 -2
  175. package/dist/packages/picker/index.scss +4 -9
  176. package/dist/packages/picker/style.mjs +0 -2
  177. package/dist/packages/popover/index.scss +2 -0
  178. package/dist/packages/popover/style.mjs +0 -2
  179. package/dist/packages/popup/index.scss +2 -0
  180. package/dist/packages/popup/style.mjs +0 -1
  181. package/dist/packages/price/index.scss +5 -10
  182. package/dist/packages/rate/index.scss +6 -9
  183. package/dist/packages/searchbar/index.scss +4 -0
  184. package/dist/packages/shortpassword/index.scss +18 -0
  185. package/dist/packages/shortpassword/style.mjs +0 -2
  186. package/dist/packages/signature/index.scss +2 -0
  187. package/dist/packages/signature/style.mjs +0 -1
  188. package/dist/packages/skeleton/index.scss +2 -0
  189. package/dist/packages/skeleton/style.mjs +0 -1
  190. package/dist/packages/sku/index.scss +4 -0
  191. package/dist/packages/sku/style.mjs +0 -4
  192. package/dist/packages/tabbaritem/index.scss +2 -0
  193. package/dist/packages/tabbaritem/style.mjs +0 -1
  194. package/dist/packages/tabs/index.scss +36 -2
  195. package/dist/packages/tabs/style.mjs +0 -1
  196. package/dist/packages/textarea/index.scss +2 -0
  197. package/dist/packages/timeselect/index.scss +2 -0
  198. package/dist/packages/timeselect/style.mjs +0 -2
  199. package/dist/packages/tour/index.scss +2 -0
  200. package/dist/packages/tour/style.mjs +0 -3
  201. package/dist/packages/uploader/index.scss +10 -2
  202. package/dist/packages/uploader/style.mjs +0 -2
  203. package/dist/resolver/index.d.ts +6 -0
  204. package/dist/resolver/index.js +1 -0
  205. package/dist/resolver/index.mjs +24 -0
  206. package/dist/resolver/package.json +20 -0
  207. package/dist/smartips/web-types.json +114 -15
  208. package/dist/style.css +1 -1
  209. package/dist/styles/themes/default.scss +155 -52
  210. package/dist/styles/themes/jdb.scss +155 -52
  211. package/dist/styles/themes/jddkh.scss +155 -52
  212. package/dist/styles/themes/jdt.scss +155 -52
  213. package/dist/styles/variables-jdb.scss +9 -1
  214. package/dist/styles/variables-jddkh.scss +9 -1
  215. package/dist/styles/variables-jdt.scss +9 -1
  216. package/dist/styles/variables.scss +8 -0
  217. package/dist/types/__VUE/address/index.vue.d.ts +2 -1
  218. package/dist/types/__VUE/addresslist/components/GeneralShell.vue.d.ts +1 -1
  219. package/dist/types/__VUE/addresslist/components/ItemContents.vue.d.ts +1 -1
  220. package/dist/types/__VUE/addresslist/index.vue.d.ts +1 -1
  221. package/dist/types/__VUE/animate/index.vue.d.ts +6 -0
  222. package/dist/types/__VUE/audiooperate/index.vue.d.ts +4 -4
  223. package/dist/types/__VUE/badge/index.vue.d.ts +9 -0
  224. package/dist/types/__VUE/button/type.d.ts +1 -0
  225. package/dist/types/__VUE/calendaritem/type.d.ts +1 -0
  226. package/dist/types/__VUE/collapse/index.vue.d.ts +31 -5
  227. package/dist/types/__VUE/collapseitem/index.vue.d.ts +117 -11
  228. package/dist/types/__VUE/configprovider/index.vue.d.ts +2 -2
  229. package/dist/types/__VUE/datepicker/index.vue.d.ts +1 -1
  230. package/dist/types/__VUE/dialog/index.d.ts +1 -0
  231. package/dist/types/__VUE/dialog/index.vue.d.ts +1 -0
  232. package/dist/types/__VUE/grid/index.vue.d.ts +1 -1
  233. package/dist/types/__VUE/image/index.vue.d.ts +14 -3
  234. package/dist/types/__VUE/imagepreview/imagePreviewItem.vue.d.ts +9 -0
  235. package/dist/types/__VUE/imagepreview/index.vue.d.ts +1 -1
  236. package/dist/types/__VUE/input/index.vue.d.ts +27 -2
  237. package/dist/types/__VUE/list/index.vue.d.ts +42 -13
  238. package/dist/types/__VUE/list/type.d.ts +13 -0
  239. package/dist/types/__VUE/menu/index.vue.d.ts +0 -2
  240. package/dist/types/__VUE/menuitem/index.vue.d.ts +9 -17
  241. package/dist/types/__VUE/navbar/index.vue.d.ts +1 -1
  242. package/dist/types/__VUE/noticebar/index.vue.d.ts +5 -2
  243. package/dist/types/__VUE/picker/common.d.ts +2 -0
  244. package/dist/types/__VUE/picker/usePicker.d.ts +1 -1
  245. package/dist/types/__VUE/price/index.vue.d.ts +9 -0
  246. package/dist/types/__VUE/rate/index.vue.d.ts +110 -3
  247. package/dist/types/__VUE/row/index.vue.d.ts +1 -1
  248. package/dist/types/__VUE/searchbar/index.vue.d.ts +121 -5
  249. package/dist/types/__VUE/skeleton/index.vue.d.ts +2 -2
  250. package/dist/types/__VUE/swiper/index.vue.d.ts +9 -2
  251. package/dist/types/__VUE/switch/index.vue.d.ts +1 -0
  252. package/dist/types/__VUE/table/common.d.ts +55 -2
  253. package/dist/types/__VUE/tabpane/index.vue.d.ts +1 -4
  254. package/dist/types/__VUE/tabs/hooks.d.ts +12 -0
  255. package/dist/types/__VUE/tabs/index.vue.d.ts +35 -5
  256. package/dist/types/__VUE/tabs/types.d.ts +12 -0
  257. package/dist/types/__VUE/timeselect/index.vue.d.ts +1 -1
  258. package/dist/types/__VUE/toast/index.vue.d.ts +11 -4
  259. package/dist/types/__VUE/uploader/type.d.ts +2 -1
  260. package/dist/types/__VUE/watermark/index.vue.d.ts +1 -1
  261. package/dist/types/index.d.ts +1 -2
  262. package/dist/types/resolver/index.d.ts +6 -0
  263. package/dist/types/utils/date.d.ts +4 -0
  264. package/dist/types/utils/useTaroRect/index.d.ts +1 -1
  265. package/dist/types/utils/util.d.ts +1 -1
  266. package/package.json +13 -6
  267. package/dist/packages/_es/_plugin-vue_export-helper-cc2b3d55.js +0 -10
  268. package/dist/packages/_es/common-b9a5e726.js +0 -145
  269. package/dist/packages/_es/component-81a4c1d0.js +0 -145
  270. package/dist/packages/_es/index-29892cda.js +0 -33
  271. package/dist/packages/_es/index-2ae3ae87.js +0 -846
  272. package/dist/packages/_es/index-43c34ac6.js +0 -30
  273. package/dist/packages/_es/index-54d03fc1.js +0 -8
  274. package/dist/packages/_es/index-79c5dc33.js +0 -10
  275. package/dist/packages/_es/index-7a7385e4.js +0 -67
  276. package/dist/packages/_es/index-991c279f.js +0 -244
  277. package/dist/packages/_es/index.vue_vue_type_script_lang-22dfc112.js +0 -46
  278. package/dist/packages/_es/index.vue_vue_type_script_lang-442e4704.js +0 -98
  279. package/dist/packages/_es/index.vue_vue_type_script_lang-cc5c4086.js +0 -151
  280. package/dist/packages/_es/interceptor-956b24fc.js +0 -29
  281. package/dist/packages/_es/mountComponent-1ece4110.js +0 -39
  282. package/dist/packages/_es/pxCheck-c6b9f6b7.js +0 -6
  283. package/dist/packages/_es/raf-729dad54.js +0 -25
  284. package/dist/packages/_es/renderIcon-3d0fd47c.js +0 -9
  285. /package/dist/types/utils/{interceptor.d.ts → Interceptor.d.ts} +0 -0
@@ -1,10 +1,9 @@
1
- import { toRefs, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, renderSlot, createBlock, createCommentVNode } from "vue";
2
- import { c as createComponent } from "./component-81a4c1d0.js";
3
- import { Close } from "@nutui/icons-vue";
4
- import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
1
+ import { toRefs as p, computed as i, resolveComponent as f, openBlock as u, createElementBlock as m, normalizeClass as d, normalizeStyle as C, renderSlot as k, createBlock as y, createCommentVNode as v } from "vue";
2
+ import { c as g } from "./component-234624bc.js";
3
+ import { Close as $ } from "@nutui/icons-vue";
4
+ import { _ as S } from "./_plugin-vue_export-helper-dad06003.js";
5
5
  import "../locale/lang";
6
- const { componentName, create } = createComponent("tag");
7
- const _sfc_main = create({
6
+ const { componentName: B, create: b } = g("tag"), h = b({
8
7
  props: {
9
8
  color: { type: String, default: "" },
10
9
  textColor: { type: String, default: "" },
@@ -14,85 +13,69 @@ const _sfc_main = create({
14
13
  },
15
14
  plain: {
16
15
  type: Boolean,
17
- default: false
16
+ default: !1
18
17
  },
19
18
  round: {
20
19
  type: Boolean,
21
- default: false
20
+ default: !1
22
21
  },
23
22
  mark: {
24
23
  type: Boolean,
25
- default: false
24
+ default: !1
26
25
  },
27
26
  closeable: {
28
27
  type: Boolean,
29
- default: false
28
+ default: !1
30
29
  }
31
30
  },
32
31
  components: {
33
- Close
32
+ Close: $
34
33
  },
35
34
  emits: ["close", "click"],
36
- setup(props, { emit }) {
37
- const { type, color, plain, round, mark, textColor } = toRefs(props);
38
- const classes = computed(() => {
39
- const prefixCls = componentName;
40
- return {
41
- [prefixCls]: true,
42
- [`${prefixCls}--${type.value}`]: type.value,
43
- [`${prefixCls}--plain`]: plain.value,
44
- [`${prefixCls}--round`]: round.value,
45
- [`${prefixCls}--mark`]: mark.value
46
- };
47
- });
48
- const getStyle = () => {
49
- const style = {};
50
- if (textColor.value) {
51
- style.color = textColor.value;
52
- } else if (color.value && plain.value) {
53
- style.color = color.value;
54
- }
55
- if (plain.value) {
56
- style.background = "#fff";
57
- style["border-color"] = color.value;
58
- } else if (color.value) {
59
- style.background = color.value;
60
- }
61
- return style;
62
- };
63
- const onClose = (event) => {
64
- event.stopPropagation();
65
- emit("close", event);
66
- };
67
- const onClick = (event) => {
68
- emit("click", event);
69
- };
35
+ setup(o, { emit: t }) {
36
+ const { type: s, color: l, plain: a, round: c, mark: r, textColor: n } = p(o);
70
37
  return {
71
- classes,
72
- getStyle,
73
- onClose,
74
- onClick
38
+ classes: i(() => {
39
+ const e = B;
40
+ return {
41
+ [e]: !0,
42
+ [`${e}--${s.value}`]: s.value,
43
+ [`${e}--plain`]: a.value,
44
+ [`${e}--round`]: c.value,
45
+ [`${e}--mark`]: r.value
46
+ };
47
+ }),
48
+ getStyle: () => {
49
+ const e = {};
50
+ return n.value ? e.color = n.value : l.value && a.value && (e.color = l.value), a.value ? (e.background = "#fff", e["border-color"] = l.value) : l.value && (e.background = l.value), e;
51
+ },
52
+ onClose: (e) => {
53
+ e.stopPropagation(), t("close", e);
54
+ },
55
+ onClick: (e) => {
56
+ t("click", e);
57
+ }
75
58
  };
76
59
  }
77
60
  });
78
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
79
- const _component_Close = resolveComponent("Close");
80
- return openBlock(), createElementBlock("view", {
81
- class: normalizeClass(_ctx.classes),
82
- style: normalizeStyle(_ctx.getStyle()),
83
- onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onClick && _ctx.onClick(...args))
61
+ function w(o, t, s, l, a, c) {
62
+ const r = f("Close");
63
+ return u(), m("view", {
64
+ class: d(o.classes),
65
+ style: C(o.getStyle()),
66
+ onClick: t[0] || (t[0] = (...n) => o.onClick && o.onClick(...n))
84
67
  }, [
85
- renderSlot(_ctx.$slots, "default"),
86
- _ctx.closeable ? (openBlock(), createBlock(_component_Close, {
68
+ k(o.$slots, "default"),
69
+ o.closeable ? (u(), y(r, {
87
70
  key: 0,
88
71
  class: "nut-tag--close",
89
72
  width: "12px",
90
73
  height: "12px",
91
- onClick: _ctx.onClose
92
- }, null, 8, ["onClick"])) : createCommentVNode("", true)
74
+ onClick: o.onClose
75
+ }, null, 8, ["onClick"])) : v("", !0)
93
76
  ], 6);
94
77
  }
95
- const Tag = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
78
+ const j = /* @__PURE__ */ S(h, [["render", w]]);
96
79
  export {
97
- Tag as default
80
+ j as default
98
81
  };
@@ -1,9 +1,8 @@
1
- import { ref, computed, onMounted, nextTick, watch, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle, toDisplayString, createCommentVNode } from "vue";
2
- import { c as createComponent } from "./component-81a4c1d0.js";
3
- import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
1
+ import { ref as c, computed as m, onMounted as p, nextTick as g, watch as b, openBlock as f, createElementBlock as h, normalizeClass as C, createElementVNode as V, normalizeStyle as w, toDisplayString as y, createCommentVNode as S } from "vue";
2
+ import { c as L } from "./component-234624bc.js";
3
+ import { _ as N } from "./_plugin-vue_export-helper-dad06003.js";
4
4
  import "../locale/lang";
5
- const { componentName, create, translate } = createComponent("textarea");
6
- const _sfc_main = create({
5
+ const { componentName: B, create: z, translate: v } = L("textarea"), x = z({
7
6
  props: {
8
7
  modelValue: {
9
8
  type: String,
@@ -15,7 +14,7 @@ const _sfc_main = create({
15
14
  },
16
15
  limitShow: {
17
16
  type: Boolean,
18
- default: false
17
+ default: !1
19
18
  },
20
19
  maxLength: {
21
20
  type: [String, Number],
@@ -31,157 +30,114 @@ const _sfc_main = create({
31
30
  },
32
31
  readonly: {
33
32
  type: Boolean,
34
- default: false
33
+ default: !1
35
34
  },
36
35
  disabled: {
37
36
  type: Boolean,
38
- default: false
37
+ default: !1
39
38
  },
40
39
  autosize: {
41
40
  type: [Boolean, Object],
42
- default: false
41
+ default: !1
43
42
  },
44
43
  autofocus: {
45
44
  type: Boolean,
46
- default: false
45
+ default: !1
47
46
  }
48
47
  },
49
48
  emits: ["update:modelValue", "change", "blur", "focus"],
50
- setup(props, { emit }) {
51
- const textareaRef = ref();
52
- const classes = computed(() => {
53
- const prefixCls = componentName;
49
+ setup(e, { emit: o }) {
50
+ const s = c(), u = m(() => {
51
+ const t = B;
54
52
  return {
55
- [prefixCls]: true,
56
- [`${prefixCls}--disabled`]: props.disabled
53
+ [t]: !0,
54
+ [`${t}--disabled`]: e.disabled
57
55
  };
58
56
  });
59
- onMounted(() => {
60
- if (props.modelValue) {
61
- emitChange(String(props.modelValue));
62
- }
63
- if (props.autosize) {
64
- nextTick(getContentHeight);
65
- }
66
- });
67
- const styles = computed(() => {
68
- return {
69
- textAlign: props.textAlign
70
- // resize: props.autosize ? 'vertical' : 'none'
71
- };
57
+ p(() => {
58
+ e.modelValue && n(String(e.modelValue)), e.autosize && g(i);
72
59
  });
73
- const getContentHeight = () => {
74
- let textarea = textareaRef.value;
75
- textarea.style.height = "auto";
76
- let height = textarea.scrollHeight;
77
- if (typeof props.autosize === "object") {
78
- const { maxHeight, minHeight } = props.autosize;
79
- if (maxHeight !== void 0) {
80
- height = Math.min(height, maxHeight);
81
- }
82
- if (minHeight !== void 0) {
83
- height = Math.max(height, minHeight);
84
- }
85
- }
86
- if (height) {
87
- textarea.style.height = height + "px";
60
+ const r = m(() => ({
61
+ textAlign: e.textAlign
62
+ // resize: props.autosize ? 'vertical' : 'none'
63
+ })), i = () => {
64
+ let t = s.value;
65
+ t.style.height = "auto";
66
+ let a = t.scrollHeight;
67
+ if (typeof e.autosize == "object") {
68
+ const { maxHeight: l, minHeight: d } = e.autosize;
69
+ l !== void 0 && (a = Math.min(a, l)), d !== void 0 && (a = Math.max(a, d));
88
70
  }
71
+ a && (t.style.height = a + "px");
89
72
  };
90
- watch(
91
- () => props.modelValue,
73
+ b(
74
+ () => e.modelValue,
92
75
  () => {
93
- if (props.autosize) {
94
- nextTick(getContentHeight);
95
- }
76
+ e.autosize && g(i);
96
77
  }
97
78
  );
98
- const emitChange = (value, event) => {
99
- if (props.maxLength && value.length > Number(props.maxLength)) {
100
- value = value.substring(0, Number(props.maxLength));
101
- }
102
- emit("update:modelValue", value, event);
103
- emit("change", value, event);
79
+ const n = (t, a) => {
80
+ e.maxLength && t.length > Number(e.maxLength) && (t = t.substring(0, Number(e.maxLength))), o("update:modelValue", t, a), o("change", t, a);
104
81
  };
105
- const change = (event) => {
106
- if (!event.target.composing) {
107
- const input = event.target;
108
- let value = input.value;
109
- if (props.maxLength && value.length > Number(props.maxLength)) {
110
- value = value.slice(0, Number(props.maxLength));
82
+ return {
83
+ textareaRef: s,
84
+ classes: u,
85
+ styles: r,
86
+ change: (t) => {
87
+ if (!t.target.composing) {
88
+ const a = t.target;
89
+ let l = a.value;
90
+ e.maxLength && l.length > Number(e.maxLength) && (l = l.slice(0, Number(e.maxLength))), n(a.value, t);
111
91
  }
112
- emitChange(input.value, event);
92
+ },
93
+ focus: (t) => {
94
+ e.disabled || e.readonly || o("focus", t);
95
+ },
96
+ blur: (t) => {
97
+ if (e.disabled || e.readonly)
98
+ return;
99
+ let l = t.target.value;
100
+ n(l, t), o("blur", { value: l, event: t });
101
+ },
102
+ translate: v,
103
+ startComposing: ({ target: t }) => {
104
+ t.composing = !0;
105
+ },
106
+ endComposing: ({ target: t }) => {
107
+ t.composing && (t.composing = !1, t.dispatchEvent(new Event("input")));
113
108
  }
114
109
  };
115
- const focus = (event) => {
116
- if (props.disabled)
117
- return;
118
- if (props.readonly)
119
- return;
120
- emit("focus", event);
121
- };
122
- const blur = (event) => {
123
- if (props.disabled)
124
- return;
125
- if (props.readonly)
126
- return;
127
- const input = event.target;
128
- let value = input.value;
129
- emitChange(value, event);
130
- emit("blur", { value, event });
131
- };
132
- const startComposing = ({ target }) => {
133
- target.composing = true;
134
- };
135
- const endComposing = ({ target }) => {
136
- if (target.composing) {
137
- target.composing = false;
138
- target.dispatchEvent(new Event("input"));
139
- }
140
- };
141
- return {
142
- textareaRef,
143
- classes,
144
- styles,
145
- change,
146
- focus,
147
- blur,
148
- translate,
149
- startComposing,
150
- endComposing
151
- };
152
110
  }
153
- });
154
- const _hoisted_1 = ["rows", "disabled", "readonly", "value", "maxlength", "placeholder", "autofocus"];
155
- const _hoisted_2 = {
111
+ }), $ = ["rows", "disabled", "readonly", "value", "maxlength", "placeholder", "autofocus"], k = {
156
112
  key: 0,
157
113
  class: "nut-textarea__limit"
158
114
  };
159
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
160
- return openBlock(), createElementBlock("view", {
161
- class: normalizeClass(_ctx.classes)
115
+ function E(e, o, s, u, r, i) {
116
+ return f(), h("view", {
117
+ class: C(e.classes)
162
118
  }, [
163
- createElementVNode("textarea", {
119
+ V("textarea", {
164
120
  ref: "textareaRef",
165
121
  class: "nut-textarea__textarea",
166
- style: normalizeStyle(_ctx.styles),
167
- rows: _ctx.rows,
168
- disabled: _ctx.disabled,
169
- readonly: _ctx.readonly,
170
- value: _ctx.modelValue,
171
- onInput: _cache[0] || (_cache[0] = (...args) => _ctx.change && _ctx.change(...args)),
172
- onBlur: _cache[1] || (_cache[1] = (...args) => _ctx.blur && _ctx.blur(...args)),
173
- onFocus: _cache[2] || (_cache[2] = (...args) => _ctx.focus && _ctx.focus(...args)),
174
- maxlength: _ctx.maxLength,
175
- placeholder: _ctx.placeholder || _ctx.translate("placeholder"),
176
- autofocus: _ctx.autofocus,
177
- onChange: _cache[3] || (_cache[3] = (...args) => _ctx.endComposing && _ctx.endComposing(...args)),
178
- onCompositionend: _cache[4] || (_cache[4] = (...args) => _ctx.endComposing && _ctx.endComposing(...args)),
179
- onCompositionstart: _cache[5] || (_cache[5] = (...args) => _ctx.startComposing && _ctx.startComposing(...args))
180
- }, null, 44, _hoisted_1),
181
- _ctx.limitShow ? (openBlock(), createElementBlock("view", _hoisted_2, toDisplayString(_ctx.modelValue ? _ctx.modelValue.length : 0) + "/" + toDisplayString(_ctx.maxLength), 1)) : createCommentVNode("", true)
122
+ style: w(e.styles),
123
+ rows: e.rows,
124
+ disabled: e.disabled,
125
+ readonly: e.readonly,
126
+ value: e.modelValue,
127
+ onInput: o[0] || (o[0] = (...n) => e.change && e.change(...n)),
128
+ onBlur: o[1] || (o[1] = (...n) => e.blur && e.blur(...n)),
129
+ onFocus: o[2] || (o[2] = (...n) => e.focus && e.focus(...n)),
130
+ maxlength: e.maxLength,
131
+ placeholder: e.placeholder || e.translate("placeholder"),
132
+ autofocus: e.autofocus,
133
+ onChange: o[3] || (o[3] = (...n) => e.endComposing && e.endComposing(...n)),
134
+ onCompositionend: o[4] || (o[4] = (...n) => e.endComposing && e.endComposing(...n)),
135
+ onCompositionstart: o[5] || (o[5] = (...n) => e.startComposing && e.startComposing(...n))
136
+ }, null, 44, $),
137
+ e.limitShow ? (f(), h("view", k, y(e.modelValue ? e.modelValue.length : 0) + "/" + y(e.maxLength), 1)) : S("", !0)
182
138
  ], 2);
183
139
  }
184
- const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
140
+ const T = /* @__PURE__ */ N(x, [["render", E]]);
185
141
  export {
186
- index as default
142
+ T as default
187
143
  };
@@ -1,77 +1,69 @@
1
- import { inject, reactive, computed, toRefs, openBlock, createElementBlock, normalizeClass, createElementVNode, Fragment, renderList, toDisplayString } from "vue";
2
- import { c as createComponent } from "./component-81a4c1d0.js";
3
- import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
1
+ var T = Object.defineProperty, $ = Object.defineProperties;
2
+ var w = Object.getOwnPropertyDescriptors;
3
+ var u = Object.getOwnPropertySymbols;
4
+ var K = Object.prototype.hasOwnProperty, D = Object.prototype.propertyIsEnumerable;
5
+ var p = (e, t, r) => t in e ? T(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, f = (e, t) => {
6
+ for (var r in t || (t = {}))
7
+ K.call(t, r) && p(e, r, t[r]);
8
+ if (u)
9
+ for (var r of u(t))
10
+ D.call(t, r) && p(e, r, t[r]);
11
+ return e;
12
+ }, y = (e, t) => $(e, w(t));
13
+ import { inject as C, reactive as x, computed as h, toRefs as B, openBlock as l, createElementBlock as c, normalizeClass as k, createElementVNode as g, Fragment as E, renderList as N, toDisplayString as j } from "vue";
14
+ import { c as z } from "./component-234624bc.js";
15
+ import { _ as A } from "./_plugin-vue_export-helper-dad06003.js";
4
16
  import "../locale/lang";
5
- const { componentName, create } = createComponent("time-detail");
6
- const _sfc_main = create({
17
+ const { componentName: F, create: L } = z("time-detail"), R = L({
7
18
  name: "timedetail",
8
19
  props: {
9
20
  times: {
10
21
  type: Array,
11
- default: () => {
12
- return [];
13
- }
22
+ default: () => []
14
23
  }
15
24
  },
16
25
  emits: ["select"],
17
- setup: (props, context) => {
18
- const currentKey = inject("currentKey");
19
- const currentTime = inject("currentTime");
20
- const state = reactive({
21
- currentKey,
22
- currentTime
23
- });
24
- const classes = computed(() => {
25
- const prefixCls = componentName;
26
- return {
27
- [prefixCls]: true
28
- };
29
- });
30
- const getClass = (item) => {
31
- let find = state.currentTime.find((item2) => item2.key == state.currentKey);
32
- if (find) {
26
+ setup: (e, t) => {
27
+ const r = C("currentKey"), o = C("currentTime"), i = x({
28
+ currentKey: r,
29
+ currentTime: o
30
+ }), m = h(() => ({
31
+ [F]: !0
32
+ })), n = (s) => {
33
+ let _ = i.currentTime.find((a) => a.key == i.currentKey);
34
+ if (_)
33
35
  return {
34
- "nut-time-detail__detail__list__item": true,
35
- "nut-time-detail__detail__list__item--curr": find.list.filter((value) => value === item).length > 0
36
+ "nut-time-detail__detail__list__item": !0,
37
+ "nut-time-detail__detail__list__item--curr": _.list.filter((a) => a === s).length > 0
36
38
  };
37
- }
39
+ }, d = h(() => e.times.find((s) => s.key == i.currentKey).list), v = (s) => {
40
+ t.emit("select", s);
38
41
  };
39
- const renderData = computed(() => {
40
- return props.times.find((time) => time.key == state.currentKey)["list"];
42
+ return y(f({
43
+ classes: m
44
+ }, B(i)), {
45
+ getClass: n,
46
+ renderData: d,
47
+ handleTime: v
41
48
  });
42
- const handleTime = (time) => {
43
- context.emit("select", time);
44
- };
45
- return {
46
- classes,
47
- ...toRefs(state),
48
- getClass,
49
- renderData,
50
- handleTime
51
- };
52
49
  }
53
- });
54
- const _hoisted_1 = { class: "nut-time-detail__detail nut-time-detail__detail--moring" };
55
- const _hoisted_2 = { class: "nut-time-detail__detail__list" };
56
- const _hoisted_3 = ["onClick"];
57
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
58
- return openBlock(), createElementBlock("view", {
59
- class: normalizeClass(_ctx.classes)
50
+ }), S = { class: "nut-time-detail__detail nut-time-detail__detail--moring" }, V = { class: "nut-time-detail__detail__list" }, b = ["onClick"];
51
+ function q(e, t, r, o, i, m) {
52
+ return l(), c("view", {
53
+ class: k(e.classes)
60
54
  }, [
61
- createElementVNode("view", _hoisted_1, [
62
- createElementVNode("view", _hoisted_2, [
63
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.renderData, (item) => {
64
- return openBlock(), createElementBlock("view", {
65
- class: normalizeClass(_ctx.getClass(item)),
66
- key: item,
67
- onClick: ($event) => _ctx.handleTime(item)
68
- }, toDisplayString(item), 11, _hoisted_3);
69
- }), 128))
55
+ g("view", S, [
56
+ g("view", V, [
57
+ (l(!0), c(E, null, N(e.renderData, (n) => (l(), c("view", {
58
+ class: k(e.getClass(n)),
59
+ key: n,
60
+ onClick: (d) => e.handleTime(n)
61
+ }, j(n), 11, b))), 128))
70
62
  ])
71
63
  ])
72
64
  ], 2);
73
65
  }
74
- const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
66
+ const O = /* @__PURE__ */ A(R, [["render", q]]);
75
67
  export {
76
- index as default
68
+ O as default
77
69
  };
@@ -1,9 +1,20 @@
1
- import { inject, reactive, computed, toRefs, openBlock, createElementBlock, normalizeClass, toDisplayString } from "vue";
2
- import { c as createComponent } from "./component-81a4c1d0.js";
3
- import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
1
+ var m = Object.defineProperty, u = Object.defineProperties;
2
+ var f = Object.getOwnPropertyDescriptors;
3
+ var p = Object.getOwnPropertySymbols;
4
+ var d = Object.prototype.hasOwnProperty, y = Object.prototype.propertyIsEnumerable;
5
+ var c = (n, e, t) => e in n ? m(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, l = (n, e) => {
6
+ for (var t in e || (e = {}))
7
+ d.call(e, t) && c(n, t, e[t]);
8
+ if (p)
9
+ for (var t of p(e))
10
+ y.call(e, t) && c(n, t, e[t]);
11
+ return n;
12
+ }, i = (n, e) => u(n, f(e));
13
+ import { inject as K, reactive as g, computed as C, toRefs as $, openBlock as h, createElementBlock as k, normalizeClass as v, toDisplayString as S } from "vue";
14
+ import { c as _ } from "./component-234624bc.js";
15
+ import { _ as x } from "./_plugin-vue_export-helper-dad06003.js";
4
16
  import "../locale/lang";
5
- const { componentName, create } = createComponent("time-pannel");
6
- const _sfc_main = create({
17
+ const { componentName: B, create: N } = _("time-pannel"), P = N({
7
18
  name: "timepannel",
8
19
  props: {
9
20
  name: {
@@ -16,35 +27,28 @@ const _sfc_main = create({
16
27
  }
17
28
  },
18
29
  emits: ["change"],
19
- setup: (props, context) => {
20
- const currentKey = inject("currentKey");
21
- const state = reactive({
22
- currentKey
23
- });
24
- const classes = computed(() => {
25
- const prefixCls = componentName;
26
- return {
27
- [prefixCls]: true,
28
- "nut-time-pannel--curr": state.currentKey == props.pannelKey
29
- };
30
- });
31
- const handlePannel = (pannelKey) => {
32
- context.emit("change", pannelKey);
33
- };
34
- return {
35
- ...toRefs(state),
36
- classes,
37
- handlePannel
30
+ setup: (n, e) => {
31
+ const t = K("currentKey"), r = g({
32
+ currentKey: t
33
+ }), s = C(() => ({
34
+ [B]: !0,
35
+ "nut-time-pannel--curr": r.currentKey == n.pannelKey
36
+ })), o = (a) => {
37
+ e.emit("change", a);
38
38
  };
39
+ return i(l({}, $(r)), {
40
+ classes: s,
41
+ handlePannel: o
42
+ });
39
43
  }
40
44
  });
41
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
42
- return openBlock(), createElementBlock("view", {
43
- class: normalizeClass(_ctx.classes),
44
- onClick: _cache[0] || (_cache[0] = ($event) => _ctx.handlePannel(_ctx.pannelKey))
45
- }, toDisplayString(_ctx.name), 3);
45
+ function b(n, e, t, r, s, o) {
46
+ return h(), k("view", {
47
+ class: v(n.classes),
48
+ onClick: e[0] || (e[0] = (a) => n.handlePannel(n.pannelKey))
49
+ }, S(n.name), 3);
46
50
  }
47
- const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
51
+ const R = /* @__PURE__ */ x(P, [["render", b]]);
48
52
  export {
49
- index as default
53
+ R as default
50
54
  };