@nutui/nutui 3.1.10 → 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 (109) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/nutui.d.ts +5 -1
  3. package/dist/nutui.es.js +4041 -3518
  4. package/dist/nutui.umd.js +4084 -3627
  5. package/dist/packages/_es/ActionSheet.js +13 -12
  6. package/dist/packages/_es/Address.js +63 -49
  7. package/dist/packages/_es/Avatar.js +4 -5
  8. package/dist/packages/_es/BackTop.js +72 -109
  9. package/dist/packages/_es/Badge.js +4 -5
  10. package/dist/packages/_es/Barrage.js +63 -57
  11. package/dist/packages/_es/Button.js +5 -6
  12. package/dist/packages/_es/Calendar.js +27 -18
  13. package/dist/packages/_es/Card.js +104 -0
  14. package/dist/packages/_es/Cell.js +5 -13
  15. package/dist/packages/_es/CellGroup.js +4 -5
  16. package/dist/packages/_es/Checkbox.js +3 -3
  17. package/dist/packages/_es/CheckboxGroup.js +9 -4
  18. package/dist/packages/_es/CircleProgress.js +142 -46
  19. package/dist/packages/_es/Col.js +4 -5
  20. package/dist/packages/_es/Collapse.js +35 -10
  21. package/dist/packages/_es/CollapseItem.js +80 -35
  22. package/dist/packages/_es/CountDown.js +7 -5
  23. package/dist/packages/_es/CountUp.js +34 -31
  24. package/dist/packages/_es/DatePicker.js +451 -219
  25. package/dist/packages/_es/Dialog.js +13 -87
  26. package/dist/packages/_es/Divider.js +5 -6
  27. package/dist/packages/_es/Drag.js +76 -50
  28. package/dist/packages/_es/Elevator.js +81 -52
  29. package/dist/packages/_es/FixedNav.js +8 -9
  30. package/dist/packages/_es/Form.js +137 -0
  31. package/dist/packages/_es/FormItem.js +109 -0
  32. package/dist/packages/_es/Icon.js +6 -40
  33. package/dist/packages/_es/ImagePreview.js +23 -21
  34. package/dist/packages/_es/InfiniteLoading.js +95 -109
  35. package/dist/packages/_es/Input.js +22 -21
  36. package/dist/packages/_es/InputNumber.js +24 -18
  37. package/dist/packages/_es/Layout.js +2 -2
  38. package/dist/packages/_es/Menu.js +89 -171
  39. package/dist/packages/_es/MenuItem.js +155 -18
  40. package/dist/packages/_es/Navbar.js +7 -7
  41. package/dist/packages/_es/NoticeBar.js +39 -26
  42. package/dist/packages/_es/Notify.js +30 -166
  43. package/dist/packages/_es/NumberKeyboard.js +10 -6
  44. package/dist/packages/_es/OverLay.js +22 -29
  45. package/dist/packages/_es/Pagination.js +8 -9
  46. package/dist/packages/_es/Picker.js +61 -447
  47. package/dist/packages/_es/Popover.js +146 -25
  48. package/dist/packages/_es/Popup.js +18 -39
  49. package/dist/packages/_es/Price.js +18 -7
  50. package/dist/packages/_es/Progress.js +23 -12
  51. package/dist/packages/_es/Radio.js +20 -7
  52. package/dist/packages/_es/RadioGroup.js +7 -3
  53. package/dist/packages/_es/Range.js +38 -59
  54. package/dist/packages/_es/Rate.js +16 -20
  55. package/dist/packages/_es/Row.js +4 -5
  56. package/dist/packages/_es/SearchBar.js +7 -5
  57. package/dist/packages/_es/ShortPassword.js +89 -59
  58. package/dist/packages/_es/Signature.js +70 -71
  59. package/dist/packages/_es/Sku.js +508 -0
  60. package/dist/packages/_es/Step.js +10 -8
  61. package/dist/packages/_es/Steps.js +2 -2
  62. package/dist/packages/_es/Swipe.js +42 -27
  63. package/dist/packages/_es/Swiper.js +17 -418
  64. package/dist/packages/_es/SwiperItem.js +14 -39
  65. package/dist/packages/_es/Switch.js +4 -5
  66. package/dist/packages/_es/TabPane.js +4 -5
  67. package/dist/packages/_es/Tabbar.js +4 -5
  68. package/dist/packages/_es/TabbarItem.js +8 -9
  69. package/dist/packages/_es/Tabs.js +23 -17
  70. package/dist/packages/_es/Tag.js +5 -6
  71. package/dist/packages/_es/TextArea.js +16 -12
  72. package/dist/packages/_es/TimeDetail.js +7 -5
  73. package/dist/packages/_es/TimePannel.js +7 -5
  74. package/dist/packages/_es/TimeSelect.js +12 -7
  75. package/dist/packages/_es/Toast.js +41 -163
  76. package/dist/packages/_es/Uploader.js +210 -164
  77. package/dist/packages/_es/commonProps.js +30 -0
  78. package/dist/packages/_es/component.js +1 -1
  79. package/dist/packages/_es/index.js +1 -1
  80. package/dist/packages/_es/index.taro.vue_vue&type=script&lang.js +44 -0
  81. package/dist/packages/_es/index2.js +44 -8
  82. package/dist/packages/_es/index3.js +419 -0
  83. package/dist/packages/_es/pxCheck.js +1 -1
  84. package/dist/packages/_es/raf.js +1 -1
  85. package/dist/packages/_es/use-lock-scroll.js +23 -0
  86. package/dist/packages/_es/util.js +47 -0
  87. package/dist/packages/button/index.scss +9 -0
  88. package/dist/packages/card/index.scss +97 -0
  89. package/dist/packages/checkbox/index.scss +1 -1
  90. package/dist/packages/form/index.scss +2 -0
  91. package/dist/packages/formitem/index.scss +60 -0
  92. package/dist/packages/menu/index.scss +32 -60
  93. package/dist/packages/menuitem/index.scss +36 -99
  94. package/dist/packages/numberkeyboard/index.scss +1 -1
  95. package/dist/packages/progress/index.scss +2 -0
  96. package/dist/packages/radio/index.scss +32 -4
  97. package/dist/packages/radiogroup/index.scss +20 -0
  98. package/dist/packages/sku/index.scss +147 -0
  99. package/dist/packages/switch/index.scss +1 -1
  100. package/dist/packages/uploader/index.scss +95 -8
  101. package/dist/style.css +1 -1
  102. package/dist/style.es.js +1 -2
  103. package/dist/styles/mixins/index.scss +0 -4
  104. package/dist/styles/themes/default.scss +34 -30
  105. package/dist/styles/variables.scss +45 -3
  106. package/package.json +3 -2
  107. package/dist/packages/_es/Video.js +0 -405
  108. package/dist/packages/_es/plugin-vue_export-helper.js +0 -12
  109. package/dist/packages/_es/style.css +0 -160
