@nutui/nutui 4.1.0-beta.5 → 4.1.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 (134) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/dist/nutui.es.js +1 -1
  3. package/dist/nutui.js +4651 -4662
  4. package/dist/nutui.umd.js +1 -1
  5. package/dist/packages/_es/ActionSheet.js +2 -2
  6. package/dist/packages/_es/Address.js +4 -3
  7. package/dist/packages/_es/AddressList.js +1 -1
  8. package/dist/packages/_es/Animate.js +1 -1
  9. package/dist/packages/_es/Audio.js +1 -1
  10. package/dist/packages/_es/AudioOperate.js +1 -1
  11. package/dist/packages/_es/Avatar.js +17 -79
  12. package/dist/packages/_es/AvatarGroup.js +91 -19
  13. package/dist/packages/_es/Backtop.js +1 -1
  14. package/dist/packages/_es/Badge.js +1 -1
  15. package/dist/packages/_es/Barrage.js +1 -1
  16. package/dist/packages/_es/Button.js +1 -1
  17. package/dist/packages/_es/Calendar.js +22 -24
  18. package/dist/packages/_es/CalendarItem.js +2 -2
  19. package/dist/packages/_es/Card.js +1 -1
  20. package/dist/packages/_es/Cascader.js +2 -2
  21. package/dist/packages/_es/Category.js +1 -1
  22. package/dist/packages/_es/CategoryPane.js +1 -1
  23. package/dist/packages/_es/Cell.js +1 -1
  24. package/dist/packages/_es/CellGroup.js +1 -1
  25. package/dist/packages/_es/Checkbox.js +1 -1
  26. package/dist/packages/_es/CheckboxGroup.js +1 -1
  27. package/dist/packages/_es/CircleProgress.js +1 -1
  28. package/dist/packages/_es/Col.js +1 -1
  29. package/dist/packages/_es/Collapse.js +1 -1
  30. package/dist/packages/_es/CollapseItem.js +1 -1
  31. package/dist/packages/_es/Comment.js +1 -1
  32. package/dist/packages/_es/ConfigProvider.js +1 -1
  33. package/dist/packages/_es/Countdown.js +1 -1
  34. package/dist/packages/_es/Countup.js +1 -1
  35. package/dist/packages/_es/DatePicker.js +1 -1
  36. package/dist/packages/_es/Dialog.js +4 -4
  37. package/dist/packages/_es/Divider.js +1 -1
  38. package/dist/packages/_es/Drag.js +1 -1
  39. package/dist/packages/_es/Ecard.js +1 -1
  40. package/dist/packages/_es/Elevator.js +1 -1
  41. package/dist/packages/_es/Ellipsis.js +1 -1
  42. package/dist/packages/_es/Empty.js +1 -1
  43. package/dist/packages/_es/FixedNav.js +1 -1
  44. package/dist/packages/_es/Form.js +26 -21
  45. package/dist/packages/_es/FormItem.js +1 -1
  46. package/dist/packages/_es/Grid.js +2 -2
  47. package/dist/packages/_es/GridItem.js +2 -2
  48. package/dist/packages/_es/Image.js +1 -1
  49. package/dist/packages/_es/ImagePreview.js +4 -4
  50. package/dist/packages/_es/Indicator.js +1 -1
  51. package/dist/packages/_es/InfiniteLoading.js +1 -1
  52. package/dist/packages/_es/Input.js +1 -1
  53. package/dist/packages/_es/InputNumber.js +23 -2
  54. package/dist/packages/_es/{Interceptor-883a3078.js → Interceptor-c05a39f2.js} +1 -1
  55. package/dist/packages/_es/Invoice.js +3 -3
  56. package/dist/packages/_es/Layout.js +1 -1
  57. package/dist/packages/_es/List.js +1 -1
  58. package/dist/packages/_es/Menu.js +1 -1
  59. package/dist/packages/_es/MenuItem.js +2 -2
  60. package/dist/packages/_es/Navbar.js +42 -89
  61. package/dist/packages/_es/Noticebar.js +1 -1
  62. package/dist/packages/_es/Notify.js +2 -2
  63. package/dist/packages/_es/NumberKeyboard.js +2 -2
  64. package/dist/packages/_es/Overlay.js +1 -1
  65. package/dist/packages/_es/Pagination.js +1 -1
  66. package/dist/packages/_es/Picker.js +1 -1
  67. package/dist/packages/_es/Popover.js +2 -2
  68. package/dist/packages/_es/Popup.js +2 -2
  69. package/dist/packages/_es/Price.js +1 -1
  70. package/dist/packages/_es/Progress.js +1 -1
  71. package/dist/packages/_es/PullRefresh.js +1 -1
  72. package/dist/packages/_es/Radio.js +2 -2
  73. package/dist/packages/_es/RadioGroup.js +2 -2
  74. package/dist/packages/_es/Range.js +1 -1
  75. package/dist/packages/_es/Rate.js +1 -1
  76. package/dist/packages/_es/Row.js +1 -1
  77. package/dist/packages/_es/Searchbar.js +1 -1
  78. package/dist/packages/_es/ShortPassword.js +2 -2
  79. package/dist/packages/_es/SideNavbar.js +1 -1
  80. package/dist/packages/_es/SideNavbarItem.js +1 -1
  81. package/dist/packages/_es/Signature.js +1 -1
  82. package/dist/packages/_es/Skeleton.js +1 -1
  83. package/dist/packages/_es/Sku.js +2 -2
  84. package/dist/packages/_es/Step.js +1 -1
  85. package/dist/packages/_es/Steps.js +1 -1
  86. package/dist/packages/_es/Sticky.js +5 -1
  87. package/dist/packages/_es/SubSideNavbar.js +1 -1
  88. package/dist/packages/_es/Swipe.js +1 -1
  89. package/dist/packages/_es/Swiper.js +1 -1
  90. package/dist/packages/_es/SwiperItem.js +1 -1
  91. package/dist/packages/_es/Switch.js +1 -1
  92. package/dist/packages/_es/TabPane.js +1 -1
  93. package/dist/packages/_es/Tabbar.js +1 -1
  94. package/dist/packages/_es/TabbarItem.js +1 -1
  95. package/dist/packages/_es/Table.js +1 -1
  96. package/dist/packages/_es/Tabs.js +1 -1
  97. package/dist/packages/_es/Tag.js +1 -1
  98. package/dist/packages/_es/Textarea.js +1 -1
  99. package/dist/packages/_es/TimeDetail.js +1 -1
  100. package/dist/packages/_es/TimePannel.js +1 -1
  101. package/dist/packages/_es/TimeSelect.js +2 -2
  102. package/dist/packages/_es/Toast.js +2 -2
  103. package/dist/packages/_es/Tour.js +2 -2
  104. package/dist/packages/_es/TrendArrow.js +1 -1
  105. package/dist/packages/_es/Uploader.js +25 -18
  106. package/dist/packages/_es/Video.js +1 -1
  107. package/dist/packages/_es/Watermark.js +1 -1
  108. package/dist/packages/_es/{common-3cfd9c50.js → common-8775d905.js} +1 -1
  109. package/dist/packages/_es/{component-470275dd.js → component-0fbad28e.js} +2 -2
  110. package/dist/packages/_es/{index-02204c4b.js → index-3a5098e4.js} +14 -12
  111. package/dist/packages/_es/{index-412323a0.js → index-5ffbc437.js} +1 -1
  112. package/dist/packages/_es/{index.vue_vue_type_script_lang-0b4f12ed.js → index.vue_vue_type_script_lang-2852286e.js} +1 -1
  113. package/dist/packages/_es/{index.vue_vue_type_script_lang-9ebe2e75.js → index.vue_vue_type_script_lang-cdf21a24.js} +1 -1
  114. package/dist/packages/_es/{mountComponent-f893becf.js → mountComponent-a895e3f1.js} +1 -1
  115. package/dist/packages/avatargroup/index.scss +0 -3
  116. package/dist/packages/navbar/index.scss +1 -0
  117. package/dist/smartips/web-types.json +132 -6
  118. package/dist/style.css +1 -1
  119. package/dist/styles/themes/default.scss +51 -153
  120. package/dist/styles/themes/jdb.scss +51 -153
  121. package/dist/styles/themes/jddkh.scss +51 -153
  122. package/dist/styles/themes/jdt.scss +51 -153
  123. package/dist/types/__VUE/avatar/index.vue.d.ts +11 -27
  124. package/dist/types/__VUE/avatar/types.d.ts +3 -0
  125. package/dist/types/__VUE/avatargroup/index.vue.d.ts +18 -15
  126. package/dist/types/__VUE/calendar/index.vue.d.ts +1 -1
  127. package/dist/types/__VUE/calendaritem/index.vue.d.ts +7 -8
  128. package/dist/types/__VUE/calendaritem/type.d.ts +0 -1
  129. package/dist/types/__VUE/form/common.d.ts +2 -2
  130. package/dist/types/__VUE/form/index.vue.d.ts +4 -4
  131. package/dist/types/__VUE/navbar/index.vue.d.ts +8 -5
  132. package/dist/types/__VUE/uploader/index.vue.d.ts +40 -4
  133. package/dist/types/index.d.ts +1 -1
  134. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  import { resolveComponent, openBlock, createElementBlock, createElementVNode, createCommentVNode, normalizeClass, toDisplayString, renderSlot, createVNode, ref, watch, onMounted, Fragment, renderList, createBlock, computed, withCtx, normalizeStyle, createTextVNode } from "vue";
