@nutui/nutui 3.1.22-beta.0 → 3.1.22-beta.3

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 (176) hide show
  1. package/dist/nutui.es.js +4019 -19251
  2. package/dist/nutui.umd.js +4012 -19344
  3. package/dist/packages/_es/ActionSheet.js +26 -157
  4. package/dist/packages/_es/Address.js +119 -542
  5. package/dist/packages/_es/AddressList.js +113 -613
  6. package/dist/packages/_es/Audio.js +62 -264
  7. package/dist/packages/_es/AudioOperate.js +18 -107
  8. package/dist/packages/_es/Avatar.js +42 -165
  9. package/dist/packages/_es/AvatarGroup.js +14 -73
  10. package/dist/packages/_es/BackTop.js +43 -156
  11. package/dist/packages/_es/Badge.js +14 -86
  12. package/dist/packages/_es/Barrage.js +41 -120
  13. package/dist/packages/_es/Button.js +23 -128
  14. package/dist/packages/_es/Calendar.js +24 -237
  15. package/dist/packages/_es/CalendarItem.js +1 -1
  16. package/dist/packages/_es/Card.js +10 -107
  17. package/dist/packages/_es/Cascader.js +156 -500
  18. package/dist/packages/_es/Category.js +15 -58
  19. package/dist/packages/_es/CategoryPane.js +11 -111
  20. package/dist/packages/_es/Cell.js +21 -100
  21. package/dist/packages/_es/CellGroup.js +9 -44
  22. package/dist/packages/_es/Checkbox.js +31 -113
  23. package/dist/packages/_es/CheckboxGroup.js +29 -58
  24. package/dist/packages/_es/CircleProgress.js +28 -151
  25. package/dist/packages/_es/Col.js +14 -56
  26. package/dist/packages/_es/Collapse.js +24 -85
  27. package/dist/packages/_es/CollapseItem.js +70 -261
  28. package/dist/packages/_es/Comment.js +64 -434
  29. package/dist/packages/_es/CountDown.js +61 -242
  30. package/dist/packages/_es/CountUp.js +149 -546
  31. package/dist/packages/_es/DatePicker.js +107 -322
  32. package/dist/packages/_es/Dialog.js +69 -261
  33. package/dist/packages/_es/Divider.js +18 -68
  34. package/dist/packages/_es/Drag.js +56 -197
  35. package/dist/packages/_es/Ecard.js +24 -159
  36. package/dist/packages/_es/Elevator.js +63 -198
  37. package/dist/packages/_es/Empty.js +12 -71
  38. package/dist/packages/_es/FixedNav.js +15 -122
  39. package/dist/packages/_es/Form.js +64 -151
  40. package/dist/packages/_es/FormItem.js +15 -110
  41. package/dist/packages/_es/Grid.js +5 -6
  42. package/dist/packages/_es/GridItem.js +33 -144
  43. package/dist/packages/_es/Icon.js +15 -40
  44. package/dist/packages/_es/ImagePreview.js +74 -298
  45. package/dist/packages/_es/Indicator.js +15 -62
  46. package/dist/packages/_es/InfiniteLoading.js +66 -258
  47. package/dist/packages/_es/Input.js +51 -413
  48. package/dist/packages/_es/InputNumber.js +41 -160
  49. package/dist/packages/_es/Layout.js +4 -5
  50. package/dist/packages/_es/List.js +23 -110
  51. package/dist/packages/_es/Menu.js +30 -118
  52. package/dist/packages/_es/MenuItem.js +34 -162
  53. package/dist/packages/_es/Navbar.js +30 -192
  54. package/dist/packages/_es/NoticeBar.js +83 -387
  55. package/dist/packages/_es/Notify.js +81 -236
  56. package/dist/packages/_es/NumberKeyboard.js +41 -272
  57. package/dist/packages/_es/OldPicker.js +140 -464
  58. package/dist/packages/_es/OverLay.js +32 -105
  59. package/dist/packages/_es/Pagination.js +39 -157
  60. package/dist/packages/_es/Picker.js +138 -459
  61. package/dist/packages/_es/Popover.js +327 -965
  62. package/dist/packages/_es/Popup.js +64 -303
  63. package/dist/packages/_es/Price.js +16 -118
  64. package/dist/packages/_es/Progress.js +14 -146
  65. package/dist/packages/_es/PullRefresh.js +92 -346
  66. package/dist/packages/_es/Radio.js +22 -90
  67. package/dist/packages/_es/RadioGroup.js +8 -37
  68. package/dist/packages/_es/Range.js +92 -417
  69. package/dist/packages/_es/Rate.js +16 -139
  70. package/dist/packages/_es/Row.js +22 -64
  71. package/dist/packages/_es/SearchBar.js +46 -247
  72. package/dist/packages/_es/ShortPassword.js +35 -225
  73. package/dist/packages/_es/SideNavBar.js +33 -89
  74. package/dist/packages/_es/SideNavBarItem.js +11 -46
  75. package/dist/packages/_es/Signature.js +46 -165
  76. package/dist/packages/_es/Skeleton.js +20 -136
  77. package/dist/packages/_es/Sku.js +93 -499
  78. package/dist/packages/_es/Step.js +25 -119
  79. package/dist/packages/_es/Steps.js +18 -53
  80. package/dist/packages/_es/Sticky.js +53 -138
  81. package/dist/packages/_es/SubSideNavBar.js +26 -90
  82. package/dist/packages/_es/Swipe.js +46 -183
  83. package/dist/packages/_es/Swiper.js +121 -433
  84. package/dist/packages/_es/SwiperItem.js +22 -53
  85. package/dist/packages/_es/Switch.js +21 -116
  86. package/dist/packages/_es/TabPane.js +12 -39
  87. package/dist/packages/_es/Tabbar.js +17 -72
  88. package/dist/packages/_es/TabbarItem.js +29 -151
  89. package/dist/packages/_es/Table.js +27 -186
  90. package/dist/packages/_es/Tabs.js +51 -209
  91. package/dist/packages/_es/Tag.js +20 -97
  92. package/dist/packages/_es/TextArea.js +42 -160
  93. package/dist/packages/_es/TimeDetail.js +23 -84
  94. package/dist/packages/_es/TimePannel.js +19 -52
  95. package/dist/packages/_es/TimeSelect.js +15 -103
  96. package/dist/packages/_es/Toast.js +80 -319
  97. package/dist/packages/_es/Uploader.js +112 -460
  98. package/dist/packages/_es/Video.js +83 -340
  99. package/dist/packages/_es/common.js +38 -128
  100. package/dist/packages/_es/component.js +35 -76
  101. package/dist/packages/_es/index.js +5 -6
  102. package/dist/packages/_es/index2.js +9 -30
  103. package/dist/packages/_es/index3.js +6 -8
  104. package/dist/packages/_es/index4.js +13 -58
  105. package/dist/packages/_es/index5.js +120 -675
  106. package/dist/packages/_es/plugin-vue_export-helper.js +7 -8
  107. package/dist/packages/_es/pxCheck.js +3 -5
  108. package/dist/packages/_es/raf.js +8 -15
  109. package/dist/packages/button/index.scss +2 -1
  110. package/dist/packages/cell/index.scss +11 -0
  111. package/dist/packages/checkbox/index.scss +6 -0
  112. package/dist/packages/dialog/index.scss +1 -0
  113. package/dist/packages/elevator/index.scss +21 -0
  114. package/dist/packages/input/index.scss +13 -1
  115. package/dist/packages/locale/lang/baseLang.d.ts +1 -0
  116. package/dist/packages/locale/lang/baseLang.js +3 -3
  117. package/dist/packages/locale/lang/en-US.d.ts +8 -0
  118. package/dist/packages/locale/lang/en-US.js +5 -97
  119. package/dist/packages/locale/lang/id-ID.d.ts +8 -0
  120. package/dist/packages/locale/lang/id-ID.js +5 -97
  121. package/dist/packages/locale/lang/index.js +16 -38
  122. package/dist/packages/locale/lang/zh-CN.d.ts +8 -0
  123. package/dist/packages/locale/lang/zh-CN.js +5 -97
  124. package/dist/packages/locale/lang/zh-TW.d.ts +8 -0
  125. package/dist/packages/locale/lang/zh-TW.js +5 -97
  126. package/dist/packages/radio/index.scss +1 -0
  127. package/dist/packages/switch/index.scss +3 -3
  128. package/dist/packages/tabpane/index.scss +1 -0
  129. package/dist/smartips/attributes.json +62 -10
  130. package/dist/smartips/tags.json +17 -4
  131. package/dist/style.css +1 -1
  132. package/dist/styles/themes/default.scss +49 -49
  133. package/dist/styles/themes/jdb.scss +49 -49
  134. package/dist/styles/themes/jdt.scss +49 -49
  135. package/dist/styles/variables-jdb.scss +10 -1
  136. package/dist/styles/variables-jdt.scss +10 -1
  137. package/dist/styles/variables.scss +10 -1
  138. package/dist/types/__VUE/address/index.vue.d.ts +5 -5
  139. package/dist/types/__VUE/addresslist/components/ItemContents.vue.d.ts +1 -0
  140. package/dist/types/__VUE/audiooperate/index.vue.d.ts +1 -0
  141. package/dist/types/__VUE/avatar/index.vue.d.ts +4 -4
  142. package/dist/types/__VUE/backtop/index.vue.d.ts +2 -2
  143. package/dist/types/__VUE/badge/index.vue.d.ts +2 -2
  144. package/dist/types/__VUE/button/index.vue.d.ts +2 -2
  145. package/dist/types/__VUE/cascader/index.vue.d.ts +1 -1
  146. package/dist/types/__VUE/cell/index.vue.d.ts +11 -4
  147. package/dist/types/__VUE/checkbox/common.d.ts +59 -0
  148. package/dist/types/__VUE/checkbox/index.vue.d.ts +18 -5
  149. package/dist/types/__VUE/checkboxgroup/index.vue.d.ts +7 -0
  150. package/dist/types/__VUE/collapseitem/index.vue.d.ts +2 -2
  151. package/dist/types/__VUE/dialog/index.d.ts +9 -2
  152. package/dist/types/__VUE/dialog/index.vue.d.ts +23 -8
  153. package/dist/types/__VUE/ecard/index.vue.d.ts +3 -3
  154. package/dist/types/__VUE/elevator/index.vue.d.ts +29 -0
  155. package/dist/types/__VUE/empty/index.vue.d.ts +2 -2
  156. package/dist/types/__VUE/formitem/index.vue.d.ts +3 -10
  157. package/dist/types/__VUE/grid/index.vue.d.ts +4 -4
  158. package/dist/types/__VUE/griditem/index.vue.d.ts +1 -1
  159. package/dist/types/__VUE/input/index.vue.d.ts +2 -2
  160. package/dist/types/__VUE/noticebar/index.vue.d.ts +1 -1
  161. package/dist/types/__VUE/oldpicker/index.vue.d.ts +2 -2
  162. package/dist/types/__VUE/picker/index.vue.d.ts +2 -2
  163. package/dist/types/__VUE/popover/index.vue.d.ts +2 -2
  164. package/dist/types/__VUE/range/index.vue.d.ts +1 -1
  165. package/dist/types/__VUE/rate/index.vue.d.ts +2 -2
  166. package/dist/types/__VUE/row/index.vue.d.ts +2 -2
  167. package/dist/types/__VUE/shortpassword/index.vue.d.ts +2 -2
  168. package/dist/types/__VUE/step/index.vue.d.ts +2 -2
  169. package/dist/types/__VUE/switch/index.vue.d.ts +2 -2
  170. package/dist/types/__VUE/tabbaritem/index.vue.d.ts +2 -2
  171. package/dist/types/__VUE/timeselect/index.vue.d.ts +9 -2
  172. package/dist/types/__VUE/toast/index.vue.d.ts +3 -3
  173. package/dist/types/__VUE/uploader/index.vue.d.ts +2 -2
  174. package/dist/types/__VUE/video/index.vue.d.ts +1 -1
  175. package/dist/types/index.d.ts +1 -1
  176. package/package.json +2 -1
