@nutui/nutui 4.0.1 → 4.0.3-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (143) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/dist/nutui.es.js +1 -1
  3. package/dist/nutui.umd.js +2 -2
  4. package/dist/packages/_es/ActionSheet.js +2 -2
  5. package/dist/packages/_es/Address.js +27 -5
  6. package/dist/packages/_es/AddressList.js +1 -1
  7. package/dist/packages/_es/Animate.js +1 -1
  8. package/dist/packages/_es/Audio.js +1 -1
  9. package/dist/packages/_es/AudioOperate.js +1 -1
  10. package/dist/packages/_es/Avatar.js +1 -1
  11. package/dist/packages/_es/AvatarGroup.js +1 -1
  12. package/dist/packages/_es/Backtop.js +1 -1
  13. package/dist/packages/_es/Badge.js +1 -1
  14. package/dist/packages/_es/Barrage.js +4 -4
  15. package/dist/packages/_es/Button.js +1 -1
  16. package/dist/packages/_es/Calendar.js +3 -3
  17. package/dist/packages/_es/CalendarItem.js +2 -2
  18. package/dist/packages/_es/Card.js +1 -1
  19. package/dist/packages/_es/Cascader.js +4 -3
  20. package/dist/packages/_es/Category.js +1 -1
  21. package/dist/packages/_es/CategoryPane.js +1 -1
  22. package/dist/packages/_es/Cell.js +1 -1
  23. package/dist/packages/_es/CellGroup.js +1 -1
  24. package/dist/packages/_es/Checkbox.js +1 -1
  25. package/dist/packages/_es/CheckboxGroup.js +1 -1
  26. package/dist/packages/_es/CircleProgress.js +1 -1
  27. package/dist/packages/_es/Col.js +1 -1
  28. package/dist/packages/_es/Collapse.js +1 -1
  29. package/dist/packages/_es/CollapseItem.js +1 -1
  30. package/dist/packages/_es/Comment.js +1 -1
  31. package/dist/packages/_es/ConfigProvider.js +2 -34
  32. package/dist/packages/_es/Countdown.js +1 -1
  33. package/dist/packages/_es/Countup.js +1 -1
  34. package/dist/packages/_es/DatePicker.js +1 -1
  35. package/dist/packages/_es/Dialog.js +4 -4
  36. package/dist/packages/_es/Divider.js +1 -1
  37. package/dist/packages/_es/Drag.js +1 -1
  38. package/dist/packages/_es/Ecard.js +1 -1
  39. package/dist/packages/_es/Elevator.js +1 -1
  40. package/dist/packages/_es/Ellipsis.js +1 -1
  41. package/dist/packages/_es/Empty.js +1 -1
  42. package/dist/packages/_es/FixedNav.js +1 -1
  43. package/dist/packages/_es/Form.js +2 -2
  44. package/dist/packages/_es/FormItem.js +1 -1
  45. package/dist/packages/_es/Grid.js +2 -2
  46. package/dist/packages/_es/GridItem.js +2 -2
  47. package/dist/packages/_es/Image.js +1 -1
  48. package/dist/packages/_es/ImagePreview.js +4 -5
  49. package/dist/packages/_es/Indicator.js +1 -1
  50. package/dist/packages/_es/InfiniteLoading.js +1 -1
  51. package/dist/packages/_es/Input.js +16 -8
  52. package/dist/packages/_es/InputNumber.js +1 -1
  53. package/dist/packages/_es/Invoice.js +3 -3
  54. package/dist/packages/_es/Layout.js +1 -1
  55. package/dist/packages/_es/List.js +165 -27
  56. package/dist/packages/_es/Menu.js +1 -1
  57. package/dist/packages/_es/MenuItem.js +2 -2
  58. package/dist/packages/_es/Navbar.js +1 -1
  59. package/dist/packages/_es/Noticebar.js +5 -4
  60. package/dist/packages/_es/Notify.js +2 -2
  61. package/dist/packages/_es/NumberKeyboard.js +2 -2
  62. package/dist/packages/_es/Overlay.js +2 -2
  63. package/dist/packages/_es/Pagination.js +1 -1
  64. package/dist/packages/_es/Picker.js +1 -1
  65. package/dist/packages/_es/Popover.js +2 -2
  66. package/dist/packages/_es/Popup.js +2 -2
  67. package/dist/packages/_es/Price.js +7 -2
  68. package/dist/packages/_es/Progress.js +1 -1
  69. package/dist/packages/_es/PullRefresh.js +1 -2
  70. package/dist/packages/_es/Radio.js +2 -2
  71. package/dist/packages/_es/RadioGroup.js +2 -2
  72. package/dist/packages/_es/Range.js +1 -1
  73. package/dist/packages/_es/Rate.js +1 -1
  74. package/dist/packages/_es/Row.js +1 -1
  75. package/dist/packages/_es/Searchbar.js +1 -1
  76. package/dist/packages/_es/ShortPassword.js +2 -2
  77. package/dist/packages/_es/SideNavbar.js +1 -1
  78. package/dist/packages/_es/SideNavbarItem.js +1 -1
  79. package/dist/packages/_es/Signature.js +1 -2
  80. package/dist/packages/_es/Skeleton.js +1 -1
  81. package/dist/packages/_es/Sku.js +2 -2
  82. package/dist/packages/_es/Step.js +1 -1
  83. package/dist/packages/_es/Steps.js +1 -1
  84. package/dist/packages/_es/Sticky.js +2 -2
  85. package/dist/packages/_es/SubSideNavbar.js +1 -1
  86. package/dist/packages/_es/Swipe.js +1 -1
  87. package/dist/packages/_es/Swiper.js +1 -1
  88. package/dist/packages/_es/SwiperItem.js +1 -1
  89. package/dist/packages/_es/Switch.js +1 -1
  90. package/dist/packages/_es/TabPane.js +13 -8
  91. package/dist/packages/_es/Tabbar.js +1 -1
  92. package/dist/packages/_es/TabbarItem.js +1 -1
  93. package/dist/packages/_es/Table.js +1 -1
  94. package/dist/packages/_es/Tabs.js +169 -26
  95. package/dist/packages/_es/Tag.js +1 -1
  96. package/dist/packages/_es/Textarea.js +1 -1
  97. package/dist/packages/_es/TimeDetail.js +1 -1
  98. package/dist/packages/_es/TimePannel.js +1 -1
  99. package/dist/packages/_es/TimeSelect.js +2 -2
  100. package/dist/packages/_es/Toast.js +2 -2
  101. package/dist/packages/_es/Tour.js +2 -2
  102. package/dist/packages/_es/TrendArrow.js +1 -1
  103. package/dist/packages/_es/Uploader.js +2 -2
  104. package/dist/packages/_es/Video.js +1 -1
  105. package/dist/packages/_es/Watermark.js +1 -1
  106. package/dist/packages/_es/{common-0c815463.js → common-b9a5e726.js} +1 -1
  107. package/dist/packages/_es/{component-bb5ff48e.js → component-81a4c1d0.js} +6 -6
  108. package/dist/packages/_es/{index-a564e25f.js → index-c55ad69e.js} +2 -2
  109. package/dist/packages/_es/{index-0432a798.js → index-cb5fe1dc.js} +1 -1
  110. package/dist/packages/_es/{index.vue_vue_type_script_lang-0725f0ae.js → index.vue_vue_type_script_lang-22dfc112.js} +1 -1
  111. package/dist/packages/_es/{index.vue_vue_type_script_lang-9c679f64.js → index.vue_vue_type_script_lang-442e4704.js} +1 -1
  112. package/dist/packages/_es/{index.vue_vue_type_script_lang-8f90bbd8.js → index.vue_vue_type_script_lang-cc5c4086.js} +1 -1
  113. package/dist/packages/_es/{interceptor-648bf3d0.js → interceptor-956b24fc.js} +1 -1
  114. package/dist/packages/_es/{mountComponent-3865592f.js → mountComponent-1ece4110.js} +1 -1
  115. package/dist/packages/address/index.scss +1 -1
  116. package/dist/packages/input/index.scss +7 -5
  117. package/dist/packages/list/index.scss +8 -8
  118. package/dist/packages/menuitem/index.scss +1 -1
  119. package/dist/packages/navbar/index.scss +0 -1
  120. package/dist/packages/noticebar/index.scss +8 -2
  121. package/dist/packages/price/index.scss +5 -10
  122. package/dist/packages/shortpassword/index.scss +16 -0
  123. package/dist/smartips/web-types.json +62 -26
  124. package/dist/style.css +1 -1
  125. package/dist/styles/themes/default.scss +46 -46
  126. package/dist/styles/themes/jdb.scss +46 -46
  127. package/dist/styles/themes/jddkh.scss +46 -46
  128. package/dist/styles/themes/jdt.scss +46 -46
  129. package/dist/types/__VUE/address/index.vue.d.ts +1 -0
  130. package/dist/types/__VUE/configprovider/index.vue.d.ts +4 -4
  131. package/dist/types/__VUE/grid/index.vue.d.ts +1 -1
  132. package/dist/types/__VUE/input/index.vue.d.ts +12 -1
  133. package/dist/types/__VUE/list/index.vue.d.ts +42 -13
  134. package/dist/types/__VUE/list/type.d.ts +13 -0
  135. package/dist/types/__VUE/noticebar/index.vue.d.ts +4 -2
  136. package/dist/types/__VUE/price/index.vue.d.ts +9 -0
  137. package/dist/types/__VUE/tabpane/index.vue.d.ts +1 -4
  138. package/dist/types/__VUE/tabs/hooks.d.ts +12 -0
  139. package/dist/types/__VUE/tabs/index.vue.d.ts +20 -5
  140. package/dist/types/__VUE/uploader/type.d.ts +2 -1
  141. package/dist/types/index.d.ts +1 -1
  142. package/dist/types/utils/useTaroRect/index.d.ts +1 -1
  143. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  import { ref, reactive, computed, watch, onMounted, h, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, renderSlot, createBlock, resolveDynamicComponent, normalizeStyle, toDisplayString, createTextVNode, createCommentVNode, withDirectives, createVNode, mergeProps, vShow } from "vue";
