@nutui/nutui 3.1.17-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 (150) hide show
  1. package/CHANGELOG.md +78 -0
  2. package/LICENSE +1 -1
  3. package/README.md +7 -1
  4. package/dist/nutui.d.ts +3 -1
  5. package/dist/nutui.es.js +2335 -1280
  6. package/dist/nutui.umd.js +2350 -1293
  7. package/dist/packages/_es/ActionSheet.js +8 -3
  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 +7 -4
  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 +25 -18
  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 +4 -4
  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 +31 -19
  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 +3 -3
  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 +3 -3
  39. package/dist/packages/_es/Icon.js +2 -2
  40. package/dist/packages/_es/ImagePreview.js +9 -4
  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 +3 -3
  48. package/dist/packages/_es/MenuItem.js +2 -2
  49. package/dist/packages/_es/Navbar.js +31 -66
  50. package/dist/packages/_es/NoticeBar.js +41 -22
  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 -156
  56. package/dist/packages/_es/Popover.js +5 -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 +131 -21
  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 +9 -4
  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 +3 -3
  75. package/dist/packages/_es/SubSideNavBar.js +2 -2
  76. package/dist/packages/_es/Swipe.js +3 -3
  77. package/dist/packages/_es/Swiper.js +3 -3
  78. package/dist/packages/_es/SwiperItem.js +3 -3
  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 +23 -8
  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 +8 -3
  90. package/dist/packages/_es/Toast.js +16 -9
  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 +6 -8
  96. package/dist/packages/_es/index2.js +9 -32
  97. package/dist/packages/_es/index3.js +29 -57
  98. package/dist/packages/_es/index4.js +64 -0
  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/actionsheet/index.scss +7 -6
  104. package/dist/packages/badge/index.scss +11 -13
  105. package/dist/packages/button/index.scss +6 -5
  106. package/dist/packages/calendar/index.scss +9 -4
  107. package/dist/packages/calendaritem/index.scss +0 -207
  108. package/dist/packages/cell/index.scss +9 -9
  109. package/dist/packages/cellgroup/index.scss +1 -1
  110. package/dist/packages/checkbox/index.scss +4 -3
  111. package/dist/packages/collapseitem/index.scss +21 -11
  112. package/dist/packages/countdown/index.scss +3 -1
  113. package/dist/packages/divider/index.scss +8 -8
  114. package/dist/packages/elevator/index.scss +36 -36
  115. package/dist/packages/formitem/index.scss +15 -8
  116. package/dist/packages/indicator/index.scss +1 -1
  117. package/dist/packages/input/index.scss +70 -24
  118. package/dist/packages/inputnumber/index.scss +4 -2
  119. package/dist/packages/list/index.scss +24 -0
  120. package/dist/packages/menu/index.scss +3 -3
  121. package/dist/packages/navbar/index.scss +30 -8
  122. package/dist/packages/noticebar/index.scss +10 -5
  123. package/dist/packages/notify/index.scss +10 -0
  124. package/dist/packages/numberkeyboard/index.scss +22 -21
  125. package/dist/packages/oldpicker/index.scss +131 -0
  126. package/dist/packages/picker/index.scss +38 -32
  127. package/dist/packages/progress/index.scss +24 -19
  128. package/dist/packages/radio/index.scss +7 -6
  129. package/dist/packages/range/index.scss +113 -6
  130. package/dist/packages/searchbar/index.scss +7 -7
  131. package/dist/packages/sidenavbaritem/index.scss +5 -5
  132. package/dist/packages/step/index.scss +29 -29
  133. package/dist/packages/subsidenavbar/index.scss +10 -8
  134. package/dist/packages/swiper/index.scss +4 -4
  135. package/dist/packages/switch/index.scss +8 -8
  136. package/dist/packages/tabbar/index.scss +3 -2
  137. package/dist/packages/tabbaritem/index.scss +19 -3
  138. package/dist/packages/tabs/index.scss +1 -0
  139. package/dist/packages/timedetail/index.scss +13 -13
  140. package/dist/packages/timepannel/index.scss +7 -7
  141. package/dist/packages/timeselect/index.scss +3 -3
  142. package/dist/packages/toast/index.scss +8 -7
  143. package/dist/packages/uploader/index.scss +4 -4
  144. package/dist/style.css +1 -1
  145. package/dist/styles/themes/default.scss +43 -41
  146. package/dist/styles/themes/jdt.scss +91 -0
  147. package/dist/styles/variables-jdt.scss +727 -0
  148. package/dist/styles/variables.scss +322 -38
  149. package/package.json +3 -2
  150. package/dist/styles/themes/jdd.scss +0 -2