@@ -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-beta.3 Wed Jun 15 2022 20:12:30 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 };
@@ -5,99 +5,38 @@ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
6
  var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
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) => {
8
+ var __spreadValues = (a2, b) => {
9
9
  for (var prop in b || (b = {}))
10
10
  if (__hasOwnProp.call(b, prop))
11
- __defNormalProp(a, prop, b[prop]);
11
+ __defNormalProp(a2, prop, b[prop]);
12
12
  if (__getOwnPropSymbols)
13
13
  for (var prop of __getOwnPropSymbols(b)) {
14
14
  if (__propIsEnum.call(b, prop))
15
- __defNormalProp(a, prop, b[prop]);
15
+ __defNormalProp(a2, prop, b[prop]);
16
16
  }
17
- return a;
17
+ return a2;
18
18
  };
19
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
19
+ var __spreadProps = (a2, b) => __defProps(a2, __getOwnPropDescs(b));
20
20
  /*!
21
- * @nutui/nutui v3.1.22-beta.0 Tue May 31 2022 21:47:10 GMT+0800 (中国标准时间)
21
+ * @nutui/nutui v3.1.22-beta.3 Wed Jun 15 2022 20:12:30 GMT+0800 (中国标准时间)
22
22
  * (c) 2022 @jdf2e.
23
23
  * Released under the MIT License.
24
24
  */
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";
25
+ 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";
26
+ import { c as d } from "./component.js";
27
+ import { _ } from "./plugin-vue_export-helper.js";
28
28
  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 };
