@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,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 { reactive, watch, computed, toRefs, openBlock, createElementBlock, normalizeClass, normalizeStyle } 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 B = Object.defineProperty, H = Object.defineProperties;
2
+ var R = Object.getOwnPropertyDescriptors;
3
+ var k = Object.getOwnPropertySymbols;
4
+ var _ = Object.prototype.hasOwnProperty, A = Object.prototype.propertyIsEnumerable;
5
+ var I = (e, a, t) => a in e ? B(e, a, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[a] = t, v = (e, a) => {
6
+ for (var t in a || (a = {}))
7
+ _.call(a, t) && I(e, t, a[t]);
8
+ if (k)
9
+ for (var t of k(a))
10
+ A.call(a, t) && I(e, t, a[t]);
11
+ return e;
12
+ }, C = (e, a) => H(e, R(a));
13
+ import { reactive as E, watch as F, computed as X, toRefs as D, openBlock as L, createElementBlock as M, normalizeClass as Y, normalizeStyle as O } from "vue";
14
+ import { c as T } from "./component-234624bc.js";
15
+ import { _ as j } from "./_plugin-vue_export-helper-dad06003.js";
23
16
  import "../locale/lang";
24
- const { componentName, create } = createComponent("watermark");
25
- const _sfc_main = create({
17
+ const { componentName: q, create: G } = T("watermark"), J = G({
26
18
  props: {
27
19
  name: {
28
20
  type: String,
@@ -94,116 +86,91 @@ const _sfc_main = create({
94
86
  }
95
87
  },
96
88
  emits: ["click"],
97
- setup(props, { emit }) {
98
- const state = reactive({
89
+ setup(e, { emit: a }) {
90
+ const t = E({
99
91
  base64Url: ""
100
- });
101
- const {
102
- zIndex,
103
- gapX,
104
- gapY,
105
- width,
106
- height,
107
- rotate,
108
- image,
109
- imageWidth,
110
- imageHeight,
111
- content,
112
- fontStyle,
113
- fontWeight,
114
- fontColor,
115
- fontSize,
116
- fontFamily
117
- } = props;
118
- const init = () => {
119
- const canvas = document.createElement("canvas");
120
- const ratio = window.devicePixelRatio;
121
- const ctx = canvas.getContext("2d");
122
- const canvasWidth = `${(gapX + width) * ratio}px`;
123
- const canvasHeight = `${(gapY + height) * ratio}px`;
124
- const markWidth = width * ratio;
125
- const markHeight = height * ratio;
126
- canvas.setAttribute("width", canvasWidth);
127
- canvas.setAttribute("height", canvasHeight);
128
- if (ctx) {
129
- if (image) {
130
- ctx.translate(markWidth / 2, markHeight / 2);
131
- ctx.rotate(Math.PI / 180 * Number(rotate));
132
- const img = new Image();
133
- img.crossOrigin = "anonymous";
134
- img.referrerPolicy = "no-referrer";
135
- img.src = image;
136
- img.onload = () => {
137
- ctx.drawImage(
138
- img,
139
- -imageWidth * ratio / 2,
140
- -imageHeight * ratio / 2,
141
- imageWidth * ratio,
142
- imageHeight * ratio
143
- );
144
- ctx.restore();
145
- state.base64Url = canvas.toDataURL();
92
+ }), {
93
+ zIndex: h,
94
+ gapX: l,
95
+ gapY: s,
96
+ width: m,
97
+ height: c,
98
+ rotate: u,
99
+ image: f,
100
+ imageWidth: d,
101
+ imageHeight: p,
102
+ content: g,
103
+ fontStyle: b,
104
+ fontWeight: S,
105
+ fontColor: x,
106
+ fontSize: $,
107
+ fontFamily: w
108
+ } = e, N = () => {
109
+ const o = document.createElement("canvas"), n = window.devicePixelRatio, r = o.getContext("2d"), U = `${(l + m) * n}px`, W = `${(s + c) * n}px`, z = m * n, y = c * n;
110
+ if (o.setAttribute("width", U), o.setAttribute("height", W), r) {
111
+ if (f) {
112
+ r.translate(z / 2, y / 2), r.rotate(Math.PI / 180 * Number(u));
113
+ const i = new Image();
114
+ i.crossOrigin = "anonymous", i.referrerPolicy = "no-referrer", i.src = f, i.onload = () => {
115
+ r.drawImage(
116
+ i,
117
+ -d * n / 2,
118
+ -p * n / 2,
119
+ d * n,
120
+ p * n
121
+ ), r.restore(), t.base64Url = o.toDataURL();
146
122
  };
147
- } else if (content) {
148
- ctx.textBaseline = "middle";
149
- ctx.textAlign = "center";
150
- ctx.translate(markWidth / 2, markHeight / 2);
151
- ctx.rotate(Math.PI / 180 * Number(rotate));
152
- const markSize = Number(fontSize) * ratio;
153
- ctx.font = `${fontStyle} normal ${fontWeight} ${markSize}px/${markHeight}px ${fontFamily}`;
154
- ctx.fillStyle = fontColor;
155
- ctx.fillText(content, 0, 0);
156
- ctx.restore();
157
- state.base64Url = canvas.toDataURL();
123
+ } else if (g) {
124
+ r.textBaseline = "middle", r.textAlign = "center", r.translate(z / 2, y / 2), r.rotate(Math.PI / 180 * Number(u));
125
+ const i = Number($) * n;
126
+ r.font = `${b} normal ${S} ${i}px/${y}px ${w}`, r.fillStyle = x, r.fillText(g, 0, 0), r.restore(), t.base64Url = o.toDataURL();
158
127
  }
159
- } else {
128
+ } else
160
129
  throw new Error("当前环境不支持Canvas");
161
- }
162
130
  };
163
- init();
164
- watch(
131
+ N(), F(
165
132
  () => [
166
- zIndex,
167
- gapX,
168
- gapY,
169
- width,
170
- height,
171
- rotate,
172
- image,
173
- imageWidth,
174
- imageHeight,
175
- content,
176
- fontStyle,
177
- fontWeight,
178
- fontColor,
179
- fontSize,
180
- fontFamily
133
+ h,
134
+ l,
135
+ s,
136
+ m,
137
+ c,
138
+ u,
139
+ f,
140
+ d,
141
+ p,
142
+ g,
143
+ b,
144
+ S,
145
+ x,
146
+ $,
147
+ w
181
148
  ],
182
149
  () => {
183
- init();
150
+ N();
184
151
  }
185
152
  );
186
- const classes = computed(() => {
187
- const prefixCls = componentName;
153
+ const P = X(() => {
154
+ const o = q;
188
155
  return {
189
- [prefixCls]: true,
190
- [`${prefixCls}-full-page`]: props.fullPage
156
+ [o]: !0,
157
+ [`${o}-full-page`]: e.fullPage
191
158
  };
192
159
  });
193
- return __spreadProps(__spreadValues({}, toRefs(state)), { classes });
160
+ return C(v({}, D(t)), { classes: P });
194
161
  }
195
162
  });
196
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
197
- return openBlock(), createElementBlock("view", {
198
- class: normalizeClass(_ctx.classes),
199
- style: normalizeStyle({
200
- zIndex: _ctx.zIndex,
201
- backgroundSize: `${_ctx.gapX + _ctx.width}px`,
202
- backgroundImage: `url('${_ctx.base64Url}')`
163
+ function K(e, a, t, h, l, s) {
164
+ return L(), M("view", {
165
+ class: Y(e.classes),
166
+ style: O({
167
+ zIndex: e.zIndex,
168
+ backgroundSize: `${e.gapX + e.width}px`,
169
+ backgroundImage: `url('${e.base64Url}')`
203
170
  })
204
171
  }, null, 6);
205
172
  }
206
- const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
173
+ const ae = /* @__PURE__ */ j(J, [["render", K]]);
207
174
  export {
208
- index as default
175
+ ae as default
209
176
  };
@@ -0,0 +1,9 @@
1
+ const s = (t, r) => {
2
+ const o = t.__vccOpts || t;
3
+ for (const [c, e] of r)
4
+ o[c] = e;
5
+ return o;
6
+ };
7
+ export {
8
+ s as _
9
+ };
@@ -0,0 +1,116 @@
1
+ import { shallowReactive as p, getCurrentInstance as d, provide as l, markRaw as i, isVNode as m, computed as c, h as y } from "vue";
2
+ import { c as g } from "./component-234624bc.js";
3
+ import { p as v } from "./pxCheck-38173291.js";
4
+ function b(n, o) {
5
+ const t = [], u = (e) => {
6
+ Array.isArray(e) && e.forEach((r) => {
7
+ var a;
8
+ if (m(r)) {
9
+ if (o) {
10
+ if (r.type && r.type.name === o) {
11
+ t.push(r);
12
+ return;
13
+ }
14
+ } else
15
+ t.push(r);
16
+ (a = r.component) != null && a.subTree && u(r.component.subTree.children), r.children && u(r.children);
17
+ }
18
+ });
19
+ };
20
+ return u(n), t;
21
+ }
22
+ function x(n, o, t) {
23
+ const u = b(n.subTree.children, t);
24
+ o.sort((e, r) => u.indexOf(e.vnode) - u.indexOf(r.vnode));
25
+ }
26
+ function C(n, o) {
27
+ const t = p([]), u = d(), e = (s) => {
28
+ s.proxy && (t.push(i(s)), x(u, t, o));
29
+ }, r = (s) => {
30
+ t.splice(t.indexOf(i(s)), 1);
31
+ }, a = Object.assign;
32
+ return (s) => (l(
33
+ n,
34
+ a(
35
+ {
36
+ add: e,
37
+ remove: r,
38
+ internalChildren: t
39
+ },
40
+ s
41
+ )
42
+ ), {
43
+ internalChildren: t
44
+ });
45
+ }
46
+ const { componentName: f } = g("grid"), B = Symbol("grid"), N = {
47
+ // 列数
48
+ columnNum: {
49
+ type: [Number, String],
50
+ default: 4
51
+ },
52
+ // 是否显示边框
53
+ border: {
54
+ type: Boolean,
55
+ default: !0
56
+ },
57
+ // 格子之间间隔距离
58
+ gutter: {
59
+ type: [Number, String],
60
+ default: 0
61
+ },
62
+ // 是否内容居中
63
+ center: {
64
+ type: Boolean,
65
+ default: !0
66
+ },
67
+ // 是否固定正方形
68
+ square: {
69
+ type: Boolean,
70
+ default: !1
71
+ },
72
+ // 内容与文字翻转
73
+ reverse: {
74
+ type: Boolean,
75
+ default: !1
76
+ },
77
+ // 内容排列方向
78
+ direction: {
79
+ type: String
80
+ },
81
+ // 是否开启点击反馈
82
+ clickable: {
83
+ type: Boolean,
84
+ default: !1
85
+ }
86
+ }, w = {
87
+ props: N,
88
+ setup(n, { slots: o }) {
89
+ C(B, `${f}-item`)({ props: n });
90
+ const t = c(() => {
91
+ const e = f;
92
+ return {
93
+ [e]: !0,
94
+ [`${e}--border`]: n.border && !n.gutter
95
+ };
96
+ }), u = c(() => {
97
+ const e = {};
98
+ return n.gutter && (e.paddingLeft = v(n.gutter)), e;
99
+ });
100
+ return () => {
101
+ var e;
102
+ return y(
103
+ "view",
104
+ {
105
+ class: t.value,
106
+ style: u.value
107
+ },
108
+ (e = o.default) == null ? void 0 : e.call(o)
109
+ );
110
+ };
111
+ }
112
+ };
113
+ export {
114
+ B as G,
115
+ w as c
116
+ };
@@ -0,0 +1,89 @@
1
+ import { defineComponent as i } from "vue";
2
+ import l from "../locale/lang";
3
+ const f = (t) => {
4
+ if (t === null)
5
+ return "null";
6
+ const e = typeof t;
7
+ if (e === "undefined" || e === "string")
8
+ return e;
9
+ switch (toString.call(t)) {
10
+ case "[object Array]":
11
+ return "array";
12
+ case "[object Date]":
13
+ return "date";
14
+ case "[object Boolean]":
15
+ return "boolean";
16
+ case "[object Number]":
17
+ return "number";
18
+ case "[object Function]":
19
+ return "function";
20
+ case "[object RegExp]":
21
+ return "regexp";
22
+ case "[object Object]":
23
+ return t.nodeType !== void 0 ? t.nodeType == 3 ? /\S/.test(t.nodeValue) ? "textnode" : "whitespace" : "element" : "object";
24
+ default:
25
+ return "unknow";
26
+ }
27
+ }, j = Array.isArray, h = (t) => t instanceof Date, s = (t) => typeof t == "function", y = (t) => typeof t == "string", p = (t) => t !== null && typeof t == "object", m = (t) => p(t) && s(t.then) && s(t.catch), b = document, w = b.body, u = (t, e) => {
28
+ try {
29
+ return e.split(".").reduce((r, o) => r[o], t);
30
+ } catch (r) {
31
+ return "";
32
+ }
33
+ }, x = (t, e, r) => {
34
+ let o = Object.assign({}, t), c = Object.assign({}, r);
35
+ return Object.keys(e).length > 0 ? (Object.keys(o).forEach((n) => {
36
+ if (c.hasOwnProperty(n)) {
37
+ const a = f(c[n]);
38
+ a == "function" && (o[n] = c[n](e)), a == "string" && (o[n] = e[c[n]]);
39
+ } else
40
+ e[n] && (o[n] = e[n]);
41
+ }), o) : t;
42
+ };
43
+ function F(t, e = 2) {
44
+ return Object.is(parseFloat(t), NaN) ? console.log(`传入的值:${t}不是一个数字`) : (t = parseFloat(t), (Math.round((t + Number.EPSILON) * Math.pow(10, e)) / Math.pow(10, e)).toFixed(e));
45
+ }
46
+ function N(t, e) {
47
+ (typeof t.cancelable != "boolean" || t.cancelable) && t.preventDefault(), e && t.stopPropagation();
48
+ }
49
+ const O = (t, e = 2) => {
50
+ for (t += ""; t.length < e; )
51
+ t = "0" + t;
52
+ return t.toString();
53
+ }, S = (t, e, r) => Math.min(Math.max(t, e), r), D = () => window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;
54
+ function T(t) {
55
+ const e = "nut-" + t;
56
+ return {
57
+ componentName: e,
58
+ translate(r, ...o) {
59
+ const c = l.languages(), n = u(c, `${t.replace("-", "")}.${r}`) || u(c, r);
60
+ return s(n) ? n(...o) : n;
61
+ },
62
+ create: function(r) {
63
+ return r.baseName = t, r.name = e, r.install = (o) => {
64
+ o.component(r.name, r);
65
+ }, i(r);
66
+ },
67
+ createDemo: function(r) {
68
+ return r.baseName = t, r.name = "demo-" + t, i(r);
69
+ }
70
+ };
71
+ }
72
+ export {
73
+ f as T,
74
+ h as a,
75
+ w as b,
76
+ T as c,
77
+ N as d,
78
+ S as e,
79
+ m as f,
80
+ p as g,
81
+ u as h,
82
+ j as i,
83
+ y as j,
84
+ s as k,
85
+ D as l,
86
+ F as m,
87
+ x as n,
88
+ O as p
89
+ };