@nutui/nutui 4.2.2 → 4.2.4

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 (210) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/README.md +34 -21
  3. package/dist/nutui.es.js +1 -1
  4. package/dist/nutui.js +6465 -6441
  5. package/dist/nutui.umd.js +1 -1
  6. package/dist/packages/{Interceptor-6aab6fe0.js → Interceptor-WYVtGbGC.js} +1 -1
  7. package/dist/packages/actionsheet/ActionSheet.js +4 -4
  8. package/dist/packages/address/Address.js +5 -6
  9. package/dist/packages/addresslist/AddressList.js +6 -5
  10. package/dist/packages/animate/Animate.js +2 -2
  11. package/dist/packages/audio/Audio.js +5 -5
  12. package/dist/packages/audiooperate/AudioOperate.js +4 -4
  13. package/dist/packages/avatar/Avatar.js +5 -65
  14. package/dist/packages/avatarcropper/AvatarCropper.js +5 -5
  15. package/dist/packages/avatargroup/AvatarGroup.js +4 -4
  16. package/dist/packages/backtop/Backtop.js +3 -3
  17. package/dist/packages/badge/Badge.js +2 -2
  18. package/dist/packages/barrage/Barrage.js +2 -2
  19. package/dist/packages/button/Button.js +2 -2
  20. package/dist/packages/calendar/Calendar.js +9 -10
  21. package/dist/packages/calendaritem/CalendarItem.js +6 -7
  22. package/dist/packages/card/Card.js +2 -2
  23. package/dist/packages/cascader/Cascader.js +10 -10
  24. package/dist/packages/cascader/index.css +1 -1
  25. package/dist/packages/category/Category.js +2 -2
  26. package/dist/packages/categorypane/CategoryPane.js +2 -2
  27. package/dist/packages/cell/Cell.js +4 -4
  28. package/dist/packages/cellgroup/CellGroup.js +2 -2
  29. package/dist/packages/checkbox/Checkbox.js +149 -152
  30. package/dist/packages/checkboxgroup/CheckboxGroup.js +5 -5
  31. package/dist/packages/circleprogress/CircleProgress.js +3 -3
  32. package/dist/packages/col/Col.js +6 -5
  33. package/dist/packages/collapse/Collapse.js +7 -6
  34. package/dist/packages/collapseitem/CollapseItem.js +9 -9
  35. package/dist/packages/comment/Comment.js +7 -7
  36. package/dist/packages/{common-1579352e.js → common-4inKawxR.js} +2 -2
  37. package/dist/packages/configprovider/ConfigProvider.js +1 -1
  38. package/dist/packages/countdown/Countdown.js +4 -4
  39. package/dist/packages/countup/Countup.js +2 -2
  40. package/dist/packages/datepicker/DatePicker.js +6 -6
  41. package/dist/packages/dialog/Dialog.js +7 -7
  42. package/dist/packages/divider/Divider.js +4 -4
  43. package/dist/packages/drag/Drag.js +3 -3
  44. package/dist/packages/ecard/Ecard.js +5 -5
  45. package/dist/packages/elevator/Elevator.js +7 -8
  46. package/dist/packages/ellipsis/Ellipsis.js +2 -2
  47. package/dist/packages/empty/Empty.js +5 -5
  48. package/dist/packages/fixednav/FixedNav.js +4 -4
  49. package/dist/packages/form/Form.js +15 -46
  50. package/dist/packages/formitem/FormItem.js +38 -24
  51. package/dist/packages/formitem/index.css +1 -1
  52. package/dist/packages/formitem/index.scss +25 -0
  53. package/dist/packages/grid/Grid.js +3 -3
  54. package/dist/packages/griditem/GridItem.js +5 -5
  55. package/dist/packages/image/Image.js +3 -3
  56. package/dist/packages/imagepreview/ImagePreview.js +11 -11
  57. package/dist/packages/index--uVlasFu.js +69 -0
  58. package/dist/packages/{index-914a76f0.js → index-NLe0VBkN.js} +6 -7
  59. package/dist/packages/{index-37ae1f41.js → index-rbZsBckW.js} +2 -2
  60. package/dist/packages/{index-c0fa0f6b.js → index-s3RgMhc7.js} +1 -1
  61. package/dist/packages/{index.vue_vue_type_script_lang-0185ccea.js → index.vue_vue_type_script_lang-54PRh3YM.js} +3 -3
  62. package/dist/packages/{index.vue_vue_type_script_lang-825ed1e0.js → index.vue_vue_type_script_lang-MJYVRFbp.js} +14 -9
  63. package/dist/packages/indicator/Indicator.js +3 -3
  64. package/dist/packages/infiniteloading/InfiniteLoading.js +6 -6
  65. package/dist/packages/input/Input.js +2 -2
  66. package/dist/packages/inputnumber/InputNumber.js +4 -4
  67. package/dist/packages/invoice/Invoice.js +11 -7
  68. package/dist/packages/invoice/index.css +1 -1
  69. package/dist/packages/layout/Layout.js +1 -1
  70. package/dist/packages/list/List.js +3 -3
  71. package/dist/packages/locale/lang/en-US.js +1 -1
  72. package/dist/packages/locale/lang/id-ID.js +1 -1
  73. package/dist/packages/locale/lang/index.js +1 -1
  74. package/dist/packages/locale/lang/zh-CN.js +1 -1
  75. package/dist/packages/locale/lang/zh-TW.js +1 -1
  76. package/dist/packages/menu/Menu.js +17 -52
  77. package/dist/packages/menuitem/MenuItem.js +8 -18
  78. package/dist/packages/{mountComponent-867a9167.js → mountComponent-uInXoTMp.js} +1 -1
  79. package/dist/packages/navbar/Navbar.js +2 -2
  80. package/dist/packages/navbar/index.css +1 -1
  81. package/dist/packages/navbar/index.scss +5 -16
  82. package/dist/packages/noticebar/Noticebar.js +3 -3
  83. package/dist/packages/notify/Notify.js +4 -4
  84. package/dist/packages/numberkeyboard/NumberKeyboard.js +5 -5
  85. package/dist/packages/overlay/Overlay.js +3 -3
  86. package/dist/packages/pagination/Pagination.js +4 -4
  87. package/dist/packages/picker/Picker.js +6 -6
  88. package/dist/packages/popover/Popover.js +9 -8
  89. package/dist/packages/popup/Popup.js +4 -4
  90. package/dist/packages/price/Price.js +2 -2
  91. package/dist/packages/progress/Progress.js +2 -2
  92. package/dist/packages/pullrefresh/PullRefresh.js +7 -7
  93. package/dist/packages/radio/Radio.js +4 -3
  94. package/dist/packages/radio/index.css +1 -1
  95. package/dist/packages/radio/index.scss +21 -0
  96. package/dist/packages/radiogroup/RadioGroup.js +3 -2
  97. package/dist/packages/radiogroup/index.scss +0 -5
  98. package/dist/packages/range/Range.js +5 -7
  99. package/dist/packages/rate/Rate.js +5 -5
  100. package/dist/packages/row/Row.js +6 -5
  101. package/dist/packages/searchbar/Searchbar.js +5 -5
  102. package/dist/packages/shortpassword/ShortPassword.js +5 -5
  103. package/dist/packages/sidenavbar/SideNavbar.js +2 -2
  104. package/dist/packages/sidenavbaritem/SideNavbarItem.js +2 -2
  105. package/dist/packages/signature/Signature.js +4 -4
  106. package/dist/packages/skeleton/Skeleton.js +3 -3
  107. package/dist/packages/sku/Sku.js +6 -6
  108. package/dist/packages/space/Space.js +1 -1
  109. package/dist/packages/step/Step.js +4 -3
  110. package/dist/packages/steps/Steps.js +3 -2
  111. package/dist/packages/sticky/Sticky.js +4 -4
  112. package/dist/packages/subsidenavbar/SubSideNavbar.js +2 -2
  113. package/dist/packages/swipe/Swipe.js +5 -4
  114. package/dist/packages/swipegroup/SwipeGroup.js +4 -3
  115. package/dist/packages/swiper/Swiper.js +9 -9
  116. package/dist/packages/swiperitem/SwiperItem.js +11 -5
  117. package/dist/packages/switch/Switch.js +2 -2
  118. package/dist/packages/tabbar/Tabbar.js +5 -4
  119. package/dist/packages/tabbaritem/TabbarItem.js +6 -5
  120. package/dist/packages/table/Table.js +4 -4
  121. package/dist/packages/tabpane/TabPane.js +2 -2
  122. package/dist/packages/tabs/Tabs.js +9 -9
  123. package/dist/packages/tabs/index.css +1 -1
  124. package/dist/packages/tabs/index.scss +114 -117
  125. package/dist/packages/tag/Tag.js +2 -2
  126. package/dist/packages/textarea/Textarea.js +4 -4
  127. package/dist/packages/textarea/index.css +1 -1
  128. package/dist/packages/textarea/index.scss +1 -0
  129. package/dist/packages/timedetail/TimeDetail.js +2 -2
  130. package/dist/packages/timepannel/TimePannel.js +2 -2
  131. package/dist/packages/timeselect/TimeSelect.js +5 -5
  132. package/dist/packages/toast/Toast.js +5 -5
  133. package/dist/packages/tour/Tour.js +6 -6
  134. package/dist/packages/trendarrow/TrendArrow.js +3 -3
  135. package/dist/packages/types-4IflWeQO.js +4 -0
  136. package/dist/packages/types-9wCQwtH3.js +4 -0
  137. package/dist/packages/types-Cq2YypZn.js +4 -0
  138. package/dist/packages/types-RCVUm7Nb.js +4 -0
  139. package/dist/packages/types-Ww4ErYJT.js +4 -0
  140. package/dist/packages/types-Ynmct7na.js +4 -0
  141. package/dist/packages/types-j71K23JP.js +4 -0
  142. package/dist/packages/types-odSRziQJ.js +4 -0
  143. package/dist/packages/types-qOrhXtA_.js +4 -0
  144. package/dist/packages/types-zeKkNDAq.js +4 -0
  145. package/dist/packages/uploader/Uploader.js +5 -5
  146. package/dist/packages/useChildren-GU_NVfD8.js +54 -0
  147. package/dist/packages/useParent-KIxqkovs.js +16 -0
  148. package/dist/packages/video/Video.js +4 -4
  149. package/dist/packages/watermark/Watermark.js +2 -2
  150. package/dist/smartips/web-types.json +55 -1
  151. package/dist/style.css +1 -1
  152. package/dist/style.js +1 -4
  153. package/dist/types/__VUE/address/index.vue.d.ts +3 -3
  154. package/dist/types/__VUE/avatar/index.vue.d.ts +1 -1
  155. package/dist/types/__VUE/avatar/types.d.ts +1 -0
  156. package/dist/types/__VUE/avatargroup/index.vue.d.ts +2 -2
  157. package/dist/types/__VUE/cell/index.vue.d.ts +1 -1
  158. package/dist/types/__VUE/checkbox/index.vue.d.ts +72 -1
  159. package/dist/types/__VUE/checkbox/types.d.ts +1 -0
  160. package/dist/types/__VUE/col/index.vue.d.ts +1 -0
  161. package/dist/types/__VUE/collapse/index.vue.d.ts +4 -29
  162. package/dist/types/__VUE/collapse/types.d.ts +5 -0
  163. package/dist/types/__VUE/collapseitem/index.vue.d.ts +2 -1
  164. package/dist/types/__VUE/countup/index.vue.d.ts +2 -2
  165. package/dist/types/__VUE/divider/index.vue.d.ts +15 -1
  166. package/dist/types/__VUE/form/common.d.ts +9 -1
  167. package/dist/types/__VUE/form/index.vue.d.ts +18 -0
  168. package/dist/types/__VUE/form/types.d.ts +4 -1
  169. package/dist/types/__VUE/formitem/index.vue.d.ts +21 -1
  170. package/dist/types/__VUE/formitem/types.d.ts +2 -0
  171. package/dist/types/__VUE/grid/index.vue.d.ts +1 -1
  172. package/dist/types/__VUE/image/index.vue.d.ts +1 -1
  173. package/dist/types/__VUE/layout/types.d.ts +1 -0
  174. package/dist/types/__VUE/menu/index.vue.d.ts +18 -9
  175. package/dist/types/__VUE/menu/types.d.ts +6 -0
  176. package/dist/types/__VUE/menuitem/index.vue.d.ts +1 -1
  177. package/dist/types/__VUE/navbar/index.vue.d.ts +1 -1
  178. package/dist/types/__VUE/radio/index.vue.d.ts +14 -3
  179. package/dist/types/__VUE/radio/types.d.ts +5 -0
  180. package/dist/types/__VUE/radiogroup/index.vue.d.ts +8 -6
  181. package/dist/types/__VUE/sku/components/SkuStepper.vue.d.ts +1 -1
  182. package/dist/types/__VUE/sku/index.vue.d.ts +1 -1
  183. package/dist/types/__VUE/steps/types.d.ts +1 -0
  184. package/dist/types/__VUE/swipe/types.d.ts +1 -0
  185. package/dist/types/__VUE/swiper/types.d.ts +1 -0
  186. package/dist/types/__VUE/tabbar/types.d.ts +1 -0
  187. package/dist/types/__VUE/tabs/index.vue.d.ts +1 -1
  188. package/dist/types/__VUE/toast/index.vue.d.ts +1 -1
  189. package/dist/types/__VUE/uploader/index.vue.d.ts +2 -28
  190. package/dist/types/index.d.ts +1 -1
  191. package/dist/types/utils/index.d.ts +1 -0
  192. package/dist/types/utils/useRelation/index.d.ts +2 -0
  193. package/dist/types/utils/useRelation/useChildren.d.ts +4 -0
  194. package/dist/types/utils/useRelation/useParent.d.ts +3 -0
  195. package/package.json +1 -1
  196. package/dist/packages/index-79c5dc33.js +0 -10
  197. package/dist/types/__VUE/checkbox/common.d.ts +0 -2
  198. package/dist/types/__VUE/menuitem/type.d.ts +0 -4
  199. package/dist/types/__VUE/picker/common.d.ts +0 -406
  200. /package/dist/packages/{_plugin-vue_export-helper-cc2b3d55.js → _plugin-vue_export-helper-yVxbj29m.js} +0 -0
  201. /package/dist/packages/{component-669c158a.js → component-TCzwHGVq.js} +0 -0
  202. /package/dist/packages/{index-7a7385e4.js → index-084nl_oE.js} +0 -0
  203. /package/dist/packages/{index-54d03fc1.js → index-Ii9XdkPy.js} +0 -0
  204. /package/dist/packages/{index-29892cda.js → index-rf29bejW.js} +0 -0
  205. /package/dist/packages/{index-97b44e6c.js → index-xDfQLRen.js} +0 -0
  206. /package/dist/packages/locale/lang/{baseLang-3a8457ac.js → baseLang-7uiEiO-2.js} +0 -0
  207. /package/dist/packages/{pxCheck-a27490eb.js → pxCheck-OnXlN1NC.js} +0 -0
  208. /package/dist/packages/{raf-729dad54.js → raf-MQjoO-Ag.js} +0 -0
  209. /package/dist/packages/{renderIcon-3d0fd47c.js → renderIcon--EgZu5_5.js} +0 -0
  210. /package/dist/packages/{util-6f26722f.js → util-4Jkyw4BJ.js} +0 -0
