@nutui/nutui 4.0.2 → 4.0.3-beta.2

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 (141) hide show
  1. package/dist/nutui.es.js +1 -1
  2. package/dist/nutui.umd.js +2 -2
  3. package/dist/packages/_es/ActionSheet.js +2 -2
  4. package/dist/packages/_es/Address.js +2 -2
  5. package/dist/packages/_es/AddressList.js +1 -1
  6. package/dist/packages/_es/Animate.js +1 -1
  7. package/dist/packages/_es/Audio.js +1 -1
  8. package/dist/packages/_es/AudioOperate.js +1 -1
  9. package/dist/packages/_es/Avatar.js +1 -1
  10. package/dist/packages/_es/AvatarGroup.js +1 -1
  11. package/dist/packages/_es/Backtop.js +1 -1
  12. package/dist/packages/_es/Badge.js +1 -1
  13. package/dist/packages/_es/Barrage.js +1 -1
  14. package/dist/packages/_es/Button.js +1 -1
  15. package/dist/packages/_es/Calendar.js +3 -3
  16. package/dist/packages/_es/CalendarItem.js +2 -2
  17. package/dist/packages/_es/Card.js +1 -1
  18. package/dist/packages/_es/Cascader.js +4 -3
  19. package/dist/packages/_es/Category.js +1 -1
  20. package/dist/packages/_es/CategoryPane.js +1 -1
  21. package/dist/packages/_es/Cell.js +1 -1
  22. package/dist/packages/_es/CellGroup.js +1 -1
  23. package/dist/packages/_es/Checkbox.js +1 -1
  24. package/dist/packages/_es/CheckboxGroup.js +1 -1
  25. package/dist/packages/_es/CircleProgress.js +1 -1
  26. package/dist/packages/_es/Col.js +1 -1
  27. package/dist/packages/_es/Collapse.js +1 -1
  28. package/dist/packages/_es/CollapseItem.js +1 -1
  29. package/dist/packages/_es/Comment.js +1 -1
  30. package/dist/packages/_es/ConfigProvider.js +2 -34
  31. package/dist/packages/_es/Countdown.js +1 -1
  32. package/dist/packages/_es/Countup.js +1 -1
  33. package/dist/packages/_es/DatePicker.js +1 -1
  34. package/dist/packages/_es/Dialog.js +4 -4
  35. package/dist/packages/_es/Divider.js +1 -1
  36. package/dist/packages/_es/Drag.js +1 -1
  37. package/dist/packages/_es/Ecard.js +1 -1
  38. package/dist/packages/_es/Elevator.js +1 -1
  39. package/dist/packages/_es/Ellipsis.js +1 -1
  40. package/dist/packages/_es/Empty.js +1 -1
  41. package/dist/packages/_es/FixedNav.js +1 -1
  42. package/dist/packages/_es/Form.js +1 -1
  43. package/dist/packages/_es/FormItem.js +1 -1
  44. package/dist/packages/_es/Grid.js +2 -2
  45. package/dist/packages/_es/GridItem.js +2 -2
  46. package/dist/packages/_es/Image.js +1 -1
  47. package/dist/packages/_es/ImagePreview.js +4 -4
  48. package/dist/packages/_es/Indicator.js +1 -1
  49. package/dist/packages/_es/InfiniteLoading.js +1 -1
  50. package/dist/packages/_es/Input.js +11 -7
  51. package/dist/packages/_es/InputNumber.js +1 -1
  52. package/dist/packages/_es/Invoice.js +3 -3
  53. package/dist/packages/_es/Layout.js +1 -1
  54. package/dist/packages/_es/List.js +2 -2
  55. package/dist/packages/_es/Menu.js +1 -1
  56. package/dist/packages/_es/MenuItem.js +2 -2
  57. package/dist/packages/_es/Navbar.js +1 -1
  58. package/dist/packages/_es/Noticebar.js +4 -3
  59. package/dist/packages/_es/Notify.js +2 -2
  60. package/dist/packages/_es/NumberKeyboard.js +2 -2
  61. package/dist/packages/_es/Overlay.js +2 -2
  62. package/dist/packages/_es/Pagination.js +1 -1
  63. package/dist/packages/_es/Picker.js +1 -1
  64. package/dist/packages/_es/Popover.js +2 -2
  65. package/dist/packages/_es/Popup.js +2 -2
  66. package/dist/packages/_es/Price.js +7 -2
  67. package/dist/packages/_es/Progress.js +1 -1
  68. package/dist/packages/_es/PullRefresh.js +1 -1
  69. package/dist/packages/_es/Radio.js +2 -2
  70. package/dist/packages/_es/RadioGroup.js +2 -2
  71. package/dist/packages/_es/Range.js +1 -1
  72. package/dist/packages/_es/Rate.js +1 -1
  73. package/dist/packages/_es/Row.js +1 -1
  74. package/dist/packages/_es/Searchbar.js +1 -1
  75. package/dist/packages/_es/ShortPassword.js +2 -2
  76. package/dist/packages/_es/SideNavbar.js +1 -1
  77. package/dist/packages/_es/SideNavbarItem.js +1 -1
  78. package/dist/packages/_es/Signature.js +1 -1
  79. package/dist/packages/_es/Skeleton.js +1 -1
  80. package/dist/packages/_es/Sku.js +2 -2
  81. package/dist/packages/_es/Step.js +1 -1
  82. package/dist/packages/_es/Steps.js +1 -1
  83. package/dist/packages/_es/Sticky.js +2 -2
  84. package/dist/packages/_es/SubSideNavbar.js +1 -1
  85. package/dist/packages/_es/Swipe.js +1 -1
  86. package/dist/packages/_es/Swiper.js +1 -1
  87. package/dist/packages/_es/SwiperItem.js +1 -1
  88. package/dist/packages/_es/Switch.js +1 -1
  89. package/dist/packages/_es/TabPane.js +13 -8
  90. package/dist/packages/_es/Tabbar.js +1 -1
  91. package/dist/packages/_es/TabbarItem.js +1 -1
  92. package/dist/packages/_es/Table.js +1 -1
  93. package/dist/packages/_es/Tabs.js +168 -26
  94. package/dist/packages/_es/Tag.js +1 -1
  95. package/dist/packages/_es/Textarea.js +1 -1
  96. package/dist/packages/_es/TimeDetail.js +1 -1
  97. package/dist/packages/_es/TimePannel.js +1 -1
  98. package/dist/packages/_es/TimeSelect.js +2 -2
  99. package/dist/packages/_es/Toast.js +2 -2
  100. package/dist/packages/_es/Tour.js +2 -2
  101. package/dist/packages/_es/TrendArrow.js +1 -1
  102. package/dist/packages/_es/Uploader.js +2 -2
  103. package/dist/packages/_es/Video.js +1 -1
  104. package/dist/packages/_es/Watermark.js +1 -1
  105. package/dist/packages/_es/{common-05c67d9a.js → common-ceb98554.js} +1 -1
  106. package/dist/packages/_es/{component-bb5ff48e.js → component-81a4c1d0.js} +6 -6
  107. package/dist/packages/_es/{index-c4bbec14.js → index-2a2f92bd.js} +1 -1
  108. package/dist/packages/_es/{index-a564e25f.js → index-c55ad69e.js} +2 -2
  109. package/dist/packages/_es/{index.vue_vue_type_script_lang-ee936659.js → index.vue_vue_type_script_lang-1291fceb.js} +1 -1
  110. package/dist/packages/_es/{index.vue_vue_type_script_lang-8f90bbd8.js → index.vue_vue_type_script_lang-cc5c4086.js} +1 -1
  111. package/dist/packages/_es/{index.vue_vue_type_script_lang-8b9f3de5.js → index.vue_vue_type_script_lang-d4c88f85.js} +1 -1
  112. package/dist/packages/_es/{interceptor-648bf3d0.js → interceptor-956b24fc.js} +1 -1
  113. package/dist/packages/_es/{mountComponent-3865592f.js → mountComponent-1ece4110.js} +1 -1
  114. package/dist/packages/input/index.scss +2 -2
  115. package/dist/packages/menuitem/index.scss +1 -1
  116. package/dist/packages/navbar/index.scss +0 -1
  117. package/dist/packages/price/index.scss +5 -10
  118. package/dist/resolver/package.json +20 -0
  119. package/dist/smartips/web-types.json +20 -20
  120. package/dist/style.css +1 -1
  121. package/dist/styles/themes/default.scss +56 -56
  122. package/dist/styles/themes/jdb.scss +56 -56
  123. package/dist/styles/themes/jddkh.scss +56 -56
  124. package/dist/styles/themes/jdt.scss +56 -56
  125. package/dist/types/__VUE/cell/index.vue.d.ts +1 -1
  126. package/dist/types/__VUE/configprovider/index.vue.d.ts +4 -4
  127. package/dist/types/__VUE/countup/index.vue.d.ts +2 -2
  128. package/dist/types/__VUE/input/index.vue.d.ts +4 -2
  129. package/dist/types/__VUE/inputnumber/index.vue.d.ts +1 -1
  130. package/dist/types/__VUE/noticebar/index.vue.d.ts +4 -2
  131. package/dist/types/__VUE/price/index.vue.d.ts +9 -0
  132. package/dist/types/__VUE/rate/index.vue.d.ts +1 -1
  133. package/dist/types/__VUE/searchbar/index.vue.d.ts +2 -2
  134. package/dist/types/__VUE/skeleton/index.vue.d.ts +1 -1
  135. package/dist/types/__VUE/tabpane/index.vue.d.ts +1 -4
  136. package/dist/types/__VUE/tabs/hooks.d.ts +12 -0
  137. package/dist/types/__VUE/tabs/index.vue.d.ts +20 -5
  138. package/dist/types/__VUE/textarea/index.vue.d.ts +1 -1
  139. package/dist/types/index.d.ts +1 -1
  140. package/dist/types/utils/useTaroRect/index.d.ts +1 -1
  141. package/package.json +2 -2