2
- import { c as createComponent } from "./component-bb5ff48e.js";
2
+ import { c as createComponent } from "./component-81a4c1d0.js";
3
3
  import { MaskClose } from "@nutui/icons-vue";
4
4
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
5
5
  import "../locale/lang";
@@ -97,6 +97,10 @@ const _sfc_main = create({
97
97
  error: {
98
98
  type: Boolean,
99
99
  default: false
100
+ },
101
+ showClearIcon: {
102
+ type: Boolean,
103
+ default: false
100
104
  }
101
105
  },
102
106
  components: { MaskClose },
@@ -108,7 +112,7 @@ const _sfc_main = create({
108
112
  const renderInput = (type) => {
109
113
  return h("input", {
110
114
  style: styles,
111
- type: type != "textarea" && inputType(type)
115
+ ...inputType(type)
112
116
  });
113
117
  };
114
118
  const state = reactive({
@@ -135,12 +139,16 @@ const _sfc_main = create({
135
139
  });
136
140
  const inputType = (type) => {
137
141
  if (type === "number") {
138
- return "text";
139
- } else if (type === "digit") {
140
- return "tel";
141
- } else {
142
- return type;
142
+ return {
143
+ type: "text"
144
+ };
145
+ }
146
+ if (type === "digit") {
147
+ return {
148
+ type: "tel"
149
+ };
143
150
  }
151
+ return { type };
144
152
  };
145
153
  const onInput = (event) => {
146
154
  if (!event.target.composing) {
@@ -309,7 +317,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
309
317
  }), null, 16, ["size", "width", "height", "onClick"])
310
318
  ])
311
319
  ], 512)), [
312
- [vShow, _ctx.active && _ctx.modelValue.length > 0]
320
+ [vShow, (_ctx.active || _ctx.showClearIcon) && _ctx.modelValue.length > 0]
313
321
  ]) : createCommentVNode("", true),
