@nutui/nutui 3.1.16 → 3.1.18-beta.0

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 (137) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/README.md +1 -1
  3. package/dist/nutui.d.ts +3 -1
  4. package/dist/nutui.es.js +1860 -773
  5. package/dist/nutui.umd.js +1871 -778
  6. package/dist/packages/_es/ActionSheet.js +8 -3
  7. package/dist/packages/_es/Address.js +60 -7
  8. package/dist/packages/_es/Audio.js +289 -0
  9. package/dist/packages/_es/Avatar.js +1 -1
  10. package/dist/packages/_es/BackTop.js +3 -3
  11. package/dist/packages/_es/Badge.js +1 -1
  12. package/dist/packages/_es/Barrage.js +1 -1
  13. package/dist/packages/_es/Button.js +13 -4
  14. package/dist/packages/_es/Calendar.js +428 -209
  15. package/dist/packages/_es/Card.js +1 -2
  16. package/dist/packages/_es/Cascader.js +2 -2
  17. package/dist/packages/_es/Cell.js +2 -2
  18. package/dist/packages/_es/CellGroup.js +1 -1
  19. package/dist/packages/_es/Checkbox.js +2 -2
  20. package/dist/packages/_es/CheckboxGroup.js +2 -2
  21. package/dist/packages/_es/CircleProgress.js +1 -1
  22. package/dist/packages/_es/Col.js +1 -1
  23. package/dist/packages/_es/Collapse.js +1 -1
  24. package/dist/packages/_es/CollapseItem.js +4 -2
  25. package/dist/packages/_es/CountDown.js +1 -1
  26. package/dist/packages/_es/CountUp.js +1 -1
  27. package/dist/packages/_es/DatePicker.js +1 -2
  28. package/dist/packages/_es/Dialog.js +1 -1
  29. package/dist/packages/_es/Divider.js +1 -1
  30. package/dist/packages/_es/Drag.js +1 -1
  31. package/dist/packages/_es/Elevator.js +10 -5
  32. package/dist/packages/_es/Empty.js +1 -1
  33. package/dist/packages/_es/FixedNav.js +1 -1
  34. package/dist/packages/_es/Form.js +1 -1
  35. package/dist/packages/_es/FormItem.js +1 -1
  36. package/dist/packages/_es/Grid.js +1 -1
  37. package/dist/packages/_es/GridItem.js +2 -2
  38. package/dist/packages/_es/Icon.js +1 -1
  39. package/dist/packages/_es/ImagePreview.js +8 -5
  40. package/dist/packages/_es/Indicator.js +1 -1
  41. package/dist/packages/_es/InfiniteLoading.js +1 -1
  42. package/dist/packages/_es/Input.js +7 -2
  43. package/dist/packages/_es/InputNumber.js +1 -1
  44. package/dist/packages/_es/Layout.js +1 -1
  45. package/dist/packages/_es/Menu.js +1 -1
  46. package/dist/packages/_es/MenuItem.js +1 -1
  47. package/dist/packages/_es/Navbar.js +18 -59
  48. package/dist/packages/_es/NoticeBar.js +38 -23
  49. package/dist/packages/_es/Notify.js +2 -2
  50. package/dist/packages/_es/NumberKeyboard.js +1 -2
  51. package/dist/packages/_es/OverLay.js +1 -1
  52. package/dist/packages/_es/Pagination.js +1 -1
  53. package/dist/packages/_es/Picker.js +2 -1
  54. package/dist/packages/_es/Popover.js +4 -1
  55. package/dist/packages/_es/Popup.js +1 -1
  56. package/dist/packages/_es/Price.js +1 -1
  57. package/dist/packages/_es/Progress.js +24 -11
  58. package/dist/packages/_es/Radio.js +2 -2
  59. package/dist/packages/_es/RadioGroup.js +1 -1
  60. package/dist/packages/_es/Range.js +2 -2
  61. package/dist/packages/_es/Rate.js +1 -1
  62. package/dist/packages/_es/Row.js +1 -1
  63. package/dist/packages/_es/SearchBar.js +1 -1
  64. package/dist/packages/_es/ShortPassword.js +12 -4
  65. package/dist/packages/_es/SideNavBar.js +1 -1
  66. package/dist/packages/_es/SideNavBarItem.js +1 -1
  67. package/dist/packages/_es/Signature.js +1 -1
  68. package/dist/packages/_es/Skeleton.js +8 -6
  69. package/dist/packages/_es/Sku.js +1 -1
  70. package/dist/packages/_es/Step.js +1 -1
  71. package/dist/packages/_es/Steps.js +1 -1
  72. package/dist/packages/_es/Sticky.js +143 -0
  73. package/dist/packages/_es/SubSideNavBar.js +1 -1
  74. package/dist/packages/_es/Swipe.js +2 -2
  75. package/dist/packages/_es/Swiper.js +2 -2
  76. package/dist/packages/_es/SwiperItem.js +3 -8
  77. package/dist/packages/_es/Switch.js +2 -2
  78. package/dist/packages/_es/TabPane.js +1 -1
  79. package/dist/packages/_es/Tabbar.js +1 -1
  80. package/dist/packages/_es/TabbarItem.js +7 -3
  81. package/dist/packages/_es/Table.js +2 -2
  82. package/dist/packages/_es/Tabs.js +1 -1
  83. package/dist/packages/_es/Tag.js +1 -1
  84. package/dist/packages/_es/TextArea.js +1 -1
  85. package/dist/packages/_es/TimeDetail.js +1 -1
  86. package/dist/packages/_es/TimePannel.js +1 -1
  87. package/dist/packages/_es/TimeSelect.js +7 -2
  88. package/dist/packages/_es/Toast.js +15 -8
  89. package/dist/packages/_es/Uploader.js +1 -1
  90. package/dist/packages/_es/Video.js +1 -55
  91. package/dist/packages/_es/common.js +1 -1
  92. package/dist/packages/_es/component.js +1 -1
  93. package/dist/packages/_es/index.js +5 -7
  94. package/dist/packages/_es/index2.js +7 -58
  95. package/dist/packages/_es/index3.js +1 -1
  96. package/dist/packages/_es/index4.js +64 -0
  97. package/dist/packages/_es/plugin-vue_export-helper.js +1 -1
  98. package/dist/packages/_es/pxCheck.js +1 -1
  99. package/dist/packages/_es/raf.js +1 -1
  100. package/dist/packages/_es/util.js +1 -1
  101. package/dist/packages/actionsheet/index.scss +7 -6
  102. package/dist/packages/address/index.scss +8 -0
  103. package/dist/packages/audio/index.scss +66 -0
  104. package/dist/packages/audiooperate/index.scss +13 -0
  105. package/dist/packages/button/index.scss +5 -5
  106. package/dist/packages/calendar/index.scss +47 -41
  107. package/dist/packages/calendaritem/index.scss +57 -42
  108. package/dist/packages/cell/index.scss +3 -3
  109. package/dist/packages/cellgroup/index.scss +1 -1
  110. package/dist/packages/elevator/index.scss +3 -0
  111. package/dist/packages/infiniteloading/index.scss +1 -1
  112. package/dist/packages/input/index.scss +4 -2
  113. package/dist/packages/navbar/index.scss +2 -0
  114. package/dist/packages/noticebar/index.scss +11 -5
  115. package/dist/packages/notify/index.scss +1 -0
  116. package/dist/packages/progress/index.scss +21 -17
  117. package/dist/packages/range/index.scss +8 -8
  118. package/dist/packages/row/index.scss +3 -0
  119. package/dist/packages/sticky/index.scss +5 -0
  120. package/dist/packages/swiper/index.scss +4 -4
  121. package/dist/packages/switch/index.scss +8 -8
  122. package/dist/packages/tabbar/index.scss +7 -4
  123. package/dist/packages/tabbaritem/index.scss +4 -3
  124. package/dist/packages/tabs/index.scss +1 -0
  125. package/dist/packages/toast/index.scss +8 -7
  126. package/dist/style.css +1 -1
  127. package/dist/styles/font/config.json +6 -1
  128. package/dist/styles/font/demo_index.html +118 -3
  129. package/dist/styles/font/iconfont.css +23 -3
  130. package/dist/styles/font/iconfont.js +25 -24
  131. package/dist/styles/font/iconfont.json +35 -0
  132. package/dist/styles/font/iconfont.ttf +0 -0
  133. package/dist/styles/font/iconfont.woff +0 -0
  134. package/dist/styles/font/iconfont.woff2 +0 -0
  135. package/dist/styles/themes/default.scss +46 -43
  136. package/dist/styles/variables.scss +123 -42
  137. package/package.json +12 -13
