@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
package/dist/packages/_es/Tag.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { toRefs, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, renderSlot, createBlock, createCommentVNode } from "vue";
|
|
2
|
-
import { c as
|
|
3
|
-
import { Close } from "@nutui/icons-vue";
|
|
4
|
-
import { _ as
|
|
1
|
+
import { toRefs as p, computed as i, resolveComponent as f, openBlock as u, createElementBlock as m, normalizeClass as d, normalizeStyle as C, renderSlot as k, createBlock as y, createCommentVNode as v } from "vue";
|
|
2
|
+
import { c as g } from "./component-234624bc.js";
|
|
3
|
+
import { Close as $ } from "@nutui/icons-vue";
|
|
4
|
+
import { _ as S } from "./_plugin-vue_export-helper-dad06003.js";
|
|
5
5
|
import "../locale/lang";
|
|
6
|
-
const { componentName, create } =
|
|
7
|
-
const _sfc_main = create({
|
|
6
|
+
const { componentName: B, create: b } = g("tag"), h = b({
|
|
8
7
|
props: {
|
|
9
8
|
color: { type: String, default: "" },
|
|
10
9
|
textColor: { type: String, default: "" },
|
|
@@ -14,85 +13,69 @@ const _sfc_main = create({
|
|
|
14
13
|
},
|
|
15
14
|
plain: {
|
|
16
15
|
type: Boolean,
|
|
17
|
-
default:
|
|
16
|
+
default: !1
|
|
18
17
|
},
|
|
19
18
|
round: {
|
|
20
19
|
type: Boolean,
|
|
21
|
-
default:
|
|
20
|
+
default: !1
|
|
22
21
|
},
|
|
23
22
|
mark: {
|
|
24
23
|
type: Boolean,
|
|
25
|
-
default:
|
|
24
|
+
default: !1
|
|
26
25
|
},
|
|
27
26
|
closeable: {
|
|
28
27
|
type: Boolean,
|
|
29
|
-
default:
|
|
28
|
+
default: !1
|
|
30
29
|
}
|
|
31
30
|
},
|
|
32
31
|
components: {
|
|
33
|
-
Close
|
|
32
|
+
Close: $
|
|
34
33
|
},
|
|
35
34
|
emits: ["close", "click"],
|
|
36
|
-
setup(
|
|
37
|
-
const { type, color, plain, round, mark, textColor } =
|
|
38
|
-
const classes = computed(() => {
|
|
39
|
-
const prefixCls = componentName;
|
|
40
|
-
return {
|
|
41
|
-
[prefixCls]: true,
|
|
42
|
-
[`${prefixCls}--${type.value}`]: type.value,
|
|
43
|
-
[`${prefixCls}--plain`]: plain.value,
|
|
44
|
-
[`${prefixCls}--round`]: round.value,
|
|
45
|
-
[`${prefixCls}--mark`]: mark.value
|
|
46
|
-
};
|
|
47
|
-
});
|
|
48
|
-
const getStyle = () => {
|
|
49
|
-
const style = {};
|
|
50
|
-
if (textColor.value) {
|
|
51
|
-
style.color = textColor.value;
|
|
52
|
-
} else if (color.value && plain.value) {
|
|
53
|
-
style.color = color.value;
|
|
54
|
-
}
|
|
55
|
-
if (plain.value) {
|
|
56
|
-
style.background = "#fff";
|
|
57
|
-
style["border-color"] = color.value;
|
|
58
|
-
} else if (color.value) {
|
|
59
|
-
style.background = color.value;
|
|
60
|
-
}
|
|
61
|
-
return style;
|
|
62
|
-
};
|
|
63
|
-
const onClose = (event) => {
|
|
64
|
-
event.stopPropagation();
|
|
65
|
-
emit("close", event);
|
|
66
|
-
};
|
|
67
|
-
const onClick = (event) => {
|
|
68
|
-
emit("click", event);
|
|
69
|
-
};
|
|
35
|
+
setup(o, { emit: t }) {
|
|
36
|
+
const { type: s, color: l, plain: a, round: c, mark: r, textColor: n } = p(o);
|
|
70
37
|
return {
|
|
71
|
-
classes
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
38
|
+
classes: i(() => {
|
|
39
|
+
const e = B;
|
|
40
|
+
return {
|
|
41
|
+
[e]: !0,
|
|
42
|
+
[`${e}--${s.value}`]: s.value,
|
|
43
|
+
[`${e}--plain`]: a.value,
|
|
44
|
+
[`${e}--round`]: c.value,
|
|
45
|
+
[`${e}--mark`]: r.value
|
|
46
|
+
};
|
|
47
|
+
}),
|
|
48
|
+
getStyle: () => {
|
|
49
|
+
const e = {};
|
|
50
|
+
return n.value ? e.color = n.value : l.value && a.value && (e.color = l.value), a.value ? (e.background = "#fff", e["border-color"] = l.value) : l.value && (e.background = l.value), e;
|
|
51
|
+
},
|
|
52
|
+
onClose: (e) => {
|
|
53
|
+
e.stopPropagation(), t("close", e);
|
|
54
|
+
},
|
|
55
|
+
onClick: (e) => {
|
|
56
|
+
t("click", e);
|
|
57
|
+
}
|
|
75
58
|
};
|
|
76
59
|
}
|
|
77
60
|
});
|
|
78
|
-
function
|
|
79
|
-
const
|
|
80
|
-
return
|
|
81
|
-
class:
|
|
82
|
-
style:
|
|
83
|
-
onClick:
|
|
61
|
+
function w(o, t, s, l, a, c) {
|
|
62
|
+
const r = f("Close");
|
|
63
|
+
return u(), m("view", {
|
|
64
|
+
class: d(o.classes),
|
|
65
|
+
style: C(o.getStyle()),
|
|
66
|
+
onClick: t[0] || (t[0] = (...n) => o.onClick && o.onClick(...n))
|
|
84
67
|
}, [
|
|
85
|
-
|
|
86
|
-
|
|
68
|
+
k(o.$slots, "default"),
|
|
69
|
+
o.closeable ? (u(), y(r, {
|
|
87
70
|
key: 0,
|
|
88
71
|
class: "nut-tag--close",
|
|
89
72
|
width: "12px",
|
|
90
73
|
height: "12px",
|
|
91
|
-
onClick:
|
|
92
|
-
}, null, 8, ["onClick"])) :
|
|
74
|
+
onClick: o.onClose
|
|
75
|
+
}, null, 8, ["onClick"])) : v("", !0)
|
|
93
76
|
], 6);
|
|
94
77
|
}
|
|
95
|
-
const
|
|
78
|
+
const j = /* @__PURE__ */ S(h, [["render", w]]);
|
|
96
79
|
export {
|
|
97
|
-
|
|
80
|
+
j as default
|
|
98
81
|
};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { ref, computed, onMounted, nextTick, watch, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle, toDisplayString, createCommentVNode } from "vue";
|
|
2
|
-
import { c as
|
|
3
|
-
import { _ as
|
|
1
|
+
import { ref as c, computed as m, onMounted as p, nextTick as g, watch as b, openBlock as f, createElementBlock as h, normalizeClass as C, createElementVNode as V, normalizeStyle as w, toDisplayString as y, createCommentVNode as S } from "vue";
|
|
2
|
+
import { c as L } from "./component-234624bc.js";
|
|
3
|
+
import { _ as N } from "./_plugin-vue_export-helper-dad06003.js";
|
|
4
4
|
import "../locale/lang";
|
|
5
|
-
const { componentName, create, translate } =
|
|
6
|
-
const _sfc_main = create({
|
|
5
|
+
const { componentName: B, create: z, translate: v } = L("textarea"), x = z({
|
|
7
6
|
props: {
|
|
8
7
|
modelValue: {
|
|
9
8
|
type: String,
|
|
@@ -15,7 +14,7 @@ const _sfc_main = create({
|
|
|
15
14
|
},
|
|
16
15
|
limitShow: {
|
|
17
16
|
type: Boolean,
|
|
18
|
-
default:
|
|
17
|
+
default: !1
|
|
19
18
|
},
|
|
20
19
|
maxLength: {
|
|
21
20
|
type: [String, Number],
|
|
@@ -31,157 +30,114 @@ const _sfc_main = create({
|
|
|
31
30
|
},
|
|
32
31
|
readonly: {
|
|
33
32
|
type: Boolean,
|
|
34
|
-
default:
|
|
33
|
+
default: !1
|
|
35
34
|
},
|
|
36
35
|
disabled: {
|
|
37
36
|
type: Boolean,
|
|
38
|
-
default:
|
|
37
|
+
default: !1
|
|
39
38
|
},
|
|
40
39
|
autosize: {
|
|
41
40
|
type: [Boolean, Object],
|
|
42
|
-
default:
|
|
41
|
+
default: !1
|
|
43
42
|
},
|
|
44
43
|
autofocus: {
|
|
45
44
|
type: Boolean,
|
|
46
|
-
default:
|
|
45
|
+
default: !1
|
|
47
46
|
}
|
|
48
47
|
},
|
|
49
48
|
emits: ["update:modelValue", "change", "blur", "focus"],
|
|
50
|
-
setup(
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
const prefixCls = componentName;
|
|
49
|
+
setup(e, { emit: o }) {
|
|
50
|
+
const s = c(), u = m(() => {
|
|
51
|
+
const t = B;
|
|
54
52
|
return {
|
|
55
|
-
[
|
|
56
|
-
[`${
|
|
53
|
+
[t]: !0,
|
|
54
|
+
[`${t}--disabled`]: e.disabled
|
|
57
55
|
};
|
|
58
56
|
});
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
emitChange(String(props.modelValue));
|
|
62
|
-
}
|
|
63
|
-
if (props.autosize) {
|
|
64
|
-
nextTick(getContentHeight);
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
const styles = computed(() => {
|
|
68
|
-
return {
|
|
69
|
-
textAlign: props.textAlign
|
|
70
|
-
// resize: props.autosize ? 'vertical' : 'none'
|
|
71
|
-
};
|
|
57
|
+
p(() => {
|
|
58
|
+
e.modelValue && n(String(e.modelValue)), e.autosize && g(i);
|
|
72
59
|
});
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
height = Math.max(height, minHeight);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
if (height) {
|
|
87
|
-
textarea.style.height = height + "px";
|
|
60
|
+
const r = m(() => ({
|
|
61
|
+
textAlign: e.textAlign
|
|
62
|
+
// resize: props.autosize ? 'vertical' : 'none'
|
|
63
|
+
})), i = () => {
|
|
64
|
+
let t = s.value;
|
|
65
|
+
t.style.height = "auto";
|
|
66
|
+
let a = t.scrollHeight;
|
|
67
|
+
if (typeof e.autosize == "object") {
|
|
68
|
+
const { maxHeight: l, minHeight: d } = e.autosize;
|
|
69
|
+
l !== void 0 && (a = Math.min(a, l)), d !== void 0 && (a = Math.max(a, d));
|
|
88
70
|
}
|
|
71
|
+
a && (t.style.height = a + "px");
|
|
89
72
|
};
|
|
90
|
-
|
|
91
|
-
() =>
|
|
73
|
+
b(
|
|
74
|
+
() => e.modelValue,
|
|
92
75
|
() => {
|
|
93
|
-
|
|
94
|
-
nextTick(getContentHeight);
|
|
95
|
-
}
|
|
76
|
+
e.autosize && g(i);
|
|
96
77
|
}
|
|
97
78
|
);
|
|
98
|
-
const
|
|
99
|
-
|
|
100
|
-
value = value.substring(0, Number(props.maxLength));
|
|
101
|
-
}
|
|
102
|
-
emit("update:modelValue", value, event);
|
|
103
|
-
emit("change", value, event);
|
|
79
|
+
const n = (t, a) => {
|
|
80
|
+
e.maxLength && t.length > Number(e.maxLength) && (t = t.substring(0, Number(e.maxLength))), o("update:modelValue", t, a), o("change", t, a);
|
|
104
81
|
};
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
82
|
+
return {
|
|
83
|
+
textareaRef: s,
|
|
84
|
+
classes: u,
|
|
85
|
+
styles: r,
|
|
86
|
+
change: (t) => {
|
|
87
|
+
if (!t.target.composing) {
|
|
88
|
+
const a = t.target;
|
|
89
|
+
let l = a.value;
|
|
90
|
+
e.maxLength && l.length > Number(e.maxLength) && (l = l.slice(0, Number(e.maxLength))), n(a.value, t);
|
|
111
91
|
}
|
|
112
|
-
|
|
92
|
+
},
|
|
93
|
+
focus: (t) => {
|
|
94
|
+
e.disabled || e.readonly || o("focus", t);
|
|
95
|
+
},
|
|
96
|
+
blur: (t) => {
|
|
97
|
+
if (e.disabled || e.readonly)
|
|
98
|
+
return;
|
|
99
|
+
let l = t.target.value;
|
|
100
|
+
n(l, t), o("blur", { value: l, event: t });
|
|
101
|
+
},
|
|
102
|
+
translate: v,
|
|
103
|
+
startComposing: ({ target: t }) => {
|
|
104
|
+
t.composing = !0;
|
|
105
|
+
},
|
|
106
|
+
endComposing: ({ target: t }) => {
|
|
107
|
+
t.composing && (t.composing = !1, t.dispatchEvent(new Event("input")));
|
|
113
108
|
}
|
|
114
109
|
};
|
|
115
|
-
const focus = (event) => {
|
|
116
|
-
if (props.disabled)
|
|
117
|
-
return;
|
|
118
|
-
if (props.readonly)
|
|
119
|
-
return;
|
|
120
|
-
emit("focus", event);
|
|
121
|
-
};
|
|
122
|
-
const blur = (event) => {
|
|
123
|
-
if (props.disabled)
|
|
124
|
-
return;
|
|
125
|
-
if (props.readonly)
|
|
126
|
-
return;
|
|
127
|
-
const input = event.target;
|
|
128
|
-
let value = input.value;
|
|
129
|
-
emitChange(value, event);
|
|
130
|
-
emit("blur", { value, event });
|
|
131
|
-
};
|
|
132
|
-
const startComposing = ({ target }) => {
|
|
133
|
-
target.composing = true;
|
|
134
|
-
};
|
|
135
|
-
const endComposing = ({ target }) => {
|
|
136
|
-
if (target.composing) {
|
|
137
|
-
target.composing = false;
|
|
138
|
-
target.dispatchEvent(new Event("input"));
|
|
139
|
-
}
|
|
140
|
-
};
|
|
141
|
-
return {
|
|
142
|
-
textareaRef,
|
|
143
|
-
classes,
|
|
144
|
-
styles,
|
|
145
|
-
change,
|
|
146
|
-
focus,
|
|
147
|
-
blur,
|
|
148
|
-
translate,
|
|
149
|
-
startComposing,
|
|
150
|
-
endComposing
|
|
151
|
-
};
|
|
152
110
|
}
|
|
153
|
-
})
|
|
154
|
-
const _hoisted_1 = ["rows", "disabled", "readonly", "value", "maxlength", "placeholder", "autofocus"];
|
|
155
|
-
const _hoisted_2 = {
|
|
111
|
+
}), $ = ["rows", "disabled", "readonly", "value", "maxlength", "placeholder", "autofocus"], k = {
|
|
156
112
|
key: 0,
|
|
157
113
|
class: "nut-textarea__limit"
|
|
158
114
|
};
|
|
159
|
-
function
|
|
160
|
-
return
|
|
161
|
-
class:
|
|
115
|
+
function E(e, o, s, u, r, i) {
|
|
116
|
+
return f(), h("view", {
|
|
117
|
+
class: C(e.classes)
|
|
162
118
|
}, [
|
|
163
|
-
|
|
119
|
+
V("textarea", {
|
|
164
120
|
ref: "textareaRef",
|
|
165
121
|
class: "nut-textarea__textarea",
|
|
166
|
-
style:
|
|
167
|
-
rows:
|
|
168
|
-
disabled:
|
|
169
|
-
readonly:
|
|
170
|
-
value:
|
|
171
|
-
onInput:
|
|
172
|
-
onBlur:
|
|
173
|
-
onFocus:
|
|
174
|
-
maxlength:
|
|
175
|
-
placeholder:
|
|
176
|
-
autofocus:
|
|
177
|
-
onChange:
|
|
178
|
-
onCompositionend:
|
|
179
|
-
onCompositionstart:
|
|
180
|
-
}, null, 44,
|
|
181
|
-
|
|
122
|
+
style: w(e.styles),
|
|
123
|
+
rows: e.rows,
|
|
124
|
+
disabled: e.disabled,
|
|
125
|
+
readonly: e.readonly,
|
|
126
|
+
value: e.modelValue,
|
|
127
|
+
onInput: o[0] || (o[0] = (...n) => e.change && e.change(...n)),
|
|
128
|
+
onBlur: o[1] || (o[1] = (...n) => e.blur && e.blur(...n)),
|
|
129
|
+
onFocus: o[2] || (o[2] = (...n) => e.focus && e.focus(...n)),
|
|
130
|
+
maxlength: e.maxLength,
|
|
131
|
+
placeholder: e.placeholder || e.translate("placeholder"),
|
|
132
|
+
autofocus: e.autofocus,
|
|
133
|
+
onChange: o[3] || (o[3] = (...n) => e.endComposing && e.endComposing(...n)),
|
|
134
|
+
onCompositionend: o[4] || (o[4] = (...n) => e.endComposing && e.endComposing(...n)),
|
|
135
|
+
onCompositionstart: o[5] || (o[5] = (...n) => e.startComposing && e.startComposing(...n))
|
|
136
|
+
}, null, 44, $),
|
|
137
|
+
e.limitShow ? (f(), h("view", k, y(e.modelValue ? e.modelValue.length : 0) + "/" + y(e.maxLength), 1)) : S("", !0)
|
|
182
138
|
], 2);
|
|
183
139
|
}
|
|
184
|
-
const
|
|
140
|
+
const T = /* @__PURE__ */ N(x, [["render", E]]);
|
|
185
141
|
export {
|
|
186
|
-
|
|
142
|
+
T as default
|
|
187
143
|
};
|
|
@@ -1,96 +1,69 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
return a;
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
import { inject, reactive, computed, toRefs, openBlock, createElementBlock, normalizeClass, createElementVNode, Fragment, renderList, toDisplayString } from "vue";
|
|
21
|
-
import { c as createComponent } from "./component-81a4c1d0.js";
|
|
22
|
-
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
1
|
+
var T = Object.defineProperty, $ = Object.defineProperties;
|
|
2
|
+
var w = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var u = Object.getOwnPropertySymbols;
|
|
4
|
+
var K = Object.prototype.hasOwnProperty, D = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var p = (e, t, r) => t in e ? T(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, f = (e, t) => {
|
|
6
|
+
for (var r in t || (t = {}))
|
|
7
|
+
K.call(t, r) && p(e, r, t[r]);
|
|
8
|
+
if (u)
|
|
9
|
+
for (var r of u(t))
|
|
10
|
+
D.call(t, r) && p(e, r, t[r]);
|
|
11
|
+
return e;
|
|
12
|
+
}, y = (e, t) => $(e, w(t));
|
|
13
|
+
import { inject as C, reactive as x, computed as h, toRefs as B, openBlock as l, createElementBlock as c, normalizeClass as k, createElementVNode as g, Fragment as E, renderList as N, toDisplayString as j } from "vue";
|
|
14
|
+
import { c as z } from "./component-234624bc.js";
|
|
15
|
+
import { _ as A } from "./_plugin-vue_export-helper-dad06003.js";
|
|
23
16
|
import "../locale/lang";
|
|
24
|
-
const { componentName, create } =
|
|
25
|
-
const _sfc_main = create({
|
|
17
|
+
const { componentName: F, create: L } = z("time-detail"), R = L({
|
|
26
18
|
name: "timedetail",
|
|
27
19
|
props: {
|
|
28
20
|
times: {
|
|
29
21
|
type: Array,
|
|
30
|
-
default: () =>
|
|
31
|
-
return [];
|
|
32
|
-
}
|
|
22
|
+
default: () => []
|
|
33
23
|
}
|
|
34
24
|
},
|
|
35
25
|
emits: ["select"],
|
|
36
|
-
setup: (
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
})
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
return {
|
|
46
|
-
[prefixCls]: true
|
|
47
|
-
};
|
|
48
|
-
});
|
|
49
|
-
const getClass = (item) => {
|
|
50
|
-
let find = state.currentTime.find((item2) => item2.key == state.currentKey);
|
|
51
|
-
if (find) {
|
|
26
|
+
setup: (e, t) => {
|
|
27
|
+
const r = C("currentKey"), o = C("currentTime"), i = x({
|
|
28
|
+
currentKey: r,
|
|
29
|
+
currentTime: o
|
|
30
|
+
}), m = h(() => ({
|
|
31
|
+
[F]: !0
|
|
32
|
+
})), n = (s) => {
|
|
33
|
+
let _ = i.currentTime.find((a) => a.key == i.currentKey);
|
|
34
|
+
if (_)
|
|
52
35
|
return {
|
|
53
|
-
"nut-time-detail__detail__list__item":
|
|
54
|
-
"nut-time-detail__detail__list__item--curr":
|
|
36
|
+
"nut-time-detail__detail__list__item": !0,
|
|
37
|
+
"nut-time-detail__detail__list__item--curr": _.list.filter((a) => a === s).length > 0
|
|
55
38
|
};
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
const renderData = computed(() => {
|
|
59
|
-
return props.times.find((time) => time.key == state.currentKey)["list"];
|
|
60
|
-
});
|
|
61
|
-
const handleTime = (time) => {
|
|
62
|
-
context.emit("select", time);
|
|
39
|
+
}, d = h(() => e.times.find((s) => s.key == i.currentKey).list), v = (s) => {
|
|
40
|
+
t.emit("select", s);
|
|
63
41
|
};
|
|
64
|
-
return
|
|
65
|
-
classes
|
|
66
|
-
},
|
|
67
|
-
getClass,
|
|
68
|
-
renderData,
|
|
69
|
-
handleTime
|
|
42
|
+
return y(f({
|
|
43
|
+
classes: m
|
|
44
|
+
}, B(i)), {
|
|
45
|
+
getClass: n,
|
|
46
|
+
renderData: d,
|
|
47
|
+
handleTime: v
|
|
70
48
|
});
|
|
71
49
|
}
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
77
|
-
return openBlock(), createElementBlock("view", {
|
|
78
|
-
class: normalizeClass(_ctx.classes)
|
|
50
|
+
}), S = { class: "nut-time-detail__detail nut-time-detail__detail--moring" }, V = { class: "nut-time-detail__detail__list" }, b = ["onClick"];
|
|
51
|
+
function q(e, t, r, o, i, m) {
|
|
52
|
+
return l(), c("view", {
|
|
53
|
+
class: k(e.classes)
|
|
79
54
|
}, [
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
(
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}, toDisplayString(item), 11, _hoisted_3);
|
|
88
|
-
}), 128))
|
|
55
|
+
g("view", S, [
|
|
56
|
+
g("view", V, [
|
|
57
|
+
(l(!0), c(E, null, N(e.renderData, (n) => (l(), c("view", {
|
|
58
|
+
class: k(e.getClass(n)),
|
|
59
|
+
key: n,
|
|
60
|
+
onClick: (d) => e.handleTime(n)
|
|
61
|
+
}, j(n), 11, b))), 128))
|
|
89
62
|
])
|
|
90
63
|
])
|
|
91
64
|
], 2);
|
|
92
65
|
}
|
|
93
|
-
const
|
|
66
|
+
const O = /* @__PURE__ */ A(R, [["render", q]]);
|
|
94
67
|
export {
|
|
95
|
-
|
|
68
|
+
O as default
|
|
96
69
|
};
|
|
@@ -1,28 +1,20 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
return a;
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
import { inject, reactive, computed, toRefs, openBlock, createElementBlock, normalizeClass, toDisplayString } from "vue";
|
|
21
|
-
import { c as createComponent } from "./component-81a4c1d0.js";
|
|
22
|
-
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
1
|
+
var m = Object.defineProperty, u = Object.defineProperties;
|
|
2
|
+
var f = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var p = Object.getOwnPropertySymbols;
|
|
4
|
+
var d = Object.prototype.hasOwnProperty, y = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var c = (n, e, t) => e in n ? m(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, l = (n, e) => {
|
|
6
|
+
for (var t in e || (e = {}))
|
|
7
|
+
d.call(e, t) && c(n, t, e[t]);
|
|
8
|
+
if (p)
|
|
9
|
+
for (var t of p(e))
|
|
10
|
+
y.call(e, t) && c(n, t, e[t]);
|
|
11
|
+
return n;
|
|
12
|
+
}, i = (n, e) => u(n, f(e));
|
|
13
|
+
import { inject as K, reactive as g, computed as C, toRefs as $, openBlock as h, createElementBlock as k, normalizeClass as v, toDisplayString as S } from "vue";
|
|
14
|
+
import { c as _ } from "./component-234624bc.js";
|
|
15
|
+
import { _ as x } from "./_plugin-vue_export-helper-dad06003.js";
|
|
23
16
|
import "../locale/lang";
|
|
24
|
-
const { componentName, create } =
|
|
25
|
-
const _sfc_main = create({
|
|
17
|
+
const { componentName: B, create: N } = _("time-pannel"), P = N({
|
|
26
18
|
name: "timepannel",
|
|
27
19
|
props: {
|
|
28
20
|
name: {
|
|
@@ -35,34 +27,28 @@ const _sfc_main = create({
|
|
|
35
27
|
}
|
|
36
28
|
},
|
|
37
29
|
emits: ["change"],
|
|
38
|
-
setup: (
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
[prefixCls]: true,
|
|
47
|
-
"nut-time-pannel--curr": state.currentKey == props.pannelKey
|
|
48
|
-
};
|
|
49
|
-
});
|
|
50
|
-
const handlePannel = (pannelKey) => {
|
|
51
|
-
context.emit("change", pannelKey);
|
|
30
|
+
setup: (n, e) => {
|
|
31
|
+
const t = K("currentKey"), r = g({
|
|
32
|
+
currentKey: t
|
|
33
|
+
}), s = C(() => ({
|
|
34
|
+
[B]: !0,
|
|
35
|
+
"nut-time-pannel--curr": r.currentKey == n.pannelKey
|
|
36
|
+
})), o = (a) => {
|
|
37
|
+
e.emit("change", a);
|
|
52
38
|
};
|
|
53
|
-
return
|
|
54
|
-
classes,
|
|
55
|
-
handlePannel
|
|
39
|
+
return i(l({}, $(r)), {
|
|
40
|
+
classes: s,
|
|
41
|
+
handlePannel: o
|
|
56
42
|
});
|
|
57
43
|
}
|
|
58
44
|
});
|
|
59
|
-
function
|
|
60
|
-
return
|
|
61
|
-
class:
|
|
62
|
-
onClick:
|
|
63
|
-
},
|
|
45
|
+
function b(n, e, t, r, s, o) {
|
|
46
|
+
return h(), k("view", {
|
|
47
|
+
class: v(n.classes),
|
|
48
|
+
onClick: e[0] || (e[0] = (a) => n.handlePannel(n.pannelKey))
|
|
49
|
+
}, S(n.name), 3);
|
|
64
50
|
}
|
|
65
|
-
const
|
|
51
|
+
const R = /* @__PURE__ */ x(P, [["render", b]]);
|
|
66
52
|
export {
|
|
67
|
-
|
|
53
|
+
R as default
|
|
68
54
|
};
|