2
- import { c as createComponent } from "./component-470275dd.js";
2
+ import { c as createComponent } from "./component-0fbad28e.js";
3
3
  import { Right, Fabulous, Comment, MoreX } from "@nutui/icons-vue";
4
4
  import Rate from "./Rate.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-470275dd.js";
1
+ import { c as createComponent } from "./component-0fbad28e.js";
2
2
  import { h } from "vue";
3
3
  import "../locale/lang";
4
4
  const { create } = createComponent("config-provider");
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  import { reactive, computed, onBeforeMount, watch, toRefs, openBlock, createElementBlock, normalizeClass, renderSlot } from "vue";
21
- import { p as padZero, c as createComponent } from "./component-470275dd.js";
21
+ import { p as padZero, c as createComponent } from "./component-0fbad28e.js";
22
22
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
23
23
  import "../locale/lang";
24
24
  const getTimeStamp = (timeStr) => {
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  import { getCurrentInstance, ref, reactive, watch, nextTick, onMounted, onUnmounted, toRefs, openBlock, createElementBlock, Fragment, normalizeStyle, renderList, createCommentVNode, toDisplayString, createTextVNode } from "vue";
21
- import { c as createComponent } from "./component-470275dd.js";
21
+ import { c as createComponent } from "./component-0fbad28e.js";
22
22
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
23
23
  import "../locale/lang";
24
24
  function useExtend(apis) {
@@ -19,7 +19,7 @@ var __spreadValues = (a, b) => {
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  import { reactive, computed, onBeforeMount, watch, toRefs, resolveComponent, openBlock, createBlock, withCtx, renderSlot } from "vue";
21
21
  import Picker from "./Picker.js";
22
- import { c as createComponent, a as isDate$1, p as padZero } from "./component-470275dd.js";
22
+ import { c as createComponent, a as isDate$1, p as padZero } from "./component-0fbad28e.js";
23
23
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
24
24
  import "./pxCheck-c6b9f6b7.js";
25
25
  import "./index-7a7385e4.js";
@@ -22,14 +22,14 @@ var __publicField = (obj, key, value) => {
22
22
  return value;
23
23
  };
24
24
  import { ref, onMounted, watch, computed, resolveComponent, openBlock, createBlock, normalizeStyle, withCtx, createElementVNode, normalizeClass, createElementBlock, renderSlot, Fragment, createTextVNode, toDisplayString, createCommentVNode, resolveDynamicComponent, nextTick, h } from "vue";
25
- import { c as createComponent } from "./component-470275dd.js";
26
- import { f as funInterceptor } from "./Interceptor-883a3078.js";
27
- import { P as Popup, p as popupProps } from "./index-412323a0.js";
25
+ import { c as createComponent } from "./component-0fbad28e.js";
26
+ import { f as funInterceptor } from "./Interceptor-c05a39f2.js";
27
+ import { P as Popup, p as popupProps } from "./index-5ffbc437.js";
28
28
  import Button from "./Button.js";
29
29
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
30
30
  import Overlay from "./Overlay.js";
31
31
  import "../locale/lang";
32
- import { C as CreateComponent } from "./mountComponent-f893becf.js";
32
+ import { C as CreateComponent } from "./mountComponent-a895e3f1.js";
33
33
  import "@nutui/icons-vue";
34
34
  const { componentName, create, translate } = createComponent("dialog");
35
35
  const _sfc_main = create({
@@ -1,5 +1,5 @@
1
1
  import { computed, openBlock, createElementBlock, normalizeClass, renderSlot, createCommentVNode } from "vue";
2
- import { c as createComponent } from "./component-470275dd.js";
2
+ import { c as createComponent } from "./component-0fbad28e.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("divider");
@@ -1,5 +1,5 @@
1
1
  import { ref, reactive, computed, onMounted, onActivated, onDeactivated, openBlock, createElementBlock, normalizeClass, renderSlot } from "vue";
2
- import { c as createComponent } from "./component-470275dd.js";
2
+ import { c as createComponent } from "./component-0fbad28e.js";
3
3
  import { r as requestAniFrame } from "./raf-729dad54.js";
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, watch, resolveComponent, openBlock, createElementBlock, createElementVNode, toDisplayString, Fragment, renderList, normalizeClass, withDirectives, vModelText, createTextVNode, createVNode } from "vue";
2
- import { c as createComponent } from "./component-470275dd.js";
2
+ import { c as createComponent } from "./component-0fbad28e.js";
3
3
  import InputNumber from "./InputNumber.js";
4
4
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
5
5
  import "../locale/lang";
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  import { ref, reactive, computed, onMounted, watch, nextTick, toRefs, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle, Fragment, renderList, toDisplayString, renderSlot, withDirectives, vShow, createCommentVNode, withModifiers } from "vue";
21
- import { c as createComponent } from "./component-470275dd.js";
21
+ import { c as createComponent } from "./component-0fbad28e.js";
22
22
  import { u as useExpose } from "./index-79c5dc33.js";
23
23
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
24
24
  import "../locale/lang";
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  import { ref, reactive, computed, watch, onMounted, toRefs, openBlock, createElementBlock, normalizeClass, toDisplayString, createCommentVNode, createTextVNode, withModifiers } from "vue";
21
- import { c as createComponent } from "./component-470275dd.js";
21
+ import { c as createComponent } from "./component-0fbad28e.js";
22
22
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
23
23
  import "../locale/lang";
24
24
  const { componentName, create } = createComponent("ellipsis");
@@ -1,5 +1,5 @@
1
1
  import { toRefs, computed, openBlock, createElementBlock, createElementVNode, normalizeStyle, renderSlot, Fragment, createCommentVNode, toDisplayString } from "vue";
2
- import { c as createComponent } from "./component-470275dd.js";
2
+ import { c as createComponent } from "./component-0fbad28e.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("empty");
@@ -1,4 +1,4 @@
1
- import { c as createComponent } from "./component-470275dd.js";
1
+ import { c as createComponent } from "./component-0fbad28e.js";
2
2
  import { computed, ref, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, createBlock, createCommentVNode, renderSlot, createElementVNode, Fragment, renderList, toDisplayString, createVNode } from "vue";
3
3
  import Overlay from "./Overlay.js";
4
4
  import { Left } from "@nutui/icons-vue";
@@ -33,8 +33,8 @@ var __async = (__this, __arguments, generator) => {
33
33
  step((generator = generator.apply(__this, __arguments)).next());
34
34
  });
35
35
  };
36
- import { g as isObject, h as getPropByPath, f as isPromise, c as createComponent } from "./component-470275dd.js";
37
- import { computed, reactive, provide, watch, resolveComponent, openBlock, createElementBlock, withModifiers, createVNode, withCtx, renderSlot } from "vue";
36
+ import { g as getPropByPath, f as isPromise, h as isObject, c as createComponent } from "./component-0fbad28e.js";
37
+ import { computed, reactive, provide, watch, isVNode, resolveComponent, openBlock, createElementBlock, withModifiers, createVNode, withCtx, renderSlot } from "vue";
38
38
  import CellGroup from "./CellGroup.js";
39
39
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
40
40
  import "../locale/lang";
@@ -43,11 +43,11 @@ const component = (components) => {
43
43
  props: {
44
44
  modelValue: {
45
45
  type: Object,
46
- default: {}
46
+ default: () => ({})
47
47
  },
48
48
  rules: {
49
49
  type: Object,
50
- default: {}
50
+ default: () => ({})
51
51
  }
52
52
  },
53
53
  components,
@@ -71,25 +71,30 @@ const component = (components) => {
71
71
  { immediate: true }
72
72
  );
73
73
  const findFormItem = (vnodes) => {
74
- let task = [];
75
- vnodes.forEach((vnode) => {
76
- var _a, _b, _c, _d;
77
- let type = vnode.type;
78
- type = type.name || type;
79
- if (type == "nut-form-item" || (type == null ? void 0 : type.toString().endsWith("form-item"))) {
80
- task.push({
81
- prop: (_a = vnode.props) == null ? void 0 : _a["prop"],
82
- rules: ((_b = vnode.props) == null ? void 0 : _b["rules"]) || []
83
- });
84
- } else if (Array.isArray(vnode.children) && ((_c = vnode.children) == null ? void 0 : _c.length)) {
85
- task = task.concat(findFormItem(vnode.children));
86
- } else if (isObject(vnode.children) && Object.keys(vnode.children)) {
87
- if ((_d = vnode.children) == null ? void 0 : _d.default) {
88
- vnode.children = vnode.children.default();
89
- task = task.concat(findFormItem(vnode.children));
74
+ const task = [];
75
+ const search = (vnode) => {
76
+ var _a, _b, _c, _d, _e;
77
+ if (isVNode(vnode)) {
78
+ const type = ((_a = vnode == null ? void 0 : vnode.type) == null ? void 0 : _a.name) || (vnode == null ? void 0 : vnode.type);
79
+ if (type == "nut-form-item" || (type == null ? void 0 : type.toString().endsWith("form-item"))) {
80
+ task.push({
81
+ prop: (_b = vnode.props) == null ? void 0 : _b["prop"],
82
+ rules: ((_c = vnode.props) == null ? void 0 : _c["rules"]) || []
83
+ });
84
+ } else if (Array.isArray(vnode.children) && ((_d = vnode.children) == null ? void 0 : _d.length)) {
85
+ search(vnode.children);
86
+ } else if (isObject(vnode.children) && Object.keys(vnode.children)) {
87
+ if ((_e = vnode.children) == null ? void 0 : _e.default) {
88
+ search(vnode.children.default());
89
+ }
90
90
  }
91
+ } else if (Array.isArray(vnode)) {
92
+ vnode.forEach((v) => {
93
+ search(v);
94
+ });
91
95
  }
92
- });
96
+ };
97
+ search(vnodes);
93
98
  return task;
94
99
  };
95
100
  const tipMessage = (errorMsg) => {
@@ -1,6 +1,6 @@
1
1
  import { p as pxCheck } from "./pxCheck-c6b9f6b7.js";
2
2
  import { inject, provide, computed, resolveComponent, openBlock, createBlock, normalizeClass, normalizeStyle, withCtx, createElementBlock, renderSlot, createTextVNode, toDisplayString, createCommentVNode, createElementVNode } from "vue";
3
- import { c as createComponent } from "./component-470275dd.js";
3
+ import { c as createComponent } from "./component-0fbad28e.js";
4
4
  import Cell from "./Cell.js";
5
5
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
6
6
  import "../locale/lang";
@@ -1,6 +1,6 @@
1
- import { c as createComponent } from "./component-470275dd.js";
1
+ import { c as createComponent } from "./component-0fbad28e.js";
2
2
  import "vue";
3
- import { c as component } from "./common-3cfd9c50.js";
3
+ import { c as component } from "./common-8775d905.js";
4
4
  import "../locale/lang";
5
5
  import "./pxCheck-c6b9f6b7.js";
6
6
  const { create } = createComponent("grid");
@@ -1,8 +1,8 @@
1
1
  import { inject, getCurrentInstance, onUnmounted, computed, ref, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, renderSlot, Fragment, createTextVNode, toDisplayString } from "vue";
2
2
  import { u as useRouter } from "./index-54d03fc1.js";
3
- import { c as createComponent } from "./component-470275dd.js";
3
+ import { c as createComponent } from "./component-0fbad28e.js";
4
4
  import { p as pxCheck } from "./pxCheck-c6b9f6b7.js";
5
- import { G as GRID_KEY } from "./common-3cfd9c50.js";
5
+ import { G as GRID_KEY } from "./common-8775d905.js";
6
6
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
7
7
  import "../locale/lang";
8
8
  function useInject(key) {
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  import { reactive, useSlots, computed, ref, onMounted, onBeforeUnmount, watch, toRefs, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, createBlock, createCommentVNode, renderSlot } from "vue";
21
- import { c as createComponent } from "./component-470275dd.js";
21
+ import { c as createComponent } from "./component-0fbad28e.js";
22
22
  import { p as pxCheck } from "./pxCheck-c6b9f6b7.js";
23
23
  import { Image, ImageError } from "@nutui/icons-vue";
24
24
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
@@ -23,18 +23,18 @@ var __publicField = (obj, key, value) => {
23
23
  return value;
24
24
  };
25
25
  import { reactive, computed, watch, toRefs, resolveComponent, openBlock, createBlock, withCtx, createElementVNode, normalizeStyle, createElementBlock, createCommentVNode, ref, onMounted, Fragment, renderList, toDisplayString, normalizeClass, renderSlot, createVNode, nextTick, h } from "vue";
26
- import { c as createComponent, e as clamp, d as preventDefault, i as isArray } from "./component-470275dd.js";
26
+ import { c as createComponent, e as clamp, d as preventDefault, i as isArray } from "./component-0fbad28e.js";
27
27
  import { u as useRect } from "./index-29892cda.js";
28
28
  import { u as useTouch } from "./index-7a7385e4.js";
29
29
  import Video from "./Video.js";
30
30
  import SwiperItem from "./SwiperItem.js";
31
31
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
32
32
  import { CircleClose } from "@nutui/icons-vue";
33
- import { P as Popup } from "./index-412323a0.js";
33
+ import { P as Popup } from "./index-5ffbc437.js";
34
34
  import Swiper from "./Swiper.js";
35
- import { f as funInterceptor } from "./Interceptor-883a3078.js";
35
+ import { f as funInterceptor } from "./Interceptor-c05a39f2.js";
36
36
  import "../locale/lang";
37
- import { C as CreateComponent } from "./mountComponent-f893becf.js";
37
+ import { C as CreateComponent } from "./mountComponent-a895e3f1.js";
38
38
  import Overlay from "./Overlay.js";
39
39
  import "./index-79c5dc33.js";
40
40
  import "./raf-729dad54.js";
@@ -1,5 +1,5 @@
1
1
  import { toRefs, computed, openBlock, createElementBlock, normalizeClass, Fragment, renderList, toDisplayString } from "vue";
2
- import { p as padZero, c as createComponent } from "./component-470275dd.js";
2
+ import { p as padZero, c as createComponent } from "./component-0fbad28e.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("indicator");
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  import { ref, reactive, computed, onMounted, onUnmounted, onActivated, onDeactivated, watch, toRefs, nextTick, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, renderSlot, createVNode, toDisplayString, createCommentVNode } from "vue";
21
- import { c as createComponent, l as getScrollTopRoot } from "./component-470275dd.js";
21
+ import { c as createComponent, l as getScrollTopRoot } from "./component-0fbad28e.js";
22
22
  import { u as useScrollParent } from "./index-97b44e6c.js";
23
23
  import { r as requestAniFrame } from "./raf-729dad54.js";
24
24
  import { Loading } from "@nutui/icons-vue";
@@ -15,7 +15,7 @@ var __spreadValues = (a, b) => {
15
15
  return a;
16
16
  };
17
17
  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";
18
- import { c as createComponent } from "./component-470275dd.js";
18
+ import { c as createComponent } from "./component-0fbad28e.js";
19
19
  import { MaskClose } from "@nutui/icons-vue";
20
20
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
21
21
  import "../locale/lang";
@@ -1,5 +1,5 @@
1
- import { computed, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, renderSlot, createVNode, normalizeStyle } from "vue";
2
- import { c as createComponent } from "./component-470275dd.js";
1
+ import { computed, watch, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, renderSlot, createVNode, normalizeStyle } from "vue";
2
+ import { c as createComponent } from "./component-0fbad28e.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";
@@ -112,6 +112,27 @@ const _sfc_main = create({
112
112
  emitChange(value, event);
113
113
  emit("blur", event);
114
114
  };
115
+ const format = (val) => {
116
+ let value = Number(val);
117
+ if (value < Number(props.min)) {
118
+ value = Number(props.min);
119
+ } else if (value > Number(props.max)) {
120
+ value = Number(props.max);
121
+ }
122
+ return value;
123
+ };
124
+ watch(
125
+ () => [props.max, props.min],
126
+ () => {
127
+ if (Number(props.min) > Number(props.max)) {
128
+ console.warn("[NutUI] <InputNumber>", "props.max < props.min");
129
+ }
130
+ const value = format(props.modelValue);
131
+ if (value !== Number(props.modelValue)) {
132
+ emitChange(value, {});
133
+ }
134
+ }
135
+ );
115
136
  return {
116
137
  classes,
117
138
  change,
@@ -1,4 +1,4 @@
1
- import { f as isPromise } from "./component-470275dd.js";
1
+ import { f as isPromise } from "./component-0fbad28e.js";
2
2
  const funInterceptor = (interceptor, {
3
3
  args = [],
4
4
  done,
@@ -18,11 +18,11 @@ var __spreadValues = (a, b) => {
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  import { ref, reactive, computed, onMounted, watch, toRefs, resolveComponent, openBlock, createElementBlock, normalizeClass, createVNode, withCtx, Fragment, renderList, createBlock, createTextVNode, toDisplayString, withDirectives, vModelText, createCommentVNode } from "vue";
21
- import { c as createComponent } from "./component-470275dd.js";
21
+ import { c as createComponent } from "./component-0fbad28e.js";
22
22
  import Form from "./Form.js";
23
23
  import FormItem from "./FormItem.js";
24
- import { _ as _sfc_main$1 } from "./index.vue_vue_type_script_lang-9ebe2e75.js";
25
- import { _ as _sfc_main$2 } from "./index.vue_vue_type_script_lang-0b4f12ed.js";
24
+ import { _ as _sfc_main$1 } from "./index.vue_vue_type_script_lang-cdf21a24.js";
25
+ import { _ as _sfc_main$2 } from "./index.vue_vue_type_script_lang-2852286e.js";
26
26
  import Button from "./Button.js";
27
27
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
28
28
  import "../locale/lang";
@@ -1,4 +1,4 @@
1
- import { c as createComponent } from "./component-470275dd.js";
1
+ import { c as createComponent } from "./component-0fbad28e.js";
2
2
  import "vue";
3
3
  import "../locale/lang";
4
4
  const { create } = createComponent("layout");
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  import { ref, reactive, computed, watch, toRefs, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, Fragment, renderList, renderSlot } from "vue";
21
- import { c as createComponent } from "./component-470275dd.js";
21
+ import { c as createComponent } from "./component-0fbad28e.js";
22
22
  import { u as useRect } from "./index-29892cda.js";
23
23
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
24
24
  import "../locale/lang";
@@ -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-470275dd.js";
2
+ import { c as createComponent } from "./component-0fbad28e.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";
@@ -18,8 +18,8 @@ var __spreadValues = (a, b) => {
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  import { reactive, computed, inject, getCurrentInstance, onUnmounted, resolveComponent, withDirectives, openBlock, createElementBlock, normalizeStyle, createElementVNode, vShow, createVNode, mergeProps, withCtx, Fragment, renderList, normalizeClass, renderSlot, createCommentVNode, toDisplayString } from "vue";
21
- import { c as createComponent } from "./component-470275dd.js";
22
- import { P as Popup } from "./index-412323a0.js";
21
+ import { c as createComponent } from "./component-0fbad28e.js";
22
+ import { P as Popup } from "./index-5ffbc437.js";
23
23
  import { Check } from "@nutui/icons-vue";
24
24
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
25
25
  import "../locale/lang";
@@ -1,5 +1,5 @@
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-470275dd.js";
1
+ import { toRefs, ref, computed, onMounted, nextTick, resolveComponent, openBlock, createElementBlock, normalizeStyle, createElementVNode, normalizeClass, renderSlot, createVNode, createCommentVNode, toDisplayString } from "vue";
2
+ import { c as createComponent } from "./component-0fbad28e.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";
@@ -41,10 +41,9 @@ const _sfc_main = create({
41
41
  },
42
42
  emits: ["on-click-back", "on-click-title", "on-click-icon", "on-click-right"],
43
43
  setup(props, { emit }) {
44
- const { border, fixed, safeAreaInsetTop, placeholder, zIndex } = toRefs(props);
45
- const navBarWrap = ref(null);
46
- const navBarHtml = ref(null);
47
- let navHeight = ref();
44
+ const { border, fixed, safeAreaInsetTop, placeholder } = toRefs(props);
45
+ const navHeight = ref("auto");
46
+ const navbarRef = ref();
48
47
  const classes = computed(() => {
49
48
  const prefixCls = componentName;
50
49
  return {
@@ -54,37 +53,44 @@ const _sfc_main = create({
54
53
  [`${prefixCls}--safe-area-inset-top`]: safeAreaInsetTop.value
55
54
  };
56
55
  });
57
- const styles = computed(() => {
58
- return {
59
- zIndex: zIndex.value
60
- };
56
+ const rootStyle = computed(() => {
57
+ if (fixed.value && placeholder.value) {
58
+ return {
59
+ height: navHeight.value
60
+ };
61
+ }
62
+ return {};
61
63
  });
64
+ const getNavHeight = () => {
65
+ if (navbarRef.value) {
66
+ const rect = navbarRef.value.getBoundingClientRect();
67
+ navHeight.value = `${rect.height}px`;
68
+ }
69
+ };
62
70
  onMounted(() => {
63
71
  if (fixed.value && placeholder.value) {
64
72
  nextTick(() => {
65
- var _a;
66
- navHeight.value = (_a = navBarHtml == null ? void 0 : navBarHtml.value) == null ? void 0 : _a.getBoundingClientRect().height;
67
- navBarWrap.value.style.height = navHeight.value + "px";
73
+ getNavHeight();
68
74
  });
69
75
  }
70
76
  });
71
- function handleLeft() {
77
+ const handleLeft = () => {
72
78
  emit("on-click-back");
73
- }
74
- function handleCenter() {
79
+ };
80
+ const handleCenter = () => {
75
81
  emit("on-click-title");
76
- }
77
- function handleCenterIcon() {
82
+ };
83
+ const handleCenterIcon = () => {
78
84
  emit("on-click-icon");
79
- }
80
- function handleRight() {
85
+ };
86
+ const handleRight = () => {
81
87
  emit("on-click-right");
82
- }
88
+ };
83
89
  return {
84
- navBarWrap,
85
- navBarHtml,
90
+ navbarRef,
91
+ rootStyle,
86
92
  classes,
87
- styles,
93
+ navHeight,
88
94
  handleLeft,
89
95
  handleCenter,
90
96
  handleCenterIcon,
@@ -93,35 +99,24 @@ const _sfc_main = create({
93
99
  }
94
100
  });
95
101
  const _hoisted_1 = {
96
- key: 0,
97
- class: "nut-navbar--placeholder",
98
- ref: "navBarWrap"
99
- };
100
- const _hoisted_2 = {
101
- key: 1,
102
- class: "nut-navbar__text"
103
- };
104
- const _hoisted_3 = { class: "nut-navbar__title" };
105
- const _hoisted_4 = {
106
- key: 0,
107
- class: "nut-navbar__text"
108
- };
109
- const _hoisted_5 = {
110
102
  key: 1,
111
103
  class: "nut-navbar__text"
112
104
  };
113
- const _hoisted_6 = { class: "nut-navbar__title" };
114
- const _hoisted_7 = {
105
+ const _hoisted_2 = { class: "nut-navbar__title" };
106
+ const _hoisted_3 = {
115
107
  key: 0,
116
108
  class: "nut-navbar__text"
117
109
  };
118
110
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
119
111
  const _component_Left = resolveComponent("Left");
120
- return _ctx.fixed && _ctx.placeholder ? (openBlock(), createElementBlock("view", _hoisted_1, [
112
+ return openBlock(), createElementBlock("view", {
113
+ class: "nut-navbar--placeholder",
114
+ style: normalizeStyle(_ctx.rootStyle)
115
+ }, [
121
116
  createElementVNode("view", {
122
117
  class: normalizeClass(_ctx.classes),
123
- style: normalizeStyle(_ctx.styles),
124
- ref: "navBarHtml"
118
+ style: normalizeStyle({ zIndex: _ctx.zIndex }),
119
+ ref: "navbarRef"
125
120
  }, [
126
121
  createElementVNode("view", {
127
122
  class: "nut-navbar__left",
@@ -133,10 +128,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
133
128
  color: "#979797"
134
129
  })
135
130
  ]) : createCommentVNode("", true),
136
- _ctx.leftText ? (openBlock(), createElementBlock("view", _hoisted_2, toDisplayString(_ctx.leftText), 1)) : createCommentVNode("", true),
131
+ _ctx.leftText ? (openBlock(), createElementBlock("view", _hoisted_1, toDisplayString(_ctx.leftText), 1)) : createCommentVNode("", true),
137
132
  renderSlot(_ctx.$slots, "left")
138
133
  ]),
139
- createElementVNode("view", _hoisted_3, [
134
+ createElementVNode("view", _hoisted_2, [
140
135
  _ctx.title ? (openBlock(), createElementBlock("view", {
141
136
  key: 0,
142
137
  class: "title",
@@ -157,53 +152,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
157
152
  class: "nut-navbar__right",
158
153
  onClick: _cache[4] || (_cache[4] = (...args) => _ctx.handleRight && _ctx.handleRight(...args))
159
154
  }, [
160
- _ctx.desc ? (openBlock(), createElementBlock("view", _hoisted_4, toDisplayString(_ctx.desc), 1)) : createCommentVNode("", true),
155
+ _ctx.desc ? (openBlock(), createElementBlock("view", _hoisted_3, toDisplayString(_ctx.desc), 1)) : createCommentVNode("", true),
161
156
  renderSlot(_ctx.$slots, "right")
162
157
  ])
163
158
  ], 6)
164
- ], 512)) : (openBlock(), createElementBlock("view", {
165
- key: 1,
166
- class: normalizeClass(_ctx.classes),
167
- style: normalizeStyle(_ctx.styles)
168
- }, [
169
- createElementVNode("view", {
170
- class: "nut-navbar__left",
171
- onClick: _cache[5] || (_cache[5] = (...args) => _ctx.handleLeft && _ctx.handleLeft(...args))
172
- }, [
173
- _ctx.leftShow ? renderSlot(_ctx.$slots, "left-show", { key: 0 }, () => [
174
- createVNode(_component_Left, {
175
- height: "12px",
176
- color: "#979797"
177
- })
178
- ]) : createCommentVNode("", true),
179
- _ctx.leftText ? (openBlock(), createElementBlock("view", _hoisted_5, toDisplayString(_ctx.leftText), 1)) : createCommentVNode("", true),
180
- renderSlot(_ctx.$slots, "left")
181
- ]),
182
- createElementVNode("view", _hoisted_6, [
183
- _ctx.title ? (openBlock(), createElementBlock("view", {
184
- key: 0,
185
- class: "title",
186
- onClick: _cache[6] || (_cache[6] = (...args) => _ctx.handleCenter && _ctx.handleCenter(...args))
187
- }, toDisplayString(_ctx.title), 1)) : createCommentVNode("", true),
188
- _ctx.titleIcon ? (openBlock(), createElementBlock("view", {
189
- key: 1,
190
- class: "icon",
191
- onClick: _cache[8] || (_cache[8] = (...args) => _ctx.handleCenterIcon && _ctx.handleCenterIcon(...args))
192
- }, [
193
- renderSlot(_ctx.$slots, "title-icon", {
194
- onClick: _cache[7] || (_cache[7] = (...args) => _ctx.handleCenterIcon && _ctx.handleCenterIcon(...args))
195
- })
196
- ])) : createCommentVNode("", true),
197
- renderSlot(_ctx.$slots, "content")
198
- ]),
199
- createElementVNode("view", {
200
- class: "nut-navbar__right",
201
- onClick: _cache[9] || (_cache[9] = (...args) => _ctx.handleRight && _ctx.handleRight(...args))
202
- }, [
203
- _ctx.desc ? (openBlock(), createElementBlock("view", _hoisted_7, toDisplayString(_ctx.desc), 1)) : createCommentVNode("", true),
204
- renderSlot(_ctx.$slots, "right")
205
- ])
206
- ], 6));
159
+ ], 4);
207
160
  }
208
161
  const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
209
162
  export {
@@ -19,7 +19,7 @@ var __spreadValues = (a, b) => {
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  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";
21
21
  import { Notice, CircleClose } from "@nutui/icons-vue";
22
- import { c as createComponent } from "./component-470275dd.js";
22
+ import { c as createComponent } from "./component-0fbad28e.js";
23
23
  import { p as pxCheck } from "./pxCheck-c6b9f6b7.js";
24
24
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
25
25
  import "../locale/lang";
@@ -18,8 +18,8 @@ var __spreadValues = (a, b) => {
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  import { ref, watch, resolveComponent, openBlock, createBlock, withCtx, createElementVNode, normalizeClass, normalizeStyle, renderSlot, createElementBlock, Fragment, createTextVNode, toDisplayString, createVNode, render, onMounted, h } from "vue";
21
- import { c as createComponent } from "./component-470275dd.js";
22
- import { P as Popup } from "./index-412323a0.js";
21
+ import { c as createComponent } from "./component-0fbad28e.js";
22
+ import { P as Popup } from "./index-5ffbc437.js";
23
23
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
24
24
  import "../locale/lang";
25
25
  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-470275dd.js";
3
- import { P as Popup } from "./index-412323a0.js";
2
+ import { c as createComponent } from "./component-0fbad28e.js";
3
+ import { P as Popup } from "./index-5ffbc437.js";
4
4
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
5
5
  import "../locale/lang";
6
6
  import "./Overlay.js";