@nutui/nutui 3.1.12-beta.0 → 3.1.12-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 (99) hide show
  1. package/dist/nutui.d.ts +4 -1
  2. package/dist/nutui.es.js +3943 -4130
  3. package/dist/nutui.umd.js +3947 -4201
  4. package/dist/packages/_es/ActionSheet.js +13 -12
  5. package/dist/packages/_es/Address.js +63 -49
  6. package/dist/packages/_es/Avatar.js +4 -5
  7. package/dist/packages/_es/BackTop.js +72 -109
  8. package/dist/packages/_es/Badge.js +4 -5
  9. package/dist/packages/_es/Barrage.js +63 -57
  10. package/dist/packages/_es/Button.js +5 -6
  11. package/dist/packages/_es/Calendar.js +27 -18
  12. package/dist/packages/_es/Card.js +104 -0
  13. package/dist/packages/_es/Cell.js +5 -13
  14. package/dist/packages/_es/CellGroup.js +4 -5
  15. package/dist/packages/_es/Checkbox.js +3 -3
  16. package/dist/packages/_es/CheckboxGroup.js +9 -4
  17. package/dist/packages/_es/CircleProgress.js +142 -46
  18. package/dist/packages/_es/Col.js +4 -5
  19. package/dist/packages/_es/Collapse.js +35 -10
  20. package/dist/packages/_es/CollapseItem.js +80 -35
  21. package/dist/packages/_es/CountDown.js +7 -5
  22. package/dist/packages/_es/CountUp.js +34 -31
  23. package/dist/packages/_es/DatePicker.js +451 -219
  24. package/dist/packages/_es/Dialog.js +24 -89
  25. package/dist/packages/_es/Divider.js +5 -6
  26. package/dist/packages/_es/Drag.js +76 -50
  27. package/dist/packages/_es/Elevator.js +81 -52
  28. package/dist/packages/_es/FixedNav.js +8 -9
  29. package/dist/packages/_es/Form.js +137 -0
  30. package/dist/packages/_es/FormItem.js +109 -0
  31. package/dist/packages/_es/Icon.js +6 -40
  32. package/dist/packages/_es/ImagePreview.js +23 -21
  33. package/dist/packages/_es/InfiniteLoading.js +95 -109
  34. package/dist/packages/_es/Input.js +22 -21
  35. package/dist/packages/_es/InputNumber.js +24 -18
  36. package/dist/packages/_es/Layout.js +2 -2
  37. package/dist/packages/_es/Menu.js +16 -14
  38. package/dist/packages/_es/MenuItem.js +9 -11
  39. package/dist/packages/_es/Navbar.js +7 -7
  40. package/dist/packages/_es/NoticeBar.js +39 -26
  41. package/dist/packages/_es/Notify.js +30 -166
  42. package/dist/packages/_es/NumberKeyboard.js +10 -6
  43. package/dist/packages/_es/OverLay.js +22 -29
  44. package/dist/packages/_es/Pagination.js +8 -9
  45. package/dist/packages/_es/Picker.js +61 -447
  46. package/dist/packages/_es/Popover.js +146 -25
  47. package/dist/packages/_es/Popup.js +17 -77
  48. package/dist/packages/_es/Price.js +18 -7
  49. package/dist/packages/_es/Progress.js +23 -12
  50. package/dist/packages/_es/Radio.js +3 -3
  51. package/dist/packages/_es/RadioGroup.js +2 -2
  52. package/dist/packages/_es/Range.js +37 -30
  53. package/dist/packages/_es/Rate.js +16 -20
  54. package/dist/packages/_es/Row.js +4 -5
  55. package/dist/packages/_es/SearchBar.js +7 -5
  56. package/dist/packages/_es/ShortPassword.js +89 -59
  57. package/dist/packages/_es/Signature.js +70 -71
  58. package/dist/packages/_es/Sku.js +54 -79
  59. package/dist/packages/_es/Step.js +10 -8
  60. package/dist/packages/_es/Steps.js +2 -2
  61. package/dist/packages/_es/Swipe.js +42 -27
  62. package/dist/packages/_es/Swiper.js +17 -418
  63. package/dist/packages/_es/SwiperItem.js +14 -39
  64. package/dist/packages/_es/Switch.js +4 -5
  65. package/dist/packages/_es/TabPane.js +4 -5
  66. package/dist/packages/_es/Tabbar.js +4 -5
  67. package/dist/packages/_es/TabbarItem.js +8 -9
  68. package/dist/packages/_es/Tabs.js +22 -16
  69. package/dist/packages/_es/Tag.js +5 -6
  70. package/dist/packages/_es/TextArea.js +16 -12
  71. package/dist/packages/_es/TimeDetail.js +7 -5
  72. package/dist/packages/_es/TimePannel.js +7 -5
  73. package/dist/packages/_es/TimeSelect.js +12 -7
  74. package/dist/packages/_es/Toast.js +41 -163
  75. package/dist/packages/_es/Uploader.js +109 -149
  76. package/dist/packages/_es/commonProps.js +30 -0
  77. package/dist/packages/_es/component.js +1 -1
  78. package/dist/packages/_es/index.js +1 -1
  79. package/dist/packages/_es/index.taro.vue_vue&type=script&lang.js +44 -0
  80. package/dist/packages/_es/index2.js +40 -27
  81. package/dist/packages/_es/index3.js +413 -7
  82. package/dist/packages/_es/pxCheck.js +1 -1
  83. package/dist/packages/_es/raf.js +1 -1
  84. package/dist/packages/_es/use-lock-scroll.js +23 -0
  85. package/dist/packages/_es/util.js +47 -0
  86. package/dist/packages/button/index.scss +6 -0
  87. package/dist/packages/card/index.scss +97 -0
  88. package/dist/packages/checkbox/index.scss +1 -1
  89. package/dist/packages/form/index.scss +2 -0
  90. package/dist/packages/formitem/index.scss +60 -0
  91. package/dist/packages/numberkeyboard/index.scss +1 -1
  92. package/dist/packages/switch/index.scss +1 -1
  93. package/dist/style.css +1 -1
  94. package/dist/style.es.js +1 -2
  95. package/dist/styles/themes/default.scss +35 -32
  96. package/dist/styles/variables.scss +11 -1
  97. package/package.json +2 -2
  98. package/dist/packages/_es/Video.js +0 -405
  99. package/dist/packages/_es/plugin-vue_export-helper.js +0 -13
@@ -17,25 +17,140 @@ var __spreadValues = (a, b) => {
17
17
  return a;
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+ var __require = typeof require !== "undefined" ? require : (x) => {
21
+ throw new Error('Dynamic require of "' + x + '" is not supported');
22
+ };
20
23
  /*!
21
- * @nutui/nutui v3.1.12-beta.0 Mon Nov 22 2021 20:58:07 GMT+0800 (中国标准时间)
24
+ * @nutui/nutui v3.1.11 Wed Nov 24 2021 14:54:38 GMT+0800 (中国标准时间)
22
25
  * (c) 2021 @jdf2e.
23
26
  * Released under the MIT License.
24
27
  */
25
- import { ref, reactive, toRefs, computed, onMounted, watch, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, renderSlot, Fragment, normalizeStyle, renderList, createVNode, createCommentVNode, toDisplayString } from "vue";
28
+ import { toRefs, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, createBlock, createCommentVNode, renderSlot, ref, reactive, onMounted, watch, Fragment, renderList, createVNode, toDisplayString } from "vue";
26
29
  import { c as createComponent } from "./component.js";
27
- import Popup, { popupProps } from "./Popup.js";
28
- import Button from "./Button.js";
29
- import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
30
- import "./OverLay.js";
31
- import "./Icon.js";
30
+ import { _ as _sfc_main$2, a as _sfc_main$3, p as popupProps } from "./index3.js";
31
+ import { u as useTaroRect } from "./index2.js";
32
+ import Taro from "@tarojs/taro";
33
+ import "./use-lock-scroll.js";
32
34
  import "./pxCheck.js";
35
+ const { componentName: componentName$1, create: create$1 } = createComponent("button");
36
+ var _sfc_main$1 = create$1({
37
+ components: {
38
+ [_sfc_main$2.name]: _sfc_main$2
39
+ },
40
+ props: {
41
+ color: String,
42
+ shape: {
43
+ type: String,
44
+ default: "round"
45
+ },
46
+ plain: {
47
+ type: Boolean,
48
+ default: false
49
+ },
50
+ loading: {
51
+ type: Boolean,
52
+ default: false
53
+ },
54
+ disabled: {
55
+ type: Boolean,
56
+ default: false
57
+ },
58
+ type: {
59
+ type: String,
60
+ default: "default"
61
+ },
62
+ size: {
63
+ type: String,
64
+ default: "normal"
65
+ },
66
+ block: {
67
+ type: Boolean,
68
+ default: false
69
+ },
70
+ icon: {
71
+ type: String,
72
+ default: ""
73
+ }
74
+ },
75
+ emits: ["click"],
76
+ setup(props, { emit, slots }) {
77
+ const { type, size, shape, disabled, loading, color, plain, block } = toRefs(props);
78
+ const handleClick = (event) => {
79
+ if (!loading.value && !disabled.value) {
80
+ emit("click", event);
81
+ }
82
+ };
83
+ const classes = computed(() => {
84
+ const prefixCls = componentName$1;
85
+ return {
86
+ [prefixCls]: true,
87
+ [`${prefixCls}--${type.value}`]: type.value,
88
+ [`${prefixCls}--${size.value}`]: size.value,
89
+ [`${prefixCls}--${shape.value}`]: shape.value,
90
+ [`${prefixCls}--plain`]: plain.value,
91
+ [`${prefixCls}--block`]: block.value,
92
+ [`${prefixCls}--disabled`]: disabled.value,
93
+ [`${prefixCls}--loading`]: loading.value
94
+ };
95
+ });
96
+ const getStyle = computed(() => {
97
+ var _a;
98
+ const style = {};
99
+ if (color == null ? void 0 : color.value) {
100
+ if (plain.value) {
101
+ style.color = color.value;
102
+ style.background = "#fff";
103
+ if (!((_a = color.value) == null ? void 0 : _a.includes("gradient"))) {
104
+ style.borderColor = color.value;
105
+ }
106
+ } else {
107
+ style.color = "#fff";
108
+ style.background = color.value;
109
+ }
110
+ }
111
+ return style;
112
+ });
113
+ return {
114
+ handleClick,
115
+ classes,
116
+ getStyle
117
+ };
118
+ }
119
+ });
120
+ const _hoisted_1$1 = { class: "nut-button__warp" };
121
+ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
122
+ const _component_nut_icon = resolveComponent("nut-icon");
123
+ return openBlock(), createElementBlock("view", {
124
+ class: normalizeClass(_ctx.classes),
125
+ style: normalizeStyle(_ctx.getStyle),
126
+ onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClick && _ctx.handleClick(...args))
127
+ }, [
128
+ createElementVNode("view", _hoisted_1$1, [
129
+ _ctx.loading ? (openBlock(), createBlock(_component_nut_icon, {
130
+ key: 0,
131
+ class: "nut-icon-loading"
132
+ })) : createCommentVNode("", true),
133
+ _ctx.icon && !_ctx.loading ? (openBlock(), createBlock(_component_nut_icon, {
134
+ key: 1,
135
+ class: normalizeClass(_ctx.icon),
136
+ name: _ctx.icon
137
+ }, null, 8, ["class", "name"])) : createCommentVNode("", true),
138
+ _ctx.$slots.default ? (openBlock(), createElementBlock("view", {
139
+ key: 2,
140
+ class: normalizeClass({ text: _ctx.icon || _ctx.loading })
141
+ }, [
142
+ renderSlot(_ctx.$slots, "default")
143
+ ], 2)) : createCommentVNode("", true)
144
+ ])
145
+ ], 6);
146
+ }
147
+ _sfc_main$1.render = _sfc_render$1;
33
148
  const { componentName, create } = createComponent("popover");
34
- const _sfc_main = create({
149
+ var _sfc_main = create({
35
150
  inheritAttrs: false,
36
151
  components: {
37
- [Popup.name]: Popup,
38
- [Button.name]: Button
152
+ [_sfc_main$3.name]: _sfc_main$3,
153
+ [_sfc_main$1.name]: _sfc_main$1
39
154
  },
40
155
  props: __spreadProps(__spreadValues({}, popupProps), {
41
156
  list: {
@@ -81,15 +196,15 @@ const _sfc_main = create({
81
196
  [`${prefixCls}--${location.value}`]: location.value
82
197
  };
83
198
  });
84
- function getReference() {
85
- state.elWidth = reference.value.offsetWidth;
86
- state.elHeight = reference.value.offsetHeight;
87
- }
199
+ const getReference = async () => {
200
+ const refe = await useTaroRect(reference, Taro);
201
+ state.elWidth = refe.width;
202
+ state.elHeight = refe.height;
203
+ };
88
204
  const getStyle = computed(() => {
89
205
  const style = {};
90
206
  if (location.value == "top") {
91
- style.bottom = state.elHeight + 20 + "px";
92
- style.left = 0 + "px";
207
+ style.bottom = state.elHeight + 10 + "px";
93
208
  } else if (location.value == "right") {
94
209
  style.top = 0 + "px";
95
210
  style.right = -state.elWidth + "px";
@@ -97,8 +212,7 @@ const _sfc_main = create({
97
212
  style.top = 0 + "px";
98
213
  style.left = -state.elWidth + "px";
99
214
  } else {
100
- style.top = state.elHeight + 20 + "px";
101
- style.left = 0 + "px";
215
+ style.top = state.elHeight + 10 + "px";
102
216
  }
103
217
  return style;
104
218
  });
@@ -120,7 +234,9 @@ const _sfc_main = create({
120
234
  return style;
121
235
  });
122
236
  onMounted(() => {
123
- getReference();
237
+ setTimeout(() => {
238
+ getReference();
239
+ }, 200);
124
240
  });
125
241
  watch(() => props.visible, (value) => {
126
242
  showPopup.value = value;
@@ -146,6 +262,7 @@ const _sfc_main = create({
146
262
  event.preventDefault();
147
263
  emit("choose");
148
264
  };
265
+ const refRandomId = Math.random().toString(36).slice(-8);
149
266
  return {
150
267
  classes,
151
268
  showPopup,
@@ -157,11 +274,12 @@ const _sfc_main = create({
157
274
  getReference,
158
275
  reference,
159
276
  getStyle,
160
- getArrowStyle
277
+ getArrowStyle,
278
+ refRandomId
161
279
  };
162
280
  }
163
281
  });
164
- const _hoisted_1 = { ref: "reference" };
282
+ const _hoisted_1 = ["id"];
165
283
  const _hoisted_2 = ["onClick"];
166
284
  const _hoisted_3 = { class: "title-name" };
167
285
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
@@ -170,9 +288,12 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
170
288
  onClick: _cache[1] || (_cache[1] = (...args) => _ctx.openPopover && _ctx.openPopover(...args)),
171
289
  class: normalizeClass(_ctx.classes)
172
290
  }, [
173
- createElementVNode("div", _hoisted_1, [
291
+ createElementVNode("div", {
292
+ ref: "reference",
293
+ id: "reference-" + _ctx.refRandomId
294
+ }, [
174
295
  renderSlot(_ctx.$slots, "reference")
175
- ], 512),
296
+ ], 8, _hoisted_1),
176
297
  _ctx.showPopup ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
177
298
  createElementVNode("view", {
178
299
  class: "more-background",
@@ -206,5 +327,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
206
327
  ], 64)) : createCommentVNode("", true)
207
328
  ], 2);
208
329
  }
209
- var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
210
- export { index as default };
330
+ _sfc_main.render = _sfc_render;
331
+ export { _sfc_main as default };
@@ -17,34 +17,20 @@ var __spreadValues = (a, b) => {
17
17
  return a;
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+ var __require = typeof require !== "undefined" ? require : (x) => {
21
+ throw new Error('Dynamic require of "' + x + '" is not supported');
22
+ };
20
23
  /*!
21
- * @nutui/nutui v3.1.12-beta.0 Mon Nov 22 2021 20:58:07 GMT+0800 (中国标准时间)
24
+ * @nutui/nutui v3.1.11 Wed Nov 24 2021 14:54:38 GMT+0800 (中国标准时间)
22
25
  * (c) 2021 @jdf2e.
23
26
  * Released under the MIT License.
24
27
  */
25
- import { reactive, computed, onMounted, onBeforeUnmount, onBeforeMount, onActivated, onDeactivated, watch, toRefs, resolveComponent, openBlock, createBlock, Teleport, normalizeClass, normalizeStyle, createCommentVNode, createVNode, Transition, withCtx, withDirectives, createElementVNode, renderSlot, createElementBlock, vShow } from "vue";
26
- import overlay, { overlayProps } from "./OverLay.js";
27
- import _sfc_main$1 from "./Icon.js";
28
+ import { getCurrentInstance, reactive, computed, onMounted, onBeforeUnmount, onBeforeMount, onActivated, onDeactivated, watch, toRefs, resolveComponent, openBlock, createElementBlock, createBlock, normalizeClass, normalizeStyle, createCommentVNode, createVNode, Transition, withCtx, withDirectives, createElementVNode, renderSlot, vShow } from "vue";
29
+ import { u as useLockScroll } from "./use-lock-scroll.js";
30
+ import _sfc_main$1, { overlayProps } from "./OverLay.js";
31
+ import { _ as _sfc_main$2 } from "./index.taro.vue_vue&type=script&lang.js";
28
32
  import { c as createComponent } from "./component.js";
29
- import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
30
33
  import "./pxCheck.js";
31
- let count = 0;
32
- const CLSNAME = "nut-overflow-hidden";
33
- const useLockScroll = (isLock) => {
34
- const lock = () => {
35
- if (isLock()) {
36
- !count && document.body.classList.add(CLSNAME);
37
- count++;
38
- }
39
- };
40
- const unlock = () => {
41
- if (isLock() && count) {
42
- count--;
43
- !count && document.body.classList.remove(CLSNAME);
44
- }
45
- };
46
- return [lock, unlock];
47
- };
48
34
  const { componentName, create } = createComponent("popup");
49
35
  let _zIndex = 2e3;
50
36
  const popupProps = __spreadProps(__spreadValues({}, overlayProps), {
@@ -87,20 +73,18 @@ const popupProps = __spreadProps(__spreadValues({}, overlayProps), {
87
73
  round: {
88
74
  type: Boolean,
89
75
  default: false
90
- },
91
- isWrapTeleport: {
92
- type: Boolean,
93
- default: true
94
76
  }
95
77
  });
96
- const _sfc_main = create({
78
+ var _sfc_main = create({
79
+ children: [_sfc_main$1],
97
80
  components: {
98
- [overlay.name]: overlay,
99
- [_sfc_main$1.name]: _sfc_main$1
81
+ [_sfc_main$1.name]: _sfc_main$1,
82
+ [_sfc_main$2.name]: _sfc_main$2
100
83
  },
101
84
  props: __spreadValues({}, popupProps),
102
85
  emits: ["click", "click-close-icon", "open", "close", "opend", "closed", "update:visible", "click-overlay"],
103
86
  setup(props, { emit }) {
87
+ getCurrentInstance();
104
88
  const state = reactive({
105
89
  zIndex: props.zIndex ? props.zIndex : _zIndex,
106
90
  showSlot: true,
@@ -214,14 +198,10 @@ const _sfc_main = create({
214
198
  });
215
199
  }
216
200
  });
217
- const _hoisted_1 = { key: 1 };
218
201
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
219
202
  const _component_nut_overlay = resolveComponent("nut-overlay");
220
203
  const _component_nut_icon = resolveComponent("nut-icon");
221
- return _ctx.isWrapTeleport ? (openBlock(), createBlock(Teleport, {
222
- key: 0,
223
- to: _ctx.teleport
224
- }, [
204
+ return openBlock(), createElementBlock("view", null, [
225
205
  _ctx.overlay ? (openBlock(), createBlock(_component_nut_overlay, {
226
206
  key: 0,
227
207
  visible: _ctx.visible,
@@ -261,47 +241,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
261
241
  ]),
262
242
  _: 3
263
243
  }, 8, ["name", "onAfterEnter", "onAfterLeave"])
264
- ], 8, ["to"])) : (openBlock(), createElementBlock("view", _hoisted_1, [
265
- _ctx.overlay ? (openBlock(), createBlock(_component_nut_overlay, {
266
- key: 0,
267
- visible: _ctx.visible,
268
- "close-on-click-overlay": _ctx.closeOnClickOverlay,
269
- class: normalizeClass(_ctx.overlayClass),
270
- style: normalizeStyle(_ctx.overlayStyle),
271
- "z-index": _ctx.zIndex,
272
- "lock-scroll": _ctx.lockScroll,
273
- duration: _ctx.duration,
274
- onClick: _ctx.onClickOverlay
275
- }, null, 8, ["visible", "close-on-click-overlay", "class", "style", "z-index", "lock-scroll", "duration", "onClick"])) : createCommentVNode("", true),
276
- createVNode(Transition, {
277
- name: _ctx.transitionName,
278
- onAfterEnter: _ctx.onOpened,
279
- onAfterLeave: _ctx.onClosed
280
- }, {
281
- default: withCtx(() => [
282
- withDirectives(createElementVNode("view", {
283
- class: normalizeClass(_ctx.classes),
284
- style: normalizeStyle(_ctx.popStyle),
285
- onClick: _cache[3] || (_cache[3] = (...args) => _ctx.onClick && _ctx.onClick(...args))
286
- }, [
287
- _ctx.showSlot ? renderSlot(_ctx.$slots, "default", { key: 0 }) : createCommentVNode("", true),
288
- _ctx.closeable ? (openBlock(), createElementBlock("view", {
289
- key: 1,
290
- onClick: _cache[2] || (_cache[2] = (...args) => _ctx.onClickCloseIcon && _ctx.onClickCloseIcon(...args)),
291
- class: normalizeClass(["nutui-popup__close-icon", "nutui-popup__close-icon--" + _ctx.closeIconPosition])
292
- }, [
293
- createVNode(_component_nut_icon, {
294
- name: _ctx.closeIcon,
295
- size: "12px"
296
- }, null, 8, ["name"])
297
- ], 2)) : createCommentVNode("", true)
298
- ], 6), [
299
- [vShow, _ctx.visible]
300
- ])
301
- ]),
302
- _: 3
303
- }, 8, ["name", "onAfterEnter", "onAfterLeave"])
304
- ]));
244
+ ]);
305
245
  }
306
- var Popup = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
307
- export { Popup as default, popupProps };
246
+ _sfc_main.render = _sfc_render;
247
+ export { _sfc_main as default, popupProps };
@@ -1,13 +1,12 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.12-beta.0 Mon Nov 22 2021 20:58:07 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.11 Wed Nov 24 2021 14:54:38 GMT+0800 (中国标准时间)
3
3
  * (c) 2021 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
6
  import { computed, openBlock, createElementBlock, normalizeClass, createCommentVNode, createElementVNode, toDisplayString } from "vue";
7
7
  import { c as createComponent } from "./component.js";
8
- import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
9
8
  const { componentName, create } = createComponent("price");
10
- const _sfc_main = create({
9
+ var _sfc_main = create({
11
10
  props: {
12
11
  price: {
13
12
  type: [Number, String],
@@ -44,8 +43,17 @@ const _sfc_main = create({
44
43
  [componentName]: true
45
44
  };
46
45
  });
46
+ const replaceSpecialChar = (url) => {
47
+ url = url.replace(/"/g, '"');
48
+ url = url.replace(/&/g, "&");
49
+ url = url.replace(/&lt;/g, "<");
50
+ url = url.replace(/&gt;/g, ">");
51
+ url = url.replace(/&nbsp;/g, " ");
52
+ url = url.replace(/&yen;/g, "\uFFE5");
53
+ return url;
54
+ };
47
55
  const showSymbol = computed(() => {
48
- const symbol = props.needSymbol ? props.symbol : "";
56
+ const symbol = props.needSymbol ? replaceSpecialChar(props.symbol) : "";
49
57
  return symbol;
50
58
  });
51
59
  const checkPoint = (price) => {
@@ -86,7 +94,8 @@ const _sfc_main = create({
86
94
  showSymbol,
87
95
  checkPoint,
88
96
  formatThousands,
89
- formatDecimal
97
+ formatDecimal,
98
+ replaceSpecialChar
90
99
  };
91
100
  }
92
101
  });
@@ -99,6 +108,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
99
108
  _ctx.needSymbol && _ctx.position == "before" ? (openBlock(), createElementBlock("view", {
100
109
  key: 0,
101
110
  class: normalizeClass(["nut-price--symbol", `nut-price--symbol-${_ctx.size}`]),
111
+ decode: "true",
102
112
  innerHTML: _ctx.showSymbol
103
113
  }, null, 10, _hoisted_1)) : createCommentVNode("", true),
104
114
  createElementVNode("view", {
@@ -114,9 +124,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
114
124
  _ctx.needSymbol && _ctx.position == "after" ? (openBlock(), createElementBlock("view", {
115
125
  key: 2,
116
126
  class: normalizeClass(["nut-price--symbol", `nut-price--symbol-${_ctx.size}`]),
127
+ decode: "true",
117
128
  innerHTML: _ctx.showSymbol
118
129
  }, null, 10, _hoisted_2)) : createCommentVNode("", true)
119
130
  ], 2);
120
131
  }
121
- var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
122
- export { index as default };
132
+ _sfc_main.render = _sfc_render;
133
+ export { _sfc_main as default };
@@ -1,13 +1,13 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.12-beta.0 Mon Nov 22 2021 20:58:07 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.11 Wed Nov 24 2021 14:54:38 GMT+0800 (中国标准时间)
3
3
  * (c) 2021 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
6
  import { ref, computed, watch, onMounted, resolveComponent, openBlock, createElementBlock, createElementVNode, normalizeClass, normalizeStyle, toDisplayString, createCommentVNode, createBlock } from "vue";
7
7
  import { c as createComponent } from "./component.js";
8
- import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
8
+ import Taro from "@tarojs/taro";
9
9
  const { create } = createComponent("progress");
10
- const _sfc_main = create({
10
+ var _sfc_main = create({
11
11
  props: {
12
12
  percentage: {
13
13
  type: [Number, String],
@@ -20,7 +20,7 @@ const _sfc_main = create({
20
20
  },
21
21
  status: {
22
22
  type: String,
23
- default: ""
23
+ default: "text"
24
24
  },
25
25
  strokeWidth: {
26
26
  type: [Number, String],
@@ -66,13 +66,24 @@ const _sfc_main = create({
66
66
  color: props.textColor || ""
67
67
  };
68
68
  });
69
+ const slideLeft = async (values) => {
70
+ if (Taro.getEnv() === "WEB") {
71
+ setTimeout(() => {
72
+ left.value = progressOuter.value.offsetWidth * Number(values) * 0.01 - 4 + "px";
73
+ }, 200);
74
+ } else {
75
+ setTimeout(() => {
76
+ const query = Taro.createSelectorQuery();
77
+ query.select(".nut-progress-outer").boundingClientRect((rec) => {
78
+ left.value = rec.width * Number(values) * 0.01 - 4 + "px";
79
+ }).exec();
80
+ }, 200);
81
+ }
82
+ };
69
83
  watch(() => props.percentage, (values) => {
70
- console.log("progressOuter.value.offsetWidth", progressOuter.value.offsetWidth);
71
- console.log("values", values);
72
- left.value = progressOuter.value.offsetWidth * Number(values) * 0.01 - 5 + "px";
73
- });
84
+ slideLeft(values);
85
+ }, { immediate: true });
74
86
  onMounted(() => {
75
- left.value = progressOuter.value.offsetWidth * Number(props.percentage) * 0.01 - 5 + "px";
76
87
  });
77
88
  return {
78
89
  height,
@@ -115,7 +126,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
115
126
  class: "nut-progress-text",
116
127
  style: normalizeStyle({ lineHeight: _ctx.height })
117
128
  }, [
118
- _ctx.status == "active" || _ctx.status == "" ? (openBlock(), createElementBlock("span", {
129
+ _ctx.status == "text" || _ctx.status == "active" ? (openBlock(), createElementBlock("span", {
119
130
  key: 0,
120
131
  style: normalizeStyle(_ctx.textStyle)
121
132
  }, toDisplayString(_ctx.percentage) + "%", 5)) : _ctx.status == "icon" ? (openBlock(), createBlock(_component_nut_icon, {
@@ -127,5 +138,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
127
138
  ], 4)) : createCommentVNode("", true)
128
139
  ]);
129
140
  }
130
- var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
131
- export { index as default };
141
+ _sfc_main.render = _sfc_render;
142
+ export { _sfc_main as default };
@@ -1,14 +1,14 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.12-beta.0 Mon Nov 22 2021 20:58:07 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.11 Wed Nov 24 2021 14:54:38 GMT+0800 (中国标准时间)
3
3
  * (c) 2021 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
6
  import { inject, computed, h } from "vue";
7
+ import { _ as _sfc_main$1 } from "./index.taro.vue_vue&type=script&lang.js";
7
8
  import { c as createComponent } from "./component.js";
8
- import _sfc_main$1 from "./Icon.js";
9
9
  import "./pxCheck.js";
10
10
  const { componentName, create } = createComponent("radio");
11
- const _sfc_main = create({
11
+ var _sfc_main = create({
12
12
  props: {
13
13
  disabled: {
14
14
  type: Boolean,
@@ -1,12 +1,12 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.12-beta.0 Mon Nov 22 2021 20:58:07 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.11 Wed Nov 24 2021 14:54:38 GMT+0800 (中国标准时间)
3
3
  * (c) 2021 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
6
  import { provide, readonly, computed, watch, h } from "vue";
7
7
  import { c as createComponent } from "./component.js";
8
8
  const { componentName, create } = createComponent("radiogroup");
9
- const _sfc_main = create({
9
+ var _sfc_main = create({
10
10
  props: {
11
11
  modelValue: {
12
12
  type: [Number, String, Boolean],