@@ -18,11 +18,11 @@ var __spreadValues = (a, b) => {
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  /*!
21
- * @nutui/nutui v3.1.16 Sun Jan 30 2022 10:58:10 GMT+0800 (中国标准时间)
21
+ * @nutui/nutui v3.1.18-beta.0 Tue Mar 08 2022 10:41:31 GMT+0800 (中国标准时间)
22
22
  * (c) 2021 @jdf2e.
23
23
  * Released under the MIT License.
24
24
  */
25
- import { h, ref, reactive, computed, watch, onMounted, onActivated, onDeactivated, onUnmounted, toRefs, resolveComponent, openBlock, createElementBlock, normalizeClass, withDirectives, normalizeStyle, createBlock, createCommentVNode, createElementVNode, renderSlot, createTextVNode, toDisplayString, withModifiers, createVNode, vShow, Fragment, renderList } from "vue";
25
+ import { h, ref, reactive, computed, watch, onMounted, onActivated, onDeactivated, onUnmounted, toRefs, resolveComponent, openBlock, createElementBlock, normalizeClass, withDirectives, normalizeStyle, renderSlot, createBlock, createCommentVNode, createElementVNode, createTextVNode, toDisplayString, withModifiers, createVNode, vShow, Fragment, renderList } from "vue";
26
26
  import { c as createComponent } from "./component.js";
27
27
  import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
28
28
  const { componentName, create } = createComponent("noticebar");
@@ -63,6 +63,7 @@ const _sfc_main = create({
63
63
  default: false
64
64
  },
65
65
  leftIcon: { type: String, default: "" },
66
+ rightIcon: { type: String, default: "" },
66
67
  color: {
67
68
  type: String,
68
69
  default: ""
@@ -77,7 +78,7 @@ const _sfc_main = create({
77
78
  },
78
79
  scrollable: {
79
80
  type: Boolean,
80
- default: true
81
+ default: null
81
82
  },
82
83
  speed: {
83
84
  type: Number,
@@ -87,12 +88,12 @@ const _sfc_main = create({
87
88
  components: {
88
89
  ScrollItem: function(props) {
89
90
  props.item.props.style = props.style;
91
+ props.item.key = props.key;
90
92
  return h(props.item);
91
93
  }
92
94
  },
93
95
  emits: ["click", "close"],
94
96
  setup(props, { emit, slots }) {
95
- console.log("componentName", componentName);
96
97
  const wrap = ref(null);
97
98
  const content = ref(null);
98
99
  const state = reactive({
@@ -106,7 +107,8 @@ const _sfc_main = create({
106
107
  scrollList: [],
107
108
  distance: 0,
108
109
  timer: null,
109
- keepAlive: false
110
+ keepAlive: false,
111
+ isCanScroll: null
110
112
  });
111
113
  const classes = computed(() => {
112
114
  const prefixCls = componentName;
@@ -114,6 +116,13 @@ const _sfc_main = create({
114
116
  [prefixCls]: true
115
117
  };
116
118
  });
119
+ const isEllipsis = computed(() => {
120
+ if (state.isCanScroll == null) {
121
+ return false;
122
+ } else {
123
+ return !state.isCanScroll && !props.wrapable;
124
+ }
125
+ });
117
126
  const iconShow = computed(() => {
118
127
  if (props.leftIcon == "close") {
119
128
  return false;
@@ -132,9 +141,9 @@ const _sfc_main = create({
132
141
  });
133
142
  const contentStyle = computed(() => {
134
143
  return {
135
- paddingLeft: state.firstRound ? 0 : state.wrapWidth + "px",
136
144
  animationDelay: (state.firstRound ? props.delay : 0) + "s",
137
- animationDuration: state.duration + "s"
145
+ animationDuration: state.duration + "s",
146
+ transform: `translateX(${state.firstRound ? 0 : state.wrapWidth + "px"})`
138
147
  };
139
148
  });
140
149
  const iconBg = computed(() => {
@@ -177,7 +186,8 @@ const _sfc_main = create({
177
186
  }
178
187
  const wrapWidth = wrap.value.getBoundingClientRect().width;
179
188
  const offsetWidth = content.value.getBoundingClientRect().width;
180
- if (props.scrollable && offsetWidth > wrapWidth) {
189
+ state.isCanScroll = props.scrollable == null ? offsetWidth > wrapWidth : props.scrollable;
190
+ if (state.isCanScroll) {
181
191
  state.wrapWidth = wrapWidth;
182
192
  state.offsetWidth = offsetWidth;
183
193
  state.duration = offsetWidth / props.speed;
@@ -191,7 +201,9 @@ const _sfc_main = create({
191
201
  emit("click", event);
192
202
  };
193
203
  const onClickIcon = (event) => {
194
- state.showNoticeBar = !props.closeMode;
204
+ if (props.closeMode) {
205
+ state.showNoticeBar = !props.closeMode;
206
+ }
195
207
  emit("close", event);
196
208
  };
197
209
  const onAnimationEnd = () => {
@@ -238,14 +250,12 @@ const _sfc_main = create({
238
250
  emit("close", state.scrollList[0]);
239
251
  };
240
252
  onMounted(() => {
241
- console.log(props.direction);
242
253
  if (props.direction == "vertical") {
243
254
  if (slots.default) {
244
255
  state.scrollList = [].concat(slots.default()[0].children);
245
256
  } else {
246
257
  state.scrollList = [].concat(props.list);
247
258
  }
248
- console.log(state.scrollList);
249
259
  setTimeout(() => {
250
260
  props.complexAm ? startRoll() : startRollEasy();
251
261
  }, props.standTime);
@@ -266,6 +276,7 @@ const _sfc_main = create({
266
276
  clearInterval(state.timer);
267
277
  });
268
278
  return __spreadProps(__spreadValues(__spreadValues({}, toRefs(props)), toRefs(state)), {
279
+ isEllipsis,
269
280
  classes,
270
281
  iconShow,
271
282
  barStyle,
@@ -305,17 +316,19 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
305
316
  class: "left-icon",
306
317
  style: normalizeStyle({ "background-image": `url(${_ctx.iconBg})` })
307
318
  }, [
308
- !_ctx.iconBg ? (openBlock(), createBlock(_component_nut_icon, {
309
- key: 0,
310
- name: "notice",
311
- size: "16",
312
- color: _ctx.color
313
- }, null, 8, ["color"])) : createCommentVNode("", true)
319
+ renderSlot(_ctx.$slots, "left-icon", {}, () => [
320
+ !_ctx.iconBg ? (openBlock(), createBlock(_component_nut_icon, {
321
+ key: 0,
322
+ name: "notice",
323
+ size: "16",
324
+ color: _ctx.color
325
+ }, null, 8, ["color"])) : createCommentVNode("", true)
326
+ ])
314
327
  ], 4)) : createCommentVNode("", true),
315
328
  createElementVNode("view", _hoisted_1, [
316
329
  createElementVNode("view", {
317
330
  ref: "content",
318
- class: normalizeClass(["content", [_ctx.animationClass, { "nut-ellipsis": !_ctx.scrollable && !_ctx.wrapable }]]),
331
+ class: normalizeClass(["content", [_ctx.animationClass, { "nut-ellipsis": _ctx.isEllipsis }]]),
319
332
  style: normalizeStyle(_ctx.contentStyle),
320
333
  onAnimationend: _cache[0] || (_cache[0] = (...args) => _ctx.onAnimationEnd && _ctx.onAnimationEnd(...args)),
321
334
  onWebkitAnimationEnd: _cache[1] || (_cache[1] = (...args) => _ctx.onAnimationEnd && _ctx.onAnimationEnd(...args))
@@ -325,15 +338,17 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
325
338
  ])
326
339
  ], 38)
327
340
  ], 512),
328
- _ctx.closeMode ? (openBlock(), createElementBlock("view", {
341
+ _ctx.closeMode || _ctx.rightIcon ? (openBlock(), createElementBlock("view", {
329
342
  key: 1,
330
343
  class: "right-icon",
331
344
  onClick: _cache[2] || (_cache[2] = withModifiers((...args) => _ctx.onClickIcon && _ctx.onClickIcon(...args), ["stop"]))
332
345
  }, [
333
- createVNode(_component_nut_icon, {
334
- name: "close",
335
- color: _ctx.color
336
- }, null, 8, ["color"])
346
+ renderSlot(_ctx.$slots, "right-icon", {}, () => [
347
+ createVNode(_component_nut_icon, {
348
+ name: _ctx.rightIcon ? _ctx.rightIcon : "close",
349
+ color: _ctx.color
350
+ }, null, 8, ["name", "color"])
351
+ ])
337
352
  ])) : createCommentVNode("", true)
338
353
  ], 6)), [
339
354
  [vShow, _ctx.showNoticeBar]
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  /*!
21
- * @nutui/nutui v3.1.16 Sun Jan 30 2022 10:58:10 GMT+0800 (中国标准时间)
21
+ * @nutui/nutui v3.1.18-beta.0 Tue Mar 08 2022 10:41:31 GMT+0800 (中国标准时间)
22
22
  * (c) 2021 @jdf2e.
23
23
  * Released under the MIT License.
24
24
  */
@@ -107,7 +107,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
107
107
  }, {
108
108
  default: withCtx(() => [
109
109
  withDirectives(createElementVNode("view", {
110
- class: normalizeClass(["popup-top", "nut-notify", `nut-notify--${_ctx.type}`, { className: _ctx.className }]),
110
+ class: normalizeClass(["popup-top", "nut-notify", `nut-notify--${_ctx.type}`, [_ctx.className]]),
111
111
  style: normalizeStyle({ color: _ctx.color, background: _ctx.background }),
112
112
  onClick: _cache[0] || (_cache[0] = (...args) => _ctx.clickCover && _ctx.clickCover(...args))
113
113
  }, [
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.16 Sun Jan 30 2022 10:58:10 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.18-beta.0 Tue Mar 08 2022 10:41:31 GMT+0800 (中国标准时间)
3
3
  * (c) 2021 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -44,7 +44,6 @@ const _sfc_main = create({
44
44
  },
45
45
  emits: ["input", "delete", "close", "update:value"],
46
46
  setup(props, { emit }) {
47
- console.log(props.overlay);
48
47
  const clickKeyIndex = ref(void 0);
49
48
  const show = ref(props.visible);
50
49
  const root = ref();
@@ -15,7 +15,7 @@ var __spreadValues = (a, b) => {
15
15
  return a;
16
16
  };
17
17
  /*!
18
- * @nutui/nutui v3.1.16 Sun Jan 30 2022 10:58:10 GMT+0800 (中国标准时间)
18
+ * @nutui/nutui v3.1.18-beta.0 Tue Mar 08 2022 10:41:31 GMT+0800 (中国标准时间)
19
19
  * (c) 2021 @jdf2e.
20
20
  * Released under the MIT License.
21
21
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.16 Sun Jan 30 2022 10:58:10 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.18-beta.0 Tue Mar 08 2022 10:41:31 GMT+0800 (中国标准时间)
3
3
  * (c) 2021 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  /*!
21
- * @nutui/nutui v3.1.16 Sun Jan 30 2022 10:58:10 GMT+0800 (中国标准时间)
21
+ * @nutui/nutui v3.1.18-beta.0 Tue Mar 08 2022 10:41:31 GMT+0800 (中国标准时间)
22
22
  * (c) 2021 @jdf2e.
23
23
  * Released under the MIT License.
24
24
  */
@@ -303,6 +303,7 @@ const _sfc_main = create({
303
303
  return "text";
304
304
  });
305
305
  const columnList = computed(() => {
306
+ console.log("\u521D\u59CB\u5316", dataType.value);
306
307
  if (dataType.value === "text") {
307
308
  return [{ values: state.formattedColumns, defaultIndex: state.defaultIndex }];
308
309
  } else if (dataType.value === "multipleColumns") {
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  /*!
21
- * @nutui/nutui v3.1.16 Sun Jan 30 2022 10:58:10 GMT+0800 (中国标准时间)
21
+ * @nutui/nutui v3.1.18-beta.0 Tue Mar 08 2022 10:41:31 GMT+0800 (中国标准时间)
22
22
  * (c) 2021 @jdf2e.
23
23
  * Released under the MIT License.
24
24
  */
@@ -138,6 +138,9 @@ const _sfc_main = create({
138
138
  emit("update:visible", false);
139
139
  };
140
140
  const chooseItem = (item, index2) => {
141
+ if (item.disabled) {
142
+ return;
143
+ }
141
144
  emit("choose", item, index2);
142
145
  };
143
146
  return {
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  /*!
21
- * @nutui/nutui v3.1.16 Sun Jan 30 2022 10:58:10 GMT+0800 (中国标准时间)
21
+ * @nutui/nutui v3.1.18-beta.0 Tue Mar 08 2022 10:41:31 GMT+0800 (中国标准时间)
22
22
  * (c) 2021 @jdf2e.
23
23
  * Released under the MIT License.
24
24
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.16 Sun Jan 30 2022 10:58:10 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.18-beta.0 Tue Mar 08 2022 10:41:31 GMT+0800 (中国标准时间)
3
3
  * (c) 2021 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.16 Sun Jan 30 2022 10:58:10 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.18-beta.0 Tue Mar 08 2022 10:41:31 GMT+0800 (中国标准时间)
3
3
  * (c) 2021 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -49,11 +49,16 @@ const _sfc_main = create({
49
49
  iconColor: {
50
50
  type: String,
51
51
  default: "#439422"
52
+ },
53
+ isShowPercentage: {
54
+ type: Boolean,
55
+ default: true
52
56
  }
53
57
  },
54
58
  setup(props, { emit }) {
55
59
  const height = ref(props.strokeWidth + "px");
56
60
  const progressOuter = ref();
61
+ const insideText = ref();
57
62
  const left = ref();
58
63
  const bgStyle = computed(() => {
59
64
  return {
@@ -66,19 +71,29 @@ const _sfc_main = create({
66
71
  color: props.textColor || ""
67
72
  };
68
73
  });
74
+ const slideLeft = (values) => {
75
+ if (props.textInside) {
76
+ let offsetWidth = progressOuter.value.offsetWidth;
77
+ let percentageWidth = progressOuter.value.offsetWidth * Number(values) * 0.01;
78
+ let insideTextWidth = insideText.value.offsetWidth;
79
+ left.value = percentageWidth - 5 + "px";
80
+ if (offsetWidth == percentageWidth) {
81
+ left.value = percentageWidth - insideTextWidth + "px";
82
+ }
83
+ }
84
+ };
69
85
  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";
86
+ slideLeft(values);
73
87
  });
74
88
  onMounted(() => {
75
- left.value = progressOuter.value.offsetWidth * Number(props.percentage) * 0.01 - 5 + "px";
89
+ slideLeft(props.percentage);
76
90
  });
77
91
  return {
78
92
  height,
79
93
  bgStyle,
80
94
  textStyle,
81
95
  progressOuter,
96
+ insideText,
82
97
  left
83
98
  };
84
99
  }
@@ -88,10 +103,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
88
103
  const _component_nut_icon = resolveComponent("nut-icon");
89
104
  return openBlock(), createElementBlock("div", _hoisted_1, [
90
105
  createElementVNode("div", {
91
- class: normalizeClass(["nut-progress-outer", [
92
- _ctx.showText && !_ctx.textInside ? "nut-progress-outer-part" : "",
93
- _ctx.size ? "nut-progress-" + _ctx.size : ""
94
- ]]),
106
+ class: normalizeClass(["nut-progress-outer", [_ctx.showText && !_ctx.textInside ? "nut-progress-outer-part" : "", _ctx.size ? "nut-progress-" + _ctx.size : ""]]),
95
107
  ref: "progressOuter",
96
108
  style: normalizeStyle({ height: _ctx.height })
97
109
  }, [
@@ -102,11 +114,12 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
102
114
  _ctx.showText && _ctx.textInside ? (openBlock(), createElementBlock("div", {
103
115
  key: 0,
104
116
  class: "nut-progress-text nut-progress-insidetext",
117
+ ref: "insideText",
105
118
  style: normalizeStyle({ lineHeight: _ctx.height, left: _ctx.left })
106
119
  }, [
107
120
  createElementVNode("span", {
108
121
  style: normalizeStyle(_ctx.textStyle)
109
- }, toDisplayString(_ctx.percentage) + "%", 5)
122
+ }, toDisplayString(_ctx.percentage) + toDisplayString(_ctx.isShowPercentage ? "%" : ""), 5)
110
123
  ], 4)) : createCommentVNode("", true)
111
124
  ], 6)
112
125
  ], 6),
@@ -118,7 +131,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
118
131
  _ctx.status == "active" || _ctx.status == "" ? (openBlock(), createElementBlock("span", {
119
132
  key: 0,
120
133
  style: normalizeStyle(_ctx.textStyle)
121
- }, toDisplayString(_ctx.percentage) + "%", 5)) : _ctx.status == "icon" ? (openBlock(), createBlock(_component_nut_icon, {
134
+ }, toDisplayString(_ctx.percentage) + toDisplayString(_ctx.isShowPercentage ? "%" : ""), 5)) : _ctx.status == "icon" ? (openBlock(), createBlock(_component_nut_icon, {
122
135
  key: 1,
123
136
  size: "16px",
124
137
  name: _ctx.iconName,
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.16 Sun Jan 30 2022 10:58:10 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.18-beta.0 Tue Mar 08 2022 10:41:31 GMT+0800 (中国标准时间)
3
3
  * (c) 2021 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -36,7 +36,7 @@ const _sfc_main = create({
36
36
  }
37
37
  },
38
38
  setup(props, { emit, slots }) {
39
- let parent = inject("parent");
39
+ let parent = inject("parent", null);
40
40
  const isCurValue = computed(() => {
41
41
  return parent.label.value == props.label;
42
42
  });
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.16 Sun Jan 30 2022 10:58:10 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.18-beta.0 Tue Mar 08 2022 10:41:31 GMT+0800 (中国标准时间)
3
3
  * (c) 2021 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -18,13 +18,13 @@ var __spreadValues = (a, b) => {
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  /*!
21
- * @nutui/nutui v3.1.16 Sun Jan 30 2022 10:58:10 GMT+0800 (中国标准时间)
21
+ * @nutui/nutui v3.1.18-beta.0 Tue Mar 08 2022 10:41:31 GMT+0800 (中国标准时间)
22
22
  * (c) 2021 @jdf2e.
23
23
  * Released under the MIT License.
24
24
  */
25
25
  import { ref, computed, toRefs, openBlock, createElementBlock, toDisplayString, createCommentVNode, createElementVNode, normalizeStyle, normalizeClass, withModifiers, Fragment, renderList, renderSlot } from "vue";
26
26
  import { c as createComponent } from "./component.js";
27
- import { u as useTouch } from "./index2.js";
27
+ import { u as useTouch } from "./index4.js";
28
28
  import { u as useRect } from "./index3.js";
29
29
  import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
30
30
  const { componentName, create } = createComponent("range");
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.16 Sun Jan 30 2022 10:58:10 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.18-beta.0 Tue Mar 08 2022 10:41:31 GMT+0800 (中国标准时间)
3
3
  * (c) 2021 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.16 Sun Jan 30 2022 10:58:10 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.18-beta.0 Tue Mar 08 2022 10:41:31 GMT+0800 (中国标准时间)
3
3
  * (c) 2021 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  /*!
21
- * @nutui/nutui v3.1.16 Sun Jan 30 2022 10:58:10 GMT+0800 (中国标准时间)
21
+ * @nutui/nutui v3.1.18-beta.0 Tue Mar 08 2022 10:41:31 GMT+0800 (中国标准时间)
22
22
  * (c) 2021 @jdf2e.
23
23
  * Released under the MIT License.
24
24
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.16 Sun Jan 30 2022 10:58:10 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.18-beta.0 Tue Mar 08 2022 10:41:31 GMT+0800 (中国标准时间)
3
3
  * (c) 2021 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -44,6 +44,10 @@ const _sfc_main = create({
44
44
  length: {
45
45
  type: [String, Number],
46
46
  default: 6
47
+ },
48
+ isWrapTeleport: {
49
+ type: Boolean,
50
+ default: true
47
51
  }
48
52
  },
49
53
  emits: ["update:modelValue", "update:visible", "complete", "change", "ok", "tips", "close", "cancel"],
@@ -63,7 +67,10 @@ const _sfc_main = create({
63
67
  });
64
68
  watch(() => props.modelValue, (value) => {
65
69
  realInput.value = value;
66
- console.log("watch", value);
70
+ emit("update:modelValue", value);
71
+ }, {
72
+ deep: true,
73
+ immediate: true
67
74
  });
68
75
  function changeValue(e) {
69
76
  const input = e.target;
@@ -157,7 +164,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
157
164
  closeable: true,
158
165
  onClickCloseIcon: _ctx.closeIcon,
159
166
  "close-on-click-overlay": _ctx.closeOnClickOverlay,
160
- onClickOverlay: _ctx.close
167
+ onClickOverlay: _ctx.close,
168
+ isWrapTeleport: _ctx.isWrapTeleport
161
169
  }, {
162
170
  default: withCtx(() => [
163
171
  createElementVNode("view", _hoisted_1, toDisplayString(_ctx.title), 1),
@@ -214,7 +222,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
214
222
  ])) : createCommentVNode("", true)
215
223
  ]),
216
224
  _: 1
217
- }, 8, ["visible", "onClickCloseIcon", "close-on-click-overlay", "onClickOverlay"])
225
+ }, 8, ["visible", "onClickCloseIcon", "close-on-click-overlay", "onClickOverlay", "isWrapTeleport"])
218
226
  ]);
219
227
  }
220
228
  var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  /*!
21
- * @nutui/nutui v3.1.16 Sun Jan 30 2022 10:58:10 GMT+0800 (中国标准时间)
21
+ * @nutui/nutui v3.1.18-beta.0 Tue Mar 08 2022 10:41:31 GMT+0800 (中国标准时间)
22
22
  * (c) 2021 @jdf2e.
23
23
  * Released under the MIT License.
24
24
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.16 Sun Jan 30 2022 10:58:10 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.18-beta.0 Tue Mar 08 2022 10:41:31 GMT+0800 (中国标准时间)
3
3
  * (c) 2021 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.16 Sun Jan 30 2022 10:58:10 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.18-beta.0 Tue Mar 08 2022 10:41:31 GMT+0800 (中国标准时间)
3
3
  * (c) 2021 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,10 +1,10 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.16 Sun Jan 30 2022 10:58:10 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.18-beta.0 Tue Mar 08 2022 10:41:31 GMT+0800 (中国标准时间)
3
3
  * (c) 2021 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
6
  import { c as createComponent } from "./component.js";
7
- import { toRefs, computed, onMounted, resolveComponent, openBlock, createElementBlock, renderSlot, createElementVNode, createBlock, normalizeClass, normalizeStyle, createCommentVNode, Fragment, renderList } from "vue";
7
+ import { toRefs, computed, onMounted, resolveComponent, openBlock, createElementBlock, renderSlot, createCommentVNode, createElementVNode, createBlock, normalizeClass, normalizeStyle, Fragment, renderList } from "vue";
8
8
  import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
9
9
  const component = {
10
10
  props: {
@@ -66,7 +66,7 @@ const component = {
66
66
  };
67
67
  });
68
68
  const getStyle = () => {
69
- if (avatarSize == null ? void 0 : avatarSize.value) {
69
+ if (avatarSize.value) {
70
70
  return {
71
71
  width: avatarSize.value,
72
72
  height: avatarSize.value
@@ -78,7 +78,6 @@ const component = {
78
78
  };
79
79
  };
80
80
  onMounted(() => {
81
- console.log("row", props.row);
82
81
  });
83
82
  return {
84
83
  avatarShape,
@@ -95,7 +94,10 @@ const _hoisted_2 = {
95
94
  key: 1,
96
95
  class: "skeleton"
97
96
  };
98
- const _hoisted_3 = /* @__PURE__ */ createElementVNode("view", { class: "skeleton-animation" }, null, -1);
97
+ const _hoisted_3 = {
98
+ key: 0,
99
+ class: "skeleton-animation"
100
+ };
99
101
  const _hoisted_4 = { class: "content" };
100
102
  const _hoisted_5 = { class: "content-line" };
101
103
  const _hoisted_6 = {
@@ -107,7 +109,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
107
109
  return !_ctx.loading ? (openBlock(), createElementBlock("view", _hoisted_1, [
108
110
  renderSlot(_ctx.$slots, "default")
109
111
  ])) : (openBlock(), createElementBlock("view", _hoisted_2, [
110
- _hoisted_3,
112
+ _ctx.animated ? (openBlock(), createElementBlock("view", _hoisted_3)) : createCommentVNode("", true),
111
113
  createElementVNode("view", _hoisted_4, [
112
114
  _ctx.avatar ? (openBlock(), createBlock(_component_nut_avatar, {
113
115
  key: 0,
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.16 Sun Jan 30 2022 10:58:10 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.18-beta.0 Tue Mar 08 2022 10:41:31 GMT+0800 (中国标准时间)
3
3
  * (c) 2021 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  /*!
21
- * @nutui/nutui v3.1.16 Sun Jan 30 2022 10:58:10 GMT+0800 (中国标准时间)
21
+ * @nutui/nutui v3.1.18-beta.0 Tue Mar 08 2022 10:41:31 GMT+0800 (中国标准时间)
22
22
  * (c) 2021 @jdf2e.
23
23
  * Released under the MIT License.
24
24
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.16 Sun Jan 30 2022 10:58:10 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.18-beta.0 Tue Mar 08 2022 10:41:31 GMT+0800 (中国标准时间)
3
3
  * (c) 2021 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */