@nutui/nutui 4.0.10-beta.1 → 4.0.10

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 (160) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/nutui.es.js +1 -1
  3. package/dist/nutui.js +6550 -8291
  4. package/dist/nutui.umd.js +1 -1
  5. package/dist/packages/_es/ActionSheet.js +78 -111
  6. package/dist/packages/_es/Address.js +250 -375
  7. package/dist/packages/_es/AddressList.js +269 -354
  8. package/dist/packages/_es/Animate.js +41 -58
  9. package/dist/packages/_es/Audio.js +128 -197
  10. package/dist/packages/_es/AudioOperate.js +60 -71
  11. package/dist/packages/_es/Avatar.js +66 -89
  12. package/dist/packages/_es/AvatarGroup.js +23 -31
  13. package/dist/packages/_es/Backtop.js +59 -99
  14. package/dist/packages/_es/Badge.js +36 -47
  15. package/dist/packages/_es/Barrage.js +68 -147
  16. package/dist/packages/_es/Button.js +47 -66
  17. package/dist/packages/_es/Calendar.js +135 -157
  18. package/dist/packages/_es/CalendarItem.js +6 -6
  19. package/dist/packages/_es/Card.js +42 -56
  20. package/dist/packages/_es/Cascader.js +315 -474
  21. package/dist/packages/_es/Category.js +29 -39
  22. package/dist/packages/_es/CategoryPane.js +57 -83
  23. package/dist/packages/_es/Cell.js +56 -71
  24. package/dist/packages/_es/CellGroup.js +19 -27
  25. package/dist/packages/_es/Checkbox.js +109 -156
  26. package/dist/packages/_es/CheckboxGroup.js +38 -59
  27. package/dist/packages/_es/CircleProgress.js +67 -96
  28. package/dist/packages/_es/Col.js +23 -31
  29. package/dist/packages/_es/Collapse.js +33 -58
  30. package/dist/packages/_es/CollapseItem.js +78 -108
  31. package/dist/packages/_es/Comment.js +207 -279
  32. package/dist/packages/_es/ConfigProvider.js +37 -55
  33. package/dist/packages/_es/Countdown.js +100 -212
  34. package/dist/packages/_es/Countup.js +232 -445
  35. package/dist/packages/_es/DatePicker.js +162 -265
  36. package/dist/packages/_es/Dialog.js +161 -213
  37. package/dist/packages/_es/Divider.js +42 -57
  38. package/dist/packages/_es/Drag.js +70 -153
  39. package/dist/packages/_es/Ecard.js +64 -104
  40. package/dist/packages/_es/Elevator.js +143 -219
  41. package/dist/packages/_es/Ellipsis.js +95 -178
  42. package/dist/packages/_es/Empty.js +23 -39
  43. package/dist/packages/_es/FixedNav.js +93 -116
  44. package/dist/packages/_es/Form.js +107 -178
  45. package/dist/packages/_es/FormItem.js +48 -61
  46. package/dist/packages/_es/Grid.js +5 -6
  47. package/dist/packages/_es/GridItem.js +58 -84
  48. package/dist/packages/_es/Image.js +90 -129
  49. package/dist/packages/_es/ImagePreview.js +256 -412
  50. package/dist/packages/_es/Indicator.js +30 -34
  51. package/dist/packages/_es/InfiniteLoading.js +83 -136
  52. package/dist/packages/_es/Input.js +160 -264
  53. package/dist/packages/_es/InputNumber.js +81 -117
  54. package/dist/packages/_es/Interceptor-6e26b757.js +18 -0
  55. package/dist/packages/_es/Invoice.js +104 -130
  56. package/dist/packages/_es/Layout.js +3 -4
  57. package/dist/packages/_es/List.js +117 -215
  58. package/dist/packages/_es/Menu.js +95 -150
  59. package/dist/packages/_es/MenuItem.js +109 -154
  60. package/dist/packages/_es/Navbar.js +103 -119
  61. package/dist/packages/_es/Noticebar.js +197 -312
  62. package/dist/packages/_es/Notify.js +110 -166
  63. package/dist/packages/_es/NumberKeyboard.js +127 -202
  64. package/dist/packages/_es/Overlay.js +52 -80
  65. package/dist/packages/_es/Pagination.js +70 -100
  66. package/dist/packages/_es/Picker.js +275 -437
  67. package/dist/packages/_es/Popover.js +122 -225
  68. package/dist/packages/_es/Popup.js +4 -4
  69. package/dist/packages/_es/Price.js +44 -82
  70. package/dist/packages/_es/Progress.js +63 -79
  71. package/dist/packages/_es/PullRefresh.js +95 -173
  72. package/dist/packages/_es/Radio.js +4 -4
  73. package/dist/packages/_es/RadioGroup.js +3 -3
  74. package/dist/packages/_es/Range.js +204 -347
  75. package/dist/packages/_es/Rate.js +92 -141
  76. package/dist/packages/_es/Row.js +21 -27
  77. package/dist/packages/_es/Searchbar.js +123 -174
  78. package/dist/packages/_es/ShortPassword.js +69 -93
  79. package/dist/packages/_es/SideNavbar.js +49 -80
  80. package/dist/packages/_es/SideNavbarItem.js +22 -32
  81. package/dist/packages/_es/Signature.js +83 -146
  82. package/dist/packages/_es/Skeleton.js +110 -130
  83. package/dist/packages/_es/Sku.js +250 -343
  84. package/dist/packages/_es/Step.js +59 -86
  85. package/dist/packages/_es/Steps.js +26 -31
  86. package/dist/packages/_es/Sticky.js +4 -4
  87. package/dist/packages/_es/SubSideNavbar.js +52 -74
  88. package/dist/packages/_es/Swipe.js +83 -155
  89. package/dist/packages/_es/Swiper.js +174 -311
  90. package/dist/packages/_es/SwiperItem.js +28 -44
  91. package/dist/packages/_es/Switch.js +55 -68
  92. package/dist/packages/_es/TabPane.js +30 -41
  93. package/dist/packages/_es/Tabbar.js +41 -52
  94. package/dist/packages/_es/TabbarItem.js +61 -82
  95. package/dist/packages/_es/Table.js +109 -165
  96. package/dist/packages/_es/Tabs.js +240 -388
  97. package/dist/packages/_es/Tag.js +44 -61
  98. package/dist/packages/_es/Textarea.js +80 -124
  99. package/dist/packages/_es/TimeDetail.js +49 -76
  100. package/dist/packages/_es/TimePannel.js +34 -48
  101. package/dist/packages/_es/TimeSelect.js +47 -68
  102. package/dist/packages/_es/Toast.js +144 -218
  103. package/dist/packages/_es/Tour.js +138 -192
  104. package/dist/packages/_es/TrendArrow.js +57 -77
  105. package/dist/packages/_es/Uploader.js +234 -359
  106. package/dist/packages/_es/Video.js +191 -316
  107. package/dist/packages/_es/Watermark.js +84 -117
  108. package/dist/packages/_es/_plugin-vue_export-helper-dad06003.js +9 -0
  109. package/dist/packages/_es/common-d218746f.js +116 -0
  110. package/dist/packages/_es/component-234624bc.js +89 -0
  111. package/dist/packages/_es/index-14dfadc4.js +561 -0
  112. package/dist/packages/_es/index-192a3ef6.js +29 -0
  113. package/dist/packages/_es/index-360c5092.js +210 -0
  114. package/dist/packages/_es/index-496e6e05.js +24 -0
  115. package/dist/packages/_es/index-50eed3d9.js +7 -0
  116. package/dist/packages/_es/index-53ec2d4d.js +34 -0
  117. package/dist/packages/_es/index-fadb0974.js +8 -0
  118. package/dist/packages/_es/index.vue_vue_type_script_lang-1139b29a.js +43 -0
  119. package/dist/packages/_es/index.vue_vue_type_script_lang-43b774dd.js +77 -0
  120. package/dist/packages/_es/index.vue_vue_type_script_lang-f44c159d.js +110 -0
  121. package/dist/packages/_es/mountComponent-6d4ff200.js +23 -0
  122. package/dist/packages/_es/pxCheck-38173291.js +4 -0
  123. package/dist/packages/_es/raf-a74f1a06.js +16 -0
  124. package/dist/packages/_es/renderIcon-47498b32.js +5 -0
  125. package/dist/smartips/web-types.json +1 -1
  126. package/dist/style.css +1 -1
  127. package/dist/styles/themes/default.scss +154 -51
  128. package/dist/styles/themes/jdb.scss +154 -51
  129. package/dist/styles/themes/jddkh.scss +154 -51
  130. package/dist/styles/themes/jdt.scss +154 -51
  131. package/dist/types/__VUE/address/index.vue.d.ts +1 -1
  132. package/dist/types/__VUE/collapseitem/index.vue.d.ts +110 -3
  133. package/dist/types/__VUE/image/index.vue.d.ts +2 -2
  134. package/dist/types/__VUE/rate/index.vue.d.ts +110 -3
  135. package/dist/types/__VUE/searchbar/index.vue.d.ts +110 -3
  136. package/dist/types/__VUE/skeleton/index.vue.d.ts +2 -2
  137. package/dist/types/__VUE/swiper/index.vue.d.ts +1 -1
  138. package/dist/types/__VUE/table/common.d.ts +55 -2
  139. package/dist/types/__VUE/timeselect/index.vue.d.ts +1 -1
  140. package/dist/types/__VUE/watermark/index.vue.d.ts +1 -1
  141. package/dist/types/index.d.ts +1 -1
  142. package/package.json +2 -2
  143. package/dist/packages/_es/Interceptor-956b24fc.js +0 -29
  144. package/dist/packages/_es/_plugin-vue_export-helper-cc2b3d55.js +0 -10
  145. package/dist/packages/_es/common-b9a5e726.js +0 -145
  146. package/dist/packages/_es/component-81a4c1d0.js +0 -145
  147. package/dist/packages/_es/index-29892cda.js +0 -33
  148. package/dist/packages/_es/index-43c34ac6.js +0 -30
  149. package/dist/packages/_es/index-54d03fc1.js +0 -8
  150. package/dist/packages/_es/index-79c5dc33.js +0 -10
  151. package/dist/packages/_es/index-7a7385e4.js +0 -67
  152. package/dist/packages/_es/index-87422be8.js +0 -942
  153. package/dist/packages/_es/index-da0a7662.js +0 -259
  154. package/dist/packages/_es/index.vue_vue_type_script_lang-22dfc112.js +0 -46
  155. package/dist/packages/_es/index.vue_vue_type_script_lang-442e4704.js +0 -98
  156. package/dist/packages/_es/index.vue_vue_type_script_lang-cc5c4086.js +0 -151
  157. package/dist/packages/_es/mountComponent-8b24c346.js +0 -39
  158. package/dist/packages/_es/pxCheck-c6b9f6b7.js +0 -6
  159. package/dist/packages/_es/raf-729dad54.js +0 -25
  160. package/dist/packages/_es/renderIcon-3d0fd47c.js +0 -9
@@ -1,47 +1,36 @@
1
- var __defProp = Object.defineProperty;
2
- var __defProps = Object.defineProperties;
3
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
- var __spreadValues = (a, b) => {
9
- for (var prop in b || (b = {}))
10
- if (__hasOwnProp.call(b, prop))
11
- __defNormalProp(a, prop, b[prop]);
12
- if (__getOwnPropSymbols)
13
- for (var prop of __getOwnPropSymbols(b)) {
14
- if (__propIsEnum.call(b, prop))
15
- __defNormalProp(a, prop, b[prop]);
16
- }
17
- return a;
18
- };
19
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- var __publicField = (obj, key, value) => {
21
- __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
22
- return value;
23
- };
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-81a4c1d0.js";
26
- import { f as funInterceptor } from "./Interceptor-956b24fc.js";
27
- import { P as Popup, p as popupProps } from "./index-da0a7662.js";
28
- import Button from "./Button.js";
29
- import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
30
- import Overlay from "./Overlay.js";
1
+ var N = Object.defineProperty, j = Object.defineProperties;
2
+ var E = Object.getOwnPropertyDescriptors;
3
+ var b = Object.getOwnPropertySymbols;
4
+ var I = Object.prototype.hasOwnProperty, L = Object.prototype.propertyIsEnumerable;
5
+ var k = (e, n, o) => n in e ? N(e, n, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[n] = o, w = (e, n) => {
6
+ for (var o in n || (n = {}))
7
+ I.call(n, o) && k(e, o, n[o]);
8
+ if (b)
9
+ for (var o of b(n))
10
+ L.call(n, o) && k(e, o, n[o]);
11
+ return e;
12
+ }, B = (e, n) => j(e, E(n));
13
+ var t = (e, n, o) => (k(e, typeof n != "symbol" ? n + "" : n, o), o);
14
+ import { ref as M, onMounted as U, watch as V, computed as h, resolveComponent as D, openBlock as l, createBlock as p, normalizeStyle as $, withCtx as m, createElementVNode as T, normalizeClass as P, createElementBlock as i, renderSlot as C, Fragment as A, createTextVNode as v, toDisplayString as g, createCommentVNode as u, resolveDynamicComponent as H, nextTick as W, h as q } from "vue";
15
+ import { c as G } from "./component-234624bc.js";
16
+ import { f as J } from "./Interceptor-6e26b757.js";
17
+ import { P as O, p as K } from "./index-360c5092.js";
18
+ import S from "./Button.js";
19
+ import { _ as Q } from "./_plugin-vue_export-helper-dad06003.js";
20
+ import R from "./Overlay.js";
31
21
  import "../locale/lang";
32
- import { C as CreateComponent } from "./mountComponent-8b24c346.js";
22
+ import { C as X } from "./mountComponent-6d4ff200.js";
33
23
  import "@nutui/icons-vue";
34
- const { componentName, create, translate } = createComponent("dialog");
35
- const _sfc_main = create({
36
- inheritAttrs: false,
24
+ const { componentName: Y, create: Z, translate: _ } = G("dialog"), x = Z({
25
+ inheritAttrs: !1,
37
26
  components: {
38
- [Popup.name]: Popup,
39
- [Button.name]: Button
27
+ [O.name]: O,
28
+ [S.name]: S
40
29
  },
41
- props: __spreadProps(__spreadValues({}, popupProps), {
30
+ props: B(w({}, K), {
42
31
  closeOnClickOverlay: {
43
32
  type: Boolean,
44
- default: true
33
+ default: !0
45
34
  },
46
35
  title: {
47
36
  type: String,
@@ -53,15 +42,15 @@ const _sfc_main = create({
53
42
  },
54
43
  noFooter: {
55
44
  type: Boolean,
56
- default: false
45
+ default: !1
57
46
  },
58
47
  noOkBtn: {
59
48
  type: Boolean,
60
- default: false
49
+ default: !1
61
50
  },
62
51
  noCancelBtn: {
63
52
  type: Boolean,
64
- default: false
53
+ default: !1
65
54
  },
66
55
  cancelText: {
67
56
  type: String,
@@ -73,7 +62,7 @@ const _sfc_main = create({
73
62
  },
74
63
  cancelAutoClose: {
75
64
  type: Boolean,
76
- default: true
65
+ default: !0
77
66
  },
78
67
  textAlign: {
79
68
  type: String,
@@ -81,7 +70,7 @@ const _sfc_main = create({
81
70
  },
82
71
  closeOnPopstate: {
83
72
  type: Boolean,
84
- default: false
73
+ default: !1
85
74
  },
86
75
  footerDirection: {
87
76
  type: String,
@@ -98,227 +87,186 @@ const _sfc_main = create({
98
87
  beforeClose: Function
99
88
  }),
100
89
  emits: ["update", "update:visible", "ok", "cancel", "opened", "closed"],
101
- setup(props, { emit }) {
102
- const showPopup = ref(props.visible);
103
- onMounted(() => {
104
- if (props.closeOnPopstate) {
105
- window.addEventListener("popstate", function() {
106
- closed("page");
107
- });
108
- }
109
- });
110
- watch(
111
- () => props.visible,
112
- (value) => {
113
- showPopup.value = value;
114
- if (value) {
115
- emit("opened");
116
- }
90
+ setup(e, { emit: n }) {
91
+ const o = M(e.visible);
92
+ U(() => {
93
+ e.closeOnPopstate && window.addEventListener("popstate", function() {
94
+ s("page");
95
+ });
96
+ }), V(
97
+ () => e.visible,
98
+ (a) => {
99
+ o.value = a, a && n("opened");
117
100
  }
118
101
  );
119
- const classes = computed(() => {
120
- return {
121
- [componentName]: true,
122
- [props.customClass]: true
123
- };
124
- });
125
- const update = (val) => {
126
- emit("update", val);
127
- emit("update:visible", val);
128
- };
129
- const closed = (action) => {
130
- funInterceptor(props.beforeClose, {
131
- args: [action],
102
+ const c = h(() => ({
103
+ [Y]: !0,
104
+ [e.customClass]: !0
105
+ })), f = (a) => {
106
+ n("update", a), n("update:visible", a);
107
+ }, s = (a) => {
108
+ J(e.beforeClose, {
109
+ args: [a],
132
110
  done: () => {
133
- showPopup.value = false;
134
- update(false);
135
- emit("closed");
111
+ o.value = !1, f(!1), n("closed");
136
112
  }
137
113
  });
138
- };
139
- const onCancel = () => {
140
- emit("cancel");
141
- if (props.cancelAutoClose) {
142
- showPopup.value = false;
143
- closed("cancel");
144
- }
145
- };
146
- const onOk = () => {
147
- emit("ok");
148
- closed("ok");
149
- };
150
- const onClickOverlay = () => {
151
- if (props.closeOnClickOverlay) {
152
- closed("");
153
- }
154
- };
155
- const contentStyle = computed(() => {
156
- return {
157
- textAlign: props.textAlign
158
- };
159
- });
114
+ }, r = () => {
115
+ n("cancel"), e.cancelAutoClose && (o.value = !1, s("cancel"));
116
+ }, d = () => {
117
+ n("ok"), s("ok");
118
+ }, y = () => {
119
+ e.closeOnClickOverlay && s("");
120
+ }, F = h(() => ({
121
+ textAlign: e.textAlign
122
+ }));
160
123
  return {
161
- closed,
162
- classes,
163
- onCancel,
164
- onOk,
165
- showPopup,
166
- onClickOverlay,
167
- contentStyle,
168
- translate
124
+ closed: s,
125
+ classes: c,
126
+ onCancel: r,
127
+ onOk: d,
128
+ showPopup: o,
129
+ onClickOverlay: y,
130
+ contentStyle: F,
131
+ translate: _
169
132
  };
170
133
  }
171
- });
172
- const _hoisted_1 = {
134
+ }), ee = {
173
135
  key: 0,
174
136
  class: "nut-dialog__header"
175
- };
176
- const _hoisted_2 = ["innerHTML"];
177
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
178
- const _component_nut_button = resolveComponent("nut-button");
179
- const _component_nut_popup = resolveComponent("nut-popup");
180
- return openBlock(), createBlock(_component_nut_popup, {
181
- teleport: _ctx.teleport,
182
- visible: _ctx.showPopup,
183
- "onUpdate:visible": _cache[0] || (_cache[0] = ($event) => _ctx.showPopup = $event),
184
- "close-on-click-overlay": false,
185
- "lock-scroll": _ctx.lockScroll,
186
- "pop-class": _ctx.popClass,
187
- "overlay-class": _ctx.overlayClass,
188
- "overlay-style": _ctx.overlayStyle,
189
- style: normalizeStyle(_ctx.popStyle),
137
+ }, oe = ["innerHTML"];
138
+ function te(e, n, o, c, f, s) {
139
+ const r = D("nut-button"), d = D("nut-popup");
140
+ return l(), p(d, {
141
+ teleport: e.teleport,
142
+ visible: e.showPopup,
143
+ "onUpdate:visible": n[0] || (n[0] = (y) => e.showPopup = y),
144
+ "close-on-click-overlay": !1,
145
+ "lock-scroll": e.lockScroll,
146
+ "pop-class": e.popClass,
147
+ "overlay-class": e.overlayClass,
148
+ "overlay-style": e.overlayStyle,
149
+ style: $(e.popStyle),
190
150
  round: "",
191
- onClickOverlay: _ctx.onClickOverlay,
192
- onClickCloseIcon: _ctx.closed
151
+ onClickOverlay: e.onClickOverlay,
152
+ onClickCloseIcon: e.closed
193
153
  }, {
194
- default: withCtx(() => [
195
- createElementVNode("view", {
196
- class: normalizeClass(_ctx.classes)
154
+ default: m(() => [
155
+ T("view", {
156
+ class: P(e.classes)
197
157
  }, [
198
- _ctx.$slots.header || _ctx.title ? (openBlock(), createElementBlock("view", _hoisted_1, [
199
- _ctx.$slots.header ? renderSlot(_ctx.$slots, "header", { key: 0 }) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
200
- createTextVNode(toDisplayString(_ctx.title), 1)
158
+ e.$slots.header || e.title ? (l(), i("view", ee, [
159
+ e.$slots.header ? C(e.$slots, "header", { key: 0 }) : (l(), i(A, { key: 1 }, [
160
+ v(g(e.title), 1)
201
161
  ], 64))
202
- ])) : createCommentVNode("", true),
203
- createElementVNode("view", {
162
+ ])) : u("", !0),
163
+ T("view", {
204
164
  class: "nut-dialog__content",
205
- style: normalizeStyle(_ctx.contentStyle)
165
+ style: $(e.contentStyle)
206
166
  }, [
207
- _ctx.$slots.default ? renderSlot(_ctx.$slots, "default", { key: 0 }) : typeof _ctx.content === "string" ? (openBlock(), createElementBlock("view", {
167
+ e.$slots.default ? C(e.$slots, "default", { key: 0 }) : typeof e.content == "string" ? (l(), i("view", {
208
168
  key: 1,
209
- innerHTML: _ctx.content
210
- }, null, 8, _hoisted_2)) : (openBlock(), createBlock(resolveDynamicComponent(_ctx.content), { key: 2 }))
169
+ innerHTML: e.content
170
+ }, null, 8, oe)) : (l(), p(H(e.content), { key: 2 }))
211
171
  ], 4),
212
- !_ctx.noFooter ? (openBlock(), createElementBlock("view", {
172
+ e.noFooter ? u("", !0) : (l(), i("view", {
213
173
  key: 1,
214
- class: normalizeClass(["nut-dialog__footer", { [_ctx.footerDirection]: _ctx.footerDirection }])
174
+ class: P(["nut-dialog__footer", { [e.footerDirection]: e.footerDirection }])
215
175
  }, [
216
- _ctx.$slots.footer ? renderSlot(_ctx.$slots, "footer", { key: 0 }) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
217
- !_ctx.noCancelBtn ? (openBlock(), createBlock(_component_nut_button, {
176
+ e.$slots.footer ? C(e.$slots, "footer", { key: 0 }) : (l(), i(A, { key: 1 }, [
177
+ e.noCancelBtn ? u("", !0) : (l(), p(r, {
218
178
  key: 0,
219
179
  size: "small",
220
180
  plain: "",
221
181
  type: "primary",
222
182
  class: "nut-dialog__footer-cancel",
223
- onClick: _ctx.onCancel
183
+ onClick: e.onCancel
224
184
  }, {
225
- default: withCtx(() => [
226
- createTextVNode(toDisplayString(_ctx.cancelText || _ctx.translate("cancel")), 1)
185
+ default: m(() => [
186
+ v(g(e.cancelText || e.translate("cancel")), 1)
227
187
  ]),
228
188
  _: 1
229
- }, 8, ["onClick"])) : createCommentVNode("", true),
230
- !_ctx.noOkBtn ? (openBlock(), createBlock(_component_nut_button, {
189
+ }, 8, ["onClick"])),
190
+ e.noOkBtn ? u("", !0) : (l(), p(r, {
231
191
  key: 1,
232
192
  size: "small",
233
193
  type: "primary",
234
194
  class: "nut-dialog__footer-ok",
235
- onClick: _ctx.onOk
195
+ onClick: e.onOk
236
196
  }, {
237
- default: withCtx(() => [
238
- createTextVNode(toDisplayString(_ctx.okText || _ctx.translate("confirm")), 1)
197
+ default: m(() => [
198
+ v(g(e.okText || e.translate("confirm")), 1)
239
199
  ]),
240
200
  _: 1
241
- }, 8, ["onClick"])) : createCommentVNode("", true)
201
+ }, 8, ["onClick"]))
242
202
  ], 64))
243
- ], 2)) : createCommentVNode("", true)
203
+ ], 2))
244
204
  ], 2)
245
205
  ]),
246
206
  _: 3
247
207
  }, 8, ["teleport", "visible", "lock-scroll", "pop-class", "overlay-class", "overlay-style", "style", "onClickOverlay", "onClickCloseIcon"]);
248
208
  }
249
- const Dialog = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
250
- class DialogOptions {
209
+ const z = /* @__PURE__ */ Q(x, [["render", te]]);
210
+ class ne {
251
211
  constructor() {
252
- __publicField(this, "title", "");
253
- __publicField(this, "content", "");
254
- __publicField(this, "cancelText", "");
255
- __publicField(this, "okText", "");
256
- __publicField(this, "textAlign", "center");
257
- __publicField(this, "customClass", "");
258
- __publicField(this, "overlayStyle", {});
259
- __publicField(this, "overlayClass", "");
260
- __publicField(this, "popStyle", {});
261
- __publicField(this, "popClass", "");
262
- __publicField(this, "teleport", "body");
263
- __publicField(this, "id", (/* @__PURE__ */ new Date()).getTime());
264
- __publicField(this, "footerDirection", "horizontal");
212
+ t(this, "title", "");
213
+ t(this, "content", "");
214
+ t(this, "cancelText", "");
215
+ t(this, "okText", "");
216
+ t(this, "textAlign", "center");
217
+ t(this, "customClass", "");
218
+ t(this, "overlayStyle", {});
219
+ t(this, "overlayClass", "");
220
+ t(this, "popStyle", {});
221
+ t(this, "popClass", "");
222
+ t(this, "teleport", "body");
223
+ t(this, "id", (/* @__PURE__ */ new Date()).getTime());
224
+ t(this, "footerDirection", "horizontal");
265
225
  //使用横纵方向 可选值 horizontal、vertical
266
226
  // function
267
- __publicField(this, "onUpdate");
268
- __publicField(this, "onOk");
269
- __publicField(this, "onCancel");
270
- __publicField(this, "onOpened");
271
- __publicField(this, "onClosed");
272
- __publicField(this, "beforeClose");
273
- __publicField(this, "visible", true);
274
- __publicField(this, "noFooter", false);
275
- __publicField(this, "noOkBtn", false);
276
- __publicField(this, "noCancelBtn", false);
277
- __publicField(this, "okBtnDisabled", false);
278
- __publicField(this, "closeOnPopstate", false);
279
- __publicField(this, "closeOnClickOverlay", true);
280
- __publicField(this, "lockScroll", true);
227
+ t(this, "onUpdate");
228
+ t(this, "onOk");
229
+ t(this, "onCancel");
230
+ t(this, "onOpened");
231
+ t(this, "onClosed");
232
+ t(this, "beforeClose");
233
+ t(this, "visible", !0);
234
+ t(this, "noFooter", !1);
235
+ t(this, "noOkBtn", !1);
236
+ t(this, "noCancelBtn", !1);
237
+ t(this, "okBtnDisabled", !1);
238
+ t(this, "closeOnPopstate", !1);
239
+ t(this, "closeOnClickOverlay", !0);
240
+ t(this, "lockScroll", !0);
281
241
  }
282
242
  }
283
- class DialogFunction {
284
- constructor(_options) {
285
- __publicField(this, "options", new DialogOptions());
286
- __publicField(this, "instance");
287
- const options = Object.assign(this.options, _options);
288
- const { unmount } = CreateComponent(options, {
243
+ class le {
244
+ constructor(n) {
245
+ t(this, "options", new ne());
246
+ t(this, "instance");
247
+ const o = Object.assign(this.options, n), { unmount: c } = X(o, {
289
248
  name: "dialog",
290
- components: [Popup, Button, Overlay],
291
- wrapper: (elWrap, root) => {
292
- return {
293
- setup() {
294
- options.onUpdate = (val) => {
295
- if (val === false) {
296
- nextTick(() => {
297
- unmount();
298
- });
299
- }
300
- };
301
- if (options == null ? void 0 : options.onOpened) {
302
- options == null ? void 0 : options.onOpened();
303
- }
304
- options.teleport = `#${root.id}`;
305
- return () => {
306
- return h(Dialog, options);
307
- };
308
- }
309
- };
310
- }
249
+ components: [O, S, R],
250
+ wrapper: (f, s) => ({
251
+ setup() {
252
+ return o.onUpdate = (r) => {
253
+ r === !1 && W(() => {
254
+ c();
255
+ });
256
+ }, o != null && o.onOpened && (o == null || o.onOpened()), o.teleport = `#${s.id}`, () => q(z, o);
257
+ }
258
+ })
311
259
  });
312
260
  }
313
261
  }
314
- const showDialog = function(options) {
315
- return new DialogFunction(options);
262
+ const se = function(e) {
263
+ return new le(e);
316
264
  };
317
- showDialog.install = (app) => {
318
- app.use(Dialog);
265
+ se.install = (e) => {
266
+ e.use(z);
319
267
  };
320
268
  export {
321
- DialogOptions,
322
- Dialog as default,
323
- showDialog
269
+ ne as DialogOptions,
270
+ z as default,
271
+ se as showDialog
324
272
  };
@@ -1,28 +1,20 @@
1
- var __defProp = Object.defineProperty;
2
- var __defProps = Object.defineProperties;
3
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
- var __spreadValues = (a, b) => {
9
- for (var prop in b || (b = {}))
10
- if (__hasOwnProp.call(b, prop))
11
- __defNormalProp(a, prop, b[prop]);
12
- if (__getOwnPropSymbols)
13
- for (var prop of __getOwnPropSymbols(b)) {
14
- if (__propIsEnum.call(b, prop))
15
- __defNormalProp(a, prop, b[prop]);
16
- }
17
- return a;
18
- };
19
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- import { computed, openBlock, createElementBlock, normalizeClass, renderSlot } from "vue";
21
- import { c as createComponent } from "./component-81a4c1d0.js";
22
- import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
1
+ var m = Object.defineProperty, p = Object.defineProperties;
2
+ var h = Object.getOwnPropertyDescriptors;
3
+ var l = Object.getOwnPropertySymbols;
4
+ var $ = Object.prototype.hasOwnProperty, y = Object.prototype.propertyIsEnumerable;
5
+ var c = (e, t, n) => t in e ? m(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, r = (e, t) => {
6
+ for (var n in t || (t = {}))
7
+ $.call(t, n) && c(e, n, t[n]);
8
+ if (l)
9
+ for (var n of l(t))
10
+ y.call(t, n) && c(e, n, t[n]);
11
+ return e;
12
+ }, a = (e, t) => p(e, h(t));
13
+ import { computed as v, openBlock as d, createElementBlock as f, normalizeClass as u, renderSlot as _ } from "vue";
14
+ import { c as g } from "./component-234624bc.js";
15
+ import { _ as k } from "./_plugin-vue_export-helper-dad06003.js";
23
16
  import "../locale/lang";
24
- const { componentName, create } = createComponent("divider");
25
- const _sfc_main = create({
17
+ const { componentName: z, create: B } = g("divider"), C = B({
26
18
  props: {
27
19
  contentPosition: {
28
20
  type: String,
@@ -30,11 +22,11 @@ const _sfc_main = create({
30
22
  },
31
23
  dashed: {
32
24
  type: Boolean,
33
- default: false
25
+ default: !1
34
26
  },
35
27
  hairline: {
36
28
  type: Boolean,
37
- default: true
29
+ default: !0
38
30
  },
39
31
  direction: {
40
32
  type: String,
@@ -42,43 +34,36 @@ const _sfc_main = create({
42
34
  }
43
35
  },
44
36
  components: {},
45
- setup(props, context) {
46
- const classes = computed(() => {
47
- const prefixCls = componentName;
48
- let defaultClassesObj = {
49
- [prefixCls]: true
50
- };
51
- let classesObj = {};
52
- if (props.direction === "horizontal") {
53
- classesObj = __spreadProps(__spreadValues({}, defaultClassesObj), {
54
- [`${prefixCls}-center`]: context.slots.default,
55
- [`${prefixCls}-left`]: props.contentPosition === "left",
56
- [`${prefixCls}-right`]: props.contentPosition === "right",
57
- [`${prefixCls}-dashed`]: props.dashed,
58
- [`${prefixCls}-hairline`]: props.hairline
59
- });
60
- } else {
61
- classesObj = __spreadProps(__spreadValues({}, defaultClassesObj), {
62
- [`${prefixCls}-vertical`]: props.direction === "vertical"
63
- });
64
- }
65
- return classesObj;
66
- });
67
- return { classes };
37
+ setup(e, t) {
38
+ return { classes: v(() => {
39
+ const o = z;
40
+ let i = {
41
+ [o]: !0
42
+ }, s = {};
43
+ return e.direction === "horizontal" ? s = a(r({}, i), {
44
+ [`${o}-center`]: t.slots.default,
45
+ [`${o}-left`]: e.contentPosition === "left",
46
+ [`${o}-right`]: e.contentPosition === "right",
47
+ [`${o}-dashed`]: e.dashed,
48
+ [`${o}-hairline`]: e.hairline
49
+ }) : s = a(r({}, i), {
50
+ [`${o}-vertical`]: e.direction === "vertical"
51
+ }), s;
52
+ }) };
68
53
  }
69
54
  });
70
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
71
- return _ctx.direction === "horizontal" ? (openBlock(), createElementBlock("view", {
55
+ function P(e, t, n, o, i, s) {
56
+ return e.direction === "horizontal" ? (d(), f("view", {
72
57
  key: 0,
73
- class: normalizeClass(_ctx.classes)
58
+ class: u(e.classes)
74
59
  }, [
75
- renderSlot(_ctx.$slots, "default")
76
- ], 2)) : (openBlock(), createElementBlock("view", {
60
+ _(e.$slots, "default")
61
+ ], 2)) : (d(), f("view", {
77
62
  key: 1,
78
- class: normalizeClass(_ctx.classes)
63
+ class: u(e.classes)
79
64
  }, null, 2));
80
65
  }
81
- const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
66
+ const x = /* @__PURE__ */ k(C, [["render", P]]);
82
67
  export {
83
- index as default
68
+ x as default
84
69
  };