@nutui/nutui 3.1.15 → 3.1.17-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 (127) hide show
  1. package/CHANGELOG.md +22 -1
  2. package/dist/nutui.d.ts +3 -1
  3. package/dist/nutui.es.js +2037 -1005
  4. package/dist/nutui.umd.js +2043 -1006
  5. package/dist/packages/_es/ActionSheet.js +2 -2
  6. package/dist/packages/_es/Address.js +60 -7
  7. package/dist/packages/_es/Audio.js +289 -0
  8. package/dist/packages/_es/Avatar.js +1 -1
  9. package/dist/packages/_es/BackTop.js +1 -1
  10. package/dist/packages/_es/Badge.js +1 -1
  11. package/dist/packages/_es/Barrage.js +1 -1
  12. package/dist/packages/_es/Button.js +13 -4
  13. package/dist/packages/_es/Calendar.js +428 -209
  14. package/dist/packages/_es/Card.js +1 -2
  15. package/dist/packages/_es/Cascader.js +2 -2
  16. package/dist/packages/_es/Cell.js +1 -1
  17. package/dist/packages/_es/CellGroup.js +1 -1
  18. package/dist/packages/_es/Checkbox.js +2 -2
  19. package/dist/packages/_es/CheckboxGroup.js +1 -1
  20. package/dist/packages/_es/CircleProgress.js +1 -1
  21. package/dist/packages/_es/Col.js +1 -1
  22. package/dist/packages/_es/Collapse.js +1 -1
  23. package/dist/packages/_es/CollapseItem.js +1 -1
  24. package/dist/packages/_es/CountDown.js +1 -1
  25. package/dist/packages/_es/CountUp.js +1 -1
  26. package/dist/packages/_es/DatePicker.js +1 -3
  27. package/dist/packages/_es/Dialog.js +1 -1
  28. package/dist/packages/_es/Divider.js +1 -1
  29. package/dist/packages/_es/Drag.js +1 -1
  30. package/dist/packages/_es/Elevator.js +10 -5
  31. package/dist/packages/_es/Empty.js +1 -1
  32. package/dist/packages/_es/FixedNav.js +1 -1
  33. package/dist/packages/_es/Form.js +1 -1
  34. package/dist/packages/_es/FormItem.js +1 -1
  35. package/dist/packages/_es/Grid.js +1 -1
  36. package/dist/packages/_es/GridItem.js +1 -1
  37. package/dist/packages/_es/Icon.js +1 -1
  38. package/dist/packages/_es/ImagePreview.js +1 -3
  39. package/dist/packages/_es/Indicator.js +1 -1
  40. package/dist/packages/_es/InfiniteLoading.js +1 -1
  41. package/dist/packages/_es/Input.js +21 -11
  42. package/dist/packages/_es/InputNumber.js +1 -1
  43. package/dist/packages/_es/Layout.js +1 -1
  44. package/dist/packages/_es/Menu.js +2 -2
  45. package/dist/packages/_es/MenuItem.js +1 -1
  46. package/dist/packages/_es/Navbar.js +6 -32
  47. package/dist/packages/_es/NoticeBar.js +1 -4
  48. package/dist/packages/_es/Notify.js +1 -1
  49. package/dist/packages/_es/NumberKeyboard.js +1 -2
  50. package/dist/packages/_es/OverLay.js +1 -1
  51. package/dist/packages/_es/Pagination.js +1 -1
  52. package/dist/packages/_es/Picker.js +170 -189
  53. package/dist/packages/_es/Popover.js +1 -1
  54. package/dist/packages/_es/Popup.js +1 -1
  55. package/dist/packages/_es/Price.js +2 -2
  56. package/dist/packages/_es/Progress.js +24 -11
  57. package/dist/packages/_es/Radio.js +2 -2
  58. package/dist/packages/_es/RadioGroup.js +1 -1
  59. package/dist/packages/_es/Range.js +3 -3
  60. package/dist/packages/_es/Rate.js +1 -1
  61. package/dist/packages/_es/Row.js +1 -1
  62. package/dist/packages/_es/SearchBar.js +1 -1
  63. package/dist/packages/_es/ShortPassword.js +5 -2
  64. package/dist/packages/_es/SideNavBar.js +1 -1
  65. package/dist/packages/_es/SideNavBarItem.js +1 -1
  66. package/dist/packages/_es/Signature.js +1 -1
  67. package/dist/packages/_es/Skeleton.js +8 -6
  68. package/dist/packages/_es/Sku.js +1 -2
  69. package/dist/packages/_es/Step.js +1 -1
  70. package/dist/packages/_es/Steps.js +1 -1
  71. package/dist/packages/_es/Sticky.js +143 -0
  72. package/dist/packages/_es/SubSideNavBar.js +1 -1
  73. package/dist/packages/_es/Swipe.js +2 -2
  74. package/dist/packages/_es/Swiper.js +1 -1
  75. package/dist/packages/_es/SwiperItem.js +3 -8
  76. package/dist/packages/_es/Switch.js +2 -2
  77. package/dist/packages/_es/TabPane.js +1 -1
  78. package/dist/packages/_es/Tabbar.js +1 -1
  79. package/dist/packages/_es/TabbarItem.js +1 -1
  80. package/dist/packages/_es/Table.js +2 -2
  81. package/dist/packages/_es/Tabs.js +1 -1
  82. package/dist/packages/_es/Tag.js +1 -1
  83. package/dist/packages/_es/TextArea.js +1 -1
  84. package/dist/packages/_es/TimeDetail.js +1 -1
  85. package/dist/packages/_es/TimePannel.js +1 -1
  86. package/dist/packages/_es/TimeSelect.js +1 -1
  87. package/dist/packages/_es/Toast.js +1 -1
  88. package/dist/packages/_es/Uploader.js +6 -4
  89. package/dist/packages/_es/Video.js +1 -55
  90. package/dist/packages/_es/common.js +1 -1
  91. package/dist/packages/_es/component.js +1 -1
  92. package/dist/packages/_es/index.js +1 -1
  93. package/dist/packages/_es/index2.js +28 -56
  94. package/dist/packages/_es/index3.js +56 -28
  95. package/dist/packages/_es/plugin-vue_export-helper.js +1 -1
  96. package/dist/packages/_es/pxCheck.js +1 -1
  97. package/dist/packages/_es/raf.js +1 -1
  98. package/dist/packages/_es/util.js +1 -1
  99. package/dist/packages/address/index.scss +8 -0
  100. package/dist/packages/audio/index.scss +66 -0
  101. package/dist/packages/audiooperate/index.scss +13 -0
  102. package/dist/packages/button/index.scss +3 -0
  103. package/dist/packages/calendar/index.scss +47 -41
  104. package/dist/packages/calendaritem/index.scss +57 -42
  105. package/dist/packages/elevator/index.scss +3 -0
  106. package/dist/packages/icon/index.scss +2 -2
  107. package/dist/packages/infiniteloading/index.scss +1 -1
  108. package/dist/packages/input/index.scss +8 -3
  109. package/dist/packages/menuitem/index.scss +1 -1
  110. package/dist/packages/navbar/index.scss +8 -34
  111. package/dist/packages/picker/index.scss +73 -17
  112. package/dist/packages/range/index.scss +4 -4
  113. package/dist/packages/row/index.scss +3 -0
  114. package/dist/packages/sticky/index.scss +5 -0
  115. package/dist/packages/tabbar/index.scss +4 -2
  116. package/dist/style.css +1 -1
  117. package/dist/styles/font/config.json +6 -1
  118. package/dist/styles/font/demo_index.html +118 -3
  119. package/dist/styles/font/iconfont.css +23 -3
  120. package/dist/styles/font/iconfont.js +25 -24
  121. package/dist/styles/font/iconfont.json +35 -0
  122. package/dist/styles/font/iconfont.ttf +0 -0
  123. package/dist/styles/font/iconfont.woff +0 -0
  124. package/dist/styles/font/iconfont.woff2 +0 -0
  125. package/dist/styles/themes/default.scss +40 -37
  126. package/dist/styles/variables.scss +34 -31
  127. package/package.json +12 -13
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.15 Fri Jan 21 2022 15:38:52 GMT+0800 (GMT+08:00)
2
+ * @nutui/nutui v3.1.16 Fri Feb 25 2022 17:05:36 GMT+0800 (GMT+08:00)
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.15 Fri Jan 21 2022 15:38:52 GMT+0800 (GMT+08:00)
2
+ * @nutui/nutui v3.1.16 Fri Feb 25 2022 17:05:36 GMT+0800 (GMT+08:00)
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.15 Fri Jan 21 2022 15:38:52 GMT+0800 (GMT+08:00)
21
+ * @nutui/nutui v3.1.16 Fri Feb 25 2022 17:05:36 GMT+0800 (GMT+08:00)
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.15 Fri Jan 21 2022 15:38:52 GMT+0800 (GMT+08:00)
2
+ * @nutui/nutui v3.1.16 Fri Feb 25 2022 17:05:36 GMT+0800 (GMT+08:00)
3
3
  * (c) 2021 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -63,7 +63,10 @@ const _sfc_main = create({
63
63
  });