314
322
  createElementVNode("view", _hoisted_8, [
315
323
  renderSlot(_ctx.$slots, "right")
@@ -1,5 +1,5 @@
1
1
  import { computed, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, renderSlot, createVNode, normalizeStyle } from "vue";
2
- import { c as createComponent } from "./component-bb5ff48e.js";
2
+ import { c as createComponent } from "./component-81a4c1d0.js";
3
3
  import { p as pxCheck } from "./pxCheck-c6b9f6b7.js";
4
4
  import { Minus, Plus } from "@nutui/icons-vue";
5
5
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
@@ -1,9 +1,9 @@
1
1
  import { ref, reactive, computed, onMounted, watch, toRefs, resolveComponent, openBlock, createElementBlock, normalizeClass, createVNode, withCtx, Fragment, renderList, createBlock, createTextVNode, toDisplayString, withDirectives, vModelText, createCommentVNode } from "vue";
2
- import { c as createComponent } from "./component-bb5ff48e.js";
2
+ import { c as createComponent } from "./component-81a4c1d0.js";
3
3
  import Form from "./Form.js";
4
4
  import FormItem from "./FormItem.js";
5
- import { _ as _sfc_main$1 } from "./index.vue_vue_type_script_lang-9c679f64.js";
6
- import { _ as _sfc_main$2 } from "./index.vue_vue_type_script_lang-0725f0ae.js";
5
+ import { _ as _sfc_main$1 } from "./index.vue_vue_type_script_lang-442e4704.js";
6
+ import { _ as _sfc_main$2 } from "./index.vue_vue_type_script_lang-22dfc112.js";
7
7
  import Button from "./Button.js";
8
8
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
9
9
  import "../locale/lang";
@@ -1,4 +1,4 @@
1
- import { c as createComponent } from "./component-bb5ff48e.js";
1
+ import { c as createComponent } from "./component-81a4c1d0.js";
2
2
  import "vue";
3
3
  import "../locale/lang";
4
4
  const { create } = createComponent("layout");
@@ -1,33 +1,72 @@
1
1
  import { ref, reactive, computed, watch, toRefs, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, Fragment, renderList, renderSlot } from "vue";
2
- import { c as createComponent } from "./component-bb5ff48e.js";
2
+ import { c as createComponent } from "./component-81a4c1d0.js";
3
+ import { u as useRect } from "./index-29892cda.js";
3
4
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
4
5
  import "../locale/lang";
6
+ var CompareResult = /* @__PURE__ */ ((CompareResult2) => {
7
+ CompareResult2[CompareResult2["eq"] = 1] = "eq";
8
+ CompareResult2[CompareResult2["lt"] = 2] = "lt";
9
+ CompareResult2[CompareResult2["gt"] = 3] = "gt";
10
+ return CompareResult2;
11
+ })(CompareResult || {});
12
+ function binarySearch(list, value, compareFunc) {
13
+ let start = 0;
14
+ let end = list.length - 1;
15
+ let tempIndex = null;
16
+ while (start <= end) {
17
+ tempIndex = Math.floor((start + end) / 2);
18
+ const midValue = list[tempIndex];
19
+ const compareRes = compareFunc(midValue, value);
20
+ if (compareRes === 1) {
21
+ return tempIndex;
22
+ }
23
+ if (compareRes === 2) {
24
+ start = tempIndex + 1;
25
+ } else if (compareRes === 3) {
26
+ end = tempIndex - 1;
27
+ }
28
+ }
29
+ return tempIndex;
30
+ }
5
31
  const { componentName, create } = createComponent("list");
6
32
  const clientHeight = document.documentElement.clientHeight || document.body.clientHeight || 667;
7
33
  const _sfc_main = create({
8
34
  props: {
9
- height: {
10
- type: [Number],
11
- default: 50
12
- },
13
35
  listData: {
14
36
  type: Array,
15
37
  default: () => {
16
38
  return [];
17
39
  }
18
40
  },
41
+ bufferSize: {
42
+ type: Number,
43
+ default: 5
44
+ },
19
45
  containerHeight: {
20
46
  type: [Number],
21
47
  default: clientHeight
48
+ },
49
+ height: {
50
+ type: Number,
51
+ default: 80
52
+ },
53
+ margin: {
54
+ type: Number,
55
+ default: 10
22
56
  }
23
57
  },
24
- emits: ["scroll", "scroll-bottom"],
58
+ emits: ["scroll-up", "scroll-down", "scroll-bottom"],
25
59
  setup(props, { emit }) {
26
60
  const list = ref(null);
61
+ const phantom = ref(null);
62
+ const actualContent = ref(null);
27
63
  const state = reactive({
28
- startOffset: 0,
29
64
  start: 0,
30
- list: props.listData.slice()
65
+ originStartIndex: 0,
66
+ scrollTop: 0,
67
+ list: props.listData.slice(),
68
+ cachePositions: [],
69
+ phantomHeight: props.height * props.listData.length
31
70
  });
32
71
  const getContainerHeight = computed(() => {
33
72
  return Math.min(props.containerHeight, clientHeight);
@@ -36,10 +75,7 @@ const _sfc_main = create({
36
75
  return Math.ceil(getContainerHeight.value / props.height);
37
76
  });
38
77
  const end = computed(() => {
39
- return state.start + visibleCount.value;
40
- });
41
- const getTransform = computed(() => {
42
- return `translate3d(0, ${state.startOffset}px, 0)`;
78
+ return Math.min(state.originStartIndex + visibleCount.value + props.bufferSize, state.list.length - 1);
43
79
  });
44
80
  const classes = computed(() => {
45
81
  const prefixCls = componentName;
@@ -47,32 +83,133 @@ const _sfc_main = create({
47
83
  [prefixCls]: true
48
84
  };
49
85
  });
50
- const listHeight = computed(() => {
51
- return state.list.length * props.height;
52
- });
53
86
  const visibleData = computed(() => {
54
- return state.list.slice(state.start, Math.min(end.value, state.list.length));
87
+ return state.list.slice(state.start, end.value);
55
88
  });
89
+ const getTransform = () => {
90
+ if (actualContent.value) {
91
+ return `translate3d(0, ${state.start >= 1 ? state.cachePositions[state.start - 1].bottom : 0}px, 0)`;
92
+ }
93
+ };
94
+ const initCachedPosition = () => {
95
+ state.cachePositions = [];
96
+ for (let i = 0; i < state.list.length; ++i) {
97
+ state.cachePositions[i] = {
98
+ index: i,
99
+ height: props.height,
100
+ top: i * props.height,
101
+ bottom: (i + 1) * (props.height + props.margin),
102
+ dValue: 0
103
+ };
104
+ }
105
+ };
106
+ const updateCachedPosition = () => {
107
+ let nodes = actualContent.value.childNodes;
108
+ nodes = Array.from(nodes).filter((node) => node.nodeType === 1);
109
+ const start = nodes[0];
110
+ nodes.forEach((node, index2) => {
111
+ if (!node)
112
+ return;
113
+ const rect = useRect(node);
114
+ const { height: height2 } = rect;
115
+ const oldHeight = state.cachePositions[index2 + state.start].height;
116
+ const dValue = oldHeight - height2;
117
+ if (dValue) {
118
+ state.cachePositions[index2 + state.start].bottom -= dValue;
119
+ state.cachePositions[index2 + state.start].height = height2;
120
+ state.cachePositions[index2 + state.start].dValue = dValue;
121
+ }
122
+ });
123
+ let startIndex = 0;
124
+ if (start) {
125
+ startIndex = state.start;
126
+ }
127
+ const cachedPositionsLen = state.cachePositions.length;
128
+ let cumulativeDiffHeight = state.cachePositions[startIndex].dValue;
129
+ state.cachePositions[startIndex].dValue = 0;
130
+ for (let i = startIndex + 1; i < cachedPositionsLen; ++i) {
131
+ const item = state.cachePositions[i];
132
+ state.cachePositions[i].top = state.cachePositions[i - 1].bottom;
133
+ state.cachePositions[i].bottom = state.cachePositions[i].bottom - cumulativeDiffHeight;
134
+ if (item.dValue !== 0) {
135
+ cumulativeDiffHeight += item.dValue;
136
+ item.dValue = 0;
137
+ }
138
+ }
139
+ const height = state.cachePositions[cachedPositionsLen - 1].bottom;
140
+ state.phantomHeight = height;
141
+ };
142
+ const getStartIndex = (scrollTop = 0) => {
143
+ let idx = binarySearch(
144
+ state.cachePositions,
145
+ scrollTop,
146
+ (currentValue, targetValue) => {
147
+ const currentCompareValue = currentValue.bottom;
148
+ if (currentCompareValue === targetValue) {
149
+ return CompareResult.eq;
150
+ }
151
+ if (currentCompareValue < targetValue) {
152
+ return CompareResult.lt;
153
+ }
154
+ return CompareResult.gt;
155
+ }
156
+ );
157
+ const targetItem = state.cachePositions[idx];
158
+ if (targetItem.bottom < scrollTop) {
159
+ idx += 1;
160
+ }
161
+ return idx;
162
+ };
163
+ const resetAllVirtualParam = () => {
164
+ state.originStartIndex = 0;
165
+ state.start = 0;
166
+ state.scrollTop = 0;
167
+ list.value.scrollTop = 0;
168
+ initCachedPosition();
169
+ state.phantomHeight = props.height * state.list.length;
170
+ };
56
171
  const handleScrollEvent = () => {
57
172
  var _a;
58
173
  const scrollTop = (_a = list.value) == null ? void 0 : _a.scrollTop;
59
- state.start = Math.floor(scrollTop / props.height);
60
- if (end.value >= state.list.length) {
61
- emit("scroll-bottom");
174
+ const { originStartIndex } = state;
175
+ const currentIndex = getStartIndex(scrollTop);
176
+ if (currentIndex !== originStartIndex) {
177
+ state.originStartIndex = currentIndex;
178
+ state.start = Math.max(state.originStartIndex - props.bufferSize, 0);
179
+ if (end.value >= state.list.length - 1) {
180
+ emit("scroll-bottom");
181
+ }
62
182
  }
63
- state.startOffset = scrollTop - scrollTop % props.height;
183
+ emit(scrollTop > state.scrollTop ? "scroll-up" : "scroll-down", scrollTop);
184
+ state.scrollTop = scrollTop;
64
185
  };
65
186
  watch(
66
187
  () => props.listData,
188
+ (val) => {
189
+ state.list = val.slice();
190
+ if (state.list.length === val.length) {
191
+ initCachedPosition();
192
+ updateCachedPosition();
193
+ } else {
194
+ resetAllVirtualParam();
195
+ return;
196
+ }
197
+ }
198
+ );
199
+ watch(
200
+ () => state.start,
67
201
  () => {
68
- state.list = props.listData.slice();
202
+ if (actualContent.value && state.list.length > 0) {
203
+ updateCachedPosition();
204
+ }
69
205
  }
70
206
  );
71
207
  return {
72
208
  ...toRefs(state),
73
209
  list,
210
+ phantom,
211
+ actualContent,
74
212
  getTransform,
75
- listHeight,
76
213
  visibleData,
77
214
  classes,
78
215
  getContainerHeight,
@@ -89,23 +226,24 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
89
226
  }, [
90
227
  createElementVNode("div", {
91
228
  class: "nut-list-phantom",
92
- style: normalizeStyle({ height: _ctx.listHeight + "px" })
229
+ style: normalizeStyle({ height: _ctx.phantomHeight + "px" }),
230
+ ref: "phantom"
93
231
  }, null, 4),
94
232
  createElementVNode("div", {
95
233
  class: "nut-list-container",
96
- style: normalizeStyle({ transform: _ctx.getTransform })
234
+ style: normalizeStyle({ transform: _ctx.getTransform() }),
235
+ ref: "actualContent"
97
236
  }, [
98
237
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.visibleData, (item, index2) => {
99
238
  return openBlock(), createElementBlock("div", {
100
239
  class: "nut-list-item",
101
- style: normalizeStyle({ height: _ctx.height + "px" }),
102
240
  key: item
103
241
  }, [
104
242
  renderSlot(_ctx.$slots, "default", {
105
243
  item,
106
- index: index2
244
+ index: index2 + _ctx.start
107
245
  })
108
- ], 4);
246
+ ]);
109
247
  }), 128))
110
248
  ], 4)
111
249
  ], 38);
@@ -1,5 +1,5 @@
1
1
  import { ref, computed, onMounted, onUnmounted, reactive, provide, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, Fragment, renderList, normalizeStyle, toDisplayString, renderSlot, createBlock } from "vue";
2
- import { c as createComponent } from "./component-bb5ff48e.js";
2
+ import { c as createComponent } from "./component-81a4c1d0.js";
3
3
  import { u as useRect } from "./index-29892cda.js";
4
4
  import { ArrowUp2, ArrowDown2 } from "@nutui/icons-vue";
5
5
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
@@ -1,6 +1,6 @@
1
1
  import { reactive, computed, inject, getCurrentInstance, onUnmounted, resolveComponent, withDirectives, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle, vShow, createVNode, mergeProps, withCtx, Fragment, renderList, renderSlot, createCommentVNode, toDisplayString } from "vue";
2
- import { c as createComponent } from "./component-bb5ff48e.js";
3
- import { P as Popup } from "./index-a564e25f.js";
2
+ import { c as createComponent } from "./component-81a4c1d0.js";
3
+ import { P as Popup } from "./index-c55ad69e.js";
4
4
  import { Check } from "@nutui/icons-vue";
5
5
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
6
6
  import "../locale/lang";
@@ -1,5 +1,5 @@
1
1
  import { toRefs, ref, computed, onMounted, nextTick, resolveComponent, openBlock, createElementBlock, createElementVNode, normalizeClass, normalizeStyle, renderSlot, createVNode, createCommentVNode, toDisplayString } from "vue";
2
- import { c as createComponent } from "./component-bb5ff48e.js";
2
+ import { c as createComponent } from "./component-81a4c1d0.js";
3
3
  import { Left } from "@nutui/icons-vue";
4
4
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
5
5
  import "../locale/lang";
@@ -1,6 +1,6 @@
1
1
  import { h, ref, reactive, computed, watch, onMounted, onActivated, onDeactivated, onUnmounted, toRefs, resolveComponent, openBlock, createElementBlock, normalizeClass, withDirectives, normalizeStyle, createElementVNode, renderSlot, createBlock, createCommentVNode, createTextVNode, toDisplayString, withModifiers, vShow, Fragment, renderList } from "vue";
2
2
  import { Notice, CircleClose } from "@nutui/icons-vue";
3
- import { c as createComponent } from "./component-bb5ff48e.js";
3
+ import { c as createComponent } from "./component-81a4c1d0.js";
4
4
  import { p as pxCheck } from "./pxCheck-c6b9f6b7.js";
5
5
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
6
6
  import "../locale/lang";
@@ -73,7 +73,7 @@ const _sfc_main = create({
73
73
  Notice,
74
74
  CircleClose
75
75
  },
76
- emits: ["click", "close"],
76
+ emits: ["click", "close", "across-end"],
77
77
  setup(props, { emit, slots }) {
78
78
  const wrap = ref(null);
79
79
  const content = ref(null);
@@ -187,8 +187,9 @@ const _sfc_main = create({
187
187
  }
188
188
  emit("close", event);
189
189
  };
190
- const onAnimationEnd = () => {
190
+ const onAnimationEnd = (event) => {
191
191
  state.firstRound = false;
192
+ emit("across-end", event);
192
193
  setTimeout(() => {
193
194
  state.duration = (state.offsetWidth + state.wrapWidth) / props.speed;
194
195
  state.animationClass = "play-infinite";
@@ -391,7 +392,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
391
392
  return openBlock(), createElementBlock("li", {
392
393
  class: "nut-noticebar__vertical-item",
393
394
  key: index2,
394
- style: normalizeStyle({ height: _ctx.pxCheck(_ctx.height) }),
395
+ style: normalizeStyle({ height: _ctx.pxCheck(_ctx.height), lineHeight: _ctx.pxCheck(_ctx.height) }),
395
396
  onClick: ($event) => _ctx.go(item)
396
397
  }, toDisplayString(item), 13, _hoisted_5);
397
398
  }), 128))
@@ -1,6 +1,6 @@
1
1
  import { ref, watch, resolveComponent, openBlock, createBlock, withCtx, createElementVNode, normalizeClass, normalizeStyle, renderSlot, createElementBlock, Fragment, createTextVNode, toDisplayString, createVNode, render, onMounted, h } from "vue";
2
- import { c as createComponent } from "./component-bb5ff48e.js";
3
- import { P as Popup } from "./index-a564e25f.js";
2
+ import { c as createComponent } from "./component-81a4c1d0.js";
3
+ import { P as Popup } from "./index-c55ad69e.js";
4
4
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
5
5
  import "../locale/lang";
6
6
  import "./Overlay.js";
@@ -1,6 +1,6 @@
1
1
  import { ref, computed, watch, resolveComponent, openBlock, createElementBlock, createVNode, withCtx, createElementVNode, toDisplayString, createCommentVNode, Fragment, renderList, normalizeClass, createTextVNode } from "vue";
2
- import { c as createComponent } from "./component-bb5ff48e.js";
3
- import { P as Popup } from "./index-a564e25f.js";
2
+ import { c as createComponent } from "./component-81a4c1d0.js";
3
+ import { P as Popup } from "./index-c55ad69e.js";
4
4
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
5
5
  import "../locale/lang";
6
6
  import "./Overlay.js";
@@ -1,5 +1,5 @@
1
1
  import { computed, watchEffect, openBlock, createBlock, Transition, withCtx, withDirectives, createElementVNode, normalizeClass, withModifiers, normalizeStyle, renderSlot, vShow } from "vue";
2
- import { b as body, c as createComponent } from "./component-bb5ff48e.js";
2
+ import { b as body, c as createComponent } from "./component-81a4c1d0.js";
3
3
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
4
4
  import "../locale/lang";
5
5
  let count = 0;
@@ -77,9 +77,9 @@ const _sfc_main = create({
77
77
  props.visible ? lock() : unlock();
78
78
  });
79
79
  const onClick = (e) => {
80
+ emit("click", e);
80
81
  if (props.closeOnClickOverlay) {
81
82
  emit("update:visible", false);
82
- emit("click", e);
83
83
  }
84
84
  };
85
85
  return { classes, style, onClick };
@@ -1,5 +1,5 @@
1
1
  import { toRefs, computed, watchEffect, openBlock, createElementBlock, createElementVNode, normalizeClass, renderSlot, createTextVNode, toDisplayString, Fragment, renderList, createCommentVNode } from "vue";
2
- import { c as createComponent } from "./component-bb5ff48e.js";
2
+ import { c as createComponent } from "./component-81a4c1d0.js";
3
3
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
4
4
  import "../locale/lang";
5
5
  const { create, translate } = createComponent("pagination");
@@ -1,5 +1,5 @@
1
1
  import { reactive, ref, computed, watch, toRefs, onMounted, openBlock, createElementBlock, createElementVNode, normalizeStyle, Fragment, renderList, normalizeClass, toDisplayString, createCommentVNode, resolveComponent, renderSlot, createVNode } from "vue";
2
- import { c as createComponent, e as preventDefault, f as clamp } from "./component-bb5ff48e.js";
2
+ import { c as createComponent, d as preventDefault, e as clamp } from "./component-81a4c1d0.js";
3
3
  import { p as pxCheck } from "./pxCheck-c6b9f6b7.js";
4
4
  import { u as useTouch } from "./index-7a7385e4.js";
5
5
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
@@ -1,8 +1,8 @@
1
1
  import { ref, computed, onMounted, watch, resolveComponent, openBlock, createElementBlock, Fragment, renderSlot, createCommentVNode, createElementVNode, normalizeClass, normalizeStyle, createVNode, withCtx, renderList, withModifiers, createBlock, resolveDynamicComponent, toDisplayString } from "vue";
2
- import { a as isArray, c as createComponent } from "./component-bb5ff48e.js";
2
+ import { i as isArray, c as createComponent } from "./component-81a4c1d0.js";
3
3
  import { r as renderIcon } from "./renderIcon-3d0fd47c.js";
4
4
  import { u as useRect } from "./index-29892cda.js";
5
- import { P as Popup } from "./index-a564e25f.js";
5
+ import { P as Popup } from "./index-c55ad69e.js";
6
6
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
7
7
  import "../locale/lang";
8
8
  import "./Overlay.js";
@@ -1,7 +1,7 @@
1
- import { P } from "./index-a564e25f.js";
1
+ import { P } from "./index-c55ad69e.js";
2
2
  import "vue";
3
3
  import "./_plugin-vue_export-helper-cc2b3d55.js";
4
- import "./component-bb5ff48e.js";
4
+ import "./component-81a4c1d0.js";
5
5
  import "../locale/lang";
6
6
  import "./Overlay.js";
7
7
  import "@nutui/icons-vue";
@@ -1,5 +1,5 @@
1
1
  import { computed, openBlock, createElementBlock, normalizeClass, createCommentVNode, createElementVNode, toDisplayString } from "vue";
2
- import { c as createComponent } from "./component-bb5ff48e.js";
2
+ import { c as createComponent } from "./component-81a4c1d0.js";
3
3
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
4
4
  import "../locale/lang";
5
5
  const { componentName, create } = createComponent("price");
@@ -32,12 +32,17 @@ const _sfc_main = create({
32
32
  size: {
33
33
  type: String,
34
34
  default: "normal"
35
+ },
36
+ strikeThrough: {
37
+ type: Boolean,
38
+ default: false
35
39
  }
36
40
  },
37
41
  setup(props) {
38
42
  const classes = computed(() => {
39
43
  return {
40
- [componentName]: true
44
+ [componentName]: true,
45
+ [`${componentName}--strike`]: props.strikeThrough
41
46
  };
42
47
  });
43
48
  const showSymbol = computed(() => {
@@ -1,5 +1,5 @@
1
1
  import { useSlots, ref, computed, onMounted, resolveComponent, openBlock, createElementBlock, createElementVNode, normalizeClass, normalizeStyle, toDisplayString, createCommentVNode, renderSlot, createVNode } from "vue";
2
- import { c as createComponent } from "./component-bb5ff48e.js";
2
+ import { c as createComponent } from "./component-81a4c1d0.js";
3
3
  import { Checked } from "@nutui/icons-vue";
4
4
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
5
5
  import "../locale/lang";
@@ -1,5 +1,5 @@
1
1
  import { ref, reactive, computed, watch, nextTick, toRefs, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle, createBlock, createCommentVNode, toDisplayString, renderSlot } from "vue";
2
- import { c as createComponent, l as getScrollTopRoot } from "./component-bb5ff48e.js";
2
+ import { c as createComponent, l as getScrollTopRoot } from "./component-81a4c1d0.js";
3
3
  import { u as useTouch } from "./index-7a7385e4.js";
4
4
  import { p as pxCheck } from "./pxCheck-c6b9f6b7.js";
5
5
  import { u as useScrollParent } from "./index-43c34ac6.js";
@@ -153,7 +153,6 @@ const _sfc_main = create({
153
153
  watch(
154
154
  () => props.modelValue,
155
155
  (val) => {
156
- console.log("监听", val);
157
156
  if (val) {
158
157
  setPullStatus(+props.headHeight, true);
159
158
  nextTick(() => emit("refresh"));
@@ -1,6 +1,6 @@
1
- import { _ as _sfc_main } from "./index.vue_vue_type_script_lang-9c679f64.js";
1
+ import { _ as _sfc_main } from "./index.vue_vue_type_script_lang-442e4704.js";
2
2
  import "vue";
3
- import "./component-bb5ff48e.js";
3
+ import "./component-81a4c1d0.js";
4
4
  import "../locale/lang";
5
5
  import "@nutui/icons-vue";
6
6
  import "./pxCheck-c6b9f6b7.js";
@@ -1,6 +1,6 @@
1
- import { _ as _sfc_main } from "./index.vue_vue_type_script_lang-0725f0ae.js";
1
+ import { _ as _sfc_main } from "./index.vue_vue_type_script_lang-22dfc112.js";
2
2
  import "vue";
3
- import "./component-bb5ff48e.js";
3
+ import "./component-81a4c1d0.js";
4
4
  import "../locale/lang";
5
5
  export {
6
6
  _sfc_main as default
@@ -1,5 +1,5 @@
1
1
  import { ref, computed, toRefs, openBlock, createElementBlock, normalizeClass, toDisplayString, createCommentVNode, createElementVNode, normalizeStyle, withModifiers, Fragment, renderList, createTextVNode, renderSlot } from "vue";
2
- import { c as createComponent, a as isArray } from "./component-bb5ff48e.js";
2
+ import { c as createComponent, i as isArray } from "./component-81a4c1d0.js";
3
3
  import { u as useTouch } from "./index-7a7385e4.js";
4
4
  import { u as useRect } from "./index-29892cda.js";
5
5
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
@@ -1,6 +1,6 @@
1
1
  import { ref, computed, openBlock, createElementBlock, normalizeClass, Fragment, renderList, normalizeStyle, createElementVNode, createBlock, resolveDynamicComponent, createCommentVNode } from "vue";
2
2
  import { StarFillN } from "@nutui/icons-vue";
3
- import { c as createComponent } from "./component-bb5ff48e.js";
3
+ import { c as createComponent } from "./component-81a4c1d0.js";
4
4
  import { r as renderIcon } from "./renderIcon-3d0fd47c.js";
5
5
  import { p as pxCheck } from "./pxCheck-c6b9f6b7.js";
6
6
  import { u as useTouch } from "./index-7a7385e4.js";
@@ -1,5 +1,5 @@
1
1
  import { provide, openBlock, createElementBlock, normalizeClass, renderSlot } from "vue";
2
- import { c as createComponent } from "./component-bb5ff48e.js";
2
+ import { c as createComponent } from "./component-81a4c1d0.js";
3
3
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
4
4
  import "../locale/lang";
5
5
  const { componentName, create } = createComponent("row");
@@ -1,5 +1,5 @@
1
1
  import { reactive, computed, ref, onMounted, toRefs, openBlock, createElementBlock, normalizeStyle, toDisplayString, createCommentVNode, renderSlot, createElementVNode, normalizeClass, withModifiers, withDirectives, createBlock, resolveDynamicComponent, vShow } from "vue";
2
- import { c as createComponent } from "./component-bb5ff48e.js";
2
+ import { c as createComponent } from "./component-81a4c1d0.js";
3
3
  import { r as renderIcon } from "./renderIcon-3d0fd47c.js";
4
4
  import { CircleClose } from "@nutui/icons-vue";
5
5
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
@@ -1,6 +1,6 @@
1
1
  import { ref, computed, watch, resolveComponent, openBlock, createElementBlock, createVNode, withCtx, createElementVNode, toDisplayString, Fragment, renderList, createCommentVNode } from "vue";
2
- import { c as createComponent } from "./component-bb5ff48e.js";
3
- import { P as Popup } from "./index-a564e25f.js";
2
+ import { c as createComponent } from "./component-81a4c1d0.js";
3
+ import { P as Popup } from "./index-c55ad69e.js";
4
4
  import { Tips } from "@nutui/icons-vue";
5
5
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
6
6
  import "../locale/lang";
@@ -1,5 +1,5 @@
1
1
  import { ref, reactive, computed, onMounted, toRefs, openBlock, createElementBlock, normalizeClass, createElementVNode, renderSlot } from "vue";
2
- import { c as createComponent } from "./component-bb5ff48e.js";
2
+ import { c as createComponent } from "./component-81a4c1d0.js";
3
3
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
4
4
  import "../locale/lang";
5
5
  const { componentName, create } = createComponent("side-navbar");
@@ -1,5 +1,5 @@
1
1
  import { computed, openBlock, createElementBlock, normalizeClass, withModifiers, createElementVNode, toDisplayString } from "vue";
2
- import { c as createComponent } from "./component-bb5ff48e.js";
2
+ import { c as createComponent } from "./component-81a4c1d0.js";
3
3
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
4
4
  import "../locale/lang";
5
5
  const { componentName, create } = createComponent("side-navbar-item");
@@ -1,5 +1,5 @@
1
1
  import { ref, computed, reactive, onMounted, toRefs, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, withDirectives, vShow, toDisplayString, createCommentVNode, createVNode, withCtx, createTextVNode } from "vue";
2
- import { c as createComponent } from "./component-bb5ff48e.js";
2
+ import { c as createComponent } from "./component-81a4c1d0.js";
3
3
  import Button from "./Button.js";
4
4
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
5
5
  import "../locale/lang";
@@ -126,7 +126,6 @@ const _sfc_main = create({
126
126
  const _canvas = isCanvasBlank(canvas2) ? "请绘制签名" : canvas2;
127
127
  const _filePath = isCanvasBlank(canvas2) ? "" : dataurl;
128
128
  emit("confirm", _canvas, _filePath);
129
- clear();
130
129
  };
131
130
  onMounted(() => {
132
131
  if (isCanvasSupported()) {