@@ -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.10 Fri Nov 05 2021 19:52:49 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.10 Fri Nov 05 2021 19:52:49 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), {
@@ -89,23 +75,16 @@ const popupProps = __spreadProps(__spreadValues({}, overlayProps), {
89
75
  default: false
90
76
  }
91
77
  });
92
- const _sfc_main = create({
78
+ var _sfc_main = create({
79
+ children: [_sfc_main$1],
93
80
  components: {
94
- [overlay.name]: overlay,
95
- [_sfc_main$1.name]: _sfc_main$1
81
+ [_sfc_main$1.name]: _sfc_main$1,
82
+ [_sfc_main$2.name]: _sfc_main$2
96
83
  },
97
84
  props: __spreadValues({}, popupProps),
98
- emits: [
99
- "click",
100
- "click-close-icon",
101
- "open",
102
- "close",
103
- "opend",
104
- "closed",
105
- "update:visible",
106
- "click-overlay"
107
- ],
85
+ emits: ["click", "click-close-icon", "open", "close", "opend", "closed", "update:visible", "click-overlay"],
108
86
  setup(props, { emit }) {
87
+ getCurrentInstance();
109
88
  const state = reactive({
110
89
  zIndex: props.zIndex ? props.zIndex : _zIndex,
111
90
  showSlot: true,
@@ -222,7 +201,7 @@ const _sfc_main = create({
222
201
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
223
202
  const _component_nut_overlay = resolveComponent("nut-overlay");
224
203
  const _component_nut_icon = resolveComponent("nut-icon");
225
- return openBlock(), createBlock(Teleport, { to: _ctx.teleport }, [
204
+ return openBlock(), createElementBlock("view", null, [
226
205
  _ctx.overlay ? (openBlock(), createBlock(_component_nut_overlay, {
227
206
  key: 0,
228
207
  visible: _ctx.visible,
@@ -262,7 +241,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
262
241
  ]),
263
242
  _: 3
264
243
  }, 8, ["name", "onAfterEnter", "onAfterLeave"])
265
- ], 8, ["to"]);
244
+ ]);
266
245
  }
267
- var Popup = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
268
- 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.10 Fri Nov 05 2021 19:52:49 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.10 Fri Nov 05 2021 19:52:49 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,21 +1,25 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.10 Fri Nov 05 2021 19:52:49 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,
15
15
  default: false
16
16
  },
17
- label: {
17
+ shape: {
18
18
  type: String,
19
+ default: "round"
20
+ },
21
+ label: {
22
+ type: [String, Number],
19
23
  default: ""
20
24
  },
21
25
  iconName: {
@@ -34,7 +38,7 @@ const _sfc_main = create({
34
38
  setup(props, { emit, slots }) {
35
39
  let parent = inject("parent");
36
40
  const isCurValue = computed(() => {
37
- return parent.label.value === props.label;
41
+ return parent.label.value == props.label;
38
42
  });
39
43
  const color = computed(() => {
40
44
  return !props.disabled ? isCurValue.value ? "nut-radio__icon" : "nut-radio__icon--unchecked" : "nut-radio__icon--disable";
@@ -56,16 +60,25 @@ const _sfc_main = create({
56
60
  class: `${componentName}__label ${props.disabled ? `${componentName}__label--disabled` : ""}`
57
61
  }, (_a = slots.default) == null ? void 0 : _a.call(slots));
58
62
  };
63
+ const renderButton = () => {
64
+ var _a;
65
+ return h("view", {
66
+ class: `${componentName}__button ${isCurValue.value && `${componentName}__button--active`} ${props.disabled ? `${componentName}__button--disabled` : ""}`
67
+ }, (_a = slots.default) == null ? void 0 : _a.call(slots));
68
+ };
59
69
  const handleClick = () => {
60
70
  if (isCurValue.value || props.disabled)
61
71
  return;
62
72
  parent.updateValue(props.label);
63
73
  };
74
+ let reverseState = position.value === "left";
64
75
  return () => {
65
76
  return h("view", {
66
- class: `${componentName} ${position.value === "left" ? `${componentName}--reverse` : ""}`,
77
+ class: `${componentName} ${componentName}--${props.shape} ${reverseState ? `${componentName}--reverse` : ""}`,
67
78
  onClick: handleClick
68
- }, [renderIcon(), renderLabel()]);
79
+ }, [
80
+ props.shape == "button" ? renderButton() : reverseState ? [renderLabel(), renderIcon()] : [renderIcon(), renderLabel()]
81
+ ]);
69
82
  };
70
83
  }
71
84
  });
@@ -1,17 +1,21 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.10 Fri Nov 05 2021 19:52:49 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],
13
13
  default: ""
14
14
  },
15
+ direction: {
16
+ type: String,
17
+ default: "vertical"
18
+ },
15
19
  textPosition: {
16
20
  type: String,
17
21
  default: "right"
@@ -29,7 +33,7 @@ const _sfc_main = create({
29
33
  return () => {
30
34
  var _a;
31
35
  return h("view", {
32
- class: `${componentName}`
36
+ class: `${componentName} ${componentName}--${props.direction}`
33
37
  }, (_a = slots.default) == null ? void 0 : _a.call(slots));
34
38
  };
35
39
  }