@nutui/nutui 3.1.22-beta.0 → 3.1.22-beta.3
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/dist/nutui.es.js +4019 -19251
- package/dist/nutui.umd.js +4012 -19344
- package/dist/packages/_es/ActionSheet.js +26 -157
- package/dist/packages/_es/Address.js +119 -542
- package/dist/packages/_es/AddressList.js +113 -613
- package/dist/packages/_es/Audio.js +62 -264
- package/dist/packages/_es/AudioOperate.js +18 -107
- package/dist/packages/_es/Avatar.js +42 -165
- 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 +24 -237
- package/dist/packages/_es/CalendarItem.js +1 -1
- package/dist/packages/_es/Card.js +10 -107
- package/dist/packages/_es/Cascader.js +156 -500
- 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 +24 -85
- package/dist/packages/_es/CollapseItem.js +70 -261
- package/dist/packages/_es/Comment.js +64 -434
- package/dist/packages/_es/CountDown.js +61 -242
- package/dist/packages/_es/CountUp.js +149 -546
- package/dist/packages/_es/DatePicker.js +107 -322
- package/dist/packages/_es/Dialog.js +69 -261
- package/dist/packages/_es/Divider.js +18 -68
- package/dist/packages/_es/Drag.js +56 -197
- package/dist/packages/_es/Ecard.js +24 -159
- package/dist/packages/_es/Elevator.js +63 -198
- 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/ImagePreview.js +74 -298
- package/dist/packages/_es/Indicator.js +15 -62
- package/dist/packages/_es/InfiniteLoading.js +66 -258
- 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 +23 -110
- package/dist/packages/_es/Menu.js +30 -118
- package/dist/packages/_es/MenuItem.js +34 -162
- package/dist/packages/_es/Navbar.js +30 -192
- package/dist/packages/_es/NoticeBar.js +83 -387
- package/dist/packages/_es/Notify.js +81 -236
- package/dist/packages/_es/NumberKeyboard.js +41 -272
- package/dist/packages/_es/OldPicker.js +140 -464
- package/dist/packages/_es/OverLay.js +32 -105
- package/dist/packages/_es/Pagination.js +39 -157
- package/dist/packages/_es/Picker.js +138 -459
- package/dist/packages/_es/Popover.js +327 -965
- package/dist/packages/_es/Popup.js +64 -303
- package/dist/packages/_es/Price.js +16 -118
- package/dist/packages/_es/Progress.js +14 -146
- package/dist/packages/_es/PullRefresh.js +92 -346
- package/dist/packages/_es/Radio.js +22 -90
- package/dist/packages/_es/RadioGroup.js +8 -37
- package/dist/packages/_es/Range.js +92 -417
- package/dist/packages/_es/Rate.js +16 -139
- package/dist/packages/_es/Row.js +22 -64
- package/dist/packages/_es/SearchBar.js +46 -247
- package/dist/packages/_es/ShortPassword.js +35 -225
- package/dist/packages/_es/SideNavBar.js +33 -89
- package/dist/packages/_es/SideNavBarItem.js +11 -46
- package/dist/packages/_es/Signature.js +46 -165
- package/dist/packages/_es/Skeleton.js +20 -136
- package/dist/packages/_es/Sku.js +93 -499
- package/dist/packages/_es/Step.js +25 -119
- package/dist/packages/_es/Steps.js +18 -53
- package/dist/packages/_es/Sticky.js +53 -138
- package/dist/packages/_es/SubSideNavBar.js +26 -90
- package/dist/packages/_es/Swipe.js +46 -183
- 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 +27 -186
- package/dist/packages/_es/Tabs.js +51 -209
- package/dist/packages/_es/Tag.js +20 -97
- package/dist/packages/_es/TextArea.js +42 -160
- package/dist/packages/_es/TimeDetail.js +23 -84
- package/dist/packages/_es/TimePannel.js +19 -52
- package/dist/packages/_es/TimeSelect.js +15 -103
- package/dist/packages/_es/Toast.js +80 -319
- package/dist/packages/_es/Uploader.js +112 -460
- package/dist/packages/_es/Video.js +83 -340
- 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 +120 -675
- 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/button/index.scss +2 -1
- package/dist/packages/cell/index.scss +11 -0
- package/dist/packages/checkbox/index.scss +6 -0
- package/dist/packages/dialog/index.scss +1 -0
- package/dist/packages/elevator/index.scss +21 -0
- package/dist/packages/input/index.scss +13 -1
- 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/radio/index.scss +1 -0
- package/dist/packages/switch/index.scss +3 -3
- package/dist/packages/tabpane/index.scss +1 -0
- package/dist/smartips/attributes.json +62 -10
- package/dist/smartips/tags.json +17 -4
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +49 -49
- package/dist/styles/themes/jdb.scss +49 -49
- package/dist/styles/themes/jdt.scss +49 -49
- package/dist/styles/variables-jdb.scss +10 -1
- package/dist/styles/variables-jdt.scss +10 -1
- package/dist/styles/variables.scss +10 -1
- package/dist/types/__VUE/address/index.vue.d.ts +5 -5
- package/dist/types/__VUE/addresslist/components/ItemContents.vue.d.ts +1 -0
- package/dist/types/__VUE/audiooperate/index.vue.d.ts +1 -0
- package/dist/types/__VUE/avatar/index.vue.d.ts +4 -4
- package/dist/types/__VUE/backtop/index.vue.d.ts +2 -2
- package/dist/types/__VUE/badge/index.vue.d.ts +2 -2
- package/dist/types/__VUE/button/index.vue.d.ts +2 -2
- package/dist/types/__VUE/cascader/index.vue.d.ts +1 -1
- 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 +18 -5
- package/dist/types/__VUE/checkboxgroup/index.vue.d.ts +7 -0
- package/dist/types/__VUE/collapseitem/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 +23 -8
- 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/empty/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/input/index.vue.d.ts +2 -2
- package/dist/types/__VUE/noticebar/index.vue.d.ts +1 -1
- package/dist/types/__VUE/oldpicker/index.vue.d.ts +2 -2
- package/dist/types/__VUE/picker/index.vue.d.ts +2 -2
- package/dist/types/__VUE/popover/index.vue.d.ts +2 -2
- package/dist/types/__VUE/range/index.vue.d.ts +1 -1
- package/dist/types/__VUE/rate/index.vue.d.ts +2 -2
- package/dist/types/__VUE/row/index.vue.d.ts +2 -2
- package/dist/types/__VUE/shortpassword/index.vue.d.ts +2 -2
- package/dist/types/__VUE/step/index.vue.d.ts +2 -2
- package/dist/types/__VUE/switch/index.vue.d.ts +2 -2
- package/dist/types/__VUE/tabbaritem/index.vue.d.ts +2 -2
- package/dist/types/__VUE/timeselect/index.vue.d.ts +9 -2
- package/dist/types/__VUE/toast/index.vue.d.ts +3 -3
- package/dist/types/__VUE/uploader/index.vue.d.ts +2 -2
- package/dist/types/__VUE/video/index.vue.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +2 -1
|
@@ -1,144 +1,21 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.22-beta.
|
|
2
|
+
* @nutui/nutui v3.1.22-beta.3 Wed Jun 15 2022 20:12:30 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { computed, resolveComponent, openBlock, createElementBlock, normalizeClass, Fragment, renderList, normalizeStyle, createVNode, createBlock, createCommentVNode } from "vue";
|
|
7
|
-
import { c as
|
|
8
|
-
import { p as
|
|
9
|
-
import { _ as
|
|
6
|
+
import { computed as e, resolveComponent as a, openBlock as l, createElementBlock as o, normalizeClass as t, Fragment as n, renderList as s, normalizeStyle as c, createVNode as i, createBlock as r, createCommentVNode as u } from "vue";
|
|
7
|
+
import { c as m } from "./component.js";
|
|
8
|
+
import { p as d } from "./pxCheck.js";
|
|
9
|
+
import { _ as f } from "./plugin-vue_export-helper.js";
|
|
10
10
|
import "../locale/lang";
|
|
11
|
-
const { componentName, create } =
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
iconSize: {
|
|
23
|
-
type: [String, Number],
|
|
24
|
-
default: 18
|
|
25
|
-
},
|
|
26
|
-
activeColor: {
|
|
27
|
-
type: String,
|
|
28
|
-
default: ""
|
|
29
|
-
},
|
|
30
|
-
voidColor: {
|
|
31
|
-
type: String,
|
|
32
|
-
default: ""
|
|
33
|
-
},
|
|
34
|
-
uncheckedIcon: {
|
|
35
|
-
type: String,
|
|
36
|
-
default: "star-n"
|
|
37
|
-
},
|
|
38
|
-
checkedIcon: {
|
|
39
|
-
type: String,
|
|
40
|
-
default: "star-fill-n"
|
|
41
|
-
},
|
|
42
|
-
readonly: {
|
|
43
|
-
type: Boolean,
|
|
44
|
-
default: false
|
|
45
|
-
},
|
|
46
|
-
disabled: {
|
|
47
|
-
type: Boolean,
|
|
48
|
-
default: false
|
|
49
|
-
},
|
|
50
|
-
allowHalf: {
|
|
51
|
-
type: Boolean,
|
|
52
|
-
default: false
|
|
53
|
-
},
|
|
54
|
-
spacing: {
|
|
55
|
-
type: [String, Number],
|
|
56
|
-
default: 14
|
|
57
|
-
},
|
|
58
|
-
classPrefix: {
|
|
59
|
-
type: String,
|
|
60
|
-
default: "nut-icon"
|
|
61
|
-
},
|
|
62
|
-
fontClassName: {
|
|
63
|
-
type: String,
|
|
64
|
-
default: "nutui-iconfont"
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
emits: ["update:modelValue", "change"],
|
|
68
|
-
setup(props, { emit }) {
|
|
69
|
-
const classes = computed(() => {
|
|
70
|
-
const prefixCls = componentName;
|
|
71
|
-
return {
|
|
72
|
-
[prefixCls]: true
|
|
73
|
-
};
|
|
74
|
-
});
|
|
75
|
-
const onClick = (e, index2) => {
|
|
76
|
-
e.preventDefault();
|
|
77
|
-
e.stopPropagation();
|
|
78
|
-
if (props.disabled || props.readonly)
|
|
79
|
-
return;
|
|
80
|
-
let value = 0;
|
|
81
|
-
if (index2 === 1 && props.modelValue === index2)
|
|
82
|
-
;
|
|
83
|
-
else {
|
|
84
|
-
value = index2;
|
|
85
|
-
if (props.allowHalf) {
|
|
86
|
-
if ((e == null ? void 0 : e.target).className.includes("__icon--half")) {
|
|
87
|
-
value -= 0.5;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
emit("update:modelValue", value);
|
|
92
|
-
emit("change", value);
|
|
93
|
-
};
|
|
94
|
-
return {
|
|
95
|
-
classes,
|
|
96
|
-
onClick,
|
|
97
|
-
pxCheck
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
});
|
|
101
|
-
const _hoisted_1 = ["onClick"];
|
|
102
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
103
|
-
const _component_nut_icon = resolveComponent("nut-icon");
|
|
104
|
-
return openBlock(), createElementBlock("view", {
|
|
105
|
-
class: normalizeClass(_ctx.classes)
|
|
106
|
-
}, [
|
|
107
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.count, (n) => {
|
|
108
|
-
return openBlock(), createElementBlock("view", {
|
|
109
|
-
class: "nut-rate-item",
|
|
110
|
-
key: n,
|
|
111
|
-
onClick: ($event) => _ctx.onClick($event, n),
|
|
112
|
-
style: normalizeStyle({ marginRight: _ctx.pxCheck(_ctx.spacing) })
|
|
113
|
-
}, [
|
|
114
|
-
createVNode(_component_nut_icon, {
|
|
115
|
-
size: _ctx.iconSize,
|
|
116
|
-
class: normalizeClass(["nut-rate-item__icon", { "nut-rate-item__icon--disabled": _ctx.disabled || n > _ctx.modelValue }]),
|
|
117
|
-
"font-class-name": _ctx.fontClassName,
|
|
118
|
-
"class-prefix": _ctx.classPrefix,
|
|
119
|
-
color: n <= _ctx.modelValue ? _ctx.activeColor : _ctx.voidColor,
|
|
120
|
-
name: n <= _ctx.modelValue ? _ctx.checkedIcon : _ctx.uncheckedIcon
|
|
121
|
-
}, null, 8, ["size", "class", "font-class-name", "class-prefix", "color", "name"]),
|
|
122
|
-
_ctx.allowHalf && _ctx.modelValue + 1 > n ? (openBlock(), createBlock(_component_nut_icon, {
|
|
123
|
-
key: 0,
|
|
124
|
-
class: "nut-rate-item__icon nut-rate-item__icon--half",
|
|
125
|
-
"font-class-name": _ctx.fontClassName,
|
|
126
|
-
"class-prefix": _ctx.classPrefix,
|
|
127
|
-
color: n <= _ctx.modelValue + 1 ? _ctx.activeColor : _ctx.voidColor,
|
|
128
|
-
size: _ctx.iconSize,
|
|
129
|
-
name: _ctx.checkedIcon
|
|
130
|
-
}, null, 8, ["font-class-name", "class-prefix", "color", "size", "name"])) : _ctx.allowHalf && _ctx.modelValue + 1 < n ? (openBlock(), createBlock(_component_nut_icon, {
|
|
131
|
-
key: 1,
|
|
132
|
-
class: "nut-rate-item__icon nut-rate-item__icon--disabled nut-rate-item__icon--half",
|
|
133
|
-
"font-class-name": _ctx.fontClassName,
|
|
134
|
-
"class-prefix": _ctx.classPrefix,
|
|
135
|
-
color: _ctx.voidColor,
|
|
136
|
-
size: _ctx.iconSize,
|
|
137
|
-
name: _ctx.uncheckedIcon
|
|
138
|
-
}, null, 8, ["font-class-name", "class-prefix", "color", "size", "name"])) : createCommentVNode("", true)
|
|
139
|
-
], 12, _hoisted_1);
|
|
140
|
-
}), 128))
|
|
141
|
-
], 2);
|
|
142
|
-
}
|
|
143
|
-
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
144
|
-
export { index as default };
|
|
11
|
+
const { componentName: p, create: g } = m("rate"), y = g({ props: { count: { type: [String, Number], default: 5 }, modelValue: { type: [String, Number], default: 0 }, iconSize: { type: [String, Number], default: 18 }, activeColor: { type: String, default: "" }, voidColor: { type: String, default: "" }, uncheckedIcon: { type: String, default: "star-n" }, checkedIcon: { type: String, default: "star-fill-n" }, readonly: { type: Boolean, default: false }, disabled: { type: Boolean, default: false }, allowHalf: { type: Boolean, default: false }, spacing: { type: [String, Number], default: 14 }, classPrefix: { type: String, default: "nut-icon" }, fontClassName: { type: String, default: "nutui-iconfont" } }, emits: ["update:modelValue", "change"], setup: (a2, { emit: l2 }) => ({ classes: e(() => ({ [p]: true })), onClick: (e2, o2) => {
|
|
12
|
+
if (e2.preventDefault(), e2.stopPropagation(), a2.disabled || a2.readonly)
|
|
13
|
+
return;
|
|
14
|
+
let t2 = 0;
|
|
15
|
+
o2 === 1 && a2.modelValue === o2 || (t2 = o2, a2.allowHalf && (e2 == null ? void 0 : e2.target.className.includes("__icon--half")) && (t2 -= 0.5)), l2("update:modelValue", t2), l2("change", t2);
|
|
16
|
+
}, pxCheck: d }) }), C = ["onClick"];
|
|
17
|
+
var _ = f(y, [["render", function(e2, m2, d2, f2, p2, g2) {
|
|
18
|
+
const y2 = a("nut-icon");
|
|
19
|
+
return l(), o("view", { class: t(e2.classes) }, [(l(true), o(n, null, s(e2.count, (a2) => (l(), o("view", { class: "nut-rate-item", key: a2, onClick: (l2) => e2.onClick(l2, a2), style: c({ marginRight: e2.pxCheck(e2.spacing) }) }, [i(y2, { size: e2.iconSize, class: t(["nut-rate-item__icon", { "nut-rate-item__icon--disabled": e2.disabled || a2 > e2.modelValue }]), "font-class-name": e2.fontClassName, "class-prefix": e2.classPrefix, color: a2 <= e2.modelValue ? e2.activeColor : e2.voidColor, name: a2 <= e2.modelValue ? e2.checkedIcon : e2.uncheckedIcon }, null, 8, ["size", "class", "font-class-name", "class-prefix", "color", "name"]), e2.allowHalf && e2.modelValue + 1 > a2 ? (l(), r(y2, { key: 0, class: "nut-rate-item__icon nut-rate-item__icon--half", "font-class-name": e2.fontClassName, "class-prefix": e2.classPrefix, color: a2 <= e2.modelValue + 1 ? e2.activeColor : e2.voidColor, size: e2.iconSize, name: e2.checkedIcon }, null, 8, ["font-class-name", "class-prefix", "color", "size", "name"])) : e2.allowHalf && e2.modelValue + 1 < a2 ? (l(), r(y2, { key: 1, class: "nut-rate-item__icon nut-rate-item__icon--disabled nut-rate-item__icon--half", "font-class-name": e2.fontClassName, "class-prefix": e2.classPrefix, color: e2.voidColor, size: e2.iconSize, name: e2.uncheckedIcon }, null, 8, ["font-class-name", "class-prefix", "color", "size", "name"])) : u("", true)], 12, C))), 128))], 2);
|
|
20
|
+
}]]);
|
|
21
|
+
export { _ as default };
|
package/dist/packages/_es/Row.js
CHANGED
|
@@ -1,69 +1,27 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.22-beta.
|
|
2
|
+
* @nutui/nutui v3.1.22-beta.3 Wed Jun 15 2022 20:12:30 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { provide, openBlock, createElementBlock, normalizeClass, renderSlot } from "vue";
|
|
7
|
-
import { c as
|
|
8
|
-
import { _ as
|
|
6
|
+
import { provide as t, openBlock as e, createElementBlock as r, normalizeClass as n, renderSlot as l } from "vue";
|
|
7
|
+
import { c as a } from "./component.js";
|
|
8
|
+
import { _ as o } from "./plugin-vue_export-helper.js";
|
|
9
9
|
import "../locale/lang";
|
|
10
|
-
const { componentName, create } =
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
},
|
|
29
|
-
flexWrap: {
|
|
30
|
-
type: String,
|
|
31
|
-
default: "nowrap"
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
emits: ["click"],
|
|
35
|
-
setup(props, { emit }) {
|
|
36
|
-
const prefixCls = componentName;
|
|
37
|
-
provide("gutter", props.gutter);
|
|
38
|
-
const getClass = (prefix, type) => {
|
|
39
|
-
return prefix ? type ? `nut-row-${prefix}-${type}` : "" : `nut-row-${type}`;
|
|
40
|
-
};
|
|
41
|
-
const getClasses = () => {
|
|
42
|
-
return `
|
|
43
|
-
${getClass("", props.type)}
|
|
44
|
-
${getClass("justify", props.justify)}
|
|
45
|
-
${getClass("align", props.align)}
|
|
46
|
-
${getClass("flex", props.flexWrap)}
|
|
47
|
-
${prefixCls}
|
|
48
|
-
`;
|
|
49
|
-
};
|
|
50
|
-
const handleClick = (evt) => {
|
|
51
|
-
evt.stopPropagation();
|
|
52
|
-
emit("click", evt);
|
|
53
|
-
};
|
|
54
|
-
return {
|
|
55
|
-
getClasses,
|
|
56
|
-
handleClick
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
61
|
-
return openBlock(), createElementBlock("view", {
|
|
62
|
-
class: normalizeClass(_ctx.getClasses()),
|
|
63
|
-
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClick && _ctx.handleClick(...args))
|
|
64
|
-
}, [
|
|
65
|
-
renderSlot(_ctx.$slots, "default")
|
|
66
|
-
], 2);
|
|
67
|
-
}
|
|
68
|
-
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
69
|
-
export { index as default };
|
|
10
|
+
const { componentName: i, create: s } = a("row");
|
|
11
|
+
var p = o(s({ props: { type: { type: String, default: "" }, gutter: { type: [String, Number], default: "" }, justify: { type: String, default: "start" }, align: { type: String, default: "flex-start" }, flexWrap: { type: String, default: "nowrap" } }, emits: ["click"], setup(e2, { emit: r2 }) {
|
|
12
|
+
const n2 = i;
|
|
13
|
+
t("gutter", e2.gutter);
|
|
14
|
+
const l2 = (t2, e3) => t2 ? e3 ? `nut-row-${t2}-${e3}` : "" : `nut-row-${e3}`;
|
|
15
|
+
return { getClasses: () => `
|
|
16
|
+
${l2("", e2.type)}
|
|
17
|
+
${l2("justify", e2.justify)}
|
|
18
|
+
${l2("align", e2.align)}
|
|
19
|
+
${l2("flex", e2.flexWrap)}
|
|
20
|
+
${n2}
|
|
21
|
+
`, handleClick: (t2) => {
|
|
22
|
+
t2.stopPropagation(), r2("click", t2);
|
|
23
|
+
} };
|
|
24
|
+
} }), [["render", function(t2, a2, o2, i2, s2, p2) {
|
|
25
|
+
return e(), r("view", { class: n(t2.getClasses()), onClick: a2[0] || (a2[0] = (...e2) => t2.handleClick && t2.handleClick(...e2)) }, [l(t2.$slots, "default")], 2);
|
|
26
|
+
}]]);
|
|
27
|
+
export { p as default };
|
|
@@ -5,258 +5,57 @@ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
|
5
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
6
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
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 = (
|
|
9
|
-
for (var prop in
|
|
10
|
-
if (__hasOwnProp.call(
|
|
11
|
-
__defNormalProp(
|
|
8
|
+
var __spreadValues = (a2, b2) => {
|
|
9
|
+
for (var prop in b2 || (b2 = {}))
|
|
10
|
+
if (__hasOwnProp.call(b2, prop))
|
|
11
|
+
__defNormalProp(a2, prop, b2[prop]);
|
|
12
12
|
if (__getOwnPropSymbols)
|
|
13
|
-
for (var prop of __getOwnPropSymbols(
|
|
14
|
-
if (__propIsEnum.call(
|
|
15
|
-
__defNormalProp(
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b2)) {
|
|
14
|
+
if (__propIsEnum.call(b2, prop))
|
|
15
|
+
__defNormalProp(a2, prop, b2[prop]);
|
|
16
16
|
}
|
|
17
|
-
return
|
|
17
|
+
return a2;
|
|
18
18
|
};
|
|
19
|
-
var __spreadProps = (
|
|
19
|
+
var __spreadProps = (a2, b2) => __defProps(a2, __getOwnPropDescs(b2));
|
|
20
20
|
/*!
|
|
21
|
-
* @nutui/nutui v3.1.22-beta.
|
|
21
|
+
* @nutui/nutui v3.1.22-beta.3 Wed Jun 15 2022 20:12:30 GMT+0800 (中国标准时间)
|
|
22
22
|
* (c) 2022 @jdf2e.
|
|
23
23
|
* Released under the MIT License.
|
|
24
24
|
*/
|
|
25
|
-
import { reactive, computed, ref, onMounted, toRefs, resolveComponent, openBlock, createElementBlock, normalizeStyle, toDisplayString, createCommentVNode, renderSlot, createElementVNode, withModifiers, withDirectives, createVNode, vShow } from "vue";
|
|
26
|
-
import { c as
|
|
27
|
-
import { _ as
|
|
25
|
+
import { reactive as e, computed as a, ref as l, onMounted as t, toRefs as r, resolveComponent as n, openBlock as c, createElementBlock as u, normalizeStyle as i, toDisplayString as o, createCommentVNode as s, renderSlot as h, createElementVNode as p, withModifiers as d, withDirectives as g, createVNode as b, vShow as m } from "vue";
|
|
26
|
+
import { c as f } from "./component.js";
|
|
27
|
+
import { _ as y } from "./plugin-vue_export-helper.js";
|
|
28
28
|
import "../locale/lang";
|
|
29
|
-
const { create, translate } =
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
maxLength
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
default: ""
|
|
63
|
-
},
|
|
64
|
-
autofocus: {
|
|
65
|
-
type: Boolean,
|
|
66
|
-
default: false
|
|
67
|
-
},
|
|
68
|
-
disabled: {
|
|
69
|
-
type: Boolean,
|
|
70
|
-
default: false
|
|
71
|
-
},
|
|
72
|
-
readonly: {
|
|
73
|
-
type: Boolean,
|
|
74
|
-
default: false
|
|
75
|
-
},
|
|
76
|
-
inputAlign: {
|
|
77
|
-
type: String,
|
|
78
|
-
default: "left"
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
emits: [
|
|
82
|
-
"change",
|
|
83
|
-
"update:modelValue",
|
|
84
|
-
"blur",
|
|
85
|
-
"focus",
|
|
86
|
-
"clear",
|
|
87
|
-
"search",
|
|
88
|
-
"click-input",
|
|
89
|
-
"click-left-icon",
|
|
90
|
-
"click-right-icon"
|
|
91
|
-
],
|
|
92
|
-
setup(props, { emit }) {
|
|
93
|
-
const state = reactive({
|
|
94
|
-
active: false
|
|
95
|
-
});
|
|
96
|
-
const searchbarStyle = computed(() => {
|
|
97
|
-
return {
|
|
98
|
-
background: props.background
|
|
99
|
-
};
|
|
100
|
-
});
|
|
101
|
-
const inputSearchbarStyle = computed(() => {
|
|
102
|
-
return {
|
|
103
|
-
background: props.inputBackground
|
|
104
|
-
};
|
|
105
|
-
});
|
|
106
|
-
const valueChange = (event) => {
|
|
107
|
-
const input = event.target;
|
|
108
|
-
let val = input.value;
|
|
109
|
-
if (props.maxLength && val.length > Number(props.maxLength)) {
|
|
110
|
-
val = val.slice(0, Number(props.maxLength));
|
|
111
|
-
}
|
|
112
|
-
emit("update:modelValue", val, event);
|
|
113
|
-
emit("change", val, event);
|
|
114
|
-
};
|
|
115
|
-
const valueFocus = (event) => {
|
|
116
|
-
const input = event.target;
|
|
117
|
-
let value = input.value;
|
|
118
|
-
state.active = true;
|
|
119
|
-
emit("focus", value, event);
|
|
120
|
-
};
|
|
121
|
-
const valueBlur = (event) => {
|
|
122
|
-
setTimeout(() => {
|
|
123
|
-
state.active = false;
|
|
124
|
-
}, 0);
|
|
125
|
-
const input = event.target;
|
|
126
|
-
let value = input.value;
|
|
127
|
-
if (props.maxLength && value.length > Number(props.maxLength)) {
|
|
128
|
-
value = value.slice(0, Number(props.maxLength));
|
|
129
|
-
}
|
|
130
|
-
emit("blur", value, event);
|
|
131
|
-
};
|
|
132
|
-
const handleClear = (event) => {
|
|
133
|
-
emit("update:modelValue", "", event);
|
|
134
|
-
emit("change", "", event);
|
|
135
|
-
emit("clear", "");
|
|
136
|
-
};
|
|
137
|
-
const handleSubmit = () => {
|
|
138
|
-
emit("search", props.modelValue);
|
|
139
|
-
};
|
|
140
|
-
const clickInput = (event) => {
|
|
141
|
-
emit("click-input", event);
|
|
142
|
-
};
|
|
143
|
-
const leftIconClick = (event) => {
|
|
144
|
-
emit("click-left-icon", props.modelValue, event);
|
|
145
|
-
};
|
|
146
|
-
const rightIconClick = (event) => {
|
|
147
|
-
emit("click-right-icon", props.modelValue, event);
|
|
148
|
-
};
|
|
149
|
-
const styleSearchbar = computed(() => {
|
|
150
|
-
return {
|
|
151
|
-
"text-align": props.inputAlign
|
|
152
|
-
};
|
|
153
|
-
});
|
|
154
|
-
const inputsearch = ref(null);
|
|
155
|
-
onMounted(() => {
|
|
156
|
-
if (props.autofocus) {
|
|
157
|
-
inputsearch.value.focus();
|
|
158
|
-
}
|
|
159
|
-
});
|
|
160
|
-
return __spreadProps(__spreadValues({
|
|
161
|
-
inputsearch
|
|
162
|
-
}, toRefs(state)), {
|
|
163
|
-
valueChange,
|
|
164
|
-
valueFocus,
|
|
165
|
-
valueBlur,
|
|
166
|
-
handleClear,
|
|
167
|
-
handleSubmit,
|
|
168
|
-
searchbarStyle,
|
|
169
|
-
inputSearchbarStyle,
|
|
170
|
-
translate,
|
|
171
|
-
clickInput,
|
|
172
|
-
leftIconClick,
|
|
173
|
-
rightIconClick,
|
|
174
|
-
styleSearchbar
|
|
175
|
-
});
|
|
176
|
-
}
|
|
177
|
-
});
|
|
178
|
-
const _hoisted_1 = {
|
|
179
|
-
key: 0,
|
|
180
|
-
class: "nut-searchbar__search-label"
|
|
181
|
-
};
|
|
182
|
-
const _hoisted_2 = {
|
|
183
|
-
key: 1,
|
|
184
|
-
class: "nut-searchbar__search-icon nut-searchbar__left-search-icon"
|
|
185
|
-
};
|
|
186
|
-
const _hoisted_3 = { class: "nut-searchbar__input-inner" };
|
|
187
|
-
const _hoisted_4 = ["type", "maxlength", "placeholder", "value", "disabled", "readonly"];
|
|
188
|
-
const _hoisted_5 = {
|
|
189
|
-
key: 2,
|
|
190
|
-
class: "nut-searchbar__search-icon nut-searchbar__right-search-icon"
|
|
191
|
-
};
|
|
192
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
193
|
-
const _component_nut_icon = resolveComponent("nut-icon");
|
|
194
|
-
return openBlock(), createElementBlock("view", {
|
|
195
|
-
class: "nut-searchbar",
|
|
196
|
-
style: normalizeStyle(_ctx.searchbarStyle)
|
|
197
|
-
}, [
|
|
198
|
-
_ctx.label ? (openBlock(), createElementBlock("span", _hoisted_1, toDisplayString(_ctx.label), 1)) : createCommentVNode("", true),
|
|
199
|
-
_ctx.$slots.leftout ? (openBlock(), createElementBlock("view", _hoisted_2, [
|
|
200
|
-
renderSlot(_ctx.$slots, "leftout")
|
|
201
|
-
])) : createCommentVNode("", true),
|
|
202
|
-
createElementVNode("view", {
|
|
203
|
-
class: "nut-searchbar__search-input",
|
|
204
|
-
style: normalizeStyle(_ctx.inputSearchbarStyle)
|
|
205
|
-
}, [
|
|
206
|
-
_ctx.$slots.leftin ? (openBlock(), createElementBlock("view", {
|
|
207
|
-
key: 0,
|
|
208
|
-
class: "nut-searchbar__search-icon nut-searchbar__iptleft-search-icon",
|
|
209
|
-
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.leftIconClick && _ctx.leftIconClick(...args))
|
|
210
|
-
}, [
|
|
211
|
-
renderSlot(_ctx.$slots, "leftin")
|
|
212
|
-
])) : createCommentVNode("", true),
|
|
213
|
-
createElementVNode("view", _hoisted_3, [
|
|
214
|
-
createElementVNode("form", {
|
|
215
|
-
action: "#",
|
|
216
|
-
onSubmit: _cache[5] || (_cache[5] = withModifiers((...args) => _ctx.handleSubmit && _ctx.handleSubmit(...args), ["prevent"]))
|
|
217
|
-
}, [
|
|
218
|
-
createElementVNode("input", {
|
|
219
|
-
ref: "inputsearch",
|
|
220
|
-
class: "nut-searchbar__input-bar",
|
|
221
|
-
type: _ctx.inputType,
|
|
222
|
-
maxlength: _ctx.maxLength,
|
|
223
|
-
placeholder: _ctx.placeholder || _ctx.translate("placeholder"),
|
|
224
|
-
value: _ctx.modelValue,
|
|
225
|
-
disabled: _ctx.disabled,
|
|
226
|
-
readonly: _ctx.readonly,
|
|
227
|
-
onClick: _cache[1] || (_cache[1] = (...args) => _ctx.clickInput && _ctx.clickInput(...args)),
|
|
228
|
-
onInput: _cache[2] || (_cache[2] = (...args) => _ctx.valueChange && _ctx.valueChange(...args)),
|
|
229
|
-
onFocus: _cache[3] || (_cache[3] = (...args) => _ctx.valueFocus && _ctx.valueFocus(...args)),
|
|
230
|
-
onBlur: _cache[4] || (_cache[4] = (...args) => _ctx.valueBlur && _ctx.valueBlur(...args)),
|
|
231
|
-
style: normalizeStyle(_ctx.styleSearchbar)
|
|
232
|
-
}, null, 44, _hoisted_4)
|
|
233
|
-
], 32),
|
|
234
|
-
_ctx.clearable ? withDirectives((openBlock(), createElementBlock("view", {
|
|
235
|
-
key: 0,
|
|
236
|
-
onClick: _cache[6] || (_cache[6] = (...args) => _ctx.handleClear && _ctx.handleClear(...args)),
|
|
237
|
-
class: "nut-searchbar__input-clear"
|
|
238
|
-
}, [
|
|
239
|
-
createVNode(_component_nut_icon, {
|
|
240
|
-
name: "circle-close",
|
|
241
|
-
size: "12",
|
|
242
|
-
color: "#555"
|
|
243
|
-
})
|
|
244
|
-
], 512)), [
|
|
245
|
-
[vShow, _ctx.modelValue.length > 0]
|
|
246
|
-
]) : createCommentVNode("", true)
|
|
247
|
-
]),
|
|
248
|
-
_ctx.$slots.rightin ? (openBlock(), createElementBlock("view", {
|
|
249
|
-
key: 1,
|
|
250
|
-
class: "nut-searchbar__search-icon nut-searchbar__iptright-sarch-icon",
|
|
251
|
-
onClick: _cache[7] || (_cache[7] = (...args) => _ctx.rightIconClick && _ctx.rightIconClick(...args))
|
|
252
|
-
}, [
|
|
253
|
-
renderSlot(_ctx.$slots, "rightin")
|
|
254
|
-
])) : createCommentVNode("", true)
|
|
255
|
-
], 4),
|
|
256
|
-
_ctx.$slots.rightout ? (openBlock(), createElementBlock("view", _hoisted_5, [
|
|
257
|
-
renderSlot(_ctx.$slots, "rightout")
|
|
258
|
-
])) : createCommentVNode("", true)
|
|
259
|
-
], 4);
|
|
260
|
-
}
|
|
261
|
-
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
262
|
-
export { index as default };
|
|
29
|
+
const { create: k, translate: v } = f("searchbar"), _ = k({ props: { modelValue: { type: [String, Number], default: "" }, inputType: { type: String, default: "textarea" }, label: { type: String, default: "" }, maxLength: { type: [String, Number], default: "9999" }, placeholder: { type: String, default: "" }, clearable: { type: Boolean, default: true }, background: { type: String, default: "" }, inputBackground: { type: String, default: "" }, autofocus: { type: Boolean, default: false }, disabled: { type: Boolean, default: false }, readonly: { type: Boolean, default: false }, inputAlign: { type: String, default: "left" } }, emits: ["change", "update:modelValue", "blur", "focus", "clear", "search", "click-input", "click-left-icon", "click-right-icon"], setup(n2, { emit: c2 }) {
|
|
30
|
+
const u2 = e({ active: false }), i2 = a(() => ({ background: n2.background })), o2 = a(() => ({ background: n2.inputBackground })), s2 = a(() => ({ "text-align": n2.inputAlign })), h2 = l(null);
|
|
31
|
+
return t(() => {
|
|
32
|
+
n2.autofocus && h2.value.focus();
|
|
33
|
+
}), __spreadProps(__spreadValues({ inputsearch: h2 }, r(u2)), { valueChange: (e2) => {
|
|
34
|
+
let a2 = e2.target.value;
|
|
35
|
+
n2.maxLength && a2.length > Number(n2.maxLength) && (a2 = a2.slice(0, Number(n2.maxLength))), c2("update:modelValue", a2, e2), c2("change", a2, e2);
|
|
36
|
+
}, valueFocus: (e2) => {
|
|
37
|
+
let a2 = e2.target.value;
|
|
38
|
+
u2.active = true, c2("focus", a2, e2);
|
|
39
|
+
}, valueBlur: (e2) => {
|
|
40
|
+
setTimeout(() => {
|
|
41
|
+
u2.active = false;
|
|
42
|
+
}, 0);
|
|
43
|
+
let a2 = e2.target.value;
|
|
44
|
+
n2.maxLength && a2.length > Number(n2.maxLength) && (a2 = a2.slice(0, Number(n2.maxLength))), c2("blur", a2, e2);
|
|
45
|
+
}, handleClear: (e2) => {
|
|
46
|
+
c2("update:modelValue", "", e2), c2("change", "", e2), c2("clear", "");
|
|
47
|
+
}, handleSubmit: () => {
|
|
48
|
+
c2("search", n2.modelValue);
|
|
49
|
+
}, searchbarStyle: i2, inputSearchbarStyle: o2, translate: v, clickInput: (e2) => {
|
|
50
|
+
c2("click-input", e2);
|
|
51
|
+
}, leftIconClick: (e2) => {
|
|
52
|
+
c2("click-left-icon", n2.modelValue, e2);
|
|
53
|
+
}, rightIconClick: (e2) => {
|
|
54
|
+
c2("click-right-icon", n2.modelValue, e2);
|
|
55
|
+
}, styleSearchbar: s2 });
|
|
56
|
+
} }), S = { key: 0, class: "nut-searchbar__search-label" }, C = { key: 1, class: "nut-searchbar__search-icon nut-searchbar__left-search-icon" }, x = { class: "nut-searchbar__input-inner" }, B = ["type", "maxlength", "placeholder", "value", "disabled", "readonly"], I = { key: 2, class: "nut-searchbar__search-icon nut-searchbar__right-search-icon" };
|
|
57
|
+
var V = y(_, [["render", function(e2, a2, l2, t2, r2, f2) {
|
|
58
|
+
const y2 = n("nut-icon");
|
|
59
|
+
return c(), u("view", { class: "nut-searchbar", style: i(e2.searchbarStyle) }, [e2.label ? (c(), u("span", S, o(e2.label), 1)) : s("", true), e2.$slots.leftout ? (c(), u("view", C, [h(e2.$slots, "leftout")])) : s("", true), p("view", { class: "nut-searchbar__search-input", style: i(e2.inputSearchbarStyle) }, [e2.$slots.leftin ? (c(), u("view", { key: 0, class: "nut-searchbar__search-icon nut-searchbar__iptleft-search-icon", onClick: a2[0] || (a2[0] = (...a3) => e2.leftIconClick && e2.leftIconClick(...a3)) }, [h(e2.$slots, "leftin")])) : s("", true), p("view", x, [p("form", { action: "#", onSubmit: a2[5] || (a2[5] = d((...a3) => e2.handleSubmit && e2.handleSubmit(...a3), ["prevent"])) }, [p("input", { ref: "inputsearch", class: "nut-searchbar__input-bar", type: e2.inputType, maxlength: e2.maxLength, placeholder: e2.placeholder || e2.translate("placeholder"), value: e2.modelValue, disabled: e2.disabled, readonly: e2.readonly, onClick: a2[1] || (a2[1] = (...a3) => e2.clickInput && e2.clickInput(...a3)), onInput: a2[2] || (a2[2] = (...a3) => e2.valueChange && e2.valueChange(...a3)), onFocus: a2[3] || (a2[3] = (...a3) => e2.valueFocus && e2.valueFocus(...a3)), onBlur: a2[4] || (a2[4] = (...a3) => e2.valueBlur && e2.valueBlur(...a3)), style: i(e2.styleSearchbar) }, null, 44, B)], 32), e2.clearable ? g((c(), u("view", { key: 0, onClick: a2[6] || (a2[6] = (...a3) => e2.handleClear && e2.handleClear(...a3)), class: "nut-searchbar__input-clear" }, [b(y2, { name: "circle-close", size: "12", color: "#555" })], 512)), [[m, e2.modelValue.length > 0]]) : s("", true)]), e2.$slots.rightin ? (c(), u("view", { key: 1, class: "nut-searchbar__search-icon nut-searchbar__iptright-sarch-icon", onClick: a2[7] || (a2[7] = (...a3) => e2.rightIconClick && e2.rightIconClick(...a3)) }, [h(e2.$slots, "rightin")])) : s("", true)], 4), e2.$slots.rightout ? (c(), u("view", I, [h(e2.$slots, "rightout")])) : s("", true)], 4);
|
|
60
|
+
}]]);
|
|
61
|
+
export { V as default };
|