@nutui/nutui 3.1.18-beta.0 → 3.1.19-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 (149) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/LICENSE +1 -1
  3. package/README.md +6 -0
  4. package/dist/nutui.d.ts +39 -36
  5. package/dist/nutui.es.js +13149 -11288
  6. package/dist/nutui.umd.js +13156 -11381
  7. package/dist/packages/_es/ActionSheet.js +13 -19
  8. package/dist/packages/_es/Address.js +70 -55
  9. package/dist/packages/_es/Audio.js +13 -13
  10. package/dist/packages/_es/AudioOperate.js +125 -0
  11. package/dist/packages/_es/Avatar.js +4 -4
  12. package/dist/packages/_es/BackTop.js +69 -108
  13. package/dist/packages/_es/Badge.js +4 -4
  14. package/dist/packages/_es/Barrage.js +63 -56
  15. package/dist/packages/_es/Button.js +3 -3
  16. package/dist/packages/_es/Calendar.js +30 -702
  17. package/dist/packages/_es/CalendarItem.js +10 -0
  18. package/dist/packages/_es/Card.js +7 -6
  19. package/dist/packages/_es/Cascader.js +8 -8
  20. package/dist/packages/_es/Cell.js +27 -27
  21. package/dist/packages/_es/CellGroup.js +2 -2
  22. package/dist/packages/_es/Checkbox.js +4 -4
  23. package/dist/packages/_es/CheckboxGroup.js +3 -3
  24. package/dist/packages/_es/CircleProgress.js +150 -41
  25. package/dist/packages/_es/Col.js +2 -2
  26. package/dist/packages/_es/Collapse.js +35 -9
  27. package/dist/packages/_es/CollapseItem.js +79 -38
  28. package/dist/packages/_es/CountDown.js +8 -6
  29. package/dist/packages/_es/CountUp.js +31 -30
  30. package/dist/packages/_es/DatePicker.js +81 -44
  31. package/dist/packages/_es/Dialog.js +7 -83
  32. package/dist/packages/_es/Divider.js +5 -5
  33. package/dist/packages/_es/Drag.js +93 -55
  34. package/dist/packages/_es/Elevator.js +75 -50
  35. package/dist/packages/_es/Empty.js +4 -4
  36. package/dist/packages/_es/FixedNav.js +6 -6
  37. package/dist/packages/_es/Form.js +11 -9
  38. package/dist/packages/_es/FormItem.js +9 -6
  39. package/dist/packages/_es/Grid.js +2 -2
  40. package/dist/packages/_es/GridItem.js +9 -27
  41. package/dist/packages/_es/Icon.js +2 -2
  42. package/dist/packages/_es/ImagePreview.js +14 -83
  43. package/dist/packages/_es/Indicator.js +4 -4
  44. package/dist/packages/_es/InfiniteLoading.js +94 -108
  45. package/dist/packages/_es/Input.js +297 -73
  46. package/dist/packages/_es/InputNumber.js +24 -17
  47. package/dist/packages/_es/Layout.js +2 -2
  48. package/dist/packages/_es/List.js +131 -0
  49. package/dist/packages/_es/Menu.js +16 -13
  50. package/dist/packages/_es/MenuItem.js +8 -8
  51. package/dist/packages/_es/Navbar.js +17 -12
  52. package/dist/packages/_es/NoticeBar.js +47 -39
  53. package/dist/packages/_es/Notify.js +28 -163
  54. package/dist/packages/_es/NumberKeyboard.js +4 -4
  55. package/dist/packages/_es/OldPicker.js +486 -0
  56. package/dist/packages/_es/OverLay.js +6 -26
  57. package/dist/packages/_es/Pagination.js +8 -8
  58. package/dist/packages/_es/Picker.js +192 -163
  59. package/dist/packages/_es/Popover.js +155 -30
  60. package/dist/packages/_es/Popup.js +7 -70
  61. package/dist/packages/_es/Price.js +18 -6
  62. package/dist/packages/_es/Progress.js +29 -27
  63. package/dist/packages/_es/PullRefresh.js +363 -0
  64. package/dist/packages/_es/Radio.js +4 -4
  65. package/dist/packages/_es/RadioGroup.js +2 -2
  66. package/dist/packages/_es/Range.js +169 -46
  67. package/dist/packages/_es/Rate.js +17 -20
  68. package/dist/packages/_es/Row.js +2 -2
  69. package/dist/packages/_es/SearchBar.js +9 -7
  70. package/dist/packages/_es/ShortPassword.js +90 -68
  71. package/dist/packages/_es/SideNavBar.js +6 -17
  72. package/dist/packages/_es/SideNavBarItem.js +2 -2
  73. package/dist/packages/_es/Signature.js +70 -70
  74. package/dist/packages/_es/Skeleton.js +9 -12
  75. package/dist/packages/_es/Sku.js +40 -31
  76. package/dist/packages/_es/Step.js +28 -12
  77. package/dist/packages/_es/Steps.js +8 -3
  78. package/dist/packages/_es/Sticky.js +29 -24
  79. package/dist/packages/_es/SubSideNavBar.js +2 -2
  80. package/dist/packages/_es/Swipe.js +40 -27
  81. package/dist/packages/_es/Swiper.js +32 -14
  82. package/dist/packages/_es/SwiperItem.js +2 -2
  83. package/dist/packages/_es/Switch.js +4 -4
  84. package/dist/packages/_es/TabPane.js +2 -2
  85. package/dist/packages/_es/Tabbar.js +4 -4
  86. package/dist/packages/_es/TabbarItem.js +28 -23
  87. package/dist/packages/_es/Table.js +14 -14
  88. package/dist/packages/_es/Tabs.js +19 -15
  89. package/dist/packages/_es/Tag.js +14 -8
  90. package/dist/packages/_es/TextArea.js +49 -15
  91. package/dist/packages/_es/TimeDetail.js +5 -4
  92. package/dist/packages/_es/TimePannel.js +4 -4
  93. package/dist/packages/_es/TimeSelect.js +9 -8
  94. package/dist/packages/_es/Toast.js +42 -171
  95. package/dist/packages/_es/Uploader.js +108 -139
  96. package/dist/packages/_es/Video.js +14 -10
  97. package/dist/packages/_es/common.js +2 -2
  98. package/dist/packages/_es/component.js +2 -2
  99. package/dist/packages/_es/index.js +45 -7
  100. package/dist/packages/_es/index.taro.js +719 -0
  101. package/dist/packages/_es/index2.js +2 -2
  102. package/dist/packages/_es/index3.js +57 -29
  103. package/dist/packages/_es/index4.js +414 -57
  104. package/dist/packages/_es/plugin-vue_export-helper.js +2 -2
  105. package/dist/packages/_es/pxCheck.js +2 -2
  106. package/dist/packages/_es/use-lock-scroll.js +23 -0
  107. package/dist/packages/_es/util.js +2 -2
  108. package/dist/packages/badge/index.scss +11 -13
  109. package/dist/packages/button/index.scss +1 -0
  110. package/dist/packages/calendar/index.scss +9 -4
  111. package/dist/packages/calendaritem/index.scss +0 -207
  112. package/dist/packages/cell/index.scss +6 -6
  113. package/dist/packages/checkbox/index.scss +4 -3
  114. package/dist/packages/collapseitem/index.scss +21 -11
  115. package/dist/packages/countdown/index.scss +3 -1
  116. package/dist/packages/divider/index.scss +8 -8
  117. package/dist/packages/elevator/index.scss +36 -36
  118. package/dist/packages/formitem/index.scss +15 -8
  119. package/dist/packages/indicator/index.scss +1 -1
  120. package/dist/packages/input/index.scss +70 -24
  121. package/dist/packages/inputnumber/index.scss +4 -2
  122. package/dist/packages/list/index.scss +24 -0
  123. package/dist/packages/menu/index.scss +3 -3
  124. package/dist/packages/navbar/index.scss +28 -8
  125. package/dist/packages/noticebar/index.scss +7 -8
  126. package/dist/packages/notify/index.scss +9 -0
  127. package/dist/packages/numberkeyboard/index.scss +22 -21
  128. package/dist/packages/oldpicker/index.scss +131 -0
  129. package/dist/packages/picker/index.scss +38 -32
  130. package/dist/packages/progress/index.scss +6 -5
  131. package/dist/packages/radio/index.scss +7 -6
  132. package/dist/packages/range/index.scss +109 -2
  133. package/dist/packages/searchbar/index.scss +7 -7
  134. package/dist/packages/sidenavbaritem/index.scss +5 -5
  135. package/dist/packages/step/index.scss +29 -29
  136. package/dist/packages/subsidenavbar/index.scss +10 -8
  137. package/dist/packages/tabbaritem/index.scss +15 -0
  138. package/dist/packages/timedetail/index.scss +13 -13
  139. package/dist/packages/timepannel/index.scss +7 -7
  140. package/dist/packages/timeselect/index.scss +3 -3
  141. package/dist/packages/uploader/index.scss +6 -6
  142. package/dist/style.css +1 -1
  143. package/dist/styles/themes/default.scss +64 -62
  144. package/dist/styles/themes/jdt.scss +91 -0
  145. package/dist/styles/variables-jdt.scss +728 -0
  146. package/dist/styles/variables.scss +250 -44
  147. package/package.json +2 -1
  148. package/dist/packages/_es/raf.js +0 -19
  149. package/dist/styles/themes/jdd.scss +0 -2
