@nutui/nutui 3.1.22-beta.0 → 3.1.22
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 +48 -0
- package/README.md +3 -4
- package/dist/nutui.es.js +4203 -19263
- package/dist/nutui.umd.js +4208 -19368
- package/dist/packages/_es/ActionSheet.js +17 -167
- package/dist/packages/_es/Address.js +110 -552
- package/dist/packages/_es/AddressList.js +113 -613
- package/dist/packages/_es/Animate.js +22 -0
- package/dist/packages/_es/Audio.js +53 -274
- package/dist/packages/_es/AudioOperate.js +13 -121
- package/dist/packages/_es/Avatar.js +38 -177
- package/dist/packages/_es/AvatarGroup.js +14 -73
- package/dist/packages/_es/BackTop.js +43 -156
- package/dist/packages/_es/Badge.js +14 -86
- package/dist/packages/_es/Barrage.js +41 -120
- package/dist/packages/_es/Button.js +23 -128
- package/dist/packages/_es/Calendar.js +30 -237
- package/dist/packages/_es/CalendarItem.js +2 -1
- package/dist/packages/_es/Card.js +10 -107
- package/dist/packages/_es/Cascader.js +147 -523
- package/dist/packages/_es/Category.js +15 -58
- package/dist/packages/_es/CategoryPane.js +11 -111
- package/dist/packages/_es/Cell.js +21 -100
- package/dist/packages/_es/CellGroup.js +9 -44
- package/dist/packages/_es/Checkbox.js +31 -113
- package/dist/packages/_es/CheckboxGroup.js +29 -58
- package/dist/packages/_es/CircleProgress.js +28 -151
- package/dist/packages/_es/Col.js +14 -56
- package/dist/packages/_es/Collapse.js +32 -84
- package/dist/packages/_es/CollapseItem.js +59 -272
- package/dist/packages/_es/Comment.js +64 -434
- package/dist/packages/_es/ConfigProvider.js +13 -0
- package/dist/packages/_es/CountDown.js +56 -256
- package/dist/packages/_es/CountUp.js +140 -556
- package/dist/packages/_es/DatePicker.js +98 -332
- package/dist/packages/_es/Dialog.js +60 -271
- package/dist/packages/_es/Divider.js +13 -82
- package/dist/packages/_es/Drag.js +56 -197
- package/dist/packages/_es/Ecard.js +24 -159
- package/dist/packages/_es/Elevator.js +58 -212
- package/dist/packages/_es/Ellipsis.js +64 -0
- package/dist/packages/_es/Empty.js +12 -71
- package/dist/packages/_es/FixedNav.js +15 -122
- package/dist/packages/_es/Form.js +64 -151
- package/dist/packages/_es/FormItem.js +15 -110
- package/dist/packages/_es/Grid.js +5 -6
- package/dist/packages/_es/GridItem.js +33 -144
- package/dist/packages/_es/Icon.js +15 -40
- package/dist/packages/_es/Image.js +31 -0
- package/dist/packages/_es/ImagePreview.js +77 -309
- package/dist/packages/_es/Indicator.js +15 -62
- package/dist/packages/_es/InfiniteLoading.js +57 -268
- package/dist/packages/_es/Input.js +51 -413
- package/dist/packages/_es/InputNumber.js +41 -160
- package/dist/packages/_es/Layout.js +4 -5
- package/dist/packages/_es/List.js +18 -124
- package/dist/packages/_es/Menu.js +45 -118
- package/dist/packages/_es/MenuItem.js +37 -162
- package/dist/packages/_es/Navbar.js +30 -192
- package/dist/packages/_es/NoticeBar.js +74 -397
- package/dist/packages/_es/Notify.js +72 -246
- package/dist/packages/_es/NumberKeyboard.js +41 -272
- package/dist/packages/_es/OldPicker.js +131 -474
- package/dist/packages/_es/OverLay.js +24 -113
- package/dist/packages/_es/Pagination.js +39 -157
- package/dist/packages/_es/Picker.js +129 -469
- package/dist/packages/_es/Popover.js +318 -975
- package/dist/packages/_es/Popup.js +55 -313
- package/dist/packages/_es/Price.js +16 -118
- package/dist/packages/_es/Progress.js +14 -146
- package/dist/packages/_es/PullRefresh.js +84 -354
- package/dist/packages/_es/Radio.js +22 -90
- package/dist/packages/_es/RadioGroup.js +8 -37
- package/dist/packages/_es/Range.js +83 -427
- package/dist/packages/_es/Rate.js +35 -137
- package/dist/packages/_es/Row.js +22 -64
- package/dist/packages/_es/SearchBar.js +37 -257
- package/dist/packages/_es/ShortPassword.js +35 -225
- package/dist/packages/_es/SideNavBar.js +24 -99
- package/dist/packages/_es/SideNavBarItem.js +11 -46
- package/dist/packages/_es/Signature.js +41 -179
- package/dist/packages/_es/Skeleton.js +20 -136
- package/dist/packages/_es/Sku.js +84 -509
- package/dist/packages/_es/Step.js +20 -133
- package/dist/packages/_es/Steps.js +18 -53
- package/dist/packages/_es/Sticky.js +53 -138
- package/dist/packages/_es/SubSideNavBar.js +17 -100
- package/dist/packages/_es/Swipe.js +41 -197
- package/dist/packages/_es/Swiper.js +121 -433
- package/dist/packages/_es/SwiperItem.js +22 -53
- package/dist/packages/_es/Switch.js +21 -116
- package/dist/packages/_es/TabPane.js +12 -39
- package/dist/packages/_es/Tabbar.js +17 -72
- package/dist/packages/_es/TabbarItem.js +29 -151
- package/dist/packages/_es/Table.js +18 -196
- package/dist/packages/_es/Tabs.js +43 -217
- package/dist/packages/_es/Tag.js +20 -97
- package/dist/packages/_es/TextArea.js +42 -160
- package/dist/packages/_es/TimeDetail.js +18 -98
- package/dist/packages/_es/TimePannel.js +14 -66
- package/dist/packages/_es/TimeSelect.js +15 -103
- package/dist/packages/_es/Toast.js +71 -329
- package/dist/packages/_es/Uploader.js +104 -468
- package/dist/packages/_es/Video.js +74 -350
- package/dist/packages/_es/common.js +38 -128
- package/dist/packages/_es/component.js +35 -76
- package/dist/packages/_es/index.js +5 -6
- package/dist/packages/_es/index2.js +9 -30
- package/dist/packages/_es/index3.js +6 -8
- package/dist/packages/_es/index4.js +13 -58
- package/dist/packages/_es/index5.js +164 -682
- package/dist/packages/_es/plugin-vue_export-helper.js +7 -8
- package/dist/packages/_es/pxCheck.js +3 -5
- package/dist/packages/_es/raf.js +8 -15
- package/dist/packages/animate/index.scss +299 -0
- package/dist/packages/button/index.scss +2 -1
- package/dist/packages/cell/index.scss +18 -1
- package/dist/packages/checkbox/index.scss +16 -0
- package/dist/packages/configprovider/index.scss +2 -0
- package/dist/packages/dialog/index.scss +1 -0
- package/dist/packages/elevator/index.scss +21 -0
- package/dist/packages/ellipsis/index.scss +12 -0
- package/dist/packages/formitem/index.scss +12 -0
- package/dist/packages/griditem/index.scss +11 -0
- package/dist/packages/image/index.scss +39 -0
- package/dist/packages/imagepreview/index.scss +21 -2
- package/dist/packages/input/index.scss +26 -1
- package/dist/packages/inputnumber/index.scss +21 -0
- package/dist/packages/locale/lang/baseLang.d.ts +1 -0
- package/dist/packages/locale/lang/baseLang.js +3 -3
- package/dist/packages/locale/lang/en-US.d.ts +8 -0
- package/dist/packages/locale/lang/en-US.js +5 -97
- package/dist/packages/locale/lang/id-ID.d.ts +8 -0
- package/dist/packages/locale/lang/id-ID.js +5 -97
- package/dist/packages/locale/lang/index.js +16 -38
- package/dist/packages/locale/lang/zh-CN.d.ts +8 -0
- package/dist/packages/locale/lang/zh-CN.js +5 -97
- package/dist/packages/locale/lang/zh-TW.d.ts +8 -0
- package/dist/packages/locale/lang/zh-TW.js +5 -97
- package/dist/packages/menu/index.scss +45 -36
- package/dist/packages/menuitem/index.scss +4 -0
- package/dist/packages/navbar/index.scss +9 -0
- package/dist/packages/pagination/index.scss +19 -0
- package/dist/packages/radio/index.scss +19 -0
- package/dist/packages/range/index.scss +19 -0
- package/dist/packages/rate/index.scss +1 -1
- package/dist/packages/searchbar/index.scss +21 -0
- package/dist/packages/switch/index.scss +4 -3
- package/dist/packages/tabbar/index.scss +5 -0
- package/dist/packages/tabbaritem/index.scss +7 -0
- package/dist/packages/tabpane/index.scss +6 -0
- package/dist/packages/tabs/index.scss +22 -0
- package/dist/packages/textarea/index.scss +8 -0
- package/dist/smartips/attributes.json +192 -12
- package/dist/smartips/tags.json +70 -10
- package/dist/smartips/web-types.json +6945 -0
- package/dist/style.css +1 -1
- package/dist/style.es.js +1 -1
- package/dist/styles/font/config.json +3 -1
- package/dist/styles/font/demo_index.html +49 -3
- package/dist/styles/font/iconfont.css +11 -3
- package/dist/styles/font/iconfont.js +15 -15
- package/dist/styles/font/iconfont.json +14 -0
- package/dist/styles/font/iconfont.ttf +0 -0
- package/dist/styles/font/iconfont.woff +0 -0
- package/dist/styles/font/iconfont.woff2 +0 -0
- package/dist/styles/themes/default.scss +54 -50
- package/dist/styles/themes/jdb.scss +54 -50
- package/dist/styles/themes/jdt.scss +54 -50
- package/dist/styles/variables-jdb.scss +22 -1
- package/dist/styles/variables-jdt.scss +22 -1
- package/dist/styles/variables.scss +22 -1
- package/dist/types/__VUE/actionsheet/index.vue.d.ts +2 -2
- package/dist/types/__VUE/address/index.vue.d.ts +4 -4
- package/dist/types/__VUE/addresslist/components/ItemContents.vue.d.ts +1 -0
- package/dist/types/__VUE/animate/index.vue.d.ts +48 -0
- package/dist/types/__VUE/animate/type.d.ts +6 -0
- package/dist/types/__VUE/audiooperate/index.vue.d.ts +1 -0
- package/dist/types/__VUE/avatar/index.vue.d.ts +5 -5
- package/dist/types/__VUE/avatargroup/index.vue.d.ts +2 -2
- package/dist/types/__VUE/badge/index.vue.d.ts +4 -4
- package/dist/types/__VUE/button/index.vue.d.ts +6 -6
- package/dist/types/__VUE/calendaritem/index.vue.d.ts +10 -2
- package/dist/types/__VUE/cascader/index.vue.d.ts +3 -3
- package/dist/types/__VUE/cell/index.vue.d.ts +11 -4
- package/dist/types/__VUE/checkbox/common.d.ts +59 -0
- package/dist/types/__VUE/checkbox/index.vue.d.ts +20 -7
- package/dist/types/__VUE/checkboxgroup/index.vue.d.ts +7 -0
- package/dist/types/__VUE/circleprogress/index.vue.d.ts +2 -2
- package/dist/types/__VUE/collapse/index.vue.d.ts +3 -1
- package/dist/types/__VUE/comment/index.vue.d.ts +2 -2
- package/dist/types/__VUE/configprovider/common.d.ts +20 -0
- package/dist/types/__VUE/configprovider/index.vue.d.ts +33 -0
- package/dist/types/__VUE/datepicker/index.vue.d.ts +2 -2
- package/dist/types/__VUE/dialog/index.d.ts +9 -2
- package/dist/types/__VUE/dialog/index.vue.d.ts +25 -10
- package/dist/types/__VUE/ecard/index.vue.d.ts +3 -3
- package/dist/types/__VUE/elevator/index.vue.d.ts +29 -0
- package/dist/types/__VUE/ellipsis/index.vue.d.ts +72 -0
- package/dist/types/__VUE/empty/index.vue.d.ts +2 -2
- package/dist/types/__VUE/fixednav/index.vue.d.ts +2 -2
- package/dist/types/__VUE/formitem/index.vue.d.ts +3 -10
- package/dist/types/__VUE/grid/index.vue.d.ts +4 -4
- package/dist/types/__VUE/griditem/index.vue.d.ts +1 -1
- package/dist/types/__VUE/image/index.vue.d.ts +105 -0
- package/dist/types/__VUE/image/type.d.ts +6 -0
- package/dist/types/__VUE/imagepreview/index.vue.d.ts +36 -2
- package/dist/types/__VUE/input/index.vue.d.ts +6 -6
- package/dist/types/__VUE/inputnumber/index.vue.d.ts +2 -2
- package/dist/types/__VUE/menu/index.vue.d.ts +29 -2
- package/dist/types/__VUE/menuitem/index.vue.d.ts +12 -3
- package/dist/types/__VUE/noticebar/index.vue.d.ts +3 -3
- package/dist/types/__VUE/notify/index.vue.d.ts +2 -2
- package/dist/types/__VUE/oldpicker/index.vue.d.ts +2 -2
- package/dist/types/__VUE/picker/Column.vue.d.ts +1 -1
- package/dist/types/__VUE/picker/index.vue.d.ts +3 -3
- package/dist/types/__VUE/popover/index.vue.d.ts +6 -6
- package/dist/types/__VUE/popup/index.vue.d.ts +2 -2
- package/dist/types/__VUE/radio/index.vue.d.ts +4 -4
- package/dist/types/__VUE/range/index.vue.d.ts +4 -4
- package/dist/types/__VUE/rate/common.d.ts +149 -0
- package/dist/types/__VUE/rate/index.vue.d.ts +15 -5
- package/dist/types/__VUE/skeleton/index.vue.d.ts +4 -4
- package/dist/types/__VUE/sku/index.vue.d.ts +2 -2
- package/dist/types/__VUE/step/index.vue.d.ts +2 -2
- package/dist/types/__VUE/sticky/index.vue.d.ts +4 -4
- package/dist/types/__VUE/swiper/index.vue.d.ts +4 -4
- package/dist/types/__VUE/tabbar/index.vue.d.ts +2 -2
- package/dist/types/__VUE/tag/index.vue.d.ts +2 -2
- package/dist/types/__VUE/timeselect/index.vue.d.ts +10 -2
- package/dist/types/__VUE/toast/index.vue.d.ts +5 -5
- package/dist/types/__VUE/uploader/index.vue.d.ts +6 -6
- package/dist/types/__VUE/uploader/uploader.d.ts +1 -0
- package/dist/types/__VUE/video/index.vue.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/nutui.d.ts +5 -1
- package/package.json +6 -3
|
@@ -1,158 +1,71 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.22
|
|
2
|
+
* @nutui/nutui v3.1.22 Fri Jun 24 2022 18:11:16 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { i as
|
|
7
|
-
import { computed, reactive, provide, watch, resolveComponent, openBlock, createElementBlock, withModifiers, createVNode, withCtx, renderSlot } from "vue";
|
|
8
|
-
import { _ as
|
|
6
|
+
import { i as e, g as r, a as t, c as o } from "./component.js";
|
|
7
|
+
import { computed as l, reactive as s, provide as n, watch as a, resolveComponent as i, openBlock as m, createElementBlock as p, withModifiers as u, createVNode as c, withCtx as d, renderSlot as f } from "vue";
|
|
8
|
+
import { _ as h } from "./plugin-vue_export-helper.js";
|
|
9
9
|
import "../locale/lang";
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
task = task.concat(findFormItem(vnode.children));
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
return task;
|
|
54
|
-
};
|
|
55
|
-
const tipMessage = (errorMsg) => {
|
|
56
|
-
if (errorMsg.message) {
|
|
57
|
-
emit("validate", errorMsg);
|
|
58
|
-
}
|
|
59
|
-
formErrorTip.value[errorMsg.prop] = errorMsg.message;
|
|
60
|
-
};
|
|
61
|
-
const checkRule = (item) => {
|
|
62
|
-
const { rules, prop } = item;
|
|
63
|
-
const _Promise = (errorMsg) => {
|
|
64
|
-
return new Promise((resolve, reject) => {
|
|
65
|
-
tipMessage(errorMsg);
|
|
66
|
-
resolve(errorMsg);
|
|
67
|
-
});
|
|
68
|
-
};
|
|
69
|
-
if (!prop) {
|
|
70
|
-
console.warn("[NutUI] <FormItem> \u4F7F\u7528 rules \u6821\u9A8C\u89C4\u5219\u65F6 , \u5FC5\u987B\u8BBE\u7F6E prop \u53C2\u6570");
|
|
71
|
-
}
|
|
72
|
-
let value = getPropByPath(props.modelValue, prop || "");
|
|
73
|
-
tipMessage({ prop, message: "" });
|
|
74
|
-
let _rules = [...rules];
|
|
75
|
-
while (_rules.length) {
|
|
76
|
-
const { required, validator, regex, message } = _rules.shift();
|
|
77
|
-
const errorMsg = { prop, message };
|
|
78
|
-
if (required) {
|
|
79
|
-
if (!value) {
|
|
80
|
-
return _Promise(errorMsg);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
if (regex && !regex.test(String(value))) {
|
|
84
|
-
return _Promise(errorMsg);
|
|
85
|
-
}
|
|
86
|
-
if (validator) {
|
|
87
|
-
const result = validator(value);
|
|
88
|
-
if (isPromise(result)) {
|
|
89
|
-
return new Promise((r, j) => {
|
|
90
|
-
result.then((res) => {
|
|
91
|
-
if (!res) {
|
|
92
|
-
tipMessage(errorMsg);
|
|
93
|
-
r(errorMsg);
|
|
94
|
-
} else {
|
|
95
|
-
r(true);
|
|
96
|
-
}
|
|
97
|
-
});
|
|
10
|
+
const v = { props: { modelValue: { type: Object, default: {} } }, components: {}, emits: ["validate"], setup(o2, { emit: i2, slots: m2 }) {
|
|
11
|
+
const p2 = l(() => s({}));
|
|
12
|
+
n("formErrorTip", p2);
|
|
13
|
+
const u2 = (e2 = o2.modelValue) => {
|
|
14
|
+
Object.keys(p2.value).forEach((e3) => {
|
|
15
|
+
p2.value[e3] = "";
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
a(() => o2.modelValue, (e2) => {
|
|
19
|
+
u2(e2);
|
|
20
|
+
}, { immediate: true });
|
|
21
|
+
const c2 = (r2) => {
|
|
22
|
+
let t2 = [];
|
|
23
|
+
return r2.forEach((r3, o3) => {
|
|
24
|
+
var _a, _b, _c, _d;
|
|
25
|
+
let l2 = r3.type;
|
|
26
|
+
l2 = l2.name || l2, l2 == "nut-form-item" ? t2.push({ prop: (_a = r3.props) == null ? void 0 : _a.prop, rules: ((_b = r3.props) == null ? void 0 : _b.rules) || [] }) : Array.isArray(r3.children) && ((_c = r3.children) == null ? void 0 : _c.length) ? t2 = t2.concat(c2(r3.children)) : e(r3.children) && Object.keys(r3.children) && ((_d = r3.children) == null ? void 0 : _d.default) && (r3.children = r3.children.default(), t2 = t2.concat(c2(r3.children)));
|
|
27
|
+
}), t2;
|
|
28
|
+
}, d2 = (e2) => {
|
|
29
|
+
e2.message && i2("validate", e2), p2.value[e2.prop] = e2.message;
|
|
30
|
+
}, f2 = (e2) => {
|
|
31
|
+
const { rules: l2, prop: s2 } = e2, n2 = (e3) => new Promise((r2, t2) => {
|
|
32
|
+
d2(e3), r2(e3);
|
|
33
|
+
});
|
|
34
|
+
let a2 = r(o2.modelValue, s2 || "");
|
|
35
|
+
d2({ prop: s2, message: "" });
|
|
36
|
+
let i3 = [...l2];
|
|
37
|
+
for (; i3.length; ) {
|
|
38
|
+
const { required: e3, validator: r2, regex: o3, message: l3 } = i3.shift(), m3 = { prop: s2, message: l3 };
|
|
39
|
+
if (e3 && !a2)
|
|
40
|
+
return n2(m3);
|
|
41
|
+
if (o3 && !o3.test(String(a2)))
|
|
42
|
+
return n2(m3);
|
|
43
|
+
if (r2) {
|
|
44
|
+
const e4 = r2(a2);
|
|
45
|
+
if (t(e4))
|
|
46
|
+
return new Promise((r3, t2) => {
|
|
47
|
+
e4.then((e5) => {
|
|
48
|
+
e5 ? r3(true) : (d2(m3), r3(m3));
|
|
98
49
|
});
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
}
|
|
50
|
+
});
|
|
51
|
+
if (!e4)
|
|
52
|
+
return n2(m3);
|
|
105
53
|
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
const res = { valid: true, errors: [] };
|
|
125
|
-
if (errorRes.length) {
|
|
126
|
-
res.valid = false;
|
|
127
|
-
res.errors = errorRes;
|
|
128
|
-
}
|
|
129
|
-
resolve(res);
|
|
130
|
-
});
|
|
131
|
-
});
|
|
132
|
-
};
|
|
133
|
-
const onSubmit = () => {
|
|
134
|
-
validate();
|
|
135
|
-
return false;
|
|
136
|
-
};
|
|
137
|
-
return { validate, reset, onSubmit, formErrorTip };
|
|
138
|
-
}
|
|
139
|
-
};
|
|
140
|
-
const { create } = createComponent("form");
|
|
141
|
-
const _sfc_main = create(component);
|
|
142
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
143
|
-
const _component_nut_cell_group = resolveComponent("nut-cell-group");
|
|
144
|
-
return openBlock(), createElementBlock("form", {
|
|
145
|
-
class: "nut-form",
|
|
146
|
-
action: "#",
|
|
147
|
-
onSubmit: _cache[0] || (_cache[0] = withModifiers((...args) => _ctx.onSubmit && _ctx.onSubmit(...args), ["prevent"]))
|
|
148
|
-
}, [
|
|
149
|
-
createVNode(_component_nut_cell_group, null, {
|
|
150
|
-
default: withCtx(() => [
|
|
151
|
-
renderSlot(_ctx.$slots, "default")
|
|
152
|
-
]),
|
|
153
|
-
_: 3
|
|
154
|
-
})
|
|
155
|
-
], 32);
|
|
156
|
-
}
|
|
157
|
-
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
158
|
-
export { index as default };
|
|
54
|
+
}
|
|
55
|
+
return Promise.resolve(true);
|
|
56
|
+
}, h2 = (e2 = "") => new Promise((r2, t2) => {
|
|
57
|
+
let o3 = c2(m2.default()).map((r3) => e2 ? e2 == r3.prop ? f2(r3) : Promise.resolve(true) : f2(r3));
|
|
58
|
+
Promise.all(o3).then((e3) => {
|
|
59
|
+
const t3 = { valid: true, errors: [] };
|
|
60
|
+
(e3 = e3.filter((e4) => e4 != 1)).length && (t3.valid = false, t3.errors = e3), r2(t3);
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
return { validate: h2, reset: () => {
|
|
64
|
+
u2();
|
|
65
|
+
}, onSubmit: () => (h2(), false), formErrorTip: p2 };
|
|
66
|
+
} }, { create: g } = o("form");
|
|
67
|
+
var y = h(g(v), [["render", function(e2, r2, t2, o2, l2, s2) {
|
|
68
|
+
const n2 = i("nut-cell-group");
|
|
69
|
+
return m(), p("form", { class: "nut-form", action: "#", onSubmit: r2[0] || (r2[0] = u(() => false, ["prevent"])) }, [c(n2, null, { default: d(() => [f(e2.$slots, "default")]), _: 3 })], 32);
|
|
70
|
+
}]]);
|
|
71
|
+
export { y as default };
|
|
@@ -1,115 +1,20 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.22
|
|
2
|
+
* @nutui/nutui v3.1.22 Fri Jun 24 2022 18:11:16 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { p as
|
|
7
|
-
import { inject, provide, computed, resolveComponent, openBlock, createBlock, normalizeClass, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode, createElementVNode
|
|
8
|
-
import { c
|
|
9
|
-
import { _ as
|
|
6
|
+
import { p as e } from "./pxCheck.js";
|
|
7
|
+
import { inject as t, provide as r, computed as l, resolveComponent as o, openBlock as s, createBlock as a, normalizeClass as n, normalizeStyle as i, withCtx as p, createElementBlock as u, renderSlot as y, createTextVNode as m, toDisplayString as d, createCommentVNode as f, createElementVNode as g } from "vue";
|
|
8
|
+
import { c } from "./component.js";
|
|
9
|
+
import { _ as b } from "./plugin-vue_export-helper.js";
|
|
10
10
|
import "../locale/lang";
|
|
11
|
-
const { componentName, create } =
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
default: ""
|
|
22
|
-
},
|
|
23
|
-
rules: {
|
|
24
|
-
type: Array,
|
|
25
|
-
default: () => {
|
|
26
|
-
return [];
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
required: {
|
|
30
|
-
type: Boolean,
|
|
31
|
-
default: false
|
|
32
|
-
},
|
|
33
|
-
showErrorMessage: {
|
|
34
|
-
type: Boolean,
|
|
35
|
-
default: true
|
|
36
|
-
},
|
|
37
|
-
showErrorLine: {
|
|
38
|
-
type: Boolean,
|
|
39
|
-
default: true
|
|
40
|
-
},
|
|
41
|
-
labelWidth: {
|
|
42
|
-
type: [String, Number],
|
|
43
|
-
default: ""
|
|
44
|
-
},
|
|
45
|
-
labelAlign: {
|
|
46
|
-
type: String,
|
|
47
|
-
default: ""
|
|
48
|
-
},
|
|
49
|
-
errorMessageAlign: {
|
|
50
|
-
type: String,
|
|
51
|
-
default: ""
|
|
52
|
-
},
|
|
53
|
-
bodyAlign: {
|
|
54
|
-
type: String,
|
|
55
|
-
default: ""
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
components: {},
|
|
59
|
-
emits: [""],
|
|
60
|
-
setup(props, { emit }) {
|
|
61
|
-
const parent = inject("formErrorTip");
|
|
62
|
-
provide("form", {
|
|
63
|
-
props
|
|
64
|
-
});
|
|
65
|
-
const labelStyle = computed(() => {
|
|
66
|
-
return {
|
|
67
|
-
width: pxCheck(props.labelWidth),
|
|
68
|
-
textAlign: props.labelAlign
|
|
69
|
-
};
|
|
70
|
-
});
|
|
71
|
-
const bodyStyle = computed(() => {
|
|
72
|
-
return {
|
|
73
|
-
textAlign: props.bodyAlign
|
|
74
|
-
};
|
|
75
|
-
});
|
|
76
|
-
const errorMessageStyle = computed(() => {
|
|
77
|
-
return {
|
|
78
|
-
textAlign: props.errorMessageAlign
|
|
79
|
-
};
|
|
80
|
-
});
|
|
81
|
-
return { parent, labelStyle, bodyStyle, errorMessageStyle };
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
const _hoisted_1 = { class: "nut-cell__value nut-form-item__body" };
|
|
85
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
86
|
-
const _component_nut_cell = resolveComponent("nut-cell");
|
|
87
|
-
return openBlock(), createBlock(_component_nut_cell, {
|
|
88
|
-
class: normalizeClass(["nut-form-item", [{ error: _ctx.parent[_ctx.prop], line: _ctx.showErrorLine }, _ctx.$attrs.class]]),
|
|
89
|
-
style: normalizeStyle(_ctx.$attrs.style)
|
|
90
|
-
}, {
|
|
91
|
-
default: withCtx(() => [
|
|
92
|
-
_ctx.label ? (openBlock(), createElementBlock("view", {
|
|
93
|
-
key: 0,
|
|
94
|
-
class: normalizeClass(["nut-cell__title nut-form-item__label", { required: _ctx.required }]),
|
|
95
|
-
style: normalizeStyle(_ctx.labelStyle)
|
|
96
|
-
}, toDisplayString(_ctx.label), 7)) : createCommentVNode("", true),
|
|
97
|
-
createElementVNode("view", _hoisted_1, [
|
|
98
|
-
createElementVNode("view", {
|
|
99
|
-
class: "nut-form-item__body__slots",
|
|
100
|
-
style: normalizeStyle(_ctx.bodyStyle)
|
|
101
|
-
}, [
|
|
102
|
-
renderSlot(_ctx.$slots, "default")
|
|
103
|
-
], 4),
|
|
104
|
-
_ctx.parent[_ctx.prop] && _ctx.showErrorMessage ? (openBlock(), createElementBlock("view", {
|
|
105
|
-
key: 0,
|
|
106
|
-
class: "nut-form-item__body__tips",
|
|
107
|
-
style: normalizeStyle(_ctx.errorMessageStyle)
|
|
108
|
-
}, toDisplayString(_ctx.parent[_ctx.prop]), 5)) : createCommentVNode("", true)
|
|
109
|
-
])
|
|
110
|
-
]),
|
|
111
|
-
_: 3
|
|
112
|
-
}, 8, ["class", "style"]);
|
|
113
|
-
}
|
|
114
|
-
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
115
|
-
export { index as default };
|
|
11
|
+
const { componentName: _, create: S } = c("form-item"), A = S({ inheritAttrs: false, props: { prop: { type: String, default: "" }, label: { type: String, default: "" }, rules: { type: Array, default: () => [] }, required: { type: Boolean, default: false }, showErrorMessage: { type: Boolean, default: true }, showErrorLine: { type: Boolean, default: true }, labelWidth: { type: [String, Number], default: "" }, labelAlign: { type: String, default: "" }, errorMessageAlign: { type: String, default: "" }, bodyAlign: { type: String, default: "" } }, components: {}, emits: [""], setup(o2, { emit: s2 }) {
|
|
12
|
+
const a2 = t("formErrorTip");
|
|
13
|
+
r("form", { props: o2 });
|
|
14
|
+
return { parent: a2, labelStyle: l(() => ({ width: e(o2.labelWidth), textAlign: o2.labelAlign })), bodyStyle: l(() => ({ textAlign: o2.bodyAlign })), errorMessageStyle: l(() => ({ textAlign: o2.errorMessageAlign })) };
|
|
15
|
+
} }), h = { class: "nut-cell__value nut-form-item__body" };
|
|
16
|
+
var w = b(A, [["render", function(e2, t2, r2, l2, c2, b2) {
|
|
17
|
+
const _2 = o("nut-cell");
|
|
18
|
+
return s(), a(_2, { class: n(["nut-form-item", [{ error: e2.parent[e2.prop], line: e2.showErrorLine }, e2.$attrs.class]]), style: i(e2.$attrs.style) }, { default: p(() => [e2.label ? (s(), u("view", { key: 0, class: n(["nut-cell__title nut-form-item__label", { required: e2.required }]), style: i(e2.labelStyle) }, [y(e2.$slots, "label", {}, () => [m(d(e2.label), 1)])], 6)) : f("", true), g("view", h, [g("view", { class: "nut-form-item__body__slots", style: i(e2.bodyStyle) }, [y(e2.$slots, "default")], 4), e2.parent[e2.prop] && e2.showErrorMessage ? (s(), u("view", { key: 0, class: "nut-form-item__body__tips", style: i(e2.errorMessageStyle) }, d(e2.parent[e2.prop]), 5)) : f("", true)])]), _: 3 }, 8, ["class", "style"]);
|
|
19
|
+
}]]);
|
|
20
|
+
export { w as default };
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.22
|
|
2
|
+
* @nutui/nutui v3.1.22 Fri Jun 24 2022 18:11:16 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { c as
|
|
7
|
-
import { c as
|
|
6
|
+
import { c as o } from "./component.js";
|
|
7
|
+
import { c as m } from "./common.js";
|
|
8
8
|
import "vue";
|
|
9
9
|
import "../locale/lang";
|
|
10
10
|
import "./pxCheck.js";
|
|
11
|
-
const { create } =
|
|
12
|
-
|
|
13
|
-
export { _sfc_main as default };
|
|
11
|
+
const { create: r } = o("grid"), t = r(m);
|
|
12
|
+
export { t as default };
|
|
@@ -1,150 +1,39 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.22
|
|
2
|
+
* @nutui/nutui v3.1.22 Fri Jun 24 2022 18:11:16 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { inject, getCurrentInstance, onUnmounted, computed, ref, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, renderSlot, Fragment, createBlock, toDisplayString } from "vue";
|
|
7
|
-
import { u as
|
|
8
|
-
import { c as
|
|
9
|
-
import { p as
|
|
10
|
-
import { G as
|
|
11
|
-
import { _ as
|
|
6
|
+
import { inject as e, getCurrentInstance as t, onUnmounted as o, computed as r, ref as n, resolveComponent as i, openBlock as l, createElementBlock as c, normalizeClass as s, normalizeStyle as a, createElementVNode as u, renderSlot as p, Fragment as m, createBlock as d, toDisplayString as f } from "vue";
|
|
7
|
+
import { u as g } from "./index.js";
|
|
8
|
+
import { c as y } from "./component.js";
|
|
9
|
+
import { p as $ } from "./pxCheck.js";
|
|
10
|
+
import { G as k } from "./common.js";
|
|
11
|
+
import { _ as x } from "./plugin-vue_export-helper.js";
|
|
12
12
|
import "../locale/lang";
|
|
13
|
-
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
onUnmounted(() => remove(instance));
|
|
20
|
-
const index2 = computed(() => internalChildren.indexOf(instance));
|
|
21
|
-
return {
|
|
22
|
-
parent,
|
|
23
|
-
index: index2
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
return {
|
|
27
|
-
parent: null,
|
|
28
|
-
index: ref(-1)
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
const { create, componentName } = createComponent("grid-item");
|
|
32
|
-
const _sfc_main = create({
|
|
33
|
-
props: {
|
|
34
|
-
text: {
|
|
35
|
-
type: String
|
|
36
|
-
},
|
|
37
|
-
icon: {
|
|
38
|
-
type: String
|
|
39
|
-
},
|
|
40
|
-
iconSize: {
|
|
41
|
-
type: [Number, String]
|
|
42
|
-
},
|
|
43
|
-
iconColor: {
|
|
44
|
-
type: String
|
|
45
|
-
},
|
|
46
|
-
to: {
|
|
47
|
-
type: [String, Object]
|
|
48
|
-
},
|
|
49
|
-
url: {
|
|
50
|
-
type: String,
|
|
51
|
-
default: ""
|
|
52
|
-
},
|
|
53
|
-
replace: {
|
|
54
|
-
type: Boolean,
|
|
55
|
-
default: false
|
|
13
|
+
const { create: C, componentName: S } = y("grid-item"), v = C({ props: { text: { type: String }, icon: { type: String }, iconSize: { type: [Number, String] }, iconColor: { type: String }, to: { type: [String, Object] }, url: { type: String, default: "" }, replace: { type: Boolean, default: false } }, emits: ["click"], setup(i2, { emit: l2 }) {
|
|
14
|
+
const c2 = function(i3) {
|
|
15
|
+
const l3 = e(i3, null);
|
|
16
|
+
if (l3) {
|
|
17
|
+
const e2 = t(), { add: n2, remove: i4, internalChildren: c3 } = l3;
|
|
18
|
+
return n2(e2), o(() => i4(e2)), { parent: l3, index: r(() => c3.indexOf(e2)) };
|
|
56
19
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
const
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
} else if (parent.gutter) {
|
|
78
|
-
style.paddingRight = pxCheck(parent.gutter);
|
|
79
|
-
if (index2.value >= parent.columnNum) {
|
|
80
|
-
style.marginTop = pxCheck(parent.gutter);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
return style;
|
|
84
|
-
});
|
|
85
|
-
const contentClass = computed(() => {
|
|
86
|
-
const prefixCls = `${componentName}__content`;
|
|
87
|
-
return {
|
|
88
|
-
[`${prefixCls}`]: true,
|
|
89
|
-
[`${prefixCls}--border`]: parent.border,
|
|
90
|
-
[`${prefixCls}--surround`]: parent.border && parent.gutter,
|
|
91
|
-
[`${prefixCls}--center`]: parent.center,
|
|
92
|
-
[`${prefixCls}--square`]: parent.square,
|
|
93
|
-
[`${prefixCls}--reverse`]: parent.reverse,
|
|
94
|
-
[`${prefixCls}--${parent.direction}`]: !!parent.direction,
|
|
95
|
-
[`${prefixCls}--clickable`]: parent.clickable || props.to || props.url
|
|
96
|
-
};
|
|
97
|
-
});
|
|
98
|
-
const iconProps = computed(() => {
|
|
99
|
-
return {
|
|
100
|
-
name: props.icon,
|
|
101
|
-
size: props.iconSize || parent.iconSize,
|
|
102
|
-
color: props.iconColor || parent.iconColor
|
|
103
|
-
};
|
|
104
|
-
});
|
|
105
|
-
const router = useRouter();
|
|
106
|
-
const handleClick = (event) => {
|
|
107
|
-
emit("click", event);
|
|
108
|
-
if (props.to && router) {
|
|
109
|
-
router[props.replace ? "replace" : "push"](props.to);
|
|
110
|
-
} else if (props.url) {
|
|
111
|
-
props.replace ? location.replace(props.url) : location.href = props.url;
|
|
112
|
-
}
|
|
113
|
-
};
|
|
114
|
-
return {
|
|
115
|
-
rootClass,
|
|
116
|
-
rootStyle,
|
|
117
|
-
contentClass,
|
|
118
|
-
iconProps,
|
|
119
|
-
handleClick
|
|
120
|
-
};
|
|
121
|
-
}
|
|
122
|
-
});
|
|
123
|
-
const _hoisted_1 = {
|
|
124
|
-
key: 3,
|
|
125
|
-
class: "nut-grid-item__text"
|
|
126
|
-
};
|
|
127
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
128
|
-
const _component_nut_icon = resolveComponent("nut-icon");
|
|
129
|
-
return openBlock(), createElementBlock("view", {
|
|
130
|
-
class: normalizeClass(_ctx.rootClass),
|
|
131
|
-
style: normalizeStyle(_ctx.rootStyle),
|
|
132
|
-
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClick && _ctx.handleClick(...args))
|
|
133
|
-
}, [
|
|
134
|
-
createElementVNode("view", {
|
|
135
|
-
class: normalizeClass(_ctx.contentClass)
|
|
136
|
-
}, [
|
|
137
|
-
_ctx.$slots.default ? renderSlot(_ctx.$slots, "default", { key: 0 }) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
138
|
-
_ctx.$slots.icon ? renderSlot(_ctx.$slots, "icon", { key: 0 }) : (openBlock(), createBlock(_component_nut_icon, {
|
|
139
|
-
key: 1,
|
|
140
|
-
name: _ctx.iconProps.name,
|
|
141
|
-
size: _ctx.iconProps.size,
|
|
142
|
-
color: _ctx.iconProps.color
|
|
143
|
-
}, null, 8, ["name", "size", "color"])),
|
|
144
|
-
_ctx.$slots.text ? renderSlot(_ctx.$slots, "text", { key: 2 }) : (openBlock(), createElementBlock("view", _hoisted_1, toDisplayString(_ctx.text), 1))
|
|
145
|
-
], 64))
|
|
146
|
-
], 2)
|
|
147
|
-
], 6);
|
|
148
|
-
}
|
|
149
|
-
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
150
|
-
export { index as default };
|
|
20
|
+
return { parent: null, index: n(-1) };
|
|
21
|
+
}(k);
|
|
22
|
+
if (!c2.parent)
|
|
23
|
+
return;
|
|
24
|
+
const s2 = c2.index, a2 = c2.parent.props, u2 = r(() => ({ [S]: true })), p2 = r(() => {
|
|
25
|
+
const e2 = { flexBasis: 100 / +a2.columnNum + "%" };
|
|
26
|
+
return a2.square ? e2.paddingTop = 100 / +a2.columnNum + "%" : a2.gutter && (e2.paddingRight = $(a2.gutter), s2.value >= a2.columnNum && (e2.marginTop = $(a2.gutter))), e2;
|
|
27
|
+
}), m2 = r(() => {
|
|
28
|
+
const e2 = `${S}__content`;
|
|
29
|
+
return { [`${e2}`]: true, [`${e2}--border`]: a2.border, [`${e2}--surround`]: a2.border && a2.gutter, [`${e2}--center`]: a2.center, [`${e2}--square`]: a2.square, [`${e2}--reverse`]: a2.reverse, [`${e2}--${a2.direction}`]: !!a2.direction, [`${e2}--clickable`]: a2.clickable || i2.to || i2.url };
|
|
30
|
+
}), d2 = r(() => ({ name: i2.icon, size: i2.iconSize || a2.iconSize, color: i2.iconColor || a2.iconColor })), f2 = g();
|
|
31
|
+
return { rootClass: u2, rootStyle: p2, contentClass: m2, iconProps: d2, handleClick: (e2) => {
|
|
32
|
+
l2("click", e2), i2.to && f2 ? f2[i2.replace ? "replace" : "push"](i2.to) : i2.url && (i2.replace ? location.replace(i2.url) : location.href = i2.url);
|
|
33
|
+
} };
|
|
34
|
+
} }), h = { key: 3, class: "nut-grid-item__text" };
|
|
35
|
+
var b = x(v, [["render", function(e2, t2, o2, r2, n2, g2) {
|
|
36
|
+
const y2 = i("nut-icon");
|
|
37
|
+
return l(), c("view", { class: s(e2.rootClass), style: a(e2.rootStyle), onClick: t2[0] || (t2[0] = (...t3) => e2.handleClick && e2.handleClick(...t3)) }, [u("view", { class: s(e2.contentClass) }, [e2.$slots.default ? p(e2.$slots, "default", { key: 0 }) : (l(), c(m, { key: 1 }, [e2.$slots.icon ? p(e2.$slots, "icon", { key: 0 }) : (l(), d(y2, { key: 1, name: e2.iconProps.name, size: e2.iconProps.size, color: e2.iconProps.color }, null, 8, ["name", "size", "color"])), e2.$slots.text ? p(e2.$slots, "text", { key: 2 }) : (l(), c("view", h, f(e2.text), 1))], 64))], 2)], 6);
|
|
38
|
+
}]]);
|
|
39
|
+
export { b as default };
|
|
@@ -1,45 +1,20 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.22
|
|
2
|
+
* @nutui/nutui v3.1.22 Fri Jun 24 2022 18:11:16 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { h } from "vue";
|
|
7
|
-
import { c as
|
|
8
|
-
import { p as
|
|
6
|
+
import { h as t } from "vue";
|
|
7
|
+
import { c as e } from "./component.js";
|
|
8
|
+
import { p as i } from "./pxCheck.js";
|
|
9
9
|
import "../locale/lang";
|
|
10
|
-
const { componentName, create } =
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
setup(props, { emit, slots }) {
|
|
22
|
-
const handleClick = (event) => {
|
|
23
|
-
emit("click", event);
|
|
24
|
-
};
|
|
25
|
-
const isImage = () => {
|
|
26
|
-
return props.name ? props.name.indexOf("/") !== -1 : false;
|
|
27
|
-
};
|
|
28
|
-
return () => {
|
|
29
|
-
var _a;
|
|
30
|
-
const _isImage = isImage();
|
|
31
|
-
return h(_isImage ? "img" : props.tag, {
|
|
32
|
-
class: _isImage ? `${componentName}__img` : `${props.fontClassName} ${componentName} ${props.classPrefix}-${props.name}`,
|
|
33
|
-
style: {
|
|
34
|
-
color: props.color,
|
|
35
|
-
fontSize: pxCheck(props.size),
|
|
36
|
-
width: pxCheck(props.size),
|
|
37
|
-
height: pxCheck(props.size)
|
|
38
|
-
},
|
|
39
|
-
onClick: handleClick,
|
|
40
|
-
src: _isImage ? props.name : ""
|
|
41
|
-
}, (_a = slots.default) == null ? void 0 : _a.call(slots));
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
export { _sfc_main as default };
|
|
10
|
+
const { componentName: n, create: o } = e("icon"), a = o({ props: { name: { type: String, default: "" }, size: { type: [String, Number], default: "" }, classPrefix: { type: String, default: "nut-icon" }, fontClassName: { type: String, default: "nutui-iconfont" }, color: { type: String, default: "" }, tag: { type: String, default: "i" } }, emits: ["click"], setup(e2, { emit: o2, slots: a2 }) {
|
|
11
|
+
const s = (t2) => {
|
|
12
|
+
o2("click", t2);
|
|
13
|
+
};
|
|
14
|
+
return () => {
|
|
15
|
+
var _a;
|
|
16
|
+
const o3 = !!e2.name && e2.name.indexOf("/") !== -1;
|
|
17
|
+
return t(o3 ? "img" : e2.tag, { class: o3 ? `${n}__img` : `${e2.fontClassName} ${n} ${e2.classPrefix}-${e2.name}`, style: { color: e2.color, fontSize: i(e2.size), width: i(e2.size), height: i(e2.size) }, onClick: s, src: o3 ? e2.name : "" }, (_a = a2.default) == null ? void 0 : _a.call(a2));
|
|
18
|
+
};
|
|
19
|
+
} });
|
|
20
|
+
export { a as default };
|