@nutui/nutui 4.0.10-beta.1 → 4.0.11
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 +23 -0
- package/dist/nutui.es.js +1 -1
- package/dist/nutui.js +6316 -7237
- 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 +148 -45
- package/dist/styles/themes/jdb.scss +148 -45
- package/dist/styles/themes/jddkh.scss +148 -45
- package/dist/styles/themes/jdt.scss +148 -45
- 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,196 +1,125 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
12
|
-
target[prop] = source[prop];
|
|
13
|
-
}
|
|
14
|
-
return target;
|
|
1
|
+
var $ = Object.getOwnPropertySymbols;
|
|
2
|
+
var F = Object.prototype.hasOwnProperty, I = Object.prototype.propertyIsEnumerable;
|
|
3
|
+
var x = (l, i) => {
|
|
4
|
+
var m = {};
|
|
5
|
+
for (var o in l)
|
|
6
|
+
F.call(l, o) && i.indexOf(o) < 0 && (m[o] = l[o]);
|
|
7
|
+
if (l != null && $)
|
|
8
|
+
for (var o of $(l))
|
|
9
|
+
i.indexOf(o) < 0 && I.call(l, o) && (m[o] = l[o]);
|
|
10
|
+
return m;
|
|
15
11
|
};
|
|
16
|
-
import { g as
|
|
17
|
-
import { computed, reactive, provide, watch, resolveComponent, openBlock, createElementBlock, withModifiers, createVNode, withCtx, renderSlot } from "vue";
|
|
18
|
-
import
|
|
19
|
-
import { _ as
|
|
12
|
+
import { g as T, h as A, f as N, c as W } from "./component-234624bc.js";
|
|
13
|
+
import { computed as q, reactive as G, provide as U, watch as z, resolveComponent as D, openBlock as H, createElementBlock as J, withModifiers as K, createVNode as L, withCtx as Q, renderSlot as X } from "vue";
|
|
14
|
+
import C from "./CellGroup.js";
|
|
15
|
+
import { _ as Y } from "./_plugin-vue_export-helper-dad06003.js";
|
|
20
16
|
import "../locale/lang";
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
default: {}
|
|
27
|
-
},
|
|
28
|
-
rules: {
|
|
29
|
-
type: Object,
|
|
30
|
-
default: {}
|
|
31
|
-
}
|
|
17
|
+
const Z = (l) => ({
|
|
18
|
+
props: {
|
|
19
|
+
modelValue: {
|
|
20
|
+
type: Object,
|
|
21
|
+
default: {}
|
|
32
22
|
},
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
)
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
const tipMessage = (errorMsg) => {
|
|
76
|
-
if (errorMsg.message) {
|
|
77
|
-
emit("validate", errorMsg);
|
|
78
|
-
}
|
|
79
|
-
formErrorTip.value[errorMsg.prop] = errorMsg.message;
|
|
80
|
-
};
|
|
81
|
-
const checkRule = (item) => {
|
|
82
|
-
const { rules, prop } = item;
|
|
83
|
-
const _Promise = (errorMsg) => {
|
|
84
|
-
return new Promise((resolve, reject) => {
|
|
85
|
-
try {
|
|
86
|
-
tipMessage(errorMsg);
|
|
87
|
-
resolve(errorMsg);
|
|
88
|
-
} catch (error) {
|
|
89
|
-
reject(error);
|
|
90
|
-
}
|
|
91
|
-
});
|
|
92
|
-
};
|
|
93
|
-
if (!prop) {
|
|
94
|
-
console.warn("[NutUI] <FormItem> 使用 rules 校验规则时 , 必须设置 prop 参数");
|
|
95
|
-
}
|
|
96
|
-
const value = getPropByPath(props.modelValue, prop || "");
|
|
97
|
-
tipMessage({ prop, message: "" });
|
|
98
|
-
const formRules = props.rules || {};
|
|
99
|
-
const _rules = [...(formRules == null ? void 0 : formRules[prop]) || [], ...rules];
|
|
100
|
-
while (_rules.length) {
|
|
101
|
-
const rule = _rules.shift();
|
|
102
|
-
const _a = rule, { validator } = _a, ruleWithoutValidator = __objRest(_a, ["validator"]);
|
|
103
|
-
const { required, regex, message } = ruleWithoutValidator;
|
|
104
|
-
const errorMsg = { prop, message };
|
|
105
|
-
if (required) {
|
|
106
|
-
if (!value && value !== 0) {
|
|
107
|
-
return _Promise(errorMsg);
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
if (regex && !regex.test(String(value))) {
|
|
111
|
-
return _Promise(errorMsg);
|
|
112
|
-
}
|
|
113
|
-
if (validator) {
|
|
114
|
-
const result = validator(value, ruleWithoutValidator);
|
|
115
|
-
if (isPromise(result)) {
|
|
116
|
-
return new Promise((r, j) => {
|
|
117
|
-
result.then((res) => {
|
|
118
|
-
if (!res) {
|
|
119
|
-
tipMessage(errorMsg);
|
|
120
|
-
r(errorMsg);
|
|
121
|
-
} else {
|
|
122
|
-
r(true);
|
|
123
|
-
}
|
|
124
|
-
}).catch((e) => j(e));
|
|
125
|
-
});
|
|
126
|
-
} else {
|
|
127
|
-
if (!result) {
|
|
128
|
-
return _Promise(errorMsg);
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
}
|
|
23
|
+
rules: {
|
|
24
|
+
type: Object,
|
|
25
|
+
default: {}
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
components: l,
|
|
29
|
+
emits: ["validate"],
|
|
30
|
+
setup(i, { emit: m, slots: o }) {
|
|
31
|
+
const f = q(() => G({}));
|
|
32
|
+
U("formErrorTip", f);
|
|
33
|
+
const _ = () => {
|
|
34
|
+
Object.keys(f.value).forEach((s) => {
|
|
35
|
+
f.value[s] = "";
|
|
36
|
+
});
|
|
37
|
+
}, g = () => {
|
|
38
|
+
_();
|
|
39
|
+
};
|
|
40
|
+
z(
|
|
41
|
+
() => i.modelValue,
|
|
42
|
+
() => {
|
|
43
|
+
_();
|
|
44
|
+
},
|
|
45
|
+
{ immediate: !0 }
|
|
46
|
+
);
|
|
47
|
+
const y = (s) => {
|
|
48
|
+
let n = [];
|
|
49
|
+
return s.forEach((e) => {
|
|
50
|
+
var c, t, a, u;
|
|
51
|
+
let r = e.type;
|
|
52
|
+
r = r.name || r, r == "nut-form-item" || r != null && r.toString().endsWith("form-item") ? n.push({
|
|
53
|
+
prop: (c = e.props) == null ? void 0 : c.prop,
|
|
54
|
+
rules: ((t = e.props) == null ? void 0 : t.rules) || []
|
|
55
|
+
}) : Array.isArray(e.children) && ((a = e.children) != null && a.length) ? n = n.concat(y(e.children)) : T(e.children) && Object.keys(e.children) && (u = e.children) != null && u.default && (e.children = e.children.default(), n = n.concat(y(e.children)));
|
|
56
|
+
}), n;
|
|
57
|
+
}, P = (s) => {
|
|
58
|
+
s.message && m("validate", s), f.value[s.prop] = s.message;
|
|
59
|
+
}, j = (s) => {
|
|
60
|
+
const { rules: n, prop: e } = s, r = (b) => new Promise((h, d) => {
|
|
61
|
+
try {
|
|
62
|
+
P(b), h(b);
|
|
63
|
+
} catch (k) {
|
|
64
|
+
d(k);
|
|
132
65
|
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
const
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
}
|
|
66
|
+
});
|
|
67
|
+
e || console.warn("[NutUI] <FormItem> 使用 rules 校验规则时 , 必须设置 prop 参数");
|
|
68
|
+
const c = A(i.modelValue, e || "");
|
|
69
|
+
P({ prop: e, message: "" });
|
|
70
|
+
const t = i.rules || {}, a = [...(t == null ? void 0 : t[e]) || [], ...n];
|
|
71
|
+
for (; a.length; ) {
|
|
72
|
+
const u = a.shift(), { validator: h } = u, d = x(u, ["validator"]), { required: k, regex: O, message: S } = d, p = { prop: e, message: S };
|
|
73
|
+
if (k && !c && c !== 0 || O && !O.test(String(c)))
|
|
74
|
+
return r(p);
|
|
75
|
+
if (h) {
|
|
76
|
+
const w = h(c, d);
|
|
77
|
+
if (N(w))
|
|
78
|
+
return new Promise((V, B) => {
|
|
79
|
+
w.then((E) => {
|
|
80
|
+
E ? V(!0) : (P(p), V(p));
|
|
81
|
+
}).catch((E) => B(E));
|
|
149
82
|
});
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
83
|
+
if (!w)
|
|
84
|
+
return r(p);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
return Promise.resolve(!0);
|
|
88
|
+
}, v = (s = "") => new Promise((n, e) => {
|
|
89
|
+
try {
|
|
90
|
+
const c = y(o.default()).map((t) => s ? s == t.prop ? j(t) : Promise.resolve(!0) : j(t));
|
|
91
|
+
Promise.all(c).then((t) => {
|
|
92
|
+
t = t.filter((u) => u != !0);
|
|
93
|
+
const a = { valid: !0, errors: [] };
|
|
94
|
+
t.length && (a.valid = !1, a.errors = t), n(a);
|
|
162
95
|
});
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
const { create } = createComponent("form");
|
|
173
|
-
const _sfc_main = create(
|
|
174
|
-
component({
|
|
175
|
-
[CellGroup.name]: CellGroup
|
|
96
|
+
} catch (r) {
|
|
97
|
+
e(r);
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
return { validate: v, reset: g, submit: () => (v(), !1), formErrorTip: f };
|
|
101
|
+
}
|
|
102
|
+
}), { create: M } = W("form"), R = M(
|
|
103
|
+
Z({
|
|
104
|
+
[C.name]: C
|
|
176
105
|
})
|
|
177
106
|
);
|
|
178
|
-
function
|
|
179
|
-
const
|
|
180
|
-
return
|
|
107
|
+
function ee(l, i, m, o, f, _) {
|
|
108
|
+
const g = D("nut-cell-group");
|
|
109
|
+
return H(), J("form", {
|
|
181
110
|
class: "nut-form",
|
|
182
111
|
action: "#",
|
|
183
|
-
onSubmit:
|
|
112
|
+
onSubmit: i[0] || (i[0] = K(() => !1, ["prevent"]))
|
|
184
113
|
}, [
|
|
185
|
-
|
|
186
|
-
default:
|
|
187
|
-
|
|
114
|
+
L(g, null, {
|
|
115
|
+
default: Q(() => [
|
|
116
|
+
X(l.$slots, "default")
|
|
188
117
|
]),
|
|
189
118
|
_: 3
|
|
190
119
|
})
|
|
191
120
|
], 32);
|
|
192
121
|
}
|
|
193
|
-
const
|
|
122
|
+
const ce = /* @__PURE__ */ Y(R, [["render", ee]]);
|
|
194
123
|
export {
|
|
195
|
-
|
|
124
|
+
ce as default
|
|
196
125
|
};
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { p as
|
|
2
|
-
import { inject, provide, computed, resolveComponent, openBlock, createBlock, normalizeClass, normalizeStyle, withCtx
|
|
3
|
-
import { c as
|
|
4
|
-
import
|
|
5
|
-
import { _ as
|
|
1
|
+
import { p as S } from "./pxCheck-38173291.js";
|
|
2
|
+
import { inject as h, provide as _, computed as l, resolveComponent as A, openBlock as o, createBlock as w, normalizeClass as m, normalizeStyle as t, withCtx as $, createElementBlock as p, renderSlot as u, createTextVNode as v, toDisplayString as d, createCommentVNode as y, createElementVNode as f } from "vue";
|
|
3
|
+
import { c as C } from "./component-234624bc.js";
|
|
4
|
+
import c from "./Cell.js";
|
|
5
|
+
import { _ as E } from "./_plugin-vue_export-helper-dad06003.js";
|
|
6
6
|
import "../locale/lang";
|
|
7
|
-
import "./index-
|
|
7
|
+
import "./index-50eed3d9.js";
|
|
8
8
|
import "@nutui/icons-vue";
|
|
9
|
-
const { componentName, create } =
|
|
10
|
-
|
|
11
|
-
inheritAttrs: false,
|
|
9
|
+
const { componentName: I, create: k } = C("form-item"), B = k({
|
|
10
|
+
inheritAttrs: !1,
|
|
12
11
|
props: {
|
|
13
12
|
prop: {
|
|
14
13
|
type: String,
|
|
@@ -20,21 +19,19 @@ const _sfc_main = create({
|
|
|
20
19
|
},
|
|
21
20
|
rules: {
|
|
22
21
|
type: Array,
|
|
23
|
-
default: () =>
|
|
24
|
-
return [];
|
|
25
|
-
}
|
|
22
|
+
default: () => []
|
|
26
23
|
},
|
|
27
24
|
required: {
|
|
28
25
|
type: Boolean,
|
|
29
|
-
default:
|
|
26
|
+
default: !1
|
|
30
27
|
},
|
|
31
28
|
showErrorMessage: {
|
|
32
29
|
type: Boolean,
|
|
33
|
-
default:
|
|
30
|
+
default: !0
|
|
34
31
|
},
|
|
35
32
|
showErrorLine: {
|
|
36
33
|
type: Boolean,
|
|
37
|
-
default:
|
|
34
|
+
default: !0
|
|
38
35
|
},
|
|
39
36
|
labelWidth: {
|
|
40
37
|
type: [String, Number],
|
|
@@ -54,69 +51,59 @@ const _sfc_main = create({
|
|
|
54
51
|
}
|
|
55
52
|
},
|
|
56
53
|
components: {
|
|
57
|
-
[
|
|
54
|
+
[c.name]: c
|
|
58
55
|
},
|
|
59
56
|
emits: [""],
|
|
60
|
-
setup(
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
props
|
|
57
|
+
setup(e, { emit: g, slots: n }) {
|
|
58
|
+
const s = h("formErrorTip");
|
|
59
|
+
_("form", {
|
|
60
|
+
props: e
|
|
64
61
|
});
|
|
65
|
-
const
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
})
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
};
|
|
75
|
-
});
|
|
76
|
-
const errorMessageStyle = computed(() => {
|
|
77
|
-
return {
|
|
78
|
-
textAlign: props.errorMessageAlign
|
|
79
|
-
};
|
|
80
|
-
});
|
|
81
|
-
const getSlots = (name) => slots[name];
|
|
82
|
-
return { parent, labelStyle, bodyStyle, errorMessageStyle, getSlots };
|
|
62
|
+
const a = l(() => ({
|
|
63
|
+
width: S(e.labelWidth),
|
|
64
|
+
textAlign: e.labelAlign
|
|
65
|
+
})), i = l(() => ({
|
|
66
|
+
textAlign: e.bodyAlign
|
|
67
|
+
})), r = l(() => ({
|
|
68
|
+
textAlign: e.errorMessageAlign
|
|
69
|
+
}));
|
|
70
|
+
return { parent: s, labelStyle: a, bodyStyle: i, errorMessageStyle: r, getSlots: (b) => n[b] };
|
|
83
71
|
}
|
|
84
|
-
});
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
style: normalizeStyle(_ctx.$attrs.style)
|
|
72
|
+
}), M = { class: "nut-cell__value nut-form-item__body" };
|
|
73
|
+
function N(e, g, n, s, a, i) {
|
|
74
|
+
const r = A("nut-cell");
|
|
75
|
+
return o(), w(r, {
|
|
76
|
+
class: m(["nut-form-item", [{ error: e.parent[e.prop], line: e.showErrorLine }, e.$attrs.class]]),
|
|
77
|
+
style: t(e.$attrs.style)
|
|
91
78
|
}, {
|
|
92
|
-
default:
|
|
93
|
-
|
|
79
|
+
default: $(() => [
|
|
80
|
+
e.label || e.getSlots("label") ? (o(), p("view", {
|
|
94
81
|
key: 0,
|
|
95
|
-
class:
|
|
96
|
-
style:
|
|
82
|
+
class: m(["nut-cell__title nut-form-item__label", { required: e.required }]),
|
|
83
|
+
style: t(e.labelStyle)
|
|
97
84
|
}, [
|
|
98
|
-
|
|
99
|
-
|
|
85
|
+
u(e.$slots, "label", {}, () => [
|
|
86
|
+
v(d(e.label), 1)
|
|
100
87
|
])
|
|
101
|
-
], 6)) :
|
|
102
|
-
|
|
103
|
-
|
|
88
|
+
], 6)) : y("", !0),
|
|
89
|
+
f("view", M, [
|
|
90
|
+
f("view", {
|
|
104
91
|
class: "nut-form-item__body__slots",
|
|
105
|
-
style:
|
|
92
|
+
style: t(e.bodyStyle)
|
|
106
93
|
}, [
|
|
107
|
-
|
|
94
|
+
u(e.$slots, "default")
|
|
108
95
|
], 4),
|
|
109
|
-
|
|
96
|
+
e.parent[e.prop] && e.showErrorMessage ? (o(), p("view", {
|
|
110
97
|
key: 0,
|
|
111
98
|
class: "nut-form-item__body__tips",
|
|
112
|
-
style:
|
|
113
|
-
},
|
|
99
|
+
style: t(e.errorMessageStyle)
|
|
100
|
+
}, d(e.parent[e.prop]), 5)) : y("", !0)
|
|
114
101
|
])
|
|
115
102
|
]),
|
|
116
103
|
_: 3
|
|
117
104
|
}, 8, ["class", "style"]);
|
|
118
105
|
}
|
|
119
|
-
const
|
|
106
|
+
const G = /* @__PURE__ */ E(B, [["render", N]]);
|
|
120
107
|
export {
|
|
121
|
-
|
|
108
|
+
G as default
|
|
122
109
|
};
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { c as
|
|
1
|
+
import { c as o } from "./component-234624bc.js";
|
|
2
2
|
import "vue";
|
|
3
|
-
import { c as
|
|
3
|
+
import { c as t } from "./common-d218746f.js";
|
|
4
4
|
import "../locale/lang";
|
|
5
|
-
import "./pxCheck-
|
|
6
|
-
const { create } =
|
|
7
|
-
const _sfc_main = create(component);
|
|
5
|
+
import "./pxCheck-38173291.js";
|
|
6
|
+
const { create: r } = o("grid"), i = r(t);
|
|
8
7
|
export {
|
|
9
|
-
|
|
8
|
+
i as default
|
|
10
9
|
};
|