@@ -18,16 +18,15 @@ var __spreadValues = (a, b) => {
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  /*!
21
- * @nutui/nutui v3.1.18-beta.0 Tue Mar 08 2022 10:41:31 GMT+0800 (中国标准时间)
22
- * (c) 2021 @jdf2e.
21
+ * @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 GMT+0800 (中国标准时间)
22
+ * (c) 2022 @jdf2e.
23
23
  * Released under the MIT License.
24
24
  */
25
25
  import { c as createComponent } from "./component.js";
26
26
  import { computed, resolveComponent, openBlock, createElementBlock, normalizeClass, createVNode, withCtx, createElementVNode, toDisplayString, createCommentVNode, Fragment, renderList, normalizeStyle, createTextVNode } from "vue";
27
- import { popupProps } from "./Popup.js";
27
+ import { p as popupProps } from "./index4.js";
28
28
  import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
29
- import "./OverLay.js";
30
- import "./Icon.js";
29
+ import "./use-lock-scroll.js";
31
30
  import "./pxCheck.js";
32
31
  const { componentName, create } = createComponent("actionsheet");
33
32
  const _sfc_main = create({
@@ -63,13 +62,9 @@ const _sfc_main = create({
63
62
  menuItems: {
64
63
  type: Array,
65
64
  default: () => []
66
- },
67
- isWrapTeleport: {
68
- type: Boolean,
69
- default: true
70
65
  }
71
66
  }),
72
- emits: ["cancel", "close", "choose", "update:visible"],
67
+ emits: ["cancel", "choose", "update:visible"],
73
68
  setup(props, { emit }) {
74
69
  const classes = computed(() => {
75
70
  const prefixCls = componentName;
@@ -84,9 +79,9 @@ const _sfc_main = create({
84
79
  emit("cancel");
85
80
  emit("update:visible", false);
86
81
  };
87
- const chooseItem = (item, index2) => {
82
+ const chooseItem = (item, index) => {
88
83
  if (!item.disable) {
89
- emit("choose", item, index2);
84
+ emit("choose", item, index);
90
85
  emit("update:visible", false);
91
86
  }
92
87
  };
@@ -126,7 +121,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
126
121
  createVNode(_component_nut_popup, {
127
122
  "pop-class": "popclass",
128
123
  visible: _ctx.visible,
129
- isWrapTeleport: _ctx.isWrapTeleport,
130
124
  position: "bottom",
131
125
  round: "",
132
126
  onClickOverlay: _ctx.close
@@ -136,12 +130,12 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
136
130
  _ctx.title ? (openBlock(), createElementBlock("view", _hoisted_2, toDisplayString(_ctx.title), 1)) : createCommentVNode("", true),
137
131
  _ctx.description ? (openBlock(), createElementBlock("view", _hoisted_3, toDisplayString(_ctx.description), 1)) : createCommentVNode("", true),
138
132
  _ctx.menuItems.length ? (openBlock(), createElementBlock("view", _hoisted_4, [
139
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.menuItems, (item, index2) => {
133
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.menuItems, (item, index) => {
140
134
  return openBlock(), createElementBlock("view", {
141
135
  class: normalizeClass(["nut-actionsheet-item", { "nut-actionsheet-item-disabled": item.disable }]),
142
136
  style: normalizeStyle({ color: _ctx.isHighlight(item) }),
143
- key: index2,
144
- onClick: ($event) => _ctx.chooseItem(item, index2)
137
+ key: index,
138
+ onClick: ($event) => _ctx.chooseItem(item, index)
145
139
  }, [
146
140
  createTextVNode(toDisplayString(item[_ctx.optionTag]), 1),
147
141
  createElementVNode("view", _hoisted_6, toDisplayString(item[_ctx.optionSubTag]), 1)
@@ -156,8 +150,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
156
150
  ])
157
151
  ]),
158
152
  _: 1
159
- }, 8, ["visible", "isWrapTeleport", "onClickOverlay"])
153
+ }, 8, ["visible", "onClickOverlay"])
160
154
  ], 2);
161
155
  }
162
- var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
163
- export { index as default };
156
+ var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
157
+ export { index_taro as default };
@@ -15,14 +15,15 @@ var __spreadValues = (a, b) => {
15
15
  return a;
16
16
  };
17
17
  /*!
18
- * @nutui/nutui v3.1.18-beta.0 Tue Mar 08 2022 10:41:31 GMT+0800 (中国标准时间)
19
- * (c) 2021 @jdf2e.
18
+ * @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 GMT+0800 (中国标准时间)
19
+ * (c) 2022 @jdf2e.
20
20
  * Released under the MIT License.
21
21
  */
22
- import { ref, computed, reactive, onMounted, watch, toRefs, nextTick, resolveComponent, openBlock, createBlock, withCtx, createElementVNode, withDirectives, createVNode, vShow, toDisplayString, createCommentVNode, createElementBlock, Fragment, renderList, normalizeClass, normalizeStyle, createTextVNode } from "vue";
22
+ import { computed, ref, reactive, onMounted, watch, toRefs, resolveComponent, openBlock, createBlock, withCtx, createElementVNode, withDirectives, createVNode, vShow, toDisplayString, createCommentVNode, createElementBlock, Fragment, renderList, normalizeClass, normalizeStyle, createTextVNode } from "vue";
23
23
  import { c as createComponent } from "./component.js";
24
+ import Taro from "@tarojs/taro";
24
25
  import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
25
- const { componentName, create } = createComponent("address");
26
+ const { create, componentName } = createComponent("address");
26
27
  const _sfc_main = create({
27
28
  inheritAttrs: false,
28
29
  props: {
@@ -101,8 +102,19 @@ const _sfc_main = create({
101
102
  },
102
103
  emits: ["update:visible", "update:modelValue", "type", "change", "selected", "close", "close-mask", "switch-module"],
103
104
  setup(props, { emit }) {
105
+ const classes = computed(() => {
106
+ const prefixCls = componentName;
107
+ return {
108
+ [prefixCls]: true
109
+ };
110
+ });
104
111
  const regionLine = ref(null);
105
- const tabRegion = ref(null);
112
+ const tabItemRef = reactive({
113
+ province: ref(null),
114
+ city: ref(null),
115
+ country: ref(null),
116
+ town: ref(null)
117
+ });
106
118
  const showPopup = ref(props.visible);
107
119
  const privateType = ref(props.type);
108
120
  const tabIndex = ref(0);
@@ -125,16 +137,16 @@ const _sfc_main = create({
125
137
  return a.title.localeCompare(b.title);
126
138
  });
127
139
  data.forEach((item) => {
128
- const index2 = newData.findIndex((value) => value.title === item.title);
129
- if (index2 <= -1) {
140
+ const index = newData.findIndex((value) => value.title === item.title);
141
+ if (index <= -1) {
130
142
  newData.push({
131
143
  title: item.title,
132
144
  list: [].concat(item)
133
145
  });
134
146
  } else {
135
- newData[index2] = {
147
+ newData[index] = {
136
148
  title: item.title,
137
- list: newData[index2].list.concat(item)
149
+ list: newData[index].list.concat(item)
138
150
  };
139
151
  }
140
152
  });
@@ -159,23 +171,24 @@ const _sfc_main = create({
159
171
  customPlaceholder();
160
172
  });
161
173
  const initCustomSelected = () => {
174
+ console.log(props.modelValue);
162
175
  if (props.modelValue.length > 0) {
163
176
  tabIndex.value = props.modelValue.length - 1;
164
- for (let index2 = 0; index2 < props.modelValue.length; index2++) {
165
- if (regionList[tabName.value[index2]].length == 0) {
166
- tabIndex.value = index2 - 1;
177
+ for (let index = 0; index < props.modelValue.length; index++) {
178
+ if (regionList[tabName.value[index]].length == 0) {
179
+ tabIndex.value = index - 1;
167
180
  break;
168
181
  } else {
169
- const val = props.modelValue[index2];
170
- const arr = regionList[tabName.value[index2]];
182
+ const val = props.modelValue[index];
183
+ const arr = regionList[tabName.value[index]];
171
184
  if (privateType.value == "custom") {
172
- selectedRegion[tabName.value[index2]] = arr.filter((item) => item.id == val)[0];
185
+ selectedRegion[tabName.value[index]] = arr.filter((item) => item.id == val)[0];
173
186
  } else if (privateType.value == "custom2") {
174
187
  let sumArr = [];
175
188
  arr.map((item) => {
176
189
  sumArr.push(...item.list);
177
190
  });
178
- selectedRegion[tabName.value[index2]] = sumArr.filter((item) => item.id == val)[0];
191
+ selectedRegion[tabName.value[index]] = sumArr.filter((item) => item.id == val)[0];
179
192
  }
180
193
  }
181
194
  }
@@ -188,22 +201,22 @@ const _sfc_main = create({
188
201
  tabNameDefault.value = new Array(4).fill(props.columnsPlaceholder);
189
202
  } else if (typeD == "[object Array]") {
190
203
  tabNameDefault.value = new Array(4).fill("");
191
- tabNameDefault.value.forEach((val, index2) => {
192
- if (props.columnsPlaceholder[index2]) {
193
- tabNameDefault.value[index2] = props.columnsPlaceholder[index2];
204
+ tabNameDefault.value.forEach((val, index) => {
205
+ if (props.columnsPlaceholder[index]) {
206
+ tabNameDefault.value[index] = props.columnsPlaceholder[index];
194
207
  } else {
195
- tabNameDefault.value[index2] = "\u8BF7\u9009\u62E9";
208
+ tabNameDefault.value[index] = "\u8BF7\u9009\u62E9";
196
209
  }
197
210
  });
198
211
  }
199
212
  };
200
- const getTabName = (item, index2) => {
213
+ const getTabName = (item, index) => {
201
214
  if (item.name)
202
215
  return item.name;
203
- if (tabIndex.value < index2) {
216
+ if (tabIndex.value < index) {
204
217
  return item.name;
205
218
  } else {
206
- return tabNameDefault.value[index2];
219
+ return "\u8BF7\u9009\u62E9";
207
220
  }
208
221
  };
209
222
  const handClose = (type = "self") => {
@@ -216,13 +229,15 @@ const _sfc_main = create({
216
229
  closeWay.value = "mask";
217
230
  };
218
231
  const lineAnimation = () => {
219
- nextTick(() => {
220
- const name = tabRegion.value && tabRegion.value.getElementsByClassName("active")[0];
221
- if (name) {
222
- const distance = name.offsetLeft;
223
- lineDistance.value = distance ? distance : 20;
224
- }
225
- });
232
+ setTimeout(() => {
233
+ Taro.createSelectorQuery().selectAll(`.${tabName.value[tabIndex.value]}`).boundingClientRect((rects) => {
234
+ console.log(rects);
235
+ rects.forEach((rect) => {
236
+ if (rect.width > 0)
237
+ lineDistance.value = rect.left;
238
+ });
239
+ }).exec();
240
+ }, 100);
226
241
  };
227
242
  const nextAreaList = (item) => {
228
243
  const calBack = {
@@ -245,16 +260,16 @@ const _sfc_main = create({
245
260
  emit("update:modelValue");
246
261
  }
247
262
  };
248
- const changeRegionTab = (item, key, index2) => {
249
- if (getTabName(item, index2)) {
250
- tabIndex.value = index2;
263
+ const changeRegionTab = (item, key, index) => {
264
+ if (getTabName(item, index)) {
265
+ tabIndex.value = index;
251
266
  lineAnimation();
252
267
  }
253
268
  };
254
269
  const selectedExist = (item) => {
255
270
  const copyExistAdd = props.existAddress;
256
271
  let prevExistAdd = {};
257
- copyExistAdd.forEach((list, index2) => {
272
+ copyExistAdd.forEach((list, index) => {
258
273
  if (list && list.selectedAddress) {
259
274
  prevExistAdd = list;
260
275
  }
@@ -342,13 +357,14 @@ const _sfc_main = create({
342
357
  regionList.town = isCustom2.value ? transformData(value) : value;
343
358
  });
344
359
  watch(() => props.existAddress, (value) => {
345
- value.forEach((item, index2) => {
360
+ value.forEach((item, index) => {
346
361
  if (item.selectedAddress) {
347
362
  selectedExistAddress = item;
348
363
  }
349
364
  });
350
365
  });
351
- return __spreadValues({
366
+ return __spreadValues(__spreadValues({
367
+ classes,
352
368
  showPopup,
353
369
  privateType,
354
370
  tabIndex,
@@ -362,14 +378,13 @@ const _sfc_main = create({
362
378
  getTabName,
363
379
  nextAreaList,
364
380
  regionLine,
365
- tabRegion,
366
381
  lineDistance,
367
382
  changeRegionTab,
368
383
  selectedExist,
369
384
  clickOverlay,
370
385
  handClose,
371
386
  handleElevatorItem
372
- }, toRefs(props));
387
+ }, toRefs(props)), toRefs(tabItemRef));
373
388
  }
374
389
  });
375
390
  const _hoisted_1 = { class: "nut-address" };
@@ -454,13 +469,13 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
454
469
  ]),
455
470
  _ctx.privateType == "custom" ? (openBlock(), createElementBlock("view", _hoisted_4, [
456
471
  createElementVNode("view", _hoisted_5, [
457
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.selectedRegion, (item, key, index2) => {
472
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.selectedRegion, (item, key, index) => {
458
473
  return openBlock(), createElementBlock("view", {
459
- class: normalizeClass(["tab-item", [index2 == _ctx.tabIndex ? "active" : ""]]),
460
- key: index2,
461
- onClick: ($event) => _ctx.changeRegionTab(item, key, index2)
474
+ class: normalizeClass({ "tab-item": true, active: index == _ctx.tabIndex, [_ctx.tabName[index]]: true }),
475
+ key: index,
476
+ onClick: ($event) => _ctx.changeRegionTab(item, key, index)
462
477
  }, [
463
- createElementVNode("view", null, toDisplayString(_ctx.getTabName(item, index2)), 1)
478
+ createElementVNode("view", null, toDisplayString(_ctx.getTabName(item, index)), 1)
464
479
  ], 10, _hoisted_6);
465
480
  }), 128)),
466
481
  createElementVNode("view", {
@@ -471,10 +486,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
471
486
  ], 512),
472
487
  createElementVNode("view", _hoisted_7, [
473
488
  createElementVNode("ul", _hoisted_8, [
474
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.regionList[_ctx.tabName[_ctx.tabIndex]], (item, index2) => {
489
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.regionList[_ctx.tabName[_ctx.tabIndex]], (item, index) => {
475
490
  return openBlock(), createElementBlock("li", {
476
- key: index2,
477
- class: normalizeClass(["region-item", [_ctx.selectedRegion[_ctx.tabName[_ctx.tabIndex]].id == item.id ? "active" : ""]]),
491
+ key: index,
492
+ class: normalizeClass(["region-item", _ctx.selectedRegion[_ctx.tabName[_ctx.tabIndex]].id == item.id ? "active" : ""]),
478
493
  onClick: ($event) => _ctx.nextAreaList(item)
479
494
  }, [
480
495
  _ctx.selectedRegion[_ctx.tabName[_ctx.tabIndex]].id == item.id ? (openBlock(), createBlock(_component_nut_icon, {
@@ -491,13 +506,13 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
491
506
  ])
492
507
  ])) : _ctx.privateType == "custom2" ? (openBlock(), createElementBlock("view", _hoisted_10, [
493
508
  createElementVNode("view", _hoisted_11, [
494
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.selectedRegion, (item, key, index2) => {
509
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.selectedRegion, (item, key, index) => {
495
510
  return openBlock(), createElementBlock("view", {
496
- class: normalizeClass(["tab-item", [index2 == _ctx.tabIndex ? "active" : ""]]),
497
- key: index2,
498
- onClick: ($event) => _ctx.changeRegionTab(item, key, index2)
511
+ class: normalizeClass({ "tab-item": true, active: index == _ctx.tabIndex, [_ctx.tabName[index]]: true }),
512
+ key: index,
513
+ onClick: ($event) => _ctx.changeRegionTab(item, key, index)
499
514
  }, [
500
- createElementVNode("view", null, toDisplayString(_ctx.getTabName(item, index2)), 1)
515
+ createElementVNode("view", null, toDisplayString(_ctx.getTabName(item, index)), 1)
501
516
  ], 10, _hoisted_12);
502
517
  }), 128)),
503
518
  createElementVNode("view", {
@@ -516,10 +531,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
516
531
  ])) : _ctx.privateType == "exist" ? (openBlock(), createElementBlock("view", _hoisted_14, [
517
532
  createElementVNode("div", _hoisted_15, [
518
533
  createElementVNode("ul", _hoisted_16, [
519
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.existAddress, (item, index2) => {
534
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.existAddress, (item, index) => {
520
535
  return openBlock(), createElementBlock("li", {
521
536
  class: normalizeClass(["exist-item", [item.selectedAddress ? "active" : ""]]),
522
- key: index2,
537
+ key: index,
523
538
  onClick: ($event) => _ctx.selectedExist(item)
524
539
  }, [
525
540
  createVNode(_component_nut_icon, {
@@ -554,5 +569,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
554
569
  _: 1
555
570
  }, 8, ["onClose", "onClickOverlay", "visible"]);
556
571
  }
557
- var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
558
- export { index as default };
572
+ var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
573
+ export { index_taro as default };
@@ -18,8 +18,8 @@ var __spreadValues = (a, b) => {
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  /*!
21
- * @nutui/nutui v3.1.18-beta.0 Tue Mar 08 2022 10:41:31 GMT+0800 (中国标准时间)
22
- * (c) 2021 @jdf2e.
21
+ * @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 GMT+0800 (中国标准时间)
22
+ * (c) 2022 @jdf2e.
23
23
  * Released under the MIT License.
24
24
  */
25
25
  import { ref, reactive, onMounted, watch, provide, toRefs, resolveComponent, openBlock, createElementBlock, createElementVNode, toDisplayString, createVNode, withCtx, createCommentVNode, normalizeClass, createBlock, renderSlot } from "vue";
@@ -218,7 +218,7 @@ const _hoisted_2 = {
218
218
  };
219
219
  const _hoisted_3 = { class: "time" };
220
220
  const _hoisted_4 = { class: "progress-bar-wrapper" };
221
- const _hoisted_5 = /* @__PURE__ */ createElementVNode("div", { class: "custom-button" }, null, -1);
221
+ const _hoisted_5 = /* @__PURE__ */ createElementVNode("view", { class: "custom-button" }, null, -1);
222
222
  const _hoisted_6 = { class: "time" };
223
223
  const _hoisted_7 = {
224
224
  key: 1,
@@ -228,10 +228,10 @@ const _hoisted_8 = ["controls", "src", "preload", "autoplay", "loop", "muted"];
228
228
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
229
229
  const _component_nut_range = resolveComponent("nut-range");
230
230
  const _component_nut_icon = resolveComponent("nut-icon");
231
- return openBlock(), createElementBlock("div", _hoisted_1, [
232
- _ctx.type == "progress" ? (openBlock(), createElementBlock("div", _hoisted_2, [
233
- createElementVNode("div", _hoisted_3, toDisplayString(_ctx.currentDuration), 1),
234
- createElementVNode("div", _hoisted_4, [
231
+ return openBlock(), createElementBlock("view", _hoisted_1, [
232
+ _ctx.type == "progress" ? (openBlock(), createElementBlock("view", _hoisted_2, [
233
+ createElementVNode("view", _hoisted_3, toDisplayString(_ctx.currentDuration), 1),
234
+ createElementVNode("view", _hoisted_4, [
235
235
  createVNode(_component_nut_range, {
236
236
  modelValue: _ctx.percent,
237
237
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.percent = $event),
@@ -246,10 +246,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
246
246
  _: 1
247
247
  }, 8, ["modelValue", "onChange"])
248
248
  ]),
249
- createElementVNode("div", _hoisted_6, toDisplayString(_ctx.duration), 1)
249
+ createElementVNode("view", _hoisted_6, toDisplayString(_ctx.duration), 1)
250
250
  ])) : createCommentVNode("", true),
251
- _ctx.type == "icon" ? (openBlock(), createElementBlock("div", _hoisted_7, [
252
- createElementVNode("div", {
251
+ _ctx.type == "icon" ? (openBlock(), createElementBlock("view", _hoisted_7, [
252
+ createElementVNode("view", {
253
253
  class: normalizeClass(["nut-audio-icon-box", _ctx.playing ? "nut-audio-icon-play" : "nut-audio-icon-stop"]),
254
254
  onClick: _cache[1] || (_cache[1] = (...args) => _ctx.changeStatus && _ctx.changeStatus(...args))
255
255
  }, [
@@ -264,7 +264,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
264
264
  })) : createCommentVNode("", true)
265
265
  ], 2)
266
266
  ])) : createCommentVNode("", true),
267
- _ctx.type == "none" ? (openBlock(), createElementBlock("div", {
267
+ _ctx.type == "none" ? (openBlock(), createElementBlock("view", {
268
268
  key: 2,
269
269
  onClick: _cache[2] || (_cache[2] = (...args) => _ctx.changeStatus && _ctx.changeStatus(...args))
270
270
  }, [
@@ -285,5 +285,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
285
285
  }, null, 40, _hoisted_8)
286
286
  ]);
287
287
  }
288
- var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
289
- export { index as default };
288
+ var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
289
+ export { index_taro as default };
@@ -0,0 +1,125 @@
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
+ /*!
21
+ * @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 GMT+0800 (中国标准时间)
22
+ * (c) 2022 @jdf2e.
23
+ * Released under the MIT License.
24
+ */
25
+ import { inject, reactive, ref, useSlots, toRefs, resolveComponent, openBlock, createElementBlock, createBlock, withCtx, createCommentVNode, renderSlot, createTextVNode, toDisplayString } from "vue";
26
+ import { c as createComponent } from "./component.js";
27
+ import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
28
+ const { componentName, create } = createComponent("audio-operate");
29
+ const _sfc_main = create({
30
+ props: {
31
+ type: {
32
+ type: String,
33
+ default() {
34
+ return "play";
35
+ }
36
+ }
37
+ },
38
+ components: {},
39
+ emits: ["click"],
40
+ setup(props, { emit }) {
41
+ const audio = inject("audioParent");
42
+ const parent = reactive(audio);
43
+ const customSlot = ref(useSlots().default);
44
+ return __spreadProps(__spreadValues(__spreadValues({}, toRefs(props)), toRefs(parent)), { customSlot });
45
+ }
46
+ });
47
+ const _hoisted_1 = { class: "nut-audio-operate" };
48
+ const _hoisted_2 = /* @__PURE__ */ createTextVNode("\u5012\u9000");
49
+ const _hoisted_3 = /* @__PURE__ */ createTextVNode("\u5FEB\u8FDB");
50
+ const _hoisted_4 = /* @__PURE__ */ createTextVNode("\u9759\u97F3");
51
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
52
+ const _component_nut_button = resolveComponent("nut-button");
53
+ return openBlock(), createElementBlock("div", _hoisted_1, [
54
+ _ctx.type == "back" ? (openBlock(), createElementBlock("div", {
55
+ key: 0,
56
+ class: "nut-audio-operate-item",
57
+ onClick: _cache[0] || (_cache[0] = (...args) => _ctx.fastBack && _ctx.fastBack(...args))
58
+ }, [
59
+ !_ctx.customSlot ? (openBlock(), createBlock(_component_nut_button, {
60
+ key: 0,
61
+ type: "primary",
62
+ size: "small"
63
+ }, {
64
+ default: withCtx(() => [
65
+ _hoisted_2
66
+ ]),
67
+ _: 1
68
+ })) : createCommentVNode("", true),
69
+ renderSlot(_ctx.$slots, "default")
70
+ ])) : createCommentVNode("", true),
71
+ _ctx.type == "play" ? (openBlock(), createElementBlock("div", {
72
+ key: 1,
73
+ class: "nut-audio-operate-item",
74
+ onClick: _cache[1] || (_cache[1] = (...args) => _ctx.changeStatus && _ctx.changeStatus(...args))
75
+ }, [
76
+ !_ctx.customSlot ? (openBlock(), createBlock(_component_nut_button, {
77
+ key: 0,
78
+ type: "primary",
79
+ size: "small"
80
+ }, {
81
+ default: withCtx(() => [
82
+ createTextVNode(toDisplayString(!_ctx.audioData.playing ? "\u5F00\u59CB" : "\u6682\u505C"), 1)
83
+ ]),
84
+ _: 1
85
+ })) : createCommentVNode("", true),
86
+ renderSlot(_ctx.$slots, "default")
87
+ ])) : createCommentVNode("", true),
88
+ _ctx.type == "forward" ? (openBlock(), createElementBlock("div", {
89
+ key: 2,
90
+ class: "nut-audio-operate-item",
91
+ onClick: _cache[2] || (_cache[2] = (...args) => _ctx.forward && _ctx.forward(...args))
92
+ }, [
93
+ !_ctx.customSlot ? (openBlock(), createBlock(_component_nut_button, {
94
+ key: 0,
95
+ type: "primary",
96
+ size: "small"
97
+ }, {
98
+ default: withCtx(() => [
99
+ _hoisted_3
100
+ ]),
101
+ _: 1
102
+ })) : createCommentVNode("", true),
103
+ renderSlot(_ctx.$slots, "default")
104
+ ])) : createCommentVNode("", true),
105
+ _ctx.type == "mute" ? (openBlock(), createElementBlock("div", {
106
+ key: 3,
107
+ class: "nut-audio-operate-item",
108
+ onClick: _cache[3] || (_cache[3] = (...args) => _ctx.handleMute && _ctx.handleMute(...args))
109
+ }, [
110
+ !_ctx.customSlot ? (openBlock(), createBlock(_component_nut_button, {
111
+ key: 0,
112
+ type: !_ctx.audioData.hanMuted ? "primary" : "default",
113
+ size: "small"
114
+ }, {
115
+ default: withCtx(() => [
116
+ _hoisted_4
117
+ ]),
118
+ _: 1
119
+ }, 8, ["type"])) : createCommentVNode("", true),
120
+ renderSlot(_ctx.$slots, "default")
121
+ ])) : createCommentVNode("", true)
122
+ ]);
123
+ }
124
+ var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
125
+ export { index as default };
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.18-beta.0 Tue Mar 08 2022 10:41:31 GMT+0800 (中国标准时间)
3
- * (c) 2021 @jdf2e.
2
+ * @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 GMT+0800 (中国标准时间)
3
+ * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
6
  import { toRefs, computed, resolveComponent, openBlock, createElementBlock, normalizeStyle, normalizeClass, createVNode, renderSlot, createCommentVNode } from "vue";
@@ -83,5 +83,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
83
83
  ])) : createCommentVNode("", true)
84
84
  ], 6);
85
85
  }
86
- var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
87
- export { index as default };
86
+ var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
87
+ export { index_taro as default };