@nutui/nutui 4.0.11 → 4.0.12
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 +1 -1
- package/dist/nutui.js +2 -2
- package/dist/nutui.umd.js +1 -1
- package/dist/packages/_es/ActionSheet.js +111 -78
- package/dist/packages/_es/Address.js +375 -250
- package/dist/packages/_es/AddressList.js +354 -269
- package/dist/packages/_es/Animate.js +58 -41
- package/dist/packages/_es/Audio.js +197 -128
- package/dist/packages/_es/AudioOperate.js +71 -60
- package/dist/packages/_es/Avatar.js +89 -66
- package/dist/packages/_es/AvatarGroup.js +31 -23
- package/dist/packages/_es/Backtop.js +99 -59
- package/dist/packages/_es/Badge.js +47 -36
- package/dist/packages/_es/Barrage.js +147 -68
- package/dist/packages/_es/Button.js +66 -47
- package/dist/packages/_es/Calendar.js +157 -135
- package/dist/packages/_es/CalendarItem.js +6 -6
- package/dist/packages/_es/Card.js +56 -42
- package/dist/packages/_es/Cascader.js +474 -315
- package/dist/packages/_es/Category.js +39 -29
- package/dist/packages/_es/CategoryPane.js +83 -57
- package/dist/packages/_es/Cell.js +71 -56
- package/dist/packages/_es/CellGroup.js +27 -19
- package/dist/packages/_es/Checkbox.js +156 -109
- package/dist/packages/_es/CheckboxGroup.js +59 -38
- package/dist/packages/_es/CircleProgress.js +96 -67
- package/dist/packages/_es/Col.js +31 -23
- package/dist/packages/_es/Collapse.js +58 -33
- package/dist/packages/_es/CollapseItem.js +108 -78
- package/dist/packages/_es/Comment.js +279 -207
- package/dist/packages/_es/ConfigProvider.js +55 -37
- package/dist/packages/_es/Countdown.js +212 -100
- package/dist/packages/_es/Countup.js +445 -232
- package/dist/packages/_es/DatePicker.js +265 -162
- package/dist/packages/_es/Dialog.js +213 -161
- package/dist/packages/_es/Divider.js +57 -42
- package/dist/packages/_es/Drag.js +153 -70
- package/dist/packages/_es/Ecard.js +104 -64
- package/dist/packages/_es/Elevator.js +219 -143
- package/dist/packages/_es/Ellipsis.js +178 -95
- package/dist/packages/_es/Empty.js +39 -23
- package/dist/packages/_es/FixedNav.js +116 -93
- package/dist/packages/_es/Form.js +178 -107
- package/dist/packages/_es/FormItem.js +61 -48
- package/dist/packages/_es/Grid.js +6 -5
- package/dist/packages/_es/GridItem.js +84 -58
- package/dist/packages/_es/Image.js +130 -90
- package/dist/packages/_es/ImagePreview.js +412 -256
- package/dist/packages/_es/Indicator.js +34 -30
- package/dist/packages/_es/InfiniteLoading.js +136 -83
- package/dist/packages/_es/Input.js +264 -160
- package/dist/packages/_es/InputNumber.js +117 -81
- package/dist/packages/_es/Interceptor-956b24fc.js +29 -0
- package/dist/packages/_es/Invoice.js +130 -104
- package/dist/packages/_es/Layout.js +4 -3
- package/dist/packages/_es/List.js +215 -117
- package/dist/packages/_es/Menu.js +150 -95
- package/dist/packages/_es/MenuItem.js +154 -109
- package/dist/packages/_es/Navbar.js +119 -103
- package/dist/packages/_es/Noticebar.js +312 -197
- package/dist/packages/_es/Notify.js +166 -110
- package/dist/packages/_es/NumberKeyboard.js +202 -127
- package/dist/packages/_es/Overlay.js +80 -52
- package/dist/packages/_es/Pagination.js +100 -70
- package/dist/packages/_es/Picker.js +437 -275
- package/dist/packages/_es/Popover.js +225 -122
- package/dist/packages/_es/Popup.js +4 -4
- package/dist/packages/_es/Price.js +82 -44
- package/dist/packages/_es/Progress.js +79 -63
- package/dist/packages/_es/PullRefresh.js +173 -95
- package/dist/packages/_es/Radio.js +4 -4
- package/dist/packages/_es/RadioGroup.js +3 -3
- package/dist/packages/_es/Range.js +347 -204
- package/dist/packages/_es/Rate.js +141 -92
- package/dist/packages/_es/Row.js +27 -21
- package/dist/packages/_es/Searchbar.js +174 -123
- package/dist/packages/_es/ShortPassword.js +93 -69
- package/dist/packages/_es/SideNavbar.js +80 -49
- package/dist/packages/_es/SideNavbarItem.js +32 -22
- package/dist/packages/_es/Signature.js +146 -83
- package/dist/packages/_es/Skeleton.js +130 -110
- package/dist/packages/_es/Sku.js +343 -250
- package/dist/packages/_es/Step.js +86 -59
- package/dist/packages/_es/Steps.js +31 -26
- package/dist/packages/_es/Sticky.js +4 -4
- package/dist/packages/_es/SubSideNavbar.js +74 -52
- package/dist/packages/_es/Swipe.js +155 -83
- package/dist/packages/_es/Swiper.js +311 -174
- package/dist/packages/_es/SwiperItem.js +44 -28
- package/dist/packages/_es/Switch.js +68 -55
- package/dist/packages/_es/TabPane.js +41 -30
- package/dist/packages/_es/Tabbar.js +52 -41
- package/dist/packages/_es/TabbarItem.js +82 -61
- package/dist/packages/_es/Table.js +165 -109
- package/dist/packages/_es/Tabs.js +388 -240
- package/dist/packages/_es/Tag.js +61 -44
- package/dist/packages/_es/Textarea.js +124 -80
- package/dist/packages/_es/TimeDetail.js +76 -49
- package/dist/packages/_es/TimePannel.js +48 -34
- package/dist/packages/_es/TimeSelect.js +68 -47
- package/dist/packages/_es/Toast.js +218 -144
- package/dist/packages/_es/Tour.js +192 -138
- package/dist/packages/_es/TrendArrow.js +77 -57
- package/dist/packages/_es/Uploader.js +359 -234
- package/dist/packages/_es/Video.js +316 -191
- package/dist/packages/_es/Watermark.js +117 -84
- package/dist/packages/_es/_plugin-vue_export-helper-cc2b3d55.js +10 -0
- package/dist/packages/_es/common-b9a5e726.js +145 -0
- package/dist/packages/_es/component-81a4c1d0.js +145 -0
- package/dist/packages/_es/index-29892cda.js +33 -0
- package/dist/packages/_es/index-43c34ac6.js +30 -0
- package/dist/packages/_es/index-54d03fc1.js +8 -0
- package/dist/packages/_es/index-79c5dc33.js +10 -0
- package/dist/packages/_es/index-7a7385e4.js +67 -0
- package/dist/packages/_es/index-87422be8.js +942 -0
- package/dist/packages/_es/index-da0a7662.js +259 -0
- package/dist/packages/_es/index.vue_vue_type_script_lang-22dfc112.js +46 -0
- package/dist/packages/_es/index.vue_vue_type_script_lang-a8856969.js +97 -0
- package/dist/packages/_es/index.vue_vue_type_script_lang-cc5c4086.js +151 -0
- package/dist/packages/_es/mountComponent-8b24c346.js +39 -0
- package/dist/packages/_es/pxCheck-c6b9f6b7.js +6 -0
- package/dist/packages/_es/raf-729dad54.js +25 -0
- package/dist/packages/_es/renderIcon-3d0fd47c.js +9 -0
- package/dist/packages/locale/lang/baseLang-3a8457ac.js +5 -0
- package/dist/packages/locale/lang/en-US.js +39 -36
- package/dist/packages/locale/lang/id-ID.js +39 -36
- package/dist/packages/locale/lang/index.js +44 -22
- package/dist/packages/locale/lang/zh-CN.js +38 -35
- package/dist/packages/locale/lang/zh-TW.js +38 -35
- package/dist/resolver/index.js +26 -1
- package/dist/resolver/index.mjs +17 -14
- package/dist/smartips/web-types.json +1 -1
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +48 -48
- package/dist/styles/themes/jdb.scss +48 -48
- package/dist/styles/themes/jddkh.scss +48 -48
- package/dist/styles/themes/jdt.scss +48 -48
- package/dist/types/index.d.ts +1 -1
- package/package.json +3 -4
- package/dist/packages/_es/Interceptor-6e26b757.js +0 -18
- package/dist/packages/_es/_plugin-vue_export-helper-dad06003.js +0 -9
- package/dist/packages/_es/common-d218746f.js +0 -116
- package/dist/packages/_es/component-234624bc.js +0 -89
- package/dist/packages/_es/index-14dfadc4.js +0 -561
- package/dist/packages/_es/index-192a3ef6.js +0 -29
- package/dist/packages/_es/index-360c5092.js +0 -210
- package/dist/packages/_es/index-496e6e05.js +0 -24
- package/dist/packages/_es/index-50eed3d9.js +0 -7
- package/dist/packages/_es/index-53ec2d4d.js +0 -34
- package/dist/packages/_es/index-fadb0974.js +0 -8
- package/dist/packages/_es/index.vue_vue_type_script_lang-1139b29a.js +0 -43
- package/dist/packages/_es/index.vue_vue_type_script_lang-43b774dd.js +0 -77
- package/dist/packages/_es/index.vue_vue_type_script_lang-f44c159d.js +0 -110
- package/dist/packages/_es/mountComponent-6d4ff200.js +0 -23
- package/dist/packages/_es/pxCheck-38173291.js +0 -4
- package/dist/packages/_es/raf-a74f1a06.js +0 -16
- package/dist/packages/_es/renderIcon-47498b32.js +0 -5
- package/dist/packages/locale/lang/baseLang-0bdc6353.js +0 -5
package/dist/packages/_es/Tag.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { toRefs
|
|
2
|
-
import { c as
|
|
3
|
-
import { Close
|
|
4
|
-
import { _ as
|
|
1
|
+
import { toRefs, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, renderSlot, createBlock, createCommentVNode } from "vue";
|
|
2
|
+
import { c as createComponent } from "./component-81a4c1d0.js";
|
|
3
|
+
import { Close } from "@nutui/icons-vue";
|
|
4
|
+
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
5
5
|
import "../locale/lang";
|
|
6
|
-
const { componentName
|
|
6
|
+
const { componentName, create } = createComponent("tag");
|
|
7
|
+
const _sfc_main = create({
|
|
7
8
|
props: {
|
|
8
9
|
color: { type: String, default: "" },
|
|
9
10
|
textColor: { type: String, default: "" },
|
|
@@ -13,69 +14,85 @@ const { componentName: B, create: b } = g("tag"), h = b({
|
|
|
13
14
|
},
|
|
14
15
|
plain: {
|
|
15
16
|
type: Boolean,
|
|
16
|
-
default:
|
|
17
|
+
default: false
|
|
17
18
|
},
|
|
18
19
|
round: {
|
|
19
20
|
type: Boolean,
|
|
20
|
-
default:
|
|
21
|
+
default: false
|
|
21
22
|
},
|
|
22
23
|
mark: {
|
|
23
24
|
type: Boolean,
|
|
24
|
-
default:
|
|
25
|
+
default: false
|
|
25
26
|
},
|
|
26
27
|
closeable: {
|
|
27
28
|
type: Boolean,
|
|
28
|
-
default:
|
|
29
|
+
default: false
|
|
29
30
|
}
|
|
30
31
|
},
|
|
31
32
|
components: {
|
|
32
|
-
Close
|
|
33
|
+
Close
|
|
33
34
|
},
|
|
34
35
|
emits: ["close", "click"],
|
|
35
|
-
setup(
|
|
36
|
-
const { type
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
36
|
+
setup(props, { emit }) {
|
|
37
|
+
const { type, color, plain, round, mark, textColor } = toRefs(props);
|
|
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;
|
|
57
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
|
+
};
|
|
70
|
+
return {
|
|
71
|
+
classes,
|
|
72
|
+
getStyle,
|
|
73
|
+
onClose,
|
|
74
|
+
onClick
|
|
58
75
|
};
|
|
59
76
|
}
|
|
60
77
|
});
|
|
61
|
-
function
|
|
62
|
-
const
|
|
63
|
-
return
|
|
64
|
-
class:
|
|
65
|
-
style:
|
|
66
|
-
onClick:
|
|
78
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
79
|
+
const _component_Close = resolveComponent("Close");
|
|
80
|
+
return openBlock(), createElementBlock("view", {
|
|
81
|
+
class: normalizeClass(_ctx.classes),
|
|
82
|
+
style: normalizeStyle(_ctx.getStyle()),
|
|
83
|
+
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onClick && _ctx.onClick(...args))
|
|
67
84
|
}, [
|
|
68
|
-
|
|
69
|
-
|
|
85
|
+
renderSlot(_ctx.$slots, "default"),
|
|
86
|
+
_ctx.closeable ? (openBlock(), createBlock(_component_Close, {
|
|
70
87
|
key: 0,
|
|
71
88
|
class: "nut-tag--close",
|
|
72
89
|
width: "12px",
|
|
73
90
|
height: "12px",
|
|
74
|
-
onClick:
|
|
75
|
-
}, null, 8, ["onClick"])) :
|
|
91
|
+
onClick: _ctx.onClose
|
|
92
|
+
}, null, 8, ["onClick"])) : createCommentVNode("", true)
|
|
76
93
|
], 6);
|
|
77
94
|
}
|
|
78
|
-
const
|
|
95
|
+
const Tag = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
79
96
|
export {
|
|
80
|
-
|
|
97
|
+
Tag as default
|
|
81
98
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { ref
|
|
2
|
-
import { c as
|
|
3
|
-
import { _ as
|
|
1
|
+
import { ref, computed, onMounted, nextTick, watch, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle, toDisplayString, createCommentVNode } from "vue";
|
|
2
|
+
import { c as createComponent } from "./component-81a4c1d0.js";
|
|
3
|
+
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
4
4
|
import "../locale/lang";
|
|
5
|
-
const { componentName
|
|
5
|
+
const { componentName, create, translate } = createComponent("textarea");
|
|
6
|
+
const _sfc_main = create({
|
|
6
7
|
props: {
|
|
7
8
|
modelValue: {
|
|
8
9
|
type: String,
|
|
@@ -14,7 +15,7 @@ const { componentName: B, create: z, translate: v } = L("textarea"), x = z({
|
|
|
14
15
|
},
|
|
15
16
|
limitShow: {
|
|
16
17
|
type: Boolean,
|
|
17
|
-
default:
|
|
18
|
+
default: false
|
|
18
19
|
},
|
|
19
20
|
maxLength: {
|
|
20
21
|
type: [String, Number],
|
|
@@ -30,114 +31,157 @@ const { componentName: B, create: z, translate: v } = L("textarea"), x = z({
|
|
|
30
31
|
},
|
|
31
32
|
readonly: {
|
|
32
33
|
type: Boolean,
|
|
33
|
-
default:
|
|
34
|
+
default: false
|
|
34
35
|
},
|
|
35
36
|
disabled: {
|
|
36
37
|
type: Boolean,
|
|
37
|
-
default:
|
|
38
|
+
default: false
|
|
38
39
|
},
|
|
39
40
|
autosize: {
|
|
40
41
|
type: [Boolean, Object],
|
|
41
|
-
default:
|
|
42
|
+
default: false
|
|
42
43
|
},
|
|
43
44
|
autofocus: {
|
|
44
45
|
type: Boolean,
|
|
45
|
-
default:
|
|
46
|
+
default: false
|
|
46
47
|
}
|
|
47
48
|
},
|
|
48
49
|
emits: ["update:modelValue", "change", "blur", "focus"],
|
|
49
|
-
setup(
|
|
50
|
-
const
|
|
51
|
-
|
|
50
|
+
setup(props, { emit }) {
|
|
51
|
+
const textareaRef = ref();
|
|
52
|
+
const classes = computed(() => {
|
|
53
|
+
const prefixCls = componentName;
|
|
52
54
|
return {
|
|
53
|
-
[
|
|
54
|
-
[`${
|
|
55
|
+
[prefixCls]: true,
|
|
56
|
+
[`${prefixCls}--disabled`]: props.disabled
|
|
55
57
|
};
|
|
56
58
|
});
|
|
57
|
-
|
|
58
|
-
|
|
59
|
+
onMounted(() => {
|
|
60
|
+
if (props.modelValue) {
|
|
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
|
+
};
|
|
59
72
|
});
|
|
60
|
-
const
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
73
|
+
const getContentHeight = () => {
|
|
74
|
+
let textarea = textareaRef.value;
|
|
75
|
+
textarea.style.height = "auto";
|
|
76
|
+
let height = textarea.scrollHeight;
|
|
77
|
+
if (typeof props.autosize === "object") {
|
|
78
|
+
const { maxHeight, minHeight } = props.autosize;
|
|
79
|
+
if (maxHeight !== void 0) {
|
|
80
|
+
height = Math.min(height, maxHeight);
|
|
81
|
+
}
|
|
82
|
+
if (minHeight !== void 0) {
|
|
83
|
+
height = Math.max(height, minHeight);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
if (height) {
|
|
87
|
+
textarea.style.height = height + "px";
|
|
70
88
|
}
|
|
71
|
-
a && (t.style.height = a + "px");
|
|
72
89
|
};
|
|
73
|
-
|
|
74
|
-
() =>
|
|
90
|
+
watch(
|
|
91
|
+
() => props.modelValue,
|
|
75
92
|
() => {
|
|
76
|
-
|
|
93
|
+
if (props.autosize) {
|
|
94
|
+
nextTick(getContentHeight);
|
|
95
|
+
}
|
|
77
96
|
}
|
|
78
97
|
);
|
|
79
|
-
const
|
|
80
|
-
|
|
98
|
+
const emitChange = (value, event) => {
|
|
99
|
+
if (props.maxLength && value.length > Number(props.maxLength)) {
|
|
100
|
+
value = value.substring(0, Number(props.maxLength));
|
|
101
|
+
}
|
|
102
|
+
emit("update:modelValue", value, event);
|
|
103
|
+
emit("change", value, event);
|
|
81
104
|
};
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
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);
|
|
105
|
+
const change = (event) => {
|
|
106
|
+
if (!event.target.composing) {
|
|
107
|
+
const input = event.target;
|
|
108
|
+
let value = input.value;
|
|
109
|
+
if (props.maxLength && value.length > Number(props.maxLength)) {
|
|
110
|
+
value = value.slice(0, Number(props.maxLength));
|
|
91
111
|
}
|
|
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")));
|
|
112
|
+
emitChange(input.value, event);
|
|
108
113
|
}
|
|
109
114
|
};
|
|
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
|
+
};
|
|
110
152
|
}
|
|
111
|
-
})
|
|
153
|
+
});
|
|
154
|
+
const _hoisted_1 = ["rows", "disabled", "readonly", "value", "maxlength", "placeholder", "autofocus"];
|
|
155
|
+
const _hoisted_2 = {
|
|
112
156
|
key: 0,
|
|
113
157
|
class: "nut-textarea__limit"
|
|
114
158
|
};
|
|
115
|
-
function
|
|
116
|
-
return
|
|
117
|
-
class:
|
|
159
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
160
|
+
return openBlock(), createElementBlock("view", {
|
|
161
|
+
class: normalizeClass(_ctx.classes)
|
|
118
162
|
}, [
|
|
119
|
-
|
|
163
|
+
createElementVNode("textarea", {
|
|
120
164
|
ref: "textareaRef",
|
|
121
165
|
class: "nut-textarea__textarea",
|
|
122
|
-
style:
|
|
123
|
-
rows:
|
|
124
|
-
disabled:
|
|
125
|
-
readonly:
|
|
126
|
-
value:
|
|
127
|
-
onInput:
|
|
128
|
-
onBlur:
|
|
129
|
-
onFocus:
|
|
130
|
-
maxlength:
|
|
131
|
-
placeholder:
|
|
132
|
-
autofocus:
|
|
133
|
-
onChange:
|
|
134
|
-
onCompositionend:
|
|
135
|
-
onCompositionstart:
|
|
136
|
-
}, null, 44,
|
|
137
|
-
|
|
166
|
+
style: normalizeStyle(_ctx.styles),
|
|
167
|
+
rows: _ctx.rows,
|
|
168
|
+
disabled: _ctx.disabled,
|
|
169
|
+
readonly: _ctx.readonly,
|
|
170
|
+
value: _ctx.modelValue,
|
|
171
|
+
onInput: _cache[0] || (_cache[0] = (...args) => _ctx.change && _ctx.change(...args)),
|
|
172
|
+
onBlur: _cache[1] || (_cache[1] = (...args) => _ctx.blur && _ctx.blur(...args)),
|
|
173
|
+
onFocus: _cache[2] || (_cache[2] = (...args) => _ctx.focus && _ctx.focus(...args)),
|
|
174
|
+
maxlength: _ctx.maxLength,
|
|
175
|
+
placeholder: _ctx.placeholder || _ctx.translate("placeholder"),
|
|
176
|
+
autofocus: _ctx.autofocus,
|
|
177
|
+
onChange: _cache[3] || (_cache[3] = (...args) => _ctx.endComposing && _ctx.endComposing(...args)),
|
|
178
|
+
onCompositionend: _cache[4] || (_cache[4] = (...args) => _ctx.endComposing && _ctx.endComposing(...args)),
|
|
179
|
+
onCompositionstart: _cache[5] || (_cache[5] = (...args) => _ctx.startComposing && _ctx.startComposing(...args))
|
|
180
|
+
}, null, 44, _hoisted_1),
|
|
181
|
+
_ctx.limitShow ? (openBlock(), createElementBlock("view", _hoisted_2, toDisplayString(_ctx.modelValue ? _ctx.modelValue.length : 0) + "/" + toDisplayString(_ctx.maxLength), 1)) : createCommentVNode("", true)
|
|
138
182
|
], 2);
|
|
139
183
|
}
|
|
140
|
-
const
|
|
184
|
+
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
141
185
|
export {
|
|
142
|
-
|
|
186
|
+
index as default
|
|
143
187
|
};
|
|
@@ -1,69 +1,96 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
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 = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
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";
|
|
16
23
|
import "../locale/lang";
|
|
17
|
-
const { componentName
|
|
24
|
+
const { componentName, create } = createComponent("time-detail");
|
|
25
|
+
const _sfc_main = create({
|
|
18
26
|
name: "timedetail",
|
|
19
27
|
props: {
|
|
20
28
|
times: {
|
|
21
29
|
type: Array,
|
|
22
|
-
default: () =>
|
|
30
|
+
default: () => {
|
|
31
|
+
return [];
|
|
32
|
+
}
|
|
23
33
|
}
|
|
24
34
|
},
|
|
25
35
|
emits: ["select"],
|
|
26
|
-
setup: (
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
})
|
|
33
|
-
|
|
34
|
-
|
|
36
|
+
setup: (props, context) => {
|
|
37
|
+
const currentKey = inject("currentKey");
|
|
38
|
+
const currentTime = inject("currentTime");
|
|
39
|
+
const state = reactive({
|
|
40
|
+
currentKey,
|
|
41
|
+
currentTime
|
|
42
|
+
});
|
|
43
|
+
const classes = computed(() => {
|
|
44
|
+
const prefixCls = componentName;
|
|
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) {
|
|
35
52
|
return {
|
|
36
|
-
"nut-time-detail__detail__list__item":
|
|
37
|
-
"nut-time-detail__detail__list__item--curr":
|
|
53
|
+
"nut-time-detail__detail__list__item": true,
|
|
54
|
+
"nut-time-detail__detail__list__item--curr": find.list.filter((value) => value === item).length > 0
|
|
38
55
|
};
|
|
39
|
-
|
|
40
|
-
|
|
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);
|
|
41
63
|
};
|
|
42
|
-
return
|
|
43
|
-
classes
|
|
44
|
-
},
|
|
45
|
-
getClass
|
|
46
|
-
renderData
|
|
47
|
-
handleTime
|
|
64
|
+
return __spreadProps(__spreadValues({
|
|
65
|
+
classes
|
|
66
|
+
}, toRefs(state)), {
|
|
67
|
+
getClass,
|
|
68
|
+
renderData,
|
|
69
|
+
handleTime
|
|
48
70
|
});
|
|
49
71
|
}
|
|
50
|
-
})
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
72
|
+
});
|
|
73
|
+
const _hoisted_1 = { class: "nut-time-detail__detail nut-time-detail__detail--moring" };
|
|
74
|
+
const _hoisted_2 = { class: "nut-time-detail__detail__list" };
|
|
75
|
+
const _hoisted_3 = ["onClick"];
|
|
76
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
77
|
+
return openBlock(), createElementBlock("view", {
|
|
78
|
+
class: normalizeClass(_ctx.classes)
|
|
54
79
|
}, [
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
(
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
80
|
+
createElementVNode("view", _hoisted_1, [
|
|
81
|
+
createElementVNode("view", _hoisted_2, [
|
|
82
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.renderData, (item) => {
|
|
83
|
+
return openBlock(), createElementBlock("view", {
|
|
84
|
+
class: normalizeClass(_ctx.getClass(item)),
|
|
85
|
+
key: item,
|
|
86
|
+
onClick: ($event) => _ctx.handleTime(item)
|
|
87
|
+
}, toDisplayString(item), 11, _hoisted_3);
|
|
88
|
+
}), 128))
|
|
62
89
|
])
|
|
63
90
|
])
|
|
64
91
|
], 2);
|
|
65
92
|
}
|
|
66
|
-
const
|
|
93
|
+
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
67
94
|
export {
|
|
68
|
-
|
|
95
|
+
index as default
|
|
69
96
|
};
|
|
@@ -1,20 +1,28 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
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 = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
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";
|
|
16
23
|
import "../locale/lang";
|
|
17
|
-
const { componentName
|
|
24
|
+
const { componentName, create } = createComponent("time-pannel");
|
|
25
|
+
const _sfc_main = create({
|
|
18
26
|
name: "timepannel",
|
|
19
27
|
props: {
|
|
20
28
|
name: {
|
|
@@ -27,28 +35,34 @@ const { componentName: B, create: N } = _("time-pannel"), P = N({
|
|
|
27
35
|
}
|
|
28
36
|
},
|
|
29
37
|
emits: ["change"],
|
|
30
|
-
setup: (
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
+
setup: (props, context) => {
|
|
39
|
+
const currentKey = inject("currentKey");
|
|
40
|
+
const state = reactive({
|
|
41
|
+
currentKey
|
|
42
|
+
});
|
|
43
|
+
const classes = computed(() => {
|
|
44
|
+
const prefixCls = componentName;
|
|
45
|
+
return {
|
|
46
|
+
[prefixCls]: true,
|
|
47
|
+
"nut-time-pannel--curr": state.currentKey == props.pannelKey
|
|
48
|
+
};
|
|
49
|
+
});
|
|
50
|
+
const handlePannel = (pannelKey) => {
|
|
51
|
+
context.emit("change", pannelKey);
|
|
38
52
|
};
|
|
39
|
-
return
|
|
40
|
-
classes
|
|
41
|
-
handlePannel
|
|
53
|
+
return __spreadProps(__spreadValues({}, toRefs(state)), {
|
|
54
|
+
classes,
|
|
55
|
+
handlePannel
|
|
42
56
|
});
|
|
43
57
|
}
|
|
44
58
|
});
|
|
45
|
-
function
|
|
46
|
-
return
|
|
47
|
-
class:
|
|
48
|
-
onClick:
|
|
49
|
-
},
|
|
59
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
60
|
+
return openBlock(), createElementBlock("view", {
|
|
61
|
+
class: normalizeClass(_ctx.classes),
|
|
62
|
+
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.handlePannel(_ctx.pannelKey))
|
|
63
|
+
}, toDisplayString(_ctx.name), 3);
|
|
50
64
|
}
|
|
51
|
-
const
|
|
65
|
+
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
52
66
|
export {
|
|
53
|
-
|
|
67
|
+
index as default
|
|
54
68
|
};
|