@@ -1,11 +1,11 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.16 Fri Feb 25 2022 17:05:36 GMT+0800 (GMT+08:00)
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";
7
7
  import { c as createComponent } from "./component.js";
8
- import { u as useExpose } from "./index.js";
8
+ import { u as useExpose } from "./index2.js";
9
9
  import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
10
10
  const { create, componentName } = createComponent("swiper-item");
11
11
  const _sfc_main = create({
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.16 Fri Feb 25 2022 17:05:36 GMT+0800 (GMT+08:00)
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.16 Fri Feb 25 2022 17:05:36 GMT+0800 (GMT+08:00)
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.16 Fri Feb 25 2022 17:05:36 GMT+0800 (GMT+08:00)
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.16 Fri Feb 25 2022 17:05:36 GMT+0800 (GMT+08:00)
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
- import { useRouter } from "vue-router";
8
- import { inject, reactive, getCurrentInstance, computed, watch, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, toDisplayString, createCommentVNode, createVNode } from "vue";
7
+ import { u as useRouter } from "./index.js";
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"
@@ -79,7 +83,11 @@ const _sfc_main = create({
79
83
  }
80
84
  if (parent.children[value].to) {
81
85
  let to = parent.children[value].to;
82
- router.push(to);
86
+ if (to && router) {
87
+ router.push(to);
88
+ } else {
89
+ location.replace(to);
90
+ }
83
91
  }
84
92
  });
85
93
  });
@@ -98,7 +106,11 @@ const _hoisted_3 = {
98
106
  key: 1,
99
107
  class: "nut-tabbar-item_icon-box_tips nut-tabbar-item_icon-box_nums"
100
108
  };
101
- 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 };
102
114
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
103
115
  const _component_nut_icon = resolveComponent("nut-icon");
104
116
  return openBlock(), createElementBlock("div", {
@@ -109,8 +121,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
109
121
  onClick: _cache[0] || (_cache[0] = ($event) => _ctx.change(_ctx.state.index))
110
122
  }, [
111
123
  createElementVNode("view", _hoisted_1, [
112
- _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),
113
- _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, [
114
129
  createVNode(_component_nut_icon, {
115
130
  class: "nut-tabbar-item_icon-box_icon",
116
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.16 Fri Feb 25 2022 17:05:36 GMT+0800 (GMT+08:00)
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.16 Fri Feb 25 2022 17:05:36 GMT+0800 (GMT+08:00)
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.16 Fri Feb 25 2022 17:05:36 GMT+0800 (GMT+08:00)
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.16 Fri Feb 25 2022 17:05:36 GMT+0800 (GMT+08:00)
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.16 Fri Feb 25 2022 17:05:36 GMT+0800 (GMT+08:00)
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.16 Fri Feb 25 2022 17:05:36 GMT+0800 (GMT+08:00)
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.16 Fri Feb 25 2022 17:05:36 GMT+0800 (GMT+08:00)
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";
@@ -30,6 +30,10 @@ const _sfc_main = create({
30
30
  default: () => {
31
31
  return [];
32
32
  }
33
+ },
34
+ isWrapTeleport: {
35
+ type: Boolean,
36
+ default: false
33
37
  }
34
38
  },
35
39
  emits: ["update:visible", "select"],
@@ -72,6 +76,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
72
76
  position: "bottom",
73
77
  closeable: "",
74
78
  round: "",
79
+ isWrapTeleport: _ctx.isWrapTeleport,
75
80
  visible: _ctx.visible,
76
81
  style: normalizeStyle(_ctx.popStyle),
77
82
  onClickOverlay: _ctx.close,
@@ -95,7 +100,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
95
100
  ], 2)
96
101
  ]),
97
102
  _: 3
98
- }, 8, ["visible", "style", "onClickOverlay", "onClickCloseIcon"]);
103
+ }, 8, ["isWrapTeleport", "visible", "style", "onClickOverlay", "onClickCloseIcon"]);
99
104
  }
100
105
  var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
101
106
  export { index as default };