@@ -4,15 +4,117 @@ var __publicField = (obj, key, value) => {
4
4
  __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
5
5
  return value;
6
6
  };
7
- import { c as createComponent, T as TypeOfFun } from "./component-bb5ff48e.js";
8
- import { ref, provide, computed, watch, onMounted, onActivated, nextTick, resolveComponent, openBlock, createElementBlock, normalizeClass, createBlock, withCtx, createElementVNode, normalizeStyle, renderSlot, Fragment, renderList, createCommentVNode, createVNode, toDisplayString } from "vue";
7
+ import { c as createComponent, T as TypeOfFun } from "./component-81a4c1d0.js";
8
+ import { ref, onMounted, reactive, provide, computed, watch, onActivated, nextTick, resolveComponent, openBlock, createElementBlock, normalizeClass, createBlock, withCtx, createElementVNode, normalizeStyle, renderSlot, Fragment, renderList, createCommentVNode, createVNode, toDisplayString } from "vue";
9
9
  import { p as pxCheck } from "./pxCheck-c6b9f6b7.js";
10
10
  import { u as useRect } from "./index-29892cda.js";
11
11
  import { r as requestAniFrame } from "./raf-729dad54.js";
12
- import { _ as _sfc_main$1 } from "./index.vue_vue_type_script_lang-8f90bbd8.js";
12
+ import { _ as _sfc_main$1 } from "./index.vue_vue_type_script_lang-cc5c4086.js";
13
13
  import { JoySmile } from "@nutui/icons-vue";