@@ -18,9 +18,8 @@ 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, createElementVNode, normalizeStyle, Fragment, renderList, toDisplayString, normalizeClass, renderSlot, withDirectives, vShow, createCommentVNode, withModifiers } from "vue";
21
- import { c as createComponent } from "../component-669c158a.js";
22
- import { u as useExpose } from "../index-79c5dc33.js";
23
- import { _ as _export_sfc } from "../_plugin-vue_export-helper-cc2b3d55.js";
21
+ import { c as createComponent } from "../component-TCzwHGVq.js";
22
+ import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
24
23
  const { create } = createComponent("elevator");
25
24
  const _sfc_main = create({
26
25
  props: {
@@ -50,7 +49,7 @@ const _sfc_main = create({
50
49
  }
51
50
  },
52
51
  emits: ["clickItem", "clickIndex", "change"],
53
- setup(props, context) {
52
+ setup(props, { emit, expose }) {
54
53
  const listview = ref(null);
55
54
  const state = reactive({
56
55
  anchorIndex: 0,
@@ -123,12 +122,12 @@ const _sfc_main = create({
123
122
  state.scrollStart = false;
124
123
  };
125
124
  const handleClickItem = (key, item) => {
126
- context.emit("clickItem", key, item);
125
+ emit("clickItem", key, item);
127
126
  state.currentData = item;
128
127
  state.currentKey = key;
129
128
  };
130
129
  const handleClickIndex = (key) => {
131
- context.emit("clickIndex", key);
130
+ emit("clickIndex", key);
132
131
  };
133
132
  const listViewScroll = (e) => {
134
133
  let target = e.target;
@@ -151,7 +150,7 @@ const _sfc_main = create({
151
150
  listview.value.addEventListener("scroll", listViewScroll);
152
151
  }
153
152
  });
154
- useExpose({
153
+ expose({
155
154
  scrollTo
156
155
  });
157
156
  watch(
@@ -178,7 +177,7 @@ const _sfc_main = create({
178
177
  watch(
179
178
  () => state.currentIndex,
180
179
  (newVal) => {
181
- context.emit("change", newVal);
180
+ emit("change", newVal);
182
181
  }
183
182
  );
184
183
  return __spreadProps(__spreadValues({}, toRefs(state)), {
@@ -18,8 +18,8 @@ var __spreadValues = (a, b) => {
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  import { ref, reactive, watch, onMounted, toRefs, openBlock, createElementBlock, toDisplayString, createCommentVNode, createTextVNode, withModifiers } from "vue";
21
- import { c as createComponent } from "../component-669c158a.js";
22
- import { _ as _export_sfc } from "../_plugin-vue_export-helper-cc2b3d55.js";
21
+ import { c as createComponent } from "../component-TCzwHGVq.js";
22
+ import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
23
23
  const { create } = createComponent("ellipsis");
24
24
  const _sfc_main = create({
25
25
  props: {
@@ -1,10 +1,10 @@
1
1
  import { computed, openBlock, createElementBlock, createElementVNode, normalizeStyle, renderSlot, createCommentVNode, toDisplayString } from "vue";
2
- import { c as createComponent } from "../component-669c158a.js";
3
- import { p as pxCheck } from "../pxCheck-a27490eb.js";
4
- import { u as useLocale } from "../index-c0fa0f6b.js";
5
- import { _ as _export_sfc } from "../_plugin-vue_export-helper-cc2b3d55.js";
2
+ import { c as createComponent } from "../component-TCzwHGVq.js";
3
+ import { p as pxCheck } from "../pxCheck-OnXlN1NC.js";
4
+ import { u as useLocale } from "../index-s3RgMhc7.js";
5
+ import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
6
6
  import "@nutui/nutui/dist/packages/locale/lang";
7
- import "../util-6f26722f.js";
7
+ import "../util-4Jkyw4BJ.js";
8
8
  const { create } = createComponent("empty");
9
9
  const cN = "NutEmpty";
10
10
  const defaultStatus = {
@@ -1,10 +1,10 @@
1
1
  import { computed, ref, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, createBlock, createCommentVNode, renderSlot, createElementVNode, Fragment, renderList, toDisplayString, createVNode } from "vue";
2
2
  import { Left } from "@nutui/icons-vue";
3
3
  import NutOverlay from "../overlay/Overlay.js";
4
- import { c as createComponent } from "../component-669c158a.js";
5
- import { u as useLocale } from "../index-c0fa0f6b.js";
6
- import { _ as _export_sfc } from "../_plugin-vue_export-helper-cc2b3d55.js";
7
- import "../util-6f26722f.js";
4
+ import { c as createComponent } from "../component-TCzwHGVq.js";
5
+ import { u as useLocale } from "../index-s3RgMhc7.js";
6
+ import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
7
+ import "../util-4Jkyw4BJ.js";
8
8
  import "@nutui/nutui/dist/packages/locale/lang";
9
9
  const { create } = createComponent("fixed-nav");
10
10
  const cN = "NutFixedNav";
@@ -33,11 +33,13 @@ var __async = (__this, __arguments, generator) => {
33
33
  step((generator = generator.apply(__this, __arguments)).next());
34
34
  });
35
35
  };
36
- import { c as createComponent } from "../component-669c158a.js";
36
+ import { c as createComponent } from "../component-TCzwHGVq.js";
37
37
  import { computed, reactive, provide, watch, resolveComponent, openBlock, createElementBlock, withModifiers, createVNode, withCtx, renderSlot } from "vue";
38
- import { g as getPropByPath, f as isPromise } from "../util-6f26722f.js";
38
+ import { g as getPropByPath, f as isPromise } from "../util-4Jkyw4BJ.js";
39
+ import { F as FORM_KEY } from "../types-Ynmct7na.js";
40
+ import { u as useChildren } from "../useChildren-GU_NVfD8.js";
39
41
  import NutCellGroup from "../cellgroup/CellGroup.js";
40
- import { _ as _export_sfc } from "../_plugin-vue_export-helper-cc2b3d55.js";
42
+ import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
41
43
  const component = (components) => {
42
44
  return {
43
45
  props: {
@@ -48,52 +50,20 @@ const component = (components) => {
48
50
  rules: {
49
51
  type: Object,
50
52
  default: () => ({})
53
+ },
54
+ labelPosition: {
55
+ type: String,
56
+ default: "left"
57
+ },
58
+ starPosition: {
59
+ type: String,
60
+ default: "left"
51
61
  }
52
62
  },
53
63
  components,
54
64
  emits: ["validate"],
55
65
  setup(props, { emit }) {
56
- const useChildren = () => {
57
- const publicChildren = reactive([]);
58
- const internalChildren = reactive([]);
59
- const linkChildren2 = (value) => {
60
- const link = (child) => {
61
- if (child.proxy) {
62
- internalChildren.push(child);
63
- publicChildren.push(child.proxy);
64
- }
65
- };
66
- const removeLink = (child) => {
67
- if (child.proxy) {
68
- let internalIndex = internalChildren.indexOf(child);
69
- if (internalIndex > -1) {
70
- internalChildren.splice(internalIndex, 1);
71
- }
72
- let publicIndex = publicChildren.indexOf(child.proxy);
73
- if (internalIndex > -1) {
74
- publicChildren.splice(publicIndex, 1);
75
- }
76
- }
77
- };
78
- provide(
79
- "NutFormParent",
80
- Object.assign(
81
- {
82
- removeLink,
83
- link,
84
- children: publicChildren,
85
- internalChildren
86
- },
87
- value
88
- )
89
- );
90
- };
91
- return {
92
- children: publicChildren,
93
- linkChildren: linkChildren2
94
- };
95
- };
96
- const { children, linkChildren } = useChildren();
66
+ const { children, linkChildren } = useChildren(FORM_KEY);
97
67
  linkChildren({ props });
98
68
  const formErrorTip = computed(() => reactive({}));
99
69
  provide("formErrorTip", formErrorTip);
@@ -219,7 +189,6 @@ const _sfc_main = create(
219
189
  NutCellGroup
220
190
  })
221
191
  );
222
- const _hoisted_1 = ["onSubmit"];
223
192
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
224
193
  const _component_nut_cell_group = resolveComponent("nut-cell-group");
225
194
  return openBlock(), createElementBlock("form", {
@@ -233,7 +202,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
233
202
  ]),
234
203
  _: 3
235
204
  })
236
- ], 40, _hoisted_1);
205
+ ], 32);
237
206
  }
238
207
  const NutForm = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
239
208
  export {
@@ -1,9 +1,11 @@
1
- import { p as pxCheck } from "../pxCheck-a27490eb.js";
2
- import { computed, inject, provide, getCurrentInstance, onUnmounted, resolveComponent, openBlock, createBlock, normalizeClass, normalizeStyle, withCtx, createElementBlock, renderSlot, createTextVNode, toDisplayString, createCommentVNode, createElementVNode } from "vue";
3
- import { c as createComponent } from "../component-669c158a.js";
1
+ import { p as pxCheck } from "../pxCheck-OnXlN1NC.js";
2
+ import { computed, inject, resolveComponent, openBlock, createBlock, normalizeClass, normalizeStyle, withCtx, createElementBlock, renderSlot, createTextVNode, toDisplayString, createCommentVNode, createElementVNode } from "vue";
3
+ import { c as createComponent } from "../component-TCzwHGVq.js";
4
4
  import NutCell from "../cell/Cell.js";
5
- import { _ as _export_sfc } from "../_plugin-vue_export-helper-cc2b3d55.js";
6
- import "../index-54d03fc1.js";
5
+ import { F as FORM_KEY } from "../types-Ynmct7na.js";
6
+ import { u as useParent } from "../useParent-KIxqkovs.js";
7
+ import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
8
+ import "../index-Ii9XdkPy.js";
7
9
  import "@nutui/icons-vue";
8
10
  const { create } = createComponent("form-item");
9
11
  const _sfc_main = create({
@@ -48,25 +50,21 @@ const _sfc_main = create({
48
50
  bodyAlign: {
49
51
  type: String,
50
52
  default: ""
53
+ },
54
+ labelPosition: {
55
+ type: String,
56
+ default: ""
57
+ },
58
+ starPosition: {
59
+ type: String,
60
+ default: ""
51
61
  }
52
62
  },
53
63
  components: {
54
64
  NutCell
55
65
  },
56
66
  setup(props, { slots }) {
57
- const useParent = () => {
58
- const parent2 = inject("NutFormParent", null);
59
- if (parent2) {
60
- const instance = getCurrentInstance();
61
- const { link, removeLink } = parent2;
62
- link(instance);
63
- onUnmounted(() => {
64
- removeLink(instance);
65
- });
66
- return { parent: parent2 };
67
- }
68
- };
69
- const { parent: parentObj } = useParent();
67
+ const { parent: parentObj } = useParent(FORM_KEY);
70
68
  const isRequired = computed(() => {
71
69
  var _a;
72
70
  const rules = (_a = parentObj.props) == null ? void 0 : _a.rules;
@@ -78,10 +76,17 @@ const _sfc_main = create({
78
76
  }
79
77
  return props.required || props.rules.some((rule) => rule.required) || formRequired;
80
78
  });
81
- const parent = inject("formErrorTip");
82
- provide("form", {
83
- props
79
+ const labelPositionClass = computed(() => {
80
+ const labelPosition = parentObj.props.labelPosition;
81
+ const position = props.labelPosition ? props.labelPosition : labelPosition;
82
+ return position !== "left" ? `nut-form-item__${position}` : "";
84
83
  });
84
+ const starPositionClass = computed(() => {
85
+ const starPosition = parentObj.props.starPosition;
86
+ const position = props.starPosition ? props.starPosition : starPosition;
87
+ return position !== "left" ? `nut-form-item__star-${position}` : "";
88
+ });
89
+ const parent = inject("formErrorTip");
85
90
  const labelStyle = computed(() => {
86
91
  return {
87
92
  width: pxCheck(props.labelWidth),
@@ -99,20 +104,29 @@ const _sfc_main = create({
99
104
  };
100
105
  });
101
106
  const getSlots = (name) => slots[name];
102
- return { parent, labelStyle, bodyStyle, errorMessageStyle, getSlots, isRequired };
107
+ return {
108
+ parent,
109
+ labelStyle,
110
+ bodyStyle,
111
+ errorMessageStyle,
112
+ getSlots,
113
+ isRequired,
114
+ labelPositionClass,
115
+ starPositionClass
116
+ };
103
117
  }
104
118
  });
105
119
  const _hoisted_1 = { class: "nut-cell__value nut-form-item__body" };
106
120
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
107
121
  const _component_nut_cell = resolveComponent("nut-cell");
108
122
  return openBlock(), createBlock(_component_nut_cell, {
109
- class: normalizeClass(["nut-form-item", [{ error: _ctx.parent[_ctx.prop], line: _ctx.showErrorLine }, _ctx.$attrs.class]]),
123
+ class: normalizeClass(["nut-form-item", [{ error: _ctx.parent[_ctx.prop], line: _ctx.showErrorLine }, _ctx.$attrs.class, _ctx.labelPositionClass]]),
110
124
  style: normalizeStyle(_ctx.$attrs.style)
111
125
  }, {
112
126
  default: withCtx(() => [
113
127
  _ctx.label || _ctx.getSlots("label") ? (openBlock(), createElementBlock("view", {
114
128
  key: 0,
115
- class: normalizeClass(["nut-cell__title nut-form-item__label", { required: _ctx.isRequired }]),
129
+ class: normalizeClass(["nut-cell__title nut-form-item__label", { required: _ctx.isRequired, [_ctx.starPositionClass]: _ctx.starPositionClass }]),
116
130
  style: normalizeStyle(_ctx.labelStyle)
117
131
  }, [
118
132
  renderSlot(_ctx.$slots, "label", {}, () => [
@@ -1 +1 @@
1
- .nut-theme-dark .nut-cell{background:var(--nut-dark-background2, #1b1b1b);color:var(--nut-dark-color, var(--nut-white, #fff));box-shadow:none}.nut-cell{position:relative;display:flex;width:100%;line-height:var(--nut-cell-line-height, 20px);padding:var(--nut-cell-padding, 13px 16px);background:var(--nut-cell-background, var(--nut-white, #fff));border-radius:var(--nut-cell-border-radius, 6px);box-shadow:var(--nut-cell-box-shadow, 0px 1px 7px 0px rgb(237, 238, 241));font-size:var(--nut-cell-title-font, var(--nut-font-size-2, 14px));color:var(--nut-cell-color, var(--nut-title-color2, #666666));margin:10px 0;box-sizing:border-box}.nut-cell--center{align-items:center}.nut-cell--large{font-size:var(--nut-cell-large-title-font, var(--nut-font-size-large, var(--nut-font-size-3, 16px)));padding:var(--nut-cell-large-padding, 15px 16px)}.nut-cell--large .nut-cell__title-desc{font-size:var(--nut-cell-large-title-desc-font, var(--nut-font-size-base, var(--nut-font-size-2, 14px)))}.nut-cell:last-child::after{border:0 !important}.nut-cell::after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;right:var(--nut-cell-after-right, 16px);bottom:0;left:16px;transform:scaleY(0.5)}.nut-cell:active::before{opacity:.1}.nut-cell--clickable{cursor:pointer}.nut-cell--clickable::before{position:absolute;top:50%;left:50%;width:100%;height:100%;background-color:var(--nut-black, #000);border:inherit;border-color:var(--nut-black, #000);border-radius:inherit;transform:translate(-50%, -50%);opacity:0;content:" "}.nut-cell__icon{display:flex;flex-direction:row;margin:var(--nut-cell-default-icon-margin, 0 4px 0 0px);align-items:center}.nut-cell__title{display:flex;flex-direction:column;flex:1;min-width:80px}.nut-cell__title-desc{font-size:var(--nut-cell-title-desc-font, var(--nut-font-size-1, 12px))}.nut-cell__value{display:inline-block;text-align:right;flex:1;font-size:var(--nut-cell-desc-font, var(--nut-font-size-2, 14px));color:var(--nut-cell-desc-color, var(--nut-disable-color, #cccccc))}.nut-cell__value--alone{color:var(--nut-cell-color, var(--nut-title-color2, #666666))}.nut-cell__link{color:#979797;align-self:center}.nut-theme-dark .nut-form-item__body__slots .nut-input-text{color:var(--nut-dark-color, var(--nut-white, #fff))}.nut-form-item{display:flex}.nut-form-item::before{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;right:16px;bottom:0;left:16px;transform:scaleX(0)}.nut-form-item.error.line::before{border-bottom:1px solid var(--nut-form-item-error-line-color, var(--nut-required-color, #fa2c19));transform:scaleX(1);transition:transform 200ms cubic-bezier(0, 0, 0.2, 1) 0ms}.nut-form-item__label{font-size:var(--nut-form-item-label-font-size, 14px);font-weight:normal;width:var(--nut-form-item-label-width, 90px);margin-right:var(--nut-form-item-label-margin-right, 10px);flex:none !important;display:inline-block !important;word-wrap:break-word;text-align:var(--nut-form-item-label-text-align, left)}.nut-form-item__label.nut-cell__title{min-width:auto}.nut-form-item__label.required::before{content:"*";color:var(--nut-form-item-required-color, var(--nut-required-color, #fa2c19));margin-right:var(--nut-form-item-required-margin-right, 4px)}.nut-form-item__body{flex:1;display:flex !important;flex-direction:column}.nut-form-item__body__slots{text-align:var(--nut-form-item-body-slots-text-align, left)}.nut-form-item__body__slots .nut-input-text{font-size:var(--nut-form-item-body-font-size, 14px);text-align:var(--nut-form-item-body-input-text-align, left);color:var(--nut-black, #000);width:100%;outline:0 none;border:0;text-decoration:none;background:rgba(0,0,0,0);padding:0;margin:0}.nut-form-item__body__slots .nut-range-container{min-height:24px}.nut-form-item__body__slots .nut-textarea{padding:0 !important}.nut-form-item__body__slots .nut-textarea .nut-textarea__textarea{text-align:var(--nut-form-item-body-input-text-align, left)}.nut-form-item__body__tips{text-align:var(--nut-form-item-tip-text-align, left);font-size:var(--nut-form-item-tip-font-size, 10px);color:var(--nut-form-item-error-message-color, var(--nut-required-color, #fa2c19))}
1
+ .nut-theme-dark .nut-cell{background:var(--nut-dark-background2, #1b1b1b);color:var(--nut-dark-color, var(--nut-white, #fff));box-shadow:none}.nut-cell{position:relative;display:flex;width:100%;line-height:var(--nut-cell-line-height, 20px);padding:var(--nut-cell-padding, 13px 16px);background:var(--nut-cell-background, var(--nut-white, #fff));border-radius:var(--nut-cell-border-radius, 6px);box-shadow:var(--nut-cell-box-shadow, 0px 1px 7px 0px rgb(237, 238, 241));font-size:var(--nut-cell-title-font, var(--nut-font-size-2, 14px));color:var(--nut-cell-color, var(--nut-title-color2, #666666));margin:10px 0;box-sizing:border-box}.nut-cell--center{align-items:center}.nut-cell--large{font-size:var(--nut-cell-large-title-font, var(--nut-font-size-large, var(--nut-font-size-3, 16px)));padding:var(--nut-cell-large-padding, 15px 16px)}.nut-cell--large .nut-cell__title-desc{font-size:var(--nut-cell-large-title-desc-font, var(--nut-font-size-base, var(--nut-font-size-2, 14px)))}.nut-cell:last-child::after{border:0 !important}.nut-cell::after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;right:var(--nut-cell-after-right, 16px);bottom:0;left:16px;transform:scaleY(0.5)}.nut-cell:active::before{opacity:.1}.nut-cell--clickable{cursor:pointer}.nut-cell--clickable::before{position:absolute;top:50%;left:50%;width:100%;height:100%;background-color:var(--nut-black, #000);border:inherit;border-color:var(--nut-black, #000);border-radius:inherit;transform:translate(-50%, -50%);opacity:0;content:" "}.nut-cell__icon{display:flex;flex-direction:row;margin:var(--nut-cell-default-icon-margin, 0 4px 0 0px);align-items:center}.nut-cell__title{display:flex;flex-direction:column;flex:1;min-width:80px}.nut-cell__title-desc{font-size:var(--nut-cell-title-desc-font, var(--nut-font-size-1, 12px))}.nut-cell__value{display:inline-block;text-align:right;flex:1;font-size:var(--nut-cell-desc-font, var(--nut-font-size-2, 14px));color:var(--nut-cell-desc-color, var(--nut-disable-color, #cccccc))}.nut-cell__value--alone{color:var(--nut-cell-color, var(--nut-title-color2, #666666))}.nut-cell__link{color:#979797;align-self:center}.nut-theme-dark .nut-form-item__body__slots .nut-input-text{color:var(--nut-dark-color, var(--nut-white, #fff))}.nut-form-item{display:flex}.nut-form-item::before{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;right:16px;bottom:0;left:16px;transform:scaleX(0)}.nut-form-item.error.line::before{border-bottom:1px solid var(--nut-form-item-error-line-color, var(--nut-required-color, #fa2c19));transform:scaleX(1);transition:transform 200ms cubic-bezier(0, 0, 0.2, 1) 0ms}.nut-form-item__label{font-size:var(--nut-form-item-label-font-size, 14px);font-weight:normal;width:var(--nut-form-item-label-width, 90px);margin-right:var(--nut-form-item-label-margin-right, 10px);flex:none !important;display:inline-block !important;word-wrap:break-word;text-align:var(--nut-form-item-label-text-align, left)}.nut-form-item__label.nut-cell__title{min-width:auto}.nut-form-item__label.required::before{content:"*";color:var(--nut-form-item-required-color, var(--nut-required-color, #fa2c19));margin-right:var(--nut-form-item-required-margin-right, 4px)}.nut-form-item__label.required.nut-form-item__star-right::before{content:none}.nut-form-item__label.required.nut-form-item__star-right::after{content:"*";color:var(--nut-form-item-required-color, var(--nut-required-color, #fa2c19));margin-left:var(--nut-form-item-required-margin-right, 4px)}.nut-form-item__body{flex:1;display:flex !important;flex-direction:column}.nut-form-item__body__slots{text-align:var(--nut-form-item-body-slots-text-align, left)}.nut-form-item__body__slots .nut-input-text{font-size:var(--nut-form-item-body-font-size, 14px);text-align:var(--nut-form-item-body-input-text-align, left);color:var(--nut-black, #000);width:100%;outline:0 none;border:0;text-decoration:none;background:rgba(0,0,0,0);padding:0;margin:0}.nut-form-item__body__slots .nut-range-container{min-height:24px}.nut-form-item__body__slots .nut-textarea{padding:0 !important}.nut-form-item__body__slots .nut-textarea .nut-textarea__textarea{text-align:var(--nut-form-item-body-input-text-align, left)}.nut-form-item__body__tips{text-align:var(--nut-form-item-tip-text-align, left);font-size:var(--nut-form-item-tip-font-size, 10px);color:var(--nut-form-item-error-message-color, var(--nut-required-color, #fa2c19))}.nut-form-item__right{--nut-form-item-label-text-align: right}.nut-form-item__top{flex-direction:column}.nut-form-item__top .nut-form-item__label{padding-bottom:5px;width:100%;box-sizing:border-box;display:block;padding-right:24px}
@@ -51,6 +51,16 @@
51
51
  color: $form-item-required-color;
52
52
  margin-right: $form-item-required-margin-right;
53
53
  }
54
+ &.nut-form-item__star-right {
55
+ &::before {
56
+ content: none;
57
+ }
58
+ &::after {
59
+ content: '*';
60
+ color: $form-item-required-color;
61
+ margin-left: $form-item-required-margin-right;
62
+ }
63
+ }
54
64
  }
55
65
  }
56
66
  &__body {
@@ -87,4 +97,19 @@
87
97
  color: $form-item-error-message-color;
88
98
  }
89
99
  }
100
+
101
+ &__right {
102
+ --nut-form-item-label-text-align: right;
103
+ }
104
+
105
+ &__top {
106
+ flex-direction: column;
107
+ .nut-form-item__label {
108
+ padding-bottom: 5px;
109
+ width: 100%;
110
+ box-sizing: border-box;
111
+ display: block;
112
+ padding-right: 24px;
113
+ }
114
+ }
90
115
  }
@@ -1,7 +1,7 @@
1
- import { c as createComponent } from "../component-669c158a.js";
1
+ import { c as createComponent } from "../component-TCzwHGVq.js";
2
2
  import "vue";
3
- import { c as component } from "../common-1579352e.js";
4
- import "../pxCheck-a27490eb.js";
3
+ import { c as component } from "../common-4inKawxR.js";
4
+ import "../pxCheck-OnXlN1NC.js";
5
5
  const { create } = createComponent("grid");
6
6
  const _sfc_main = create(component);
7
7
  export {
@@ -1,9 +1,9 @@
1
1
  import { inject, getCurrentInstance, onUnmounted, computed, ref, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, renderSlot, Fragment, createTextVNode, toDisplayString } from "vue";
2
- import { u as useRouter } from "../index-54d03fc1.js";
3
- import { c as createComponent } from "../component-669c158a.js";
4
- import { p as pxCheck } from "../pxCheck-a27490eb.js";
5
- import { G as GRID_KEY } from "../common-1579352e.js";
6
- import { _ as _export_sfc } from "../_plugin-vue_export-helper-cc2b3d55.js";
2
+ import { u as useRouter } from "../index-Ii9XdkPy.js";
3
+ import { c as createComponent } from "../component-TCzwHGVq.js";
4
+ import { p as pxCheck } from "../pxCheck-OnXlN1NC.js";
5
+ import { G as GRID_KEY } from "../common-4inKawxR.js";
6
+ import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
7
7
  function useInject(key) {
8
8
  const parent = inject(key, null);
9
9
  if (parent) {
@@ -18,10 +18,10 @@ 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-669c158a.js";
22
- import { p as pxCheck } from "../pxCheck-a27490eb.js";
21
+ import { c as createComponent } from "../component-TCzwHGVq.js";
22
+ import { p as pxCheck } from "../pxCheck-OnXlN1NC.js";
23
23
  import { Image, ImageError } from "@nutui/icons-vue";
24
- import { _ as _export_sfc } from "../_plugin-vue_export-helper-cc2b3d55.js";
24
+ import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
25
25
  const { componentName, create } = createComponent("image");
26
26
  const _sfc_main = create({
27
27
  props: {
@@ -23,23 +23,23 @@ 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, nextTick, onMounted, Fragment, renderList, toDisplayString, normalizeClass, renderSlot, createVNode, h } from "vue";
26
- import { c as createComponent } from "../component-669c158a.js";
27
- import { e as clamp, d as preventDefault, a as isArray } from "../util-6f26722f.js";
28
- import { u as useRect } from "../index-29892cda.js";
29
- import { u as useTouch } from "../index-7a7385e4.js";
26
+ import { c as createComponent } from "../component-TCzwHGVq.js";
27
+ import { e as clamp, d as preventDefault, a as isArray } from "../util-4Jkyw4BJ.js";
28
+ import { u as useRect } from "../index-rf29bejW.js";
29
+ import { u as useTouch } from "../index-084nl_oE.js";
30
30
  import NutVideo from "../video/Video.js";
31
31
  import NutSwiperItem from "../swiperitem/SwiperItem.js";
32
- import { _ as _export_sfc } from "../_plugin-vue_export-helper-cc2b3d55.js";
32
+ import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
33
33
  import { CircleClose } from "@nutui/icons-vue";
34
- import { N as NutPopup } from "../index-37ae1f41.js";
34
+ import { N as NutPopup } from "../index-rbZsBckW.js";
35
35
  import NutSwiper from "../swiper/Swiper.js";
36
- import { f as funInterceptor } from "../Interceptor-6aab6fe0.js";
37
- import { C as CreateComponent } from "../mountComponent-867a9167.js";
36
+ import { f as funInterceptor } from "../Interceptor-WYVtGbGC.js";
37
+ import { C as CreateComponent } from "../mountComponent-uInXoTMp.js";
38
38
  import NutOverlay from "../overlay/Overlay.js";
39
- import "../index-c0fa0f6b.js";
39
+ import "../index-s3RgMhc7.js";
40
40
  import "@nutui/nutui/dist/packages/locale/lang";
41
- import "../index-79c5dc33.js";
42
- import "../raf-729dad54.js";
41
+ import "../types-9wCQwtH3.js";
42
+ import "../raf-MQjoO-Ag.js";
43
43
  const baseProps = {
44
44
  show: { type: Boolean, default: false },
45
45
  initNo: { type: Number, default: 0 },
@@ -0,0 +1,69 @@
1
+ import { toRefs, inject, ref, computed, openBlock, createElementBlock, normalizeStyle, normalizeClass, renderSlot } from "vue";
2
+ import { c as createComponent } from "./component-TCzwHGVq.js";
3
+ import { _ as _export_sfc } from "./_plugin-vue_export-helper-yVxbj29m.js";
4
+ const AVATAR_KEY = Symbol("nut-avatar");
5
+ const { create } = createComponent("avatar");
6
+ const _sfc_main = create({
7
+ props: {
8
+ size: {
9
+ type: [String, Number],
10
+ default: "normal"
11
+ },
12
+ shape: {
13
+ type: String,
14
+ default: "round"
15
+ },
16
+ bgColor: {
17
+ type: String,
18
+ default: "#eee"
19
+ },
20
+ color: {
21
+ type: String,
22
+ default: "#666"
23
+ }
24
+ },
25
+ setup(props) {
26
+ const { size, shape, bgColor, color } = toRefs(props);
27
+ const sizeValue = ["large", "normal", "small"];
28
+ const avatarGroup = inject(AVATAR_KEY, null);
29
+ const avatarRef = ref(null);
30
+ const classes = computed(() => {
31
+ var _a, _b;
32
+ const prefixCls = "nut-avatar";
33
+ return {
34
+ [prefixCls]: true,
35
+ [`nut-avatar-${size.value || ((_a = avatarGroup == null ? void 0 : avatarGroup.props) == null ? void 0 : _a.size) || "normal"}`]: true,
36
+ [`nut-avatar-${shape.value || ((_b = avatarGroup == null ? void 0 : avatarGroup.props) == null ? void 0 : _b.shape) || "round"}`]: true
37
+ };
38
+ });
39
+ const styles = computed(() => {
40
+ var _a, _b;
41
+ return {
42
+ width: size.value in sizeValue ? "" : `${size.value}px`,
43
+ height: size.value in sizeValue ? "" : `${size.value}px`,
44
+ backgroundColor: `${bgColor.value}`,
45
+ color: `${color.value}`,
46
+ marginLeft: ((_a = avatarGroup == null ? void 0 : avatarGroup.props) == null ? void 0 : _a.span) ? `${(_b = avatarGroup == null ? void 0 : avatarGroup.props) == null ? void 0 : _b.span}px` : ""
47
+ };
48
+ });
49
+ return {
50
+ classes,
51
+ styles,
52
+ avatarRef
53
+ };
54
+ }
55
+ });
56
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
57
+ return openBlock(), createElementBlock("view", {
58
+ ref: "avatarRef",
59
+ style: normalizeStyle(_ctx.styles),
60
+ class: normalizeClass(_ctx.classes)
61
+ }, [
62
+ renderSlot(_ctx.$slots, "default")
63
+ ], 6);
64
+ }
65
+ const NutAvatar = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
66
+ export {
67
+ AVATAR_KEY as A,
68
+ NutAvatar as N
69
+ };
@@ -18,11 +18,10 @@ var __spreadValues = (a, b) => {
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  import { ref, computed, reactive, watch, toRefs, openBlock, createElementBlock, normalizeClass, createElementVNode, toDisplayString, createCommentVNode, renderSlot, Fragment, renderList, normalizeStyle, createTextVNode } from "vue";
21
- import { c as createComponent } from "./component-669c158a.js";
22
- import { r as requestAniFrame } from "./raf-729dad54.js";
23
- import { u as useExpose } from "./index-79c5dc33.js";
24
- import { u as useLocale } from "./index-c0fa0f6b.js";
25
- import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
21
+ import { c as createComponent } from "./component-TCzwHGVq.js";
22
+ import { r as requestAniFrame } from "./raf-MQjoO-Ag.js";
23
+ import { u as useLocale } from "./index-s3RgMhc7.js";
24
+ import { _ as _export_sfc } from "./_plugin-vue_export-helper-yVxbj29m.js";
26
25
  const Utils = {
27
26
  /**
28
27
  * 是否为闫年
@@ -232,7 +231,7 @@ const _sfc_main = create({
232
231
  disabledDate: Function
233
232
  },
234
233
  emits: ["choose", "update", "close", "select"],
235
- setup(props, { emit, slots }) {
234
+ setup(props, { emit, slots, expose }) {
236
235
  const translate = useLocale(cN);
237
236
  const weekdays = translate("weekdays").map((day, index) => ({
238
237
  day,
@@ -703,7 +702,7 @@ const _sfc_main = create({
703
702
  months.value.scrollTop = state.monthsData[state.currentIndex].cssScrollHeight;
704
703
  }
705
704
  };
706
- useExpose({
705
+ expose({
707
706
  scrollToDate,
708
707
  initPosition
709
708
  });
@@ -20,8 +20,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  import { reactive, computed, watch, watchEffect, toRefs, resolveComponent, openBlock, createBlock, Teleport, mergeProps, createCommentVNode, createVNode, Transition, withCtx, withDirectives, createElementVNode, normalizeClass, normalizeStyle, renderSlot, createElementBlock, vShow } from "vue";
21
21
  import { Close } from "@nutui/icons-vue";
22
22
  import NutOverlay from "./overlay/Overlay.js";
23
- import { c as createComponent } from "./component-669c158a.js";
24
- import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
23
+ import { c as createComponent } from "./component-TCzwHGVq.js";
24
+ import { _ as _export_sfc } from "./_plugin-vue_export-helper-yVxbj29m.js";
25
25
  const popupProps = {
26
26
  visible: {
27
27
  type: Boolean,
@@ -1,5 +1,5 @@
1
1
  import locale from "@nutui/nutui/dist/packages/locale/lang";
2
- import { g as getPropByPath, i as isFunction } from "./util-6f26722f.js";
2
+ import { g as getPropByPath, i as isFunction } from "./util-4Jkyw4BJ.js";
3
3
  const useLocale = (name = "") => {
4
4
  return (keyPath, ...args) => {
5
5
  name = name.toLocaleLowerCase();
@@ -1,5 +1,6 @@
1
1
  import { provide, readonly, computed, watch, h } from "vue";
2
- import { c as createComponent } from "./component-669c158a.js";
2
+ import { c as createComponent } from "./component-TCzwHGVq.js";
3
+ import { R as RADIO_KEY } from "./types-odSRziQJ.js";
3
4
  const { componentName, create } = createComponent("radio-group");
4
5
  const _sfc_main = create({
5
6
  props: {
@@ -10,7 +11,6 @@ const _sfc_main = create({
10
11
  direction: {
11
12
  type: String,
12
13
  default: "vertical"
13
- //horizontal
14
14
  },
15
15
  textPosition: {
16
16
  type: String,
@@ -20,7 +20,7 @@ const _sfc_main = create({
20
20
  emits: ["change", "update:modelValue"],
21
21
  setup(props, { emit, slots }) {
22
22
  const updateValue = (value) => emit("update:modelValue", value);
23
- provide("parent", {
23
+ provide(RADIO_KEY, {
24
24
  label: readonly(computed(() => props.modelValue)),
25
25
  position: readonly(computed(() => props.textPosition)),
26
26
  updateValue
@@ -1,7 +1,8 @@
1
- import { inject, computed, h } from "vue";
2
- import { c as createComponent } from "./component-669c158a.js";
1
+ import { toRefs, inject, computed, h } from "vue";
2
+ import { c as createComponent } from "./component-TCzwHGVq.js";
3
3
  import { CheckNormal, CheckChecked } from "@nutui/icons-vue";
4
- import { p as pxCheck } from "./pxCheck-a27490eb.js";
4
+ import { p as pxCheck } from "./pxCheck-OnXlN1NC.js";
5
+ import { R as RADIO_KEY } from "./types-odSRziQJ.js";
5
6
  const { componentName, create } = createComponent("radio");
6
7
  const _sfc_main = create({
7
8
  components: {
@@ -16,7 +17,6 @@ const _sfc_main = create({
16
17
  shape: {
17
18
  type: String,
18
19
  default: "round"
19
- // button
20
20
  },
21
21
  label: {
22
22
  type: [String, Number, Boolean],
@@ -25,10 +25,15 @@ const _sfc_main = create({
25
25
  iconSize: {
26
26
  type: [String, Number],
27
27
  default: ""
28
+ },
29
+ size: {
30
+ type: String,
31
+ default: "normal"
28
32
  }
29
33
  },
30
34
  setup(props, { slots }) {
31
- let parent = inject("parent", null);
35
+ const { size } = toRefs(props);
36
+ let parent = inject(RADIO_KEY, null);
32
37
  const isCurValue = computed(() => {
33
38
  return parent.label.value === props.label;
34
39
  });
@@ -42,10 +47,10 @@ const _sfc_main = create({
42
47
  Checked: slots.checkedIcon ? slots.checkedIcon : CheckChecked
43
48
  };
44
49
  const iconNode = !isCurValue.value ? iconNodeMap.CheckNormal : iconNodeMap.Checked;
45
- const size = pxCheck(iconSize);
50
+ const size2 = pxCheck(iconSize);
46
51
  return h(iconNode, {
47
- width: size,
48
- height: size,
52
+ width: size2,
53
+ height: size2,
49
54
  class: color.value
50
55
  });
51
56
  };
@@ -64,7 +69,7 @@ const _sfc_main = create({
64
69
  return h(
65
70
  "view",
66
71
  {
67
- class: `${componentName}__button ${isCurValue.value && `${componentName}__button--active`} ${props.disabled ? `${componentName}__button--disabled` : ""}`
72
+ class: `${componentName}__button ${isCurValue.value && `${componentName}__button--active`} ${componentName}__button--${size.value} ${props.disabled ? `${componentName}__button--disabled` : ""}`
68
73
  },
69
74
  (_a = slots.default) == null ? void 0 : _a.call(slots)
70
75
  );