@@ -18,8 +18,8 @@ var __spreadValues = (a, b) => {
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  /*!
21
- * @nutui/nutui v3.1.16 Fri Feb 25 2022 17:05:36 GMT+0800 (GMT+08:00)
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";
@@ -53,6 +53,10 @@ const _sfc_main = create({
53
53
  type: [String, Number],
54
54
  default: "base"
55
55
  },
56
+ iconSize: {
57
+ type: String,
58
+ default: "20"
59
+ },
56
60
  icon: String,
57
61
  textAlignCenter: {
58
62
  type: Boolean,
@@ -64,7 +68,7 @@ const _sfc_main = create({
64
68
  },
65
69
  bgColor: {
66
70
  type: String,
67
- default: "rgba(0, 0, 0, .8)"
71
+ default: ""
68
72
  },
69
73
  onClose: Function,
70
74
  unmount: Function,
@@ -74,7 +78,7 @@ const _sfc_main = create({
74
78
  },
75
79
  coverColor: {
76
80
  type: String,
77
- default: "rgba(0, 0, 0, 0)"
81
+ default: ""
78
82
  },
79
83
  title: {
80
84
  type: String,
@@ -85,7 +89,8 @@ const _sfc_main = create({
85
89
  default: false
86
90
  }
87
91
  },
88
- setup(props) {
92
+ emits: ["close"],
93
+ setup(props, { emit }) {
89
94
  let timer;
90
95
  const state = reactive({
91
96
  mounted: false
@@ -113,6 +118,7 @@ const _sfc_main = create({
113
118
  const clickCover = () => {
114
119
  if (props.closeOnClickOverlay) {
115
120
  hide();
121
+ emit("close");
116
122
  }
117
123
  };
118
124
  if (props.duration) {
@@ -189,10 +195,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
189
195
  }, [
190
196
  _ctx.hasIcon ? (openBlock(), createElementBlock("view", _hoisted_1, [
191
197
  createVNode(_component_nut_icon, {
192
- size: "20",
198
+ size: _ctx.iconSize,
193
199
  color: "#ffffff",
194
200
  name: _ctx.icon
195
- }, null, 8, ["name"])
201
+ }, null, 8, ["size", "name"])
196
202
  ])) : createCommentVNode("", true),
197
203
  _ctx.title ? (openBlock(), createElementBlock("div", _hoisted_2, toDisplayString(_ctx.title), 1)) : createCommentVNode("", true),
198
204
  createElementVNode("view", {
@@ -218,14 +224,15 @@ const defaultOptions = {
218
224
  customClass: "",
219
225
  bottom: "30px",
220
226
  size: "base",
227
+ iconSize: "20",
221
228
  icon: null,
222
229
  textAlignCenter: true,
223
230
  loadingRotate: true,
224
- bgColor: "rgba(0, 0, 0, .8)",
231
+ bgColor: "",
225
232
  onClose: null,
226
233
  unmount: null,
227
234
  cover: false,
228
- coverColor: "rgba(0, 0, 0, 0)",
235
+ coverColor: "",
229
236
  closeOnClickOverlay: false
230
237
  };
231
238
  let idsMap = [];
@@ -19,8 +19,8 @@ var __publicField = (obj, key, value) => {
19
19
  return value;
20
20
  };
21
21
  /*!
22
- * @nutui/nutui v3.1.16 Fri Feb 25 2022 17:05:36 GMT+0800 (GMT+08:00)
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.16 Fri Feb 25 2022 17:05:36 GMT+0800 (GMT+08:00)
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.16 Fri Feb 25 2022 17:05:36 GMT+0800 (GMT+08:00)
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.16 Fri Feb 25 2022 17:05:36 GMT+0800 (GMT+08:00)
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,13 +1,11 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.16 Fri Feb 25 2022 17:05:36 GMT+0800 (GMT+08:00)
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";
7
- function useExpose(apis) {
8
- const instance = getCurrentInstance();
9
- if (instance) {
10
- Object.assign(instance.proxy, apis);
11
- }
7
+ function useRouter() {
8
+ const proxy = getCurrentInstance().proxy;
9
+ return proxy.$router || null;
12
10
  }
13
- export { useExpose as u };
11
+ export { useRouter as u };
@@ -1,36 +1,13 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.16 Fri Feb 25 2022 17:05:36 GMT+0800 (GMT+08:00)
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 { unref } from "vue";
7
- function isWindow(val) {
8
- return val === window;
9
- }
10
- const useRect = (elementRef) => {
11
- const element = unref(elementRef);
12
- if (isWindow(element)) {
13
- const width = element.innerWidth;
14
- const height = element.innerHeight;
15
- return {
16
- top: 0,
17
- left: 0,
18
- right: width,
19
- bottom: height,
20
- width,
21
- height
22
- };
23
- }
24
- if (element && element.getBoundingClientRect) {
25
- return element.getBoundingClientRect();
6
+ import { getCurrentInstance } from "vue";
7
+ function useExpose(apis) {
8
+ const instance = getCurrentInstance();
9
+ if (instance) {
10
+ Object.assign(instance.proxy, apis);
26
11
  }
27
- return {
28
- top: 0,
29
- left: 0,
30
- right: 0,
31
- bottom: 0,
32
- width: 0,
33
- height: 0
34
- };
35
- };
36
- export { useRect as u };
12
+ }
13
+ export { useExpose as u };