64
64
  watch(() => props.modelValue, (value) => {
65
65
  realInput.value = value;
66
- console.log("watch", value);
66
+ emit("update:modelValue", value);
67
+ }, {
68
+ deep: true,
69
+ immediate: true
67
70
  });
68
71
  function changeValue(e) {
69
72
  const input = e.target;
@@ -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.15 Fri Jan 21 2022 15:38:52 GMT+0800 (GMT+08:00)
21
+ * @nutui/nutui v3.1.16 Fri Feb 25 2022 17:05:36 GMT+0800 (GMT+08:00)
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.15 Fri Jan 21 2022 15:38:52 GMT+0800 (GMT+08:00)
2
+ * @nutui/nutui v3.1.16 Fri Feb 25 2022 17:05:36 GMT+0800 (GMT+08:00)
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.15 Fri Jan 21 2022 15:38:52 GMT+0800 (GMT+08:00)
2
+ * @nutui/nutui v3.1.16 Fri Feb 25 2022 17:05:36 GMT+0800 (GMT+08:00)
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.15 Fri Jan 21 2022 15:38:52 GMT+0800 (GMT+08:00)
2
+ * @nutui/nutui v3.1.16 Fri Feb 25 2022 17:05:36 GMT+0800 (GMT+08:00)
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.15 Fri Jan 21 2022 15:38:52 GMT+0800 (GMT+08:00)
2
+ * @nutui/nutui v3.1.16 Fri Feb 25 2022 17:05:36 GMT+0800 (GMT+08:00)
3
3
  * (c) 2021 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -359,7 +359,6 @@ const _sfc_main = create({
359
359
  }
360
360
  });