29
+ 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) => {
30
+ 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);
31
+ return __spreadProps(__spreadValues({ classes: c2 }, r(m2)), { getClass: (e2) => {
32
+ let t2 = m2.currentTime.find((e3) => e3.key == m2.currentKey);
33
+ if (t2)
34
+ return { "nut-timedetail__detail__list__item": true, "nut-timedetail__detail__list__item--curr": t2.list.filter((t3) => t3 === e2).length > 0 };
35
+ }, renderData: u2, handleTime: (e2) => {
36
+ a2.emit("select", e2);
37
+ } });
38
+ } }), y = { class: "nut-timedetail__detail nut-timedetail__detail--moring" }, g = { class: "nut-timedetail__detail__list" }, v = ["onClick"];
39
+ var k = _(f, [["render", function(e2, t2, i2, r2, d2, _2) {
40
+ 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);
41
+ }]]);
42
+ export { k as default };
@@ -5,67 +5,34 @@ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
6
  var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
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) => {
8
+ var __spreadValues = (a2, b) => {
9
9
  for (var prop in b || (b = {}))
10
10
  if (__hasOwnProp.call(b, prop))
11
- __defNormalProp(a, prop, b[prop]);
11
+ __defNormalProp(a2, prop, b[prop]);
12
12
  if (__getOwnPropSymbols)
13
13
  for (var prop of __getOwnPropSymbols(b)) {
14
14
  if (__propIsEnum.call(b, prop))
15
- __defNormalProp(a, prop, b[prop]);
15
+ __defNormalProp(a2, prop, b[prop]);
16
16
  }
17
- return a;
17
+ return a2;
18
18
  };
19
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
19
+ var __spreadProps = (a2, b) => __defProps(a2, __getOwnPropDescs(b));
20
20
  /*!
21
- * @nutui/nutui v3.1.22-beta.0 Tue May 31 2022 21:47:10 GMT+0800 (中国标准时间)
21
+ * @nutui/nutui v3.1.22-beta.3 Wed Jun 15 2022 20:12:30 GMT+0800 (中国标准时间)
22
22
  * (c) 2022 @jdf2e.
23
23
  * Released under the MIT License.
24
24
  */
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";
25
+ 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";
26
+ import { c as o } from "./component.js";
27
+ import { _ as c } from "./plugin-vue_export-helper.js";
28
28
  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 };
