@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.
- package/CHANGELOG.md +17 -0
- package/dist/nutui.es.js +1 -1
- package/dist/nutui.js +6550 -8291
- package/dist/nutui.umd.js +1 -1
- package/dist/packages/_es/ActionSheet.js +78 -111
- package/dist/packages/_es/Address.js +250 -375
- package/dist/packages/_es/AddressList.js +269 -354
- package/dist/packages/_es/Animate.js +41 -58
- package/dist/packages/_es/Audio.js +128 -197
- package/dist/packages/_es/AudioOperate.js +60 -71
- package/dist/packages/_es/Avatar.js +66 -89
- package/dist/packages/_es/AvatarGroup.js +23 -31
- package/dist/packages/_es/Backtop.js +59 -99
- package/dist/packages/_es/Badge.js +36 -47
- package/dist/packages/_es/Barrage.js +68 -147
- package/dist/packages/_es/Button.js +47 -66
- package/dist/packages/_es/Calendar.js +135 -157
- package/dist/packages/_es/CalendarItem.js +6 -6
- package/dist/packages/_es/Card.js +42 -56
- package/dist/packages/_es/Cascader.js +315 -474
- package/dist/packages/_es/Category.js +29 -39
- package/dist/packages/_es/CategoryPane.js +57 -83
- package/dist/packages/_es/Cell.js +56 -71
- package/dist/packages/_es/CellGroup.js +19 -27
- package/dist/packages/_es/Checkbox.js +109 -156
- package/dist/packages/_es/CheckboxGroup.js +38 -59
- package/dist/packages/_es/CircleProgress.js +67 -96
- package/dist/packages/_es/Col.js +23 -31
- package/dist/packages/_es/Collapse.js +33 -58
- package/dist/packages/_es/CollapseItem.js +78 -108
- package/dist/packages/_es/Comment.js +207 -279
- package/dist/packages/_es/ConfigProvider.js +37 -55
- package/dist/packages/_es/Countdown.js +100 -212
- package/dist/packages/_es/Countup.js +232 -445
- package/dist/packages/_es/DatePicker.js +162 -265
- package/dist/packages/_es/Dialog.js +161 -213
- package/dist/packages/_es/Divider.js +42 -57
- package/dist/packages/_es/Drag.js +70 -153
- package/dist/packages/_es/Ecard.js +64 -104
- package/dist/packages/_es/Elevator.js +143 -219
- package/dist/packages/_es/Ellipsis.js +95 -178
- package/dist/packages/_es/Empty.js +23 -39
- package/dist/packages/_es/FixedNav.js +93 -116
- package/dist/packages/_es/Form.js +107 -178
- package/dist/packages/_es/FormItem.js +48 -61
- package/dist/packages/_es/Grid.js +5 -6
- package/dist/packages/_es/GridItem.js +58 -84
- package/dist/packages/_es/Image.js +90 -129
- package/dist/packages/_es/ImagePreview.js +256 -412
- package/dist/packages/_es/Indicator.js +30 -34
- package/dist/packages/_es/InfiniteLoading.js +83 -136
- package/dist/packages/_es/Input.js +160 -264
- package/dist/packages/_es/InputNumber.js +81 -117
- package/dist/packages/_es/Interceptor-6e26b757.js +18 -0
- package/dist/packages/_es/Invoice.js +104 -130
- package/dist/packages/_es/Layout.js +3 -4
- package/dist/packages/_es/List.js +117 -215
- package/dist/packages/_es/Menu.js +95 -150
- package/dist/packages/_es/MenuItem.js +109 -154
- package/dist/packages/_es/Navbar.js +103 -119
- package/dist/packages/_es/Noticebar.js +197 -312
- package/dist/packages/_es/Notify.js +110 -166
- package/dist/packages/_es/NumberKeyboard.js +127 -202
- package/dist/packages/_es/Overlay.js +52 -80
- package/dist/packages/_es/Pagination.js +70 -100
- package/dist/packages/_es/Picker.js +275 -437
- package/dist/packages/_es/Popover.js +122 -225
- package/dist/packages/_es/Popup.js +4 -4
- package/dist/packages/_es/Price.js +44 -82
- package/dist/packages/_es/Progress.js +63 -79
- package/dist/packages/_es/PullRefresh.js +95 -173
- package/dist/packages/_es/Radio.js +4 -4
- package/dist/packages/_es/RadioGroup.js +3 -3
- package/dist/packages/_es/Range.js +204 -347
- package/dist/packages/_es/Rate.js +92 -141
- package/dist/packages/_es/Row.js +21 -27
- package/dist/packages/_es/Searchbar.js +123 -174
- package/dist/packages/_es/ShortPassword.js +69 -93
- package/dist/packages/_es/SideNavbar.js +49 -80
- package/dist/packages/_es/SideNavbarItem.js +22 -32
- package/dist/packages/_es/Signature.js +83 -146
- package/dist/packages/_es/Skeleton.js +110 -130
- package/dist/packages/_es/Sku.js +250 -343
- package/dist/packages/_es/Step.js +59 -86
- package/dist/packages/_es/Steps.js +26 -31
- package/dist/packages/_es/Sticky.js +4 -4
- package/dist/packages/_es/SubSideNavbar.js +52 -74
- package/dist/packages/_es/Swipe.js +83 -155
- package/dist/packages/_es/Swiper.js +174 -311
- package/dist/packages/_es/SwiperItem.js +28 -44
- package/dist/packages/_es/Switch.js +55 -68
- package/dist/packages/_es/TabPane.js +30 -41
- package/dist/packages/_es/Tabbar.js +41 -52
- package/dist/packages/_es/TabbarItem.js +61 -82
- package/dist/packages/_es/Table.js +109 -165
- package/dist/packages/_es/Tabs.js +240 -388
- package/dist/packages/_es/Tag.js +44 -61
- package/dist/packages/_es/Textarea.js +80 -124
- package/dist/packages/_es/TimeDetail.js +49 -76
- package/dist/packages/_es/TimePannel.js +34 -48
- package/dist/packages/_es/TimeSelect.js +47 -68
- package/dist/packages/_es/Toast.js +144 -218
- package/dist/packages/_es/Tour.js +138 -192
- package/dist/packages/_es/TrendArrow.js +57 -77
- package/dist/packages/_es/Uploader.js +234 -359
- package/dist/packages/_es/Video.js +191 -316
- package/dist/packages/_es/Watermark.js +84 -117
- package/dist/packages/_es/_plugin-vue_export-helper-dad06003.js +9 -0
- package/dist/packages/_es/common-d218746f.js +116 -0
- package/dist/packages/_es/component-234624bc.js +89 -0
- package/dist/packages/_es/index-14dfadc4.js +561 -0
- package/dist/packages/_es/index-192a3ef6.js +29 -0
- package/dist/packages/_es/index-360c5092.js +210 -0
- package/dist/packages/_es/index-496e6e05.js +24 -0
- package/dist/packages/_es/index-50eed3d9.js +7 -0
- package/dist/packages/_es/index-53ec2d4d.js +34 -0
- package/dist/packages/_es/index-fadb0974.js +8 -0
- package/dist/packages/_es/index.vue_vue_type_script_lang-1139b29a.js +43 -0
- package/dist/packages/_es/index.vue_vue_type_script_lang-43b774dd.js +77 -0
- package/dist/packages/_es/index.vue_vue_type_script_lang-f44c159d.js +110 -0
- package/dist/packages/_es/mountComponent-6d4ff200.js +23 -0
- package/dist/packages/_es/pxCheck-38173291.js +4 -0
- package/dist/packages/_es/raf-a74f1a06.js +16 -0
- package/dist/packages/_es/renderIcon-47498b32.js +5 -0
- package/dist/smartips/web-types.json +1 -1
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +154 -51
- package/dist/styles/themes/jdb.scss +154 -51
- package/dist/styles/themes/jddkh.scss +154 -51
- package/dist/styles/themes/jdt.scss +154 -51
- package/dist/types/__VUE/address/index.vue.d.ts +1 -1
- package/dist/types/__VUE/collapseitem/index.vue.d.ts +110 -3
- package/dist/types/__VUE/image/index.vue.d.ts +2 -2
- package/dist/types/__VUE/rate/index.vue.d.ts +110 -3
- package/dist/types/__VUE/searchbar/index.vue.d.ts +110 -3
- package/dist/types/__VUE/skeleton/index.vue.d.ts +2 -2
- package/dist/types/__VUE/swiper/index.vue.d.ts +1 -1
- package/dist/types/__VUE/table/common.d.ts +55 -2
- package/dist/types/__VUE/timeselect/index.vue.d.ts +1 -1
- package/dist/types/__VUE/watermark/index.vue.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +2 -2
- package/dist/packages/_es/Interceptor-956b24fc.js +0 -29
- package/dist/packages/_es/_plugin-vue_export-helper-cc2b3d55.js +0 -10
- package/dist/packages/_es/common-b9a5e726.js +0 -145
- package/dist/packages/_es/component-81a4c1d0.js +0 -145
- package/dist/packages/_es/index-29892cda.js +0 -33
- package/dist/packages/_es/index-43c34ac6.js +0 -30
- package/dist/packages/_es/index-54d03fc1.js +0 -8
- package/dist/packages/_es/index-79c5dc33.js +0 -10
- package/dist/packages/_es/index-7a7385e4.js +0 -67
- package/dist/packages/_es/index-87422be8.js +0 -942
- package/dist/packages/_es/index-da0a7662.js +0 -259
- package/dist/packages/_es/index.vue_vue_type_script_lang-22dfc112.js +0 -46
- package/dist/packages/_es/index.vue_vue_type_script_lang-442e4704.js +0 -98
- package/dist/packages/_es/index.vue_vue_type_script_lang-cc5c4086.js +0 -151
- package/dist/packages/_es/mountComponent-8b24c346.js +0 -39
- package/dist/packages/_es/pxCheck-c6b9f6b7.js +0 -6
- package/dist/packages/_es/raf-729dad54.js +0 -25
- package/dist/packages/_es/renderIcon-3d0fd47c.js +0 -9
|
@@ -1,28 +1,20 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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 } =
|
|
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(
|
|
98
|
-
const
|
|
89
|
+
setup(e, { emit: a }) {
|
|
90
|
+
const t = E({
|
|
99
91
|
base64Url: ""
|
|
100
|
-
})
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
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 (
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
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
|
-
|
|
164
|
-
watch(
|
|
131
|
+
N(), F(
|
|
165
132
|
() => [
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
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
|
-
|
|
150
|
+
N();
|
|
184
151
|
}
|
|
185
152
|
);
|
|
186
|
-
const
|
|
187
|
-
const
|
|
153
|
+
const P = X(() => {
|
|
154
|
+
const o = q;
|
|
188
155
|
return {
|
|
189
|
-
[
|
|
190
|
-
[`${
|
|
156
|
+
[o]: !0,
|
|
157
|
+
[`${o}-full-page`]: e.fullPage
|
|
191
158
|
};
|
|
192
159
|
});
|
|
193
|
-
return
|
|
160
|
+
return C(v({}, D(t)), { classes: P });
|
|
194
161
|
}
|
|
195
162
|
});
|
|
196
|
-
function
|
|
197
|
-
return
|
|
198
|
-
class:
|
|
199
|
-
style:
|
|
200
|
-
zIndex:
|
|
201
|
-
backgroundSize: `${
|
|
202
|
-
backgroundImage: `url('${
|
|
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
|
|
173
|
+
const ae = /* @__PURE__ */ j(J, [["render", K]]);
|
|
207
174
|
export {
|
|
208
|
-
|
|
175
|
+
ae as default
|
|
209
176
|
};
|
|
@@ -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
|
+
};
|