14
+ import { u as useTouch } from "./index-7a7385e4.js";
14
15
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
15
16
  import "../locale/lang";
17
+ const useTabContentTouch = (props, tabMethods, taro, useTaroRect) => {
18
+ const tabsContentRef = ref();
19
+ const tabsContentRefRect = ref({ width: 0, height: 0 });
20
+ const initTaroWidth = async () => {
21
+ var _a, _b;
22
+ if (taro && taro.getEnv() !== taro.ENV_TYPE.WEB) {
23
+ let rect = await useTaroRect(tabsContentRef, taro);
24
+ tabsContentRefRect.value.width = rect.width || 0;
25
+ tabsContentRefRect.value.height = rect.height || 0;
26
+ } else {
27
+ tabsContentRefRect.value.width = ((_a = tabsContentRef.value) == null ? void 0 : _a.clientWidth) || 0;
28
+ tabsContentRefRect.value.height = ((_b = tabsContentRef.value) == null ? void 0 : _b.clientHeight) || 0;
29
+ }
30
+ };
31
+ onMounted(() => {
32
+ setTimeout(() => {
33
+ initTaroWidth();
34
+ }, 100);
35
+ });
36
+ const touchState = reactive({
37
+ offset: 0,
38
+ moving: false
39
+ });
40
+ const touch = useTouch();
41
+ let position = "";
42
+ const setoffset = (deltaX, deltaY) => {
43
+ var _a;
44
+ let offset = deltaX;
45
+ if (props.direction == "horizontal") {
46
+ position = deltaX > 0 ? "right" : "left";
47
+ offset = Math.abs(offset) / tabsContentRefRect.value.width * 100;
48
+ } else {
49
+ position = deltaY > 0 ? "bottom" : "top";
50
+ offset = deltaY;
51
+ offset = Math.abs(offset) / ((_a = tabsContentRefRect.value) == null ? void 0 : _a.height) * 100;
52
+ }
53
+ if (offset > 85) {
54
+ offset = 85;
55
+ }
56
+ switch (position) {
57
+ case "left":
58
+ case "top":
59
+ if (tabMethods.isEnd()) {
60
+ offset = 0;
61
+ touchState.moving = false;
62
+ }
63
+ break;
64
+ case "right":
65
+ case "bottom":
66
+ offset = -offset;
67
+ if (tabMethods.isBegin()) {
68
+ offset = 0;
69
+ touchState.moving = false;
70
+ }
71
+ break;
72
+ }
73
+ touchState.offset = offset;
74
+ };
75
+ const touchMethods = {
76
+ onTouchStart(event) {
77
+ if (!props.swipeable)
78
+ return;
79
+ touch.start(event);
80
+ },
81
+ onTouchMove(event) {
82
+ if (!props.swipeable)
83
+ return;
84
+ touch.move(event);
85
+ touchState.moving = true;
86
+ setoffset(touch.deltaX.value, touch.deltaY.value);
87
+ if (props.direction == "horizontal" && touch.isHorizontal()) {
88
+ event.preventDefault();
89
+ event.stopPropagation();
90
+ }
91
+ if (props.direction == "vertical" && touch.isVertical()) {
92
+ event.preventDefault();
93
+ event.stopPropagation();
94
+ }
95
+ },
96
+ onTouchEnd() {
97
+ if (touchState.moving) {
98
+ touchState.moving = false;
99
+ switch (position) {
100
+ case "left":
101
+ case "top":
102
+ if (touchState.offset > 35) {
103
+ tabMethods.next();
104
+ }
105
+ break;
106
+ case "right":
107
+ case "bottom":
108
+ if (touchState.offset < -35) {
109
+ tabMethods.prev();
110
+ }
111
+ break;
112
+ }
113
+ }
114
+ }
115
+ };
116
+ return { touchMethods, touchState, tabsContentRef };
117
+ };
16
118
  class Title {
17
119
  constructor() {
18
120
  __publicField(this, "title", "");
@@ -53,6 +155,10 @@ const _sfc_main = create({
53
155
  type: Boolean,
54
156
  default: true
55
157
  },
158
+ swipeable: {
159
+ type: Boolean,
160
+ default: false
161
+ },
56
162
  autoHeight: {
57
163
  type: Boolean,
58
164
  default: false
@@ -82,8 +188,11 @@ const _sfc_main = create({
82
188
  setup(props, { emit, slots }) {
83
189
  const container = ref(null);
84
190
  let stickyFixed;
85
- provide("activeKey", { activeKey: computed(() => props.modelValue) });
86
- provide("autoHeight", { autoHeight: computed(() => props.autoHeight) });
191
+ provide("tabsOpiton", {
192
+ activeKey: computed(() => props.modelValue || "0"),
193
+ autoHeight: computed(() => props.autoHeight),
194
+ animatedTime: computed(() => props.animatedTime)
195
+ });
87
196
  const titles = ref([]);
88
197
  const renderTitles = (vnodes) => {
89
198
  vnodes.forEach((vnode, index) => {
@@ -114,7 +223,7 @@ const _sfc_main = create({
114
223
  const findTabsIndex = (value) => {
115
224
  let index = titles.value.findIndex((item) => item.paneKey == value);
116
225
  if (titles.value.length == 0) {
117
- console.error("[NutUI] <Tabs> 当前未找到 TabPane 组件元素 , 请检查 .");
226
+ console.warn("[NutUI] <Tabs> 当前未找到 TabPane 组件元素 , 请检查 .");
118
227
  } else if (index == -1)
119
228
  ;
120
229
  else {
@@ -188,11 +297,51 @@ const _sfc_main = create({
188
297
  );
189
298
  onMounted(init);
190
299
  onActivated(init);
300
+ const tabMethods = {
301
+ isBegin: () => {
302
+ return currentIndex.value == 0;
303
+ },
304
+ isEnd: () => {
305
+ return currentIndex.value == titles.value.length - 1;
306
+ },
307
+ next: () => {
308
+ currentIndex.value += 1;
309
+ tabMethods.updateValue(titles.value[currentIndex.value]);
310
+ },
311
+ prev: () => {
312
+ currentIndex.value -= 1;
313
+ tabMethods.updateValue(titles.value[currentIndex.value]);
314
+ },
315
+ updateValue: (item) => {
316
+ emit("update:modelValue", item.paneKey);
317
+ emit("change", item);
318
+ },
319
+ tabChange: (item, index) => {
320
+ emit("click", item);
321
+ if (item.disabled || currentIndex.value == index) {
322
+ return;
323
+ }
324
+ currentIndex.value = index;
325
+ tabMethods.updateValue(item);
326
+ },
327
+ setTabItemRef: (el, index) => {
328
+ titleRef.value[index] = el;
329
+ }
330
+ };
331
+ const { tabsContentRef, touchState, touchMethods } = useTabContentTouch(props, tabMethods);
191
332
  const contentStyle = computed(() => {
192
- return {
193
- transform: props.direction == "horizontal" ? `translate3d(-${currentIndex.value * 100}%, 0, 0)` : `translate3d( 0,-${currentIndex.value * 100}%, 0)`,
194
- transitionDuration: `${props.animatedTime}ms`
333
+ let offsetPercent = currentIndex.value * 100;
334
+ if (touchState.moving) {
335
+ offsetPercent += touchState.offset;
336
+ }
337
+ let style = {
338
+ transform: props.direction == "horizontal" ? `translate3d(-${offsetPercent}%, 0, 0)` : `translate3d( 0,-${offsetPercent}%, 0)`,
339
+ transitionDuration: touchState.moving ? void 0 : `${props.animatedTime}ms`
195
340
  };
341
+ if (props.animatedTime == 0) {
342
+ style = {};
343
+ }
344
+ return style;
196
345
  });
197
346
  const tabsNavStyle = computed(() => {
198
347
  return {
@@ -211,22 +360,9 @@ const _sfc_main = create({
211
360
  marginRight: pxCheck(props.titleGutter)
212
361
  };
213
362
  });
214
- const methods = {
215
- tabChange: (item, index) => {
216
- emit("click", item);
217
- if (item.disabled || currentIndex.value == index) {
218
- return;
219
- }
220
- currentIndex.value = index;
221
- emit("update:modelValue", item.paneKey);
222
- emit("change", item);
223
- },
224
- setTabItemRef: (el, index) => {
225
- titleRef.value[index] = el;
226
- }
227
- };
228
363
  return {
229
364
  navRef,
365
+ tabsContentRef,
230
366
  titles,
231
367
  contentStyle,
232
368
  tabsNavStyle,
@@ -234,7 +370,8 @@ const _sfc_main = create({
234
370
  tabsActiveStyle,
235
371
  container,
236
372
  onStickyScroll,
237
- ...methods
373
+ ...tabMethods,
374
+ ...touchMethods
238
375
  };
239
376
  }
240
377
  });
@@ -322,10 +459,15 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
322
459
  ], 6)),
323
460
  createElementVNode("view", {
324
461
  class: "nut-tabs__content",
325
- style: normalizeStyle(_ctx.contentStyle)
462
+ ref: "tabsContentRef",
463
+ style: normalizeStyle(_ctx.contentStyle),
464
+ onTouchstart: _cache[0] || (_cache[0] = (...args) => _ctx.onTouchStart && _ctx.onTouchStart(...args)),
465
+ onTouchmove: _cache[1] || (_cache[1] = (...args) => _ctx.onTouchMove && _ctx.onTouchMove(...args)),
466
+ onTouchend: _cache[2] || (_cache[2] = (...args) => _ctx.onTouchEnd && _ctx.onTouchEnd(...args)),
467
+ onTouchcancel: _cache[3] || (_cache[3] = (...args) => _ctx.onTouchEnd && _ctx.onTouchEnd(...args))
326
468
  }, [
327
469
  renderSlot(_ctx.$slots, "default")
328
- ], 4)
470
+ ], 36)
329
471
  ], 2);
330
472
  }
331
473
  const Tabs = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
@@ -1,5 +1,5 @@
1
1
  import { toRefs, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, renderSlot, createBlock, createCommentVNode } from "vue";
2
- import { c as createComponent } from "./component-bb5ff48e.js";
2
+ import { c as createComponent } from "./component-81a4c1d0.js";
3
3
  import { Close } 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, computed, onMounted, nextTick, watch, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle, toDisplayString, 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 { componentName, create, translate } = createComponent("textarea");
@@ -1,5 +1,5 @@
1
1
  import { inject, reactive, computed, toRefs, openBlock, createElementBlock, normalizeClass, createElementVNode, Fragment, renderList, 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("time-detail");
@@ -1,5 +1,5 @@
1
1
  import { inject, reactive, computed, toRefs, openBlock, createElementBlock, normalizeClass, 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("time-pannel");
@@ -1,6 +1,6 @@
1
1
  import { computed, provide, resolveComponent, openBlock, createBlock, normalizeStyle, withCtx, createElementVNode, normalizeClass, createElementBlock, toDisplayString, renderSlot } 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,9 +1,9 @@
1
1
  import { reactive, onMounted, watch, computed, openBlock, createBlock, Transition, withCtx, withDirectives, createElementVNode, normalizeClass, normalizeStyle, createElementBlock, resolveDynamicComponent, createCommentVNode, toDisplayString, vShow, createVNode, render } 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 { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
5
5
  import "../locale/lang";
6
- import { C as CreateComponent } from "./mountComponent-3865592f.js";
6
+ import { C as CreateComponent } from "./mountComponent-1ece4110.js";
7
7
  import { Success, Failure, Tips, Loading } from "@nutui/icons-vue";
8
8
  const { create } = createComponent("toast");
9
9
  const _sfc_main = create({
@@ -1,12 +1,12 @@
1
1
  import { reactive, ref, computed, onMounted, watch, toRefs, nextTick, resolveComponent, openBlock, createElementBlock, normalizeClass, withDirectives, createElementVNode, vShow, Fragment, renderList, normalizeStyle, createCommentVNode, createVNode, withCtx, renderSlot, toDisplayString } 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 { Close } from "@nutui/icons-vue";
5
5
  import Popover from "./Popover.js";
6
6
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
7
7
  import "../locale/lang";
8
8
  import "./renderIcon-3d0fd47c.js";
9
- import "./index-a564e25f.js";
9
+ import "./index-c55ad69e.js";
10
10
  import "./Overlay.js";
11
11
  const { create } = createComponent("tour");
12
12
  const _sfc_main = create({
@@ -1,5 +1,5 @@
1
1
  import { reactive, computed, toRefs, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, toDisplayString, createCommentVNode, renderSlot, createVNode } from "vue";
2
- import { m as myFixed, c as createComponent } from "./component-bb5ff48e.js";
2
+ import { m as myFixed, c as createComponent } from "./component-81a4c1d0.js";
3
3
  import { TriangleUp, TriangleDown } from "@nutui/icons-vue";
4
4
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
5
5
  import "../locale/lang";
@@ -5,8 +5,8 @@ var __publicField = (obj, key, value) => {
5
5
  return value;
6
6
  };
7
7
  import { reactive, computed, h, resolveComponent, openBlock, createElementBlock, normalizeClass, renderSlot, createBlock, resolveDynamicComponent, createCommentVNode, Fragment, renderList, createElementVNode, toDisplayString, createVNode } from "vue";
8
- import { c as createComponent } from "./component-bb5ff48e.js";
9
- import { f as funInterceptor } from "./interceptor-648bf3d0.js";
8
+ import { c as createComponent } from "./component-81a4c1d0.js";
9
+ import { f as funInterceptor } from "./interceptor-956b24fc.js";
10
10
  import Progress from "./Progress.js";
11
11
  import { Photograph, Failure, Loading, Del, Link } from "@nutui/icons-vue";
12
12
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
@@ -1,5 +1,5 @@
1
1
  import { reactive, ref, computed, watch, nextTick, onMounted, toRefs, openBlock, createElementBlock, createElementVNode, createCommentVNode, withDirectives, vShow, normalizeClass, toDisplayString, normalizeStyle, withModifiers } 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
  function throttle(fn, delay) {
@@ -1,5 +1,5 @@
1
1
  import { reactive, watch, computed, toRefs, openBlock, createElementBlock, normalizeClass, normalizeStyle } 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("watermark");
@@ -1,5 +1,5 @@
1
1
  import { shallowReactive, getCurrentInstance, provide, markRaw, isVNode, computed, h } 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
  function flattenVNodes(children, childName) {
5
5
  const result = [];
@@ -127,15 +127,15 @@ function createComponent(name) {
127
127
  }
128
128
  export {
129
129
  TypeOfFun as T,
130
- isArray as a,
130
+ isDate as a,
131
131
  body as b,
132
132
  createComponent as c,
133
- isDate as d,
134
- preventDefault as e,
135
- clamp as f,
136
- isPromise as g,
133
+ preventDefault as d,
134
+ clamp as e,
135
+ isPromise as f,
136
+ isObject as g,
137
137
  getPropByPath as h,
138
- isObject as i,
138
+ isArray as i,
139
139
  isString as j,
140
140
  isFunction as k,
141
141
  getScrollTopRoot as l,
@@ -1,5 +1,5 @@
1
1
  import { ref, computed, reactive, watch, toRefs, openBlock, createElementBlock, normalizeClass, createElementVNode, toDisplayString, createCommentVNode, renderSlot, Fragment, renderList, normalizeStyle, createTextVNode } 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 requestAniFrame } from "./raf-729dad54.js";
4
4
  import { u as useExpose } from "./index-79c5dc33.js";
5
5
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
@@ -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 { reactive, computed, watch, watchEffect, toRefs, resolveComponent, openBlock, createBlock, Teleport, mergeProps, createCommentVNode, createVNode, Transition, withCtx, withDirectives, createElementVNode, normalizeClass, normalizeStyle, renderSlot, createElementBlock, vShow } from "vue";
3
3
  import Overlay from "./Overlay.js";
4
4
  import { Close } from "@nutui/icons-vue";
@@ -149,8 +149,8 @@ const component = (componentName2, components) => {
149
149
  emit("update:visible", false);
150
150
  };
151
151
  const onClickOverlay = (e) => {
152
+ emit("click-overlay", e);
152
153
  if (props.closeOnClickOverlay) {
153
- emit("click-overlay", e);
154
154
  emit("update:visible", false);
155
155
  }
156
156
  };
@@ -1,5 +1,5 @@
1
1
  import { provide, readonly, computed, watch, h } from "vue";
2
- import { c as createComponent } from "./component-bb5ff48e.js";
2
+ import { c as createComponent } from "./component-81a4c1d0.js";
3
3
  const { componentName, create } = createComponent("radio-group");
4
4
  const _sfc_main = create({
5
5
  props: {
@@ -1,5 +1,5 @@
1
1
  import { ref, reactive, computed, watch, onMounted, onUnmounted, h, unref } 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
  const { componentName, create } = createComponent("sticky");
5
5
  const _sfc_main = create({
@@ -1,5 +1,5 @@
1
1
  import { inject, computed, h } from "vue";
2
- import { c as createComponent } from "./component-bb5ff48e.js";
2
+ import { c as createComponent } from "./component-81a4c1d0.js";
3
3
  import { CheckNormal, CheckChecked } from "@nutui/icons-vue";
4
4
  import { p as pxCheck } from "./pxCheck-c6b9f6b7.js";
5
5
  const { componentName, create } = createComponent("radio");
@@ -1,4 +1,4 @@
1
- import { g as isPromise } from "./component-bb5ff48e.js";
1
+ import { f as isPromise } from "./component-81a4c1d0.js";
2
2
  const funInterceptor = (interceptor, {
3
3
  args = [],
4
4
  done,
@@ -1,5 +1,5 @@
1
1
  import { createApp } from "vue";
2
- import { j as isString, k as isFunction } from "./component-bb5ff48e.js";
2
+ import { j as isString, k as isFunction } from "./component-81a4c1d0.js";
3
3
  const CreateComponent = (options, component) => {
4
4
  let elWarp = document.body;
5
5
  const teleport = options.teleport || "body";
@@ -55,8 +55,8 @@ textarea {
55
55
  }
56
56
  .input-text {
57
57
  font-size: $input-font-size;
58
- height: auto;
59
- min-height: auto;
58
+ // height: auto;
59
+ // min-height: auto;
60
60
  }
61
61
  &__label {
62
62
  width: 80px;
@@ -40,7 +40,7 @@
40
40
 
41
41
  .nut-menu__pop {
42
42
  transition: height linear 3s;
43
- // transform: none;
43
+ transform: none;
44
44
  }
45
45
 
46
46
  .nut-menu-item-placeholder-element {
@@ -33,7 +33,6 @@
33
33
  width: 100%;
34
34
  }
35
35
  &--placeholder {
36
- display: inline-block;
37
36
  width: 100%;
38
37
  }
39
38
  &--safe-area-inset-top {
@@ -2,10 +2,14 @@
2
2
  font-size: 0;
3
3
  display: inline;
4
4
  color: $primary-color;
5
+ &--strike {
6
+ [class*='nut-price'] {
7
+ text-decoration: line-through;
8
+ }
9
+ }
5
10
  &--symbol {
6
11
  display: inline-block;
7
12
  font-size: $font-size-3;
8
- // margin-right: 4px;
9
13
  }
10
14
  &--large {
11
15
  display: inline-block;
@@ -15,11 +19,6 @@
15
19
  display: inline-block;
16
20
  font-size: $price-big-size;
17
21
  }
18
- // &--small {
19
- // display: inline-block;
20
- // font-size: $font-size-4;
21
- // }
22
-
23
22
  &--decimal-large {
24
23
  display: inline-block;
25
24
  font-size: $price-decimal-big-size;
@@ -52,8 +51,4 @@
52
51
  display: inline-block;
53
52
  font-size: $price-symbol-small-size;
54
53
  }
55
- // &--decimal--big {
56
- // display: inline-block;
57
- // font-size: $price-medium-size;
58
- // }
59
54
  }
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "nutui-vue-resolver",
3
+ "description": "NutUIResolver for unplugin-vue-components",
4
+ "exports": {
5
+ ".": {
6
+ "types": "./index.d.ts",
7
+ "require": "./index.js",
8
+ "import": "./index.mjs"
9
+ },
10
+ "./index": {
11
+ "types": "./index.d.ts",
12
+ "require": "./index.js",
13
+ "import": "./index.mjs"
14
+ },
15
+ "./*": "./*"
16
+ },
17
+ "main": "index.js",
18
+ "module": "index.mjs",
19
+ "types": "index.d.ts"
20
+ }
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "framework": "vue",
4
4
  "name": "NutUI",
5
- "version": "4.0.2",
5
+ "version": "4.0.3-beta.2",
6
6
  "contributions": {
7
7
  "html": {
8
8
  "tags": [
@@ -1428,24 +1428,6 @@
1428
1428
  "type": "string",
1429
1429
  "kind": "expression"
1430
1430
  }
1431
- },
1432
- {
1433
- "name": "font-class-name",
1434
- "default": "`nutui-iconfont`",
1435
- "description": "自定义 icon 字体基础类名",
1436
- "value": {
1437
- "type": "string",
1438
- "kind": "expression"
1439
- }
1440
- },
1441
- {
1442
- "name": "class-prefix",
1443
- "default": "`nut-icon`",
1444
- "description": "自定义 icon 类名前缀,用于使用自定义图标",
1445
- "value": {
1446
- "type": "string",
1447
- "kind": "expression"
1448
- }
1449
1431
  }
1450
1432
  ]
1451
1433
  },
@@ -3840,7 +3822,7 @@
3840
3822
  {
3841
3823
  "name": "close-on-click-overlay",
3842
3824
  "default": "`true`",
3843
- "description": "点击遮罩时是否关闭,如果设置 `false`,那么 `click`事件将失效",
3825
+ "description": "点击遮罩时是否关闭",
3844
3826
  "value": {
3845
3827
  "type": "boolean",
3846
3828
  "kind": "expression"
@@ -4438,6 +4420,15 @@
4438
4420
  "type": "string",
4439
4421
  "kind": "expression"
4440
4422
  }
4423
+ },
4424
+ {
4425
+ "name": "strike-through",
4426
+ "default": "false",
4427
+ "description": "是否展示划线价",
4428
+ "value": {
4429
+ "type": "boolean",
4430
+ "kind": "expression"
4431
+ }
4441
4432
  }
4442
4433
  ]
4443
4434
  },
@@ -5892,6 +5883,15 @@
5892
5883
  "kind": "expression"
5893
5884
  }
5894
5885
  },
5886
+ {
5887
+ "name": "swipeable",
5888
+ "default": "`false`",
5889
+ "description": "是否开启手势左右滑动切换",
5890
+ "value": {
5891
+ "type": "boolean",
5892
+ "kind": "expression"
5893
+ }
5894
+ },
5895
5895
  {
5896
5896
  "name": "title-scroll",
5897
5897
  "default": "`false`",