29
+ const { componentName: s, create: u } = o("timepannel");
30
+ var i = c(u({ name: "timepannel", props: { name: { type: String, default: "" }, pannelKey: { type: [Number, String], default: 0 } }, emits: ["change"], setup: (a2, l2) => {
31
+ const p2 = e("currentKey"), m2 = n({ currentKey: p2 }), o2 = t(() => ({ [s]: true, "nut-timepannel--curr": m2.currentKey == a2.pannelKey }));
32
+ return __spreadProps(__spreadValues({}, r(m2)), { classes: o2, handlePannel: (e2) => {
33
+ l2.emit("change", e2);
34
+ } });
35
+ } }), [["render", function(e2, n2, t2, r2, o2, c2) {
36
+ return a(), l("view", { class: p(e2.classes), onClick: n2[0] || (n2[0] = (n3) => e2.handlePannel(e2.pannelKey)) }, m(e2.name), 3);
37
+ }]]);
38
+ 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-beta.3 Wed Jun 15 2022 20:12:30 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 i, normalizeStyle as o, withCtx as r, createElementVNode as c, normalizeClass as n, toDisplayString as a, renderSlot as p } from "vue";
7
+ import { c as u } from "./component.js";
8
+ import { _ as m } 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 } = u("timeselect"), y = 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 i2 = e(() => ({ [_]: true })), o2 = e(() => ({ width: "100%", height: l2.height })), r2 = e(() => l2.currentKey), c2 = e(() => l2.currentTime);
12
+ return t("currentKey", r2), t("currentTime", c2), { classes: i2, popStyle: o2, close: () => {
13
+ s2.emit("update:visible", false), s2.emit("select", c2.value);
14
+ }, translate: d };
15
+ } }), f = { class: "nut-timeselect__title" }, b = { class: "nut-timeselect__title__fixed" }, k = { class: "nut-timeselect__content" }, g = { class: "nut-timeselect__content__pannel" }, h = { class: "nut-timeselect__content__detail" };
16
+ var T = m(y, [["render", function(e2, t2, u2, m2, _2, v2) {
17
+ const d2 = l("nut-popup");
18
+ return s(), i(d2, { position: "bottom", closeable: "", round: "", isWrapTeleport: e2.isWrapTeleport, visible: e2.visible, style: o(e2.popStyle), "lock-scroll": e2.lockScroll, onClickOverlay: e2.close, onClickCloseIcon: e2.close }, { default: r(() => [c("view", { class: n(e2.classes) }, [c("view", f, [c("view", b, a(e2.title || e2.translate("pickupTime")), 1)]), c("view", k, [c("view", g, [p(e2.$slots, "pannel")]), c("view", h, [p(e2.$slots, "detail")])])], 2)]), _: 3 }, 8, ["isWrapTeleport", "visible", "style", "lock-scroll", "onClickOverlay", "onClickCloseIcon"]);
19
+ }]]);
20
+ export { T as default };