361
361
  onMounted(() => {
362
- console.log("\u66F4\u65B0\u53C2\u6570");
363
362
  });
364
363
  const getSlots = (name) => slots[name];
365
364
  const selectSku = (skus) => {
@@ -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.15 Fri Jan 21 2022 15:38:52 GMT+0800 (GMT+08:00)
21
+ * @nutui/nutui v3.1.16 Fri Feb 25 2022 17:05:36 GMT+0800 (GMT+08:00)
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.15 Fri Jan 21 2022 15:38:52 GMT+0800 (GMT+08:00)
2
+ * @nutui/nutui v3.1.16 Fri Feb 25 2022 17:05:36 GMT+0800 (GMT+08:00)
3
3
  * (c) 2021 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -0,0 +1,143 @@
1
+ /*!
2
+ * @nutui/nutui v3.1.16 Fri Feb 25 2022 17:05:36 GMT+0800 (GMT+08:00)
3
+ * (c) 2021 @jdf2e.
4
+ * Released under the MIT License.
5
+ */
6
+ import { ref, reactive, computed, watch, onMounted, onUnmounted, h, unref } from "vue";
7
+ import { c as createComponent } from "./component.js";
8
+ import { u as useRect } from "./index2.js";
9
+ const { componentName, create } = createComponent("sticky");
10
+ const _sfc_main = create({
11
+ props: {
12
+ position: {
13
+ type: String,
14
+ default: "top"
15
+ },
16
+ top: {
17
+ type: [Number, String],
18
+ default: 0
19
+ },
20
+ bottom: {
21
+ type: [Number, String],
22
+ default: 0
23
+ },
24
+ container: {
25
+ type: Object
26
+ },
27
+ zIndex: {
28
+ type: [Number, String],
29
+ default: 2e3
30
+ }
31
+ },
32
+ emits: ["change", "scroll"],
33
+ setup(props, { emit, slots }) {
34
+ const root = ref();
35
+ const state = reactive({
36
+ width: 0,
37
+ height: 0,
38
+ fixed: false,
39
+ transform: 0
40
+ });
41
+ const rootStyle = computed(() => {
42
+ const { fixed, width, height } = state;
43
+ if (fixed) {
44
+ return {
45
+ width: `${width}px`,
46
+ height: `${height}px`
47
+ };
48
+ }
49
+ });
50
+ const stickyStyle = computed(() => {
51
+ if (!state.fixed)
52
+ return;
53
+ const style = {
54
+ width: `${state.width}px`,
55
+ height: `${state.height}px`,
56
+ [props.position]: `${offset.value}px`,
57
+ zIndex: +props.zIndex
58
+ };
59
+ if (state.transform)
60
+ style.transform = `translate3d(0, ${state.transform}px, 0)`;
61
+ return style;
62
+ });
63
+ const offset = computed(() => {
64
+ return props.position === "top" ? props.top : props.bottom;
65
+ });
66
+ const isHidden = (elementRef) => {
67
+ const el = unref(elementRef);
68
+ if (!el)
69
+ return false;
70
+ const style = window.getComputedStyle(el);
71
+ const hidden = style.display === "none";
72
+ const parentHidden = el.offsetParent === null && style.position !== "fixed";
73
+ return hidden || parentHidden;
74
+ };
75
+ const isExistRoot = () => {
76
+ if (!root.value || isHidden(root))
77
+ return false;
78
+ return true;
79
+ };
80
+ const getScrollTop = (el) => {
81
+ return Math.max(0, "scrollTop" in el ? el.scrollTop : el.pageYOffset);
82
+ };
83
+ const renderFixed = () => {
84
+ var _a;
85
+ return h("view", {
86
+ style: stickyStyle.value,
87
+ class: state.fixed ? `${componentName} nut-sticky--fixed` : componentName
88
+ }, (_a = slots.default) == null ? void 0 : _a.call(slots));
89
+ };
90
+ const onScroll = () => {
91
+ if (!isExistRoot())
92
+ return;
93
+ const { container, position } = props;
94
+ const scrollTop = getScrollTop(window);
95
+ const rootRect = useRect(root);
96
+ if (rootRect.width || rootRect.height) {
97
+ state.width = rootRect.width;
98
+ state.height = rootRect.height;
99
+ }
100
+ if (position === "top") {
101
+ if (container) {
102
+ const containerRect = useRect(container);
103
+ const diff = containerRect.bottom - +offset.value - state.height;
104
+ state.fixed = +offset.value > rootRect.top && containerRect.bottom > 0;
105
+ state.transform = diff < 0 ? diff : 0;
106
+ } else {
107
+ state.fixed = offset.value > rootRect.top;
108
+ }
109
+ } else if (position === "bottom") {
110
+ const clientHeight = document.documentElement.clientHeight;
111
+ if (container) {
112
+ const containerRect = useRect(container);
113
+ const diff = clientHeight - containerRect.top - +offset.value - state.height;
114
+ state.fixed = clientHeight - +offset.value < rootRect.bottom && clientHeight > containerRect.top;
115
+ state.transform = diff < 0 ? -diff : 0;
116
+ } else {
117
+ state.fixed = clientHeight - +offset.value < rootRect.bottom;
118
+ }
119
+ }
120
+ emit("scroll", {
121
+ top: scrollTop,
122
+ fixed: state.fixed
123
+ });
124
+ };
125
+ watch(() => state.fixed, (val) => {
126
+ emit("change", val);
127
+ });
128
+ onMounted(() => {
129
+ window.addEventListener("scroll", onScroll);
130
+ onScroll();
131
+ });
132
+ onUnmounted(() => {
133
+ window.removeEventListener("scroll", onScroll);
134
+ });
135
+ return () => {
136
+ return h("view", {
137
+ style: rootStyle.value,
138
+ ref: root
139
+ }, [renderFixed()]);
140
+ };
141
+ }
142
+ });
143
+ export { _sfc_main as default };
@@ -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.15 Fri Jan 21 2022 15:38:52 GMT+0800 (GMT+08:00)
21
+ * @nutui/nutui v3.1.16 Fri Feb 25 2022 17:05:36 GMT+0800 (GMT+08:00)
22
22
  * (c) 2021 @jdf2e.
23
23
  * Released under the MIT License.
24
24
  */
@@ -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.15 Fri Jan 21 2022 15:38:52 GMT+0800 (GMT+08:00)
21
+ * @nutui/nutui v3.1.16 Fri Feb 25 2022 17:05:36 GMT+0800 (GMT+08:00)
22
22
  * (c) 2021 @jdf2e.
23
23
  * Released under the MIT License.
24
24
  */
25
- import { u as useTouch } from "./index2.js";
25
+ import { u as useTouch } from "./index3.js";
26
26
  import { computed, ref, reactive, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, renderSlot } from "vue";
27
27
  import { c as createComponent } from "./component.js";
28
28
  import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.15 Fri Jan 21 2022 15:38:52 GMT+0800 (GMT+08:00)
2
+ * @nutui/nutui v3.1.16 Fri Feb 25 2022 17:05:36 GMT+0800 (GMT+08:00)
3
3
  * (c) 2021 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,17 +1,12 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.15 Fri Jan 21 2022 15:38:52 GMT+0800 (GMT+08:00)
2
+ * @nutui/nutui v3.1.16 Fri Feb 25 2022 17:05:36 GMT+0800 (GMT+08:00)
3
3
  * (c) 2021 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
- import { getCurrentInstance, inject, reactive, computed, openBlock, createElementBlock, normalizeClass, normalizeStyle, renderSlot } from "vue";
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
9
  import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
9
- function useExpose(apis) {
10
- const instance = getCurrentInstance();
11
- if (instance) {
12
- Object.assign(instance.proxy, apis);
13
- }
14
- }
15
10
  const { create, componentName } = createComponent("swiper-item");
16
11
  const _sfc_main = create({
17
12
  props: {},
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.15 Fri Jan 21 2022 15:38:52 GMT+0800 (GMT+08:00)
2
+ * @nutui/nutui v3.1.16 Fri Feb 25 2022 17:05:36 GMT+0800 (GMT+08:00)
3
3
  * (c) 2021 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -58,7 +58,7 @@ const _sfc_main = create({
58
58
  default: ""
59
59
  }
60
60
  },
61
- emits: ["change", "update:modelValue"],
61
+ emits: ["change", "update:modelValue", "update:loading"],
62
62
  setup(props, { emit }) {
63
63
  const isActive = computed(() => props.modelValue === props.activeValue);
64
64
  const classes = computed(() => {
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.15 Fri Jan 21 2022 15:38:52 GMT+0800 (GMT+08:00)
2
+ * @nutui/nutui v3.1.16 Fri Feb 25 2022 17:05:36 GMT+0800 (GMT+08:00)
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.15 Fri Jan 21 2022 15:38:52 GMT+0800 (GMT+08:00)
2
+ * @nutui/nutui v3.1.16 Fri Feb 25 2022 17:05:36 GMT+0800 (GMT+08:00)
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.15 Fri Jan 21 2022 15:38:52 GMT+0800 (GMT+08:00)
2
+ * @nutui/nutui v3.1.16 Fri Feb 25 2022 17:05:36 GMT+0800 (GMT+08:00)
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.15 Fri Jan 21 2022 15:38:52 GMT+0800 (GMT+08:00)
21
+ * @nutui/nutui v3.1.16 Fri Feb 25 2022 17:05:36 GMT+0800 (GMT+08:00)
22
22
  * (c) 2021 @jdf2e.
23
23
  * Released under the MIT License.
24
24
  */
@@ -30,7 +30,7 @@ var RenderColumn = {
30
30
  return () => h(`view`, {}, props.slots());
31
31
  },
32
32
  props: {
33
- slots: Object
33
+ slots: Function
34
34
  }
35
35
  };
36
36
  const component = (componentName2) => {
@@ -19,7 +19,7 @@ var __publicField = (obj, key, value) => {
19
19
  return value;
20
20
  };
21
21
  /*!
22
- * @nutui/nutui v3.1.15 Fri Jan 21 2022 15:38:52 GMT+0800 (GMT+08:00)
22
+ * @nutui/nutui v3.1.16 Fri Feb 25 2022 17:05:36 GMT+0800 (GMT+08:00)
23
23
  * (c) 2021 @jdf2e.
24
24
  * Released under the MIT License.
25
25
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.15 Fri Jan 21 2022 15:38:52 GMT+0800 (GMT+08:00)
2
+ * @nutui/nutui v3.1.16 Fri Feb 25 2022 17:05:36 GMT+0800 (GMT+08:00)
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.15 Fri Jan 21 2022 15:38:52 GMT+0800 (GMT+08:00)
2
+ * @nutui/nutui v3.1.16 Fri Feb 25 2022 17:05:36 GMT+0800 (GMT+08:00)
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.15 Fri Jan 21 2022 15:38:52 GMT+0800 (GMT+08:00)
21
+ * @nutui/nutui v3.1.16 Fri Feb 25 2022 17:05:36 GMT+0800 (GMT+08:00)
22
22
  * (c) 2021 @jdf2e.
23
23
  * Released under the MIT License.
24
24
  */
@@ -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.15 Fri Jan 21 2022 15:38:52 GMT+0800 (GMT+08:00)
21
+ * @nutui/nutui v3.1.16 Fri Feb 25 2022 17:05:36 GMT+0800 (GMT+08:00)
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.15 Fri Jan 21 2022 15:38:52 GMT+0800 (GMT+08:00)
2
+ * @nutui/nutui v3.1.16 Fri Feb 25 2022 17:05:36 GMT+0800 (GMT+08:00)
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.15 Fri Jan 21 2022 15:38:52 GMT+0800 (GMT+08:00)
21
+ * @nutui/nutui v3.1.16 Fri Feb 25 2022 17:05:36 GMT+0800 (GMT+08:00)
22
22
  * (c) 2021 @jdf2e.
23
23
  * Released under the MIT License.
24
24
  */
@@ -19,7 +19,7 @@ var __publicField = (obj, key, value) => {
19
19
  return value;
20
20
  };
21
21
  /*!
22
- * @nutui/nutui v3.1.15 Fri Jan 21 2022 15:38:52 GMT+0800 (GMT+08:00)
22
+ * @nutui/nutui v3.1.16 Fri Feb 25 2022 17:05:36 GMT+0800 (GMT+08:00)
23
23
  * (c) 2021 @jdf2e.
24
24
  * Released under the MIT License.
25
25
  */
@@ -287,8 +287,9 @@ const _sfc_main = create({
287
287
  if (oversizes.length) {
288
288
  emit("oversize", oversizes);
289
289
  }
290
- if (files.length > maximum) {
291
- files.splice(maximum - 1, files.length - maximum);
290
+ let currentFileLength = files.length + fileList.length;
291
+ if (currentFileLength > maximum) {
292
+ files.splice(files.length - (currentFileLength - maximum));
292
293
  }
293
294
  return files;
294
295
  };
@@ -298,7 +299,8 @@ const _sfc_main = create({
298
299
  fileList.splice(index2, 1);
299
300
  emit("delete", {
300
301
  file,
301
- fileList
302
+ fileList,
303
+ index: index2
302
304
  });
303
305
  } else {
304
306
  console.log("\u7528\u6237\u963B\u6B62\u4E86\u5220\u9664\uFF01");
@@ -18,38 +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.15 Fri Jan 21 2022 15:38:52 GMT+0800 (GMT+08:00)
21
+ * @nutui/nutui v3.1.16 Fri Feb 25 2022 17:05:36 GMT+0800 (GMT+08:00)
22
22
  * (c) 2021 @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";
26
26
  import { c as createComponent } from "./component.js";
27
27
  import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
28
- const throttle = (func, wait, type) => {
29
- if (type === 1) {
30
- var previous = 0;
31
- } else if (type === 2) {
32
- var timeout;
33
- }
34
- return function() {
35
- let context = this;
36
- let args = arguments;
37
- if (type === 1) {
38
- let now = Date.now();
39
- if (now - previous > wait) {
40
- func.apply(context, args);
41
- previous = now;
42
- }
43
- } else if (type === 2) {
44
- if (!timeout) {
45
- timeout = setTimeout(() => {
46
- timeout = null;
47
- func.apply(context, args);
48
- }, wait);
49
- }
50
- }
51
- };
52
- };
53
28
  const { create } = createComponent("video");
54
29
  const _sfc_main = create({
55
30
  props: {
@@ -156,7 +131,6 @@ const _sfc_main = create({
156
131
  emit("pause", state.videoElm);
157
132
  });
158
133
  state.videoElm.addEventListener("ended", playEnded);
159
- state.videoElm.addEventListener("timeupdate", throttle(getPlayTime, 100, 1));
160
134
  }
161
135
  };
162
136
  const customerInit = () => {
@@ -180,7 +154,6 @@ const _sfc_main = create({
180
154
  state.videoElm.addEventListener("progress", () => {
181
155
  getLoadTime();
182
156
  });
183
- state.videoElm.addEventListener("timeupdate", throttle(getPlayTime, 100, 1));
184
157
  state.videoElm.addEventListener("ended", playEnded);
185
158
  emit("play", state.videoElm);
186
159
  } catch (e) {
@@ -192,37 +165,10 @@ const _sfc_main = create({
192
165
  }
193
166
  }
194
167
  };
195
- const timeFormat = (t) => {
196
- var h = Math.floor(t / 3600);
197
- if (h < 10) {
198
- h = "0" + h;
199
- }
200
- var m = Math.floor(t % 3600 / 60);
201
- if (m < 10) {
202
- m = "0" + m;
203
- }
204
- var s = Math.round(t % 3600 % 60);
205
- if (s < 10) {
206
- s = "0" + s;
207
- }
208
- var str = "";
209
- if (h != 0) {
210
- str = h + ":" + m + ":" + s;
211
- } else {
212
- str = m + ":" + s;
213
- }
214
- return str;
215
- };
216
168
  const getLoadTime = () => {
217
169
  if (state.videoSet.loaded)
218
170
  state.videoSet.loaded = state.videoElm.buffered.end(0) / state.videoElm.duration * 100;
219
171
  };
220
- const getPlayTime = () => {
221
- const percent = state.videoElm.currentTime / state.videoElm.duration;
222
- state.videoSet.progress.current = Math.round(state.videoSet.progress.width * percent);
223
- state.videoSet.totalTime = timeFormat(state.videoElm.duration);
224
- state.videoSet.displayTime = timeFormat(state.videoElm.currentTime);
225
- };
226
172
  const playEnded = () => {
227
173
  state.state.playing = false;
228
174
  state.state.isEnd = true;
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.15 Fri Jan 21 2022 15:38:52 GMT+0800 (GMT+08:00)
2
+ * @nutui/nutui v3.1.16 Fri Feb 25 2022 17:05:36 GMT+0800 (GMT+08:00)
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.15 Fri Jan 21 2022 15:38:52 GMT+0800 (GMT+08:00)
2
+ * @nutui/nutui v3.1.16 Fri Feb 25 2022 17:05:36 GMT+0800 (GMT+08:00)
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.15 Fri Jan 21 2022 15:38:52 GMT+0800 (GMT+08:00)
2
+ * @nutui/nutui v3.1.16 Fri Feb 25 2022 17:05:36 GMT+0800 (GMT+08:00)
3
3
  * (c) 2021 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */