@nutui/nutui 3.1.18-beta.0 → 3.1.18

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 (143) 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 +3 -1
  5. package/dist/nutui.es.js +2230 -1192
  6. package/dist/nutui.umd.js +2240 -1201
  7. package/dist/packages/_es/ActionSheet.js +2 -2
  8. package/dist/packages/_es/Address.js +17 -11
  9. package/dist/packages/_es/Audio.js +2 -2
  10. package/dist/packages/_es/Avatar.js +2 -2
  11. package/dist/packages/_es/BackTop.js +5 -2
  12. package/dist/packages/_es/Badge.js +2 -2
  13. package/dist/packages/_es/Barrage.js +2 -2
  14. package/dist/packages/_es/Button.js +2 -2
  15. package/dist/packages/_es/Calendar.js +15 -16
  16. package/dist/packages/_es/Card.js +2 -2
  17. package/dist/packages/_es/Cascader.js +2 -2
  18. package/dist/packages/_es/Cell.js +24 -17
  19. package/dist/packages/_es/CellGroup.js +2 -2
  20. package/dist/packages/_es/Checkbox.js +4 -4
  21. package/dist/packages/_es/CheckboxGroup.js +3 -3
  22. package/dist/packages/_es/CircleProgress.js +2 -2
  23. package/dist/packages/_es/Col.js +2 -2
  24. package/dist/packages/_es/Collapse.js +2 -2
  25. package/dist/packages/_es/CollapseItem.js +28 -18
  26. package/dist/packages/_es/CountDown.js +4 -2
  27. package/dist/packages/_es/CountUp.js +25 -16
  28. package/dist/packages/_es/DatePicker.js +83 -47
  29. package/dist/packages/_es/Dialog.js +5 -3
  30. package/dist/packages/_es/Divider.js +2 -2
  31. package/dist/packages/_es/Drag.js +4 -4
  32. package/dist/packages/_es/Elevator.js +2 -2
  33. package/dist/packages/_es/Empty.js +2 -2
  34. package/dist/packages/_es/FixedNav.js +2 -2
  35. package/dist/packages/_es/Form.js +8 -6
  36. package/dist/packages/_es/FormItem.js +9 -6
  37. package/dist/packages/_es/Grid.js +2 -2
  38. package/dist/packages/_es/GridItem.js +2 -2
  39. package/dist/packages/_es/Icon.js +2 -2
  40. package/dist/packages/_es/ImagePreview.js +2 -2
  41. package/dist/packages/_es/Indicator.js +2 -2
  42. package/dist/packages/_es/InfiniteLoading.js +2 -2
  43. package/dist/packages/_es/Input.js +290 -66
  44. package/dist/packages/_es/InputNumber.js +2 -2
  45. package/dist/packages/_es/Layout.js +2 -2
  46. package/dist/packages/_es/List.js +124 -0
  47. package/dist/packages/_es/Menu.js +2 -2
  48. package/dist/packages/_es/MenuItem.js +2 -2
  49. package/dist/packages/_es/Navbar.js +16 -10
  50. package/dist/packages/_es/NoticeBar.js +6 -5
  51. package/dist/packages/_es/Notify.js +7 -3
  52. package/dist/packages/_es/NumberKeyboard.js +9 -4
  53. package/dist/packages/_es/OverLay.js +2 -2
  54. package/dist/packages/_es/Pagination.js +2 -2
  55. package/dist/packages/_es/Picker.js +163 -157
  56. package/dist/packages/_es/Popover.js +2 -2
  57. package/dist/packages/_es/Popup.js +2 -2
  58. package/dist/packages/_es/Price.js +2 -2
  59. package/dist/packages/_es/Progress.js +14 -22
  60. package/dist/packages/_es/Radio.js +3 -3
  61. package/dist/packages/_es/RadioGroup.js +2 -2
  62. package/dist/packages/_es/Range.js +129 -19
  63. package/dist/packages/_es/Rate.js +2 -2
  64. package/dist/packages/_es/Row.js +2 -2
  65. package/dist/packages/_es/SearchBar.js +2 -2
  66. package/dist/packages/_es/ShortPassword.js +2 -2
  67. package/dist/packages/_es/SideNavBar.js +2 -2
  68. package/dist/packages/_es/SideNavBarItem.js +2 -2
  69. package/dist/packages/_es/Signature.js +25 -6
  70. package/dist/packages/_es/Skeleton.js +2 -2
  71. package/dist/packages/_es/Sku.js +31 -13
  72. package/dist/packages/_es/Step.js +28 -12
  73. package/dist/packages/_es/Steps.js +8 -3
  74. package/dist/packages/_es/Sticky.js +2 -2
  75. package/dist/packages/_es/SubSideNavBar.js +2 -2
  76. package/dist/packages/_es/Swipe.js +2 -2
  77. package/dist/packages/_es/Swiper.js +2 -2
  78. package/dist/packages/_es/SwiperItem.js +2 -2
  79. package/dist/packages/_es/Switch.js +2 -2
  80. package/dist/packages/_es/TabPane.js +2 -2
  81. package/dist/packages/_es/Tabbar.js +2 -2
  82. package/dist/packages/_es/TabbarItem.js +17 -6
  83. package/dist/packages/_es/Table.js +2 -2
  84. package/dist/packages/_es/Tabs.js +8 -5
  85. package/dist/packages/_es/Tag.js +11 -5
  86. package/dist/packages/_es/TextArea.js +38 -6
  87. package/dist/packages/_es/TimeDetail.js +2 -2
  88. package/dist/packages/_es/TimePannel.js +2 -2
  89. package/dist/packages/_es/TimeSelect.js +2 -2
  90. package/dist/packages/_es/Toast.js +2 -2
  91. package/dist/packages/_es/Uploader.js +2 -4
  92. package/dist/packages/_es/Video.js +12 -8
  93. package/dist/packages/_es/common.js +2 -2
  94. package/dist/packages/_es/component.js +2 -2
  95. package/dist/packages/_es/index.js +2 -2
  96. package/dist/packages/_es/index2.js +2 -2
  97. package/dist/packages/_es/index3.js +2 -2
  98. package/dist/packages/_es/index4.js +2 -2
  99. package/dist/packages/_es/plugin-vue_export-helper.js +2 -2
  100. package/dist/packages/_es/pxCheck.js +2 -2
  101. package/dist/packages/_es/raf.js +2 -2
  102. package/dist/packages/_es/util.js +2 -2
  103. package/dist/packages/badge/index.scss +11 -13
  104. package/dist/packages/button/index.scss +1 -0
  105. package/dist/packages/calendar/index.scss +9 -4
  106. package/dist/packages/calendaritem/index.scss +0 -207
  107. package/dist/packages/cell/index.scss +6 -6
  108. package/dist/packages/checkbox/index.scss +4 -3
  109. package/dist/packages/collapseitem/index.scss +21 -11
  110. package/dist/packages/countdown/index.scss +3 -1
  111. package/dist/packages/divider/index.scss +8 -8
  112. package/dist/packages/elevator/index.scss +36 -36
  113. package/dist/packages/formitem/index.scss +15 -8
  114. package/dist/packages/indicator/index.scss +1 -1
  115. package/dist/packages/input/index.scss +70 -24
  116. package/dist/packages/inputnumber/index.scss +4 -2
  117. package/dist/packages/list/index.scss +24 -0
  118. package/dist/packages/menu/index.scss +3 -3
  119. package/dist/packages/navbar/index.scss +28 -8
  120. package/dist/packages/noticebar/index.scss +7 -8
  121. package/dist/packages/notify/index.scss +9 -0
  122. package/dist/packages/numberkeyboard/index.scss +22 -21
  123. package/dist/packages/oldpicker/index.scss +131 -0
  124. package/dist/packages/picker/index.scss +38 -32
  125. package/dist/packages/progress/index.scss +6 -5
  126. package/dist/packages/radio/index.scss +7 -6
  127. package/dist/packages/range/index.scss +109 -2
  128. package/dist/packages/searchbar/index.scss +7 -7
  129. package/dist/packages/sidenavbaritem/index.scss +5 -5
  130. package/dist/packages/step/index.scss +29 -29
  131. package/dist/packages/subsidenavbar/index.scss +10 -8
  132. package/dist/packages/tabbaritem/index.scss +15 -0
  133. package/dist/packages/timedetail/index.scss +13 -13
  134. package/dist/packages/timepannel/index.scss +7 -7
  135. package/dist/packages/timeselect/index.scss +3 -3
  136. package/dist/packages/uploader/index.scss +4 -4
  137. package/dist/style.css +1 -1
  138. package/dist/styles/themes/default.scss +39 -37
  139. package/dist/styles/themes/jdt.scss +91 -0
  140. package/dist/styles/variables-jdt.scss +727 -0
  141. package/dist/styles/variables.scss +250 -44
  142. package/package.json +2 -1
  143. package/dist/styles/themes/jdd.scss +0 -2
@@ -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.18 Fri Mar 25 2022 15:02:08 GMT+0800 (中国标准时间)
3
+ * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
6
  import { reactive, computed, provide, h } from "vue";
@@ -21,6 +21,7 @@ const _sfc_main = create({
21
21
  default: false
22
22
  }
23
23
  },
24
+ emits: ["click-step"],
24
25
  setup(props, { emit, slots }) {
25
26
  const state = reactive({
26
27
  children: []
@@ -36,10 +37,14 @@ const _sfc_main = create({
36
37
  const relation = (child) => {
37
38
  child && state.children.push(child);
38
39
  };
40
+ const onEmit = (index) => {
41
+ emit("click-step", index);
42
+ };
39
43
  provide("parent", {
40
44
  relation,
41
45
  state,
42
- props
46
+ props,
47
+ onEmit
43
48
  });
44
49
  return () => {
45
50
  var _a;
@@ -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.18 Fri Mar 25 2022 15:02:08 GMT+0800 (中国标准时间)
3
+ * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
6
  import { ref, reactive, computed, watch, onMounted, onUnmounted, h, unref } from "vue";
@@ -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.18 Fri Mar 25 2022 15:02:08 GMT+0800 (中国标准时间)
22
+ * (c) 2022 @jdf2e.
23
23
  * Released under the MIT License.
24
24
  */
25
25
  import { reactive, computed, onMounted, toRefs, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, withModifiers, toDisplayString, createVNode, normalizeStyle, renderSlot } from "vue";
@@ -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.18 Fri Mar 25 2022 15:02:08 GMT+0800 (中国标准时间)
22
+ * (c) 2022 @jdf2e.
23
23
  * Released under the MIT License.
24
24
  */
25
25
  import { u as useTouch } from "./index4.js";
@@ -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.18 Fri Mar 25 2022 15:02:08 GMT+0800 (中国标准时间)
3
+ * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
6
  import { reactive, ref, computed, provide, onMounted, nextTick, onActivated, onDeactivated, onBeforeUnmount, watch, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle, renderSlot, Fragment, renderList, createCommentVNode } from "vue";
@@ -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.18 Fri Mar 25 2022 15:02:08 GMT+0800 (中国标准时间)
3
+ * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
6
  import { inject, getCurrentInstance, reactive, computed, openBlock, createElementBlock, normalizeClass, normalizeStyle, renderSlot } from "vue";
@@ -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.18 Fri Mar 25 2022 15:02:08 GMT+0800 (中国标准时间)
3
+ * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
6
  import { computed, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, createBlock, createCommentVNode, Fragment, withDirectives, toDisplayString, vShow } from "vue";
@@ -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.18 Fri Mar 25 2022 15:02:08 GMT+0800 (中国标准时间)
3
+ * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
6
  import { inject, openBlock, createElementBlock, normalizeClass, renderSlot } from "vue";
@@ -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.18 Fri Mar 25 2022 15:02:08 GMT+0800 (中国标准时间)
3
+ * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
6
  import { reactive, provide, watch, openBlock, createElementBlock, normalizeClass, renderSlot } from "vue";
@@ -1,11 +1,11 @@
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.18 Fri Mar 25 2022 15:02:08 GMT+0800 (中国标准时间)
3
+ * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
6
  import { c as createComponent } from "./component.js";
7
7
  import { u as useRouter } from "./index.js";
8
- import { inject, reactive, getCurrentInstance, computed, watch, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, toDisplayString, createCommentVNode, createVNode } from "vue";
8
+ import { inject, reactive, getCurrentInstance, computed, watch, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, Fragment, toDisplayString, createCommentVNode, createVNode } from "vue";
9
9
  import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
10
10
  const { create } = createComponent("tabbar-item");
11
11
  const _sfc_main = create({
@@ -38,6 +38,10 @@ const _sfc_main = create({
38
38
  type: String,
39
39
  default: "nut-icon"
40
40
  },
41
+ dot: {
42
+ type: Boolean,
43
+ default: false
44
+ },
41
45
  fontClassName: {
42
46
  type: String,
43
47
  default: "nutui-iconfont"
@@ -102,7 +106,11 @@ const _hoisted_3 = {
102
106
  key: 1,
103
107
  class: "nut-tabbar-item_icon-box_tips nut-tabbar-item_icon-box_nums"
104
108
  };
105
- const _hoisted_4 = { key: 2 };
109
+ const _hoisted_4 = {
110
+ key: 1,
111
+ class: "nut-tabbar-item_icon-box_dot"
112
+ };
113
+ const _hoisted_5 = { key: 2 };
106
114
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
107
115
  const _component_nut_icon = resolveComponent("nut-icon");
108
116
  return openBlock(), createElementBlock("div", {
@@ -113,8 +121,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
113
121
  onClick: _cache[0] || (_cache[0] = ($event) => _ctx.change(_ctx.state.index))
114
122
  }, [
115
123
  createElementVNode("view", _hoisted_1, [
116
- _ctx.num && _ctx.num <= 99 ? (openBlock(), createElementBlock("view", _hoisted_2, toDisplayString(_ctx.num), 1)) : _ctx.num && _ctx.num > 100 ? (openBlock(), createElementBlock("view", _hoisted_3, toDisplayString("99+"))) : createCommentVNode("", true),
117
- _ctx.icon ? (openBlock(), createElementBlock("view", _hoisted_4, [
124
+ !_ctx.dot ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
125
+ _ctx.num && _ctx.num <= 99 ? (openBlock(), createElementBlock("view", _hoisted_2, toDisplayString(_ctx.num), 1)) : _ctx.num && _ctx.num > 100 ? (openBlock(), createElementBlock("view", _hoisted_3, toDisplayString("99+"))) : createCommentVNode("", true)
126
+ ], 64)) : createCommentVNode("", true),
127
+ _ctx.dot ? (openBlock(), createElementBlock("div", _hoisted_4)) : createCommentVNode("", true),
128
+ _ctx.icon ? (openBlock(), createElementBlock("view", _hoisted_5, [
118
129
  createVNode(_component_nut_icon, {
119
130
  class: "nut-tabbar-item_icon-box_icon",
120
131
  size: _ctx.state.size,
@@ -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.18 Fri Mar 25 2022 15:02:08 GMT+0800 (中国标准时间)
22
+ * (c) 2022 @jdf2e.
23
23
  * Released under the MIT License.
24
24
  */
25
25
  import { c as createComponent } from "./component.js";
@@ -19,8 +19,8 @@ var __publicField = (obj, key, value) => {
19
19
  return value;
20
20
  };
21
21
  /*!
22
- * @nutui/nutui v3.1.18-beta.0 Tue Mar 08 2022 10:41:31 GMT+0800 (中国标准时间)
23
- * (c) 2021 @jdf2e.
22
+ * @nutui/nutui v3.1.18 Fri Mar 25 2022 15:02:08 GMT+0800 (中国标准时间)
23
+ * (c) 2022 @jdf2e.
24
24
  * Released under the MIT License.
25
25
  */
26
26
  import { p as pxCheck } from "./pxCheck.js";
@@ -103,13 +103,16 @@ const _sfc_main = create({
103
103
  }
104
104
  });
105
105
  };
106
- const init = (vnodes = slots.default()) => {
106
+ const init = (vnodes = ((_a) => (_a = slots.default) == null ? void 0 : _a.call(slots))()) => {
107
107
  titles.value = [];
108
- if (vnodes.length) {
108
+ if (vnodes && vnodes.length) {
109
109
  renderTitles(vnodes);
110
110
  }
111
111
  };
112
- watch(() => slots.default(), (vnodes) => {
112
+ watch(() => {
113
+ var _a;
114
+ return (_a = slots.default) == null ? void 0 : _a.call(slots);
115
+ }, (vnodes) => {
113
116
  init(vnodes);
114
117
  });
115
118
  watch(() => props.modelValue, (value) => {
@@ -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.18 Fri Mar 25 2022 15:02:08 GMT+0800 (中国标准时间)
3
+ * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
6
  import { toRefs, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, renderSlot, createBlock, createCommentVNode } from "vue";
@@ -32,7 +32,7 @@ const _sfc_main = create({
32
32
  default: false
33
33
  }
34
34
  },
35
- emits: ["close"],
35
+ emits: ["close", "click"],
36
36
  setup(props, { emit }) {
37
37
  const { type, color, plain, round, mark, textColor } = toRefs(props);
38
38
  const classes = computed(() => {
@@ -68,10 +68,15 @@ const _sfc_main = create({
68
68
  event.stopPropagation();
69
69
  emit("close", event);
70
70
  };
71
+ const onClick = (event) => {
72
+ event.stopPropagation();
73
+ emit("click", event);
74
+ };
71
75
  return {
72
76
  classes,
73
77
  getStyle,
74
- onClose
78
+ onClose,
79
+ onClick
75
80
  };
76
81
  }
77
82
  });
@@ -79,7 +84,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
79
84
  const _component_nut_icon = resolveComponent("nut-icon");
80
85
  return openBlock(), createElementBlock("view", {
81
86
  class: normalizeClass(_ctx.classes),
82
- style: normalizeStyle(_ctx.getStyle())
87
+ style: normalizeStyle(_ctx.getStyle()),
88
+ onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onClick && _ctx.onClick(...args))
83
89
  }, [
84
90
  renderSlot(_ctx.$slots, "default"),
85
91
  _ctx.closeable ? (openBlock(), createBlock(_component_nut_icon, {
@@ -1,9 +1,9 @@
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.18 Fri Mar 25 2022 15:02:08 GMT+0800 (中国标准时间)
3
+ * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
- import { computed, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle, toDisplayString, createCommentVNode } from "vue";
6
+ import { ref, computed, onMounted, nextTick, watch, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle, toDisplayString, createCommentVNode } from "vue";
7
7
  import { c as createComponent } from "./component.js";
8
8
  import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
9
9
  const { componentName, create } = createComponent("textarea");
@@ -15,7 +15,7 @@ const _sfc_main = create({
15
15
  },
16
16
  textAlign: {
17
17
  type: String,
18
- default: "left"
18
+ default: ""
19
19
  },
20
20
  limitShow: {
21
21
  type: Boolean,
@@ -52,6 +52,7 @@ const _sfc_main = create({
52
52
  },
53
53
  emits: ["update:modelValue", "change", "blur", "focus"],
54
54
  setup(props, { emit }) {
55
+ const textareaRef = ref();
55
56
  const classes = computed(() => {
56
57
  const prefixCls = componentName;
57
58
  return {
@@ -59,12 +60,41 @@ const _sfc_main = create({
59
60
  [`${prefixCls}--disabled`]: props.disabled
60
61
  };
61
62
  });
63
+ onMounted(() => {
64
+ if (props.modelValue) {
65
+ emitChange(String(props.modelValue));
66
+ }
67
+ if (props.autosize) {
68
+ nextTick(getContentHeight);
69
+ }
70
+ });
62
71
  const styles = computed(() => {
63
72
  return {
64
- textAlign: props.textAlign,
65
- resize: props.autosize ? "vertical" : "none"
73
+ textAlign: props.textAlign
66
74
  };
67
75
  });
76
+ const getContentHeight = () => {
77
+ let textarea = textareaRef.value;
78
+ textarea.style.height = "auto";
79
+ let height = textarea.scrollHeight;
80
+ if (typeof props.autosize === "object") {
81
+ const { maxHeight, minHeight } = props.autosize;
82
+ if (maxHeight !== void 0) {
83
+ height = Math.min(height, maxHeight);
84
+ }
85
+ if (minHeight !== void 0) {
86
+ height = Math.max(height, minHeight);
87
+ }
88
+ }
89
+ if (height) {
90
+ textarea.style.height = height + "px";
91
+ }
92
+ };
93
+ watch(() => props.modelValue, () => {
94
+ if (props.autosize) {
95
+ nextTick(getContentHeight);
96
+ }
97
+ });
68
98
  const emitChange = (value, event) => {
69
99
  if (props.maxLength && value.length > Number(props.maxLength)) {
70
100
  value = value.substring(0, Number(props.maxLength));
@@ -94,6 +124,7 @@ const _sfc_main = create({
94
124
  emit("blur", { value, event });
95
125
  };
96
126
  return {
127
+ textareaRef,
97
128
  classes,
98
129
  styles,
99
130
  change,
@@ -112,6 +143,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
112
143
  class: normalizeClass(_ctx.classes)
113
144
  }, [
114
145
  createElementVNode("textarea", {
146
+ ref: "textareaRef",
115
147
  class: "nut-textarea__textarea",
116
148
  style: normalizeStyle(_ctx.styles),
117
149
  rows: _ctx.rows,
@@ -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.18 Fri Mar 25 2022 15:02:08 GMT+0800 (中国标准时间)
22
+ * (c) 2022 @jdf2e.
23
23
  * Released under the MIT License.
24
24
  */
25
25
  import { inject, reactive, computed, toRefs, openBlock, createElementBlock, normalizeClass, createElementVNode, Fragment, renderList, toDisplayString } from "vue";
@@ -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.18 Fri Mar 25 2022 15:02:08 GMT+0800 (中国标准时间)
22
+ * (c) 2022 @jdf2e.
23
23
  * Released under the MIT License.
24
24
  */
25
25
  import { inject, reactive, computed, toRefs, openBlock, createElementBlock, normalizeClass, toDisplayString } from "vue";
@@ -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.18 Fri Mar 25 2022 15:02:08 GMT+0800 (中国标准时间)
3
+ * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
6
  import { computed, provide, resolveComponent, openBlock, createBlock, normalizeStyle, withCtx, createElementVNode, normalizeClass, toDisplayString, renderSlot } from "vue";
@@ -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.18 Fri Mar 25 2022 15:02:08 GMT+0800 (中国标准时间)
22
+ * (c) 2022 @jdf2e.
23
23
  * Released under the MIT License.
24
24
  */
25
25
  import { reactive, onMounted, watch, computed, resolveComponent, openBlock, createBlock, Transition, withCtx, withDirectives, createElementVNode, normalizeClass, normalizeStyle, createElementBlock, createVNode, createCommentVNode, toDisplayString, vShow, render } from "vue";
@@ -19,8 +19,8 @@ var __publicField = (obj, key, value) => {
19
19
  return value;
20
20
  };
21
21
  /*!
22
- * @nutui/nutui v3.1.18-beta.0 Tue Mar 08 2022 10:41:31 GMT+0800 (中国标准时间)
23
- * (c) 2021 @jdf2e.
22
+ * @nutui/nutui v3.1.18 Fri Mar 25 2022 15:02:08 GMT+0800 (中国标准时间)
23
+ * (c) 2022 @jdf2e.
24
24
  * Released under the MIT License.
25
25
  */
26
26
  import { reactive, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, renderSlot, Fragment, createCommentVNode, renderList, createElementVNode, toDisplayString, createVNode, createBlock, createTextVNode } from "vue";
@@ -302,8 +302,6 @@ const _sfc_main = create({
302
302
  fileList,
303
303
  index: index2
304
304
  });
305
- } else {
306
- console.log("\u7528\u6237\u963B\u6B62\u4E86\u5220\u9664\uFF01");
307
305
  }
308
306
  };
309
307
  const onChange = (event) => {
@@ -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.18 Fri Mar 25 2022 15:02:08 GMT+0800 (中国标准时间)
22
+ * (c) 2022 @jdf2e.
23
23
  * Released under the MIT License.
24
24
  */
25
25
  import { reactive, ref, computed, watch, nextTick, onMounted, toRefs, openBlock, createElementBlock, createElementVNode, createCommentVNode, withDirectives, vShow, normalizeClass, toDisplayString, normalizeStyle, withModifiers } from "vue";
@@ -90,24 +90,26 @@ const _sfc_main = create({
90
90
  },
91
91
  showTouchMask: false
92
92
  });
93
- const root = ref();
93
+ const root = ref(null);
94
94
  const isDisabled = computed(() => {
95
95
  return props.options.disabled;
96
96
  });
97
- watch(props.source, (newValue) => {
97
+ watch(() => props.source, (newValue) => {
98
98
  if (newValue.src) {
99
99
  nextTick(() => {
100
100
  state.videoElm.load();
101
101
  });
102
102
  }
103
103
  });
104
- watch(props.options, (newValue) => {
105
- state.state.isMuted = newValue.muted ? newValue.muted : false;
104
+ watch(() => props.options, (newValue) => {
105
+ state.state.isMuted = newValue ? newValue.muted : false;
106
106
  }, { immediate: true });
107
107
  const init = () => {
108
108
  state.videoElm = root.value;
109
109
  if (props.options.autoplay) {
110
- state.videoElm.play();
110
+ setTimeout(() => {
111
+ state.videoElm.play();
112
+ }, 200);
111
113
  }
112
114
  if (props.options.touchPlay) {
113
115
  state.showTouchMask = true;
@@ -150,7 +152,9 @@ const _sfc_main = create({
150
152
  if (state.videoElm) {
151
153
  if (state.state.playing) {
152
154
  try {
153
- state.videoElm.play();
155
+ setTimeout(() => {
156
+ state.videoElm.play();
157
+ }, 200);
154
158
  state.videoElm.addEventListener("progress", () => {
155
159
  getLoadTime();
156
160
  });
@@ -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.18 Fri Mar 25 2022 15:02:08 GMT+0800 (中国标准时间)
3
+ * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
6
  import { provide, shallowReactive, getCurrentInstance, markRaw, isVNode, computed, h } from "vue";
@@ -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.18 Fri Mar 25 2022 15:02:08 GMT+0800 (中国标准时间)
3
+ * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
6
  import { defineComponent } from "vue";
@@ -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.18 Fri Mar 25 2022 15:02:08 GMT+0800 (中国标准时间)
3
+ * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
6
  import { getCurrentInstance } from "vue";
@@ -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.18 Fri Mar 25 2022 15:02:08 GMT+0800 (中国标准时间)
3
+ * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
6
  import { getCurrentInstance } from "vue";
@@ -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.18 Fri Mar 25 2022 15:02:08 GMT+0800 (中国标准时间)
3
+ * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
6
  import { unref } from "vue";
@@ -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.18 Fri Mar 25 2022 15:02:08 GMT+0800 (中国标准时间)
3
+ * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
6
  import { ref } from "vue";
@@ -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.18 Fri Mar 25 2022 15:02:08 GMT+0800 (中国标准时间)
3
+ * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
6
  var _export_sfc = (sfc, props) => {
@@ -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.18 Fri Mar 25 2022 15:02:08 GMT+0800 (中国标准时间)
3
+ * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
6
  const pxCheck = (value) => {
@@ -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.18 Fri Mar 25 2022 15:02:08 GMT+0800 (中国标准时间)
3
+ * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
6
  const _window = window;
@@ -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.18 Fri Mar 25 2022 15:02:08 GMT+0800 (中国标准时间)
3
+ * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
6
  const TypeOfFun = (value) => {
@@ -4,32 +4,30 @@
4
4
  .slot-icons {
5
5
  position: absolute;
6
6
  background: $badge-background-color;
7
- border-radius: 7px;
8
7
  top: -20%;
9
8
  right: -20%;
10
- padding: 0 5px;
9
+ padding: $badge-padding;
11
10
  text-align: center;
12
- border-radius: 14px;
13
- z-index: 1;
11
+ border-radius: $badge-border-radius;
12
+ z-index: $badge-z-index;
14
13
  }
15
14
  .sup {
16
15
  position: absolute;
17
16
  background: $badge-background-color;
18
- border-radius: 7px;
19
- padding: 0 5px;
17
+ padding: $badge-padding;
20
18
  text-align: center;
21
- border-radius: 14px;
19
+ border-radius: $badge-border-radius;
22
20
  font-size: $badge-font-size;
23
21
  font-weight: normal;
24
- color: $badge-default-background-color;
22
+ color: $badge-color;
25
23
  }
26
24
  .nut-badge__content {
27
- transform: translateY(-50%) translateX(100%);
25
+ transform: $badge-content-transform;
28
26
  }
29
27
  .is-dot {
30
- width: 7px;
31
- height: 7px;
32
- border-radius: 7px;
33
- padding: 0;
28
+ width: $badge-dot-width;
29
+ height: $badge-dot-height;
30
+ border-radius: $badge-dot-border-radius;
31
+ padding: $badge-dot-padding;
34
32
  }
35
33
  }
@@ -1,6 +1,7 @@
1
1
  .nut-button {
2
2
  position: relative;
3
3
  display: inline-block;
4
+ width: auto;
4
5
  flex-shrink: 0;
5
6
  height: $button-default-height;
6
7
  box-sizing: border-box;