@nutui/nutui 4.3.6 → 4.3.7
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 +20 -0
- package/dist/nutui.es.js +1 -1
- package/dist/nutui.js +4053 -4161
- package/dist/nutui.umd.js +1 -1
- package/dist/packages/image/Image.js +79 -111
- package/dist/packages/input/Input.js +111 -181
- package/dist/packages/invoice/Invoice.js +4 -4
- package/dist/packages/menuitem/MenuItem.js +1 -1
- package/dist/packages/numberkeyboard/NumberKeyboard.js +6 -2
- package/dist/packages/tabpane/TabPane.js +1 -1
- package/dist/smartips/web-types.json +1 -1
- package/dist/types/__VUE/image/image.vue.d.ts +111 -0
- package/dist/types/__VUE/image/index.d.ts +6 -0
- package/dist/types/__VUE/input/index.d.ts +6 -0
- package/dist/types/__VUE/input/input.vue.d.ts +171 -0
- package/dist/types/__VUE/input/{type.d.ts → types.d.ts} +2 -2
- package/dist/types/__VUE/input/util.d.ts +1 -1
- package/dist/types/__VUE/numberkeyboard/index.vue.d.ts +3 -1
- package/dist/types/index.d.ts +5 -3
- package/package.json +1 -1
- package/dist/types/__VUE/image/index.vue.d.ts +0 -126
- package/dist/types/__VUE/input/index.vue.d.ts +0 -221
- /package/dist/types/__VUE/image/{type.d.ts → types.d.ts} +0 -0
|
@@ -17,67 +17,44 @@ var __spreadValues = (a, b) => {
|
|
|
17
17
|
return a;
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
import {
|
|
21
|
-
import { c as createComponent } from "../component-DQf3CENX.js";
|
|
20
|
+
import { defineComponent, ref, computed, onMounted, onBeforeUnmount, watch, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, renderSlot, createVNode, unref, createCommentVNode } from "vue";
|
|
22
21
|
import { p as pxCheck } from "../pxCheck-DN6FYV6q.js";
|
|
23
22
|
import { Image, ImageError } from "@nutui/icons-vue";
|
|
24
|
-
import {
|
|
25
|
-
const
|
|
26
|
-
const
|
|
23
|
+
import { w as withInstall } from "../with-install-Ch3FF0uS.js";
|
|
24
|
+
const _hoisted_1 = ["src", "data-src", "alt"];
|
|
25
|
+
const _hoisted_2 = {
|
|
26
|
+
key: 0,
|
|
27
|
+
class: "nut-img-loading"
|
|
28
|
+
};
|
|
29
|
+
const _hoisted_3 = {
|
|
30
|
+
key: 1,
|
|
31
|
+
class: "nut-img-error"
|
|
32
|
+
};
|
|
33
|
+
const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, {
|
|
34
|
+
name: "NutImage"
|
|
35
|
+
}), {
|
|
36
|
+
__name: "image",
|
|
27
37
|
props: {
|
|
28
|
-
src:
|
|
29
|
-
fit: {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
},
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
},
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
default: ""
|
|
40
|
-
},
|
|
41
|
-
width: {
|
|
42
|
-
type: String,
|
|
43
|
-
default: "center"
|
|
44
|
-
},
|
|
45
|
-
height: {
|
|
46
|
-
type: String,
|
|
47
|
-
default: ""
|
|
48
|
-
},
|
|
49
|
-
round: {
|
|
50
|
-
type: Boolean,
|
|
51
|
-
default: false
|
|
52
|
-
},
|
|
53
|
-
radius: [String, Number],
|
|
54
|
-
showError: {
|
|
55
|
-
type: Boolean,
|
|
56
|
-
default: true
|
|
57
|
-
},
|
|
58
|
-
showLoading: {
|
|
59
|
-
type: Boolean,
|
|
60
|
-
default: true
|
|
61
|
-
},
|
|
62
|
-
lazyLoad: {
|
|
63
|
-
type: Boolean,
|
|
64
|
-
default: false
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
components: {
|
|
68
|
-
Image,
|
|
69
|
-
ImageError
|
|
38
|
+
src: {},
|
|
39
|
+
fit: { default: "fill" },
|
|
40
|
+
position: { default: "center" },
|
|
41
|
+
alt: { default: "" },
|
|
42
|
+
width: { default: "" },
|
|
43
|
+
height: { default: "" },
|
|
44
|
+
round: { type: Boolean, default: false },
|
|
45
|
+
radius: {},
|
|
46
|
+
showError: { type: Boolean, default: true },
|
|
47
|
+
showLoading: { type: Boolean, default: true },
|
|
48
|
+
lazyLoad: { type: Boolean, default: false }
|
|
70
49
|
},
|
|
71
50
|
emits: ["click", "load", "error"],
|
|
72
|
-
setup(
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
slotError: useSlots().error
|
|
78
|
-
});
|
|
51
|
+
setup(__props, { emit: __emit }) {
|
|
52
|
+
const props = __props;
|
|
53
|
+
const emit = __emit;
|
|
54
|
+
const loading = ref(true);
|
|
55
|
+
const isError = ref(false);
|
|
79
56
|
const classes = computed(() => {
|
|
80
|
-
const prefixCls =
|
|
57
|
+
const prefixCls = "nut-image";
|
|
81
58
|
return {
|
|
82
59
|
[prefixCls]: true,
|
|
83
60
|
[`${prefixCls}-round`]: props.round
|
|
@@ -129,73 +106,64 @@ const _sfc_main = create({
|
|
|
129
106
|
watch(
|
|
130
107
|
() => props.src,
|
|
131
108
|
() => {
|
|
132
|
-
|
|
109
|
+
isError.value = false;
|
|
110
|
+
loading.value = true;
|
|
133
111
|
}
|
|
134
112
|
);
|
|
135
113
|
const load = () => {
|
|
136
|
-
|
|
137
|
-
|
|
114
|
+
isError.value = false;
|
|
115
|
+
loading.value = false;
|
|
138
116
|
emit("load");
|
|
139
117
|
};
|
|
140
118
|
const error = () => {
|
|
141
|
-
|
|
142
|
-
|
|
119
|
+
isError.value = true;
|
|
120
|
+
loading.value = false;
|
|
143
121
|
emit("error");
|
|
144
122
|
};
|
|
145
123
|
const imageClick = (event) => {
|
|
146
124
|
emit("click", event);
|
|
147
125
|
};
|
|
148
|
-
return
|
|
126
|
+
return (_ctx, _cache) => {
|
|
127
|
+
return openBlock(), createElementBlock("div", {
|
|
128
|
+
class: normalizeClass(classes.value),
|
|
129
|
+
style: normalizeStyle(stylebox.value),
|
|
130
|
+
onClick: imageClick
|
|
131
|
+
}, [
|
|
132
|
+
createElementVNode("img", {
|
|
133
|
+
ref_key: "imgRef",
|
|
134
|
+
ref: imgRef,
|
|
135
|
+
class: "nut-img",
|
|
136
|
+
src: _ctx.lazyLoad ? show.value ? _ctx.src : void 0 : _ctx.src,
|
|
137
|
+
"data-src": _ctx.lazyLoad ? show.value ? void 0 : _ctx.src : void 0,
|
|
138
|
+
alt: _ctx.alt,
|
|
139
|
+
style: normalizeStyle(styles.value),
|
|
140
|
+
onLoad: load,
|
|
141
|
+
onError: error
|
|
142
|
+
}, null, 44, _hoisted_1),
|
|
143
|
+
loading.value ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
144
|
+
renderSlot(_ctx.$slots, "loading", {}, () => [
|
|
145
|
+
createVNode(unref(Image), {
|
|
146
|
+
width: "16px",
|
|
147
|
+
height: "20px",
|
|
148
|
+
name: "image"
|
|
149
|
+
})
|
|
150
|
+
])
|
|
151
|
+
])) : createCommentVNode("", true),
|
|
152
|
+
isError.value && !loading.value ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
153
|
+
renderSlot(_ctx.$slots, "error", {}, () => [
|
|
154
|
+
createVNode(unref(ImageError), {
|
|
155
|
+
width: "16px",
|
|
156
|
+
height: "20px",
|
|
157
|
+
name: "imageError"
|
|
158
|
+
})
|
|
159
|
+
])
|
|
160
|
+
])) : createCommentVNode("", true)
|
|
161
|
+
], 6);
|
|
162
|
+
};
|
|
149
163
|
}
|
|
150
|
-
});
|
|
151
|
-
|
|
152
|
-
const _hoisted_2 = {
|
|
153
|
-
key: 0,
|
|
154
|
-
class: "nut-img-loading"
|
|
155
|
-
};
|
|
156
|
-
const _hoisted_3 = {
|
|
157
|
-
key: 1,
|
|
158
|
-
class: "nut-img-error"
|
|
159
|
-
};
|
|
160
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
161
|
-
const _component_Image = resolveComponent("Image");
|
|
162
|
-
const _component_ImageError = resolveComponent("ImageError");
|
|
163
|
-
return openBlock(), createElementBlock("div", {
|
|
164
|
-
class: normalizeClass(_ctx.classes),
|
|
165
|
-
style: normalizeStyle(_ctx.stylebox),
|
|
166
|
-
onClick: _cache[2] || (_cache[2] = (...args) => _ctx.imageClick && _ctx.imageClick(...args))
|
|
167
|
-
}, [
|
|
168
|
-
createElementVNode("img", {
|
|
169
|
-
ref: "imgRef",
|
|
170
|
-
class: "nut-img",
|
|
171
|
-
src: _ctx.lazyLoad ? _ctx.show ? _ctx.src : void 0 : _ctx.src,
|
|
172
|
-
"date-src": _ctx.lazyLoad ? _ctx.show ? void 0 : _ctx.src : void 0,
|
|
173
|
-
alt: _ctx.alt,
|
|
174
|
-
style: normalizeStyle(_ctx.styles),
|
|
175
|
-
onLoad: _cache[0] || (_cache[0] = (...args) => _ctx.load && _ctx.load(...args)),
|
|
176
|
-
onError: _cache[1] || (_cache[1] = (...args) => _ctx.error && _ctx.error(...args))
|
|
177
|
-
}, null, 44, _hoisted_1),
|
|
178
|
-
_ctx.loading ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
179
|
-
!_ctx.slotLoding ? (openBlock(), createBlock(_component_Image, {
|
|
180
|
-
key: 0,
|
|
181
|
-
width: "16px",
|
|
182
|
-
height: "20px",
|
|
183
|
-
name: "image"
|
|
184
|
-
})) : createCommentVNode("", true),
|
|
185
|
-
renderSlot(_ctx.$slots, "loading")
|
|
186
|
-
])) : createCommentVNode("", true),
|
|
187
|
-
_ctx.isError && !_ctx.loading ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
188
|
-
!_ctx.slotError ? (openBlock(), createBlock(_component_ImageError, {
|
|
189
|
-
key: 0,
|
|
190
|
-
width: "16px",
|
|
191
|
-
height: "20px",
|
|
192
|
-
name: "imageError"
|
|
193
|
-
})) : createCommentVNode("", true),
|
|
194
|
-
renderSlot(_ctx.$slots, "error")
|
|
195
|
-
])) : createCommentVNode("", true)
|
|
196
|
-
], 6);
|
|
197
|
-
}
|
|
198
|
-
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
164
|
+
}));
|
|
165
|
+
withInstall(_sfc_main);
|
|
199
166
|
export {
|
|
200
|
-
|
|
167
|
+
_sfc_main as Image,
|
|
168
|
+
_sfc_main as default
|
|
201
169
|
};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
2
4
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
6
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
@@ -14,11 +16,11 @@ var __spreadValues = (a, b) => {
|
|
|
14
16
|
}
|
|
15
17
|
return a;
|
|
16
18
|
};
|
|
17
|
-
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
import { defineComponent, toRef, ref, reactive, computed, watch, onMounted, openBlock, createElementBlock, normalizeClass, createElementVNode, renderSlot, createCommentVNode, createBlock, resolveDynamicComponent, normalizeStyle, unref, toDisplayString, createTextVNode, withDirectives, createVNode, mergeProps, vShow, h } from "vue";
|
|
18
21
|
import { MaskClose } from "@nutui/icons-vue";
|
|
19
|
-
import { c as createComponent } from "../component-DQf3CENX.js";
|
|
20
22
|
import { u as useFormDisabled } from "../common-BH7uB7Cn.js";
|
|
21
|
-
import {
|
|
23
|
+
import { w as withInstall } from "../with-install-Ch3FF0uS.js";
|
|
22
24
|
function trimExtraChar(value, char, regExp) {
|
|
23
25
|
const index = value.indexOf(char);
|
|
24
26
|
if (index === -1) {
|
|
@@ -58,90 +60,47 @@ function mapInputType(type) {
|
|
|
58
60
|
}
|
|
59
61
|
return { type };
|
|
60
62
|
}
|
|
61
|
-
const
|
|
62
|
-
const
|
|
63
|
+
const _hoisted_1 = { class: "nut-input-value" };
|
|
64
|
+
const _hoisted_2 = { class: "nut-input-inner" };
|
|
65
|
+
const _hoisted_3 = {
|
|
66
|
+
key: 0,
|
|
67
|
+
class: "nut-input-left-box"
|
|
68
|
+
};
|
|
69
|
+
const _hoisted_4 = { class: "nut-input-box" };
|
|
70
|
+
const _hoisted_5 = {
|
|
71
|
+
key: 0,
|
|
72
|
+
class: "nut-input-word-limit"
|
|
73
|
+
};
|
|
74
|
+
const _hoisted_6 = { class: "nut-input-word-num" };
|
|
75
|
+
const _hoisted_7 = { class: "nut-input-right-box" };
|
|
76
|
+
const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, {
|
|
77
|
+
name: "NutInput"
|
|
78
|
+
}), {
|
|
79
|
+
__name: "input",
|
|
63
80
|
props: {
|
|
64
|
-
type: {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
},
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
},
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
},
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
},
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
default: false
|
|
83
|
-
},
|
|
84
|
-
disabled: {
|
|
85
|
-
type: Boolean,
|
|
86
|
-
default: false
|
|
87
|
-
},
|
|
88
|
-
readonly: {
|
|
89
|
-
type: Boolean,
|
|
90
|
-
default: false
|
|
91
|
-
},
|
|
92
|
-
maxLength: {
|
|
93
|
-
type: [String, Number],
|
|
94
|
-
default: ""
|
|
95
|
-
},
|
|
96
|
-
clearable: {
|
|
97
|
-
type: Boolean,
|
|
98
|
-
default: false
|
|
99
|
-
},
|
|
100
|
-
clearSize: {
|
|
101
|
-
type: [String, Number],
|
|
102
|
-
default: "14"
|
|
103
|
-
},
|
|
104
|
-
border: {
|
|
105
|
-
type: Boolean,
|
|
106
|
-
default: true
|
|
107
|
-
},
|
|
108
|
-
formatTrigger: {
|
|
109
|
-
type: String,
|
|
110
|
-
default: "onChange"
|
|
111
|
-
},
|
|
112
|
-
formatter: {
|
|
113
|
-
type: Function,
|
|
114
|
-
default: null
|
|
115
|
-
},
|
|
116
|
-
showWordLimit: {
|
|
117
|
-
type: Boolean,
|
|
118
|
-
default: false
|
|
119
|
-
},
|
|
120
|
-
autofocus: {
|
|
121
|
-
type: Boolean,
|
|
122
|
-
default: false
|
|
123
|
-
},
|
|
124
|
-
confirmType: {
|
|
125
|
-
type: String,
|
|
126
|
-
default: "done"
|
|
127
|
-
},
|
|
128
|
-
error: {
|
|
129
|
-
type: Boolean,
|
|
130
|
-
default: false
|
|
131
|
-
},
|
|
132
|
-
showClearIcon: {
|
|
133
|
-
type: Boolean,
|
|
134
|
-
default: false
|
|
135
|
-
},
|
|
136
|
-
class: {
|
|
137
|
-
type: String,
|
|
138
|
-
default: ""
|
|
139
|
-
}
|
|
81
|
+
type: { default: "text" },
|
|
82
|
+
modelValue: { default: "" },
|
|
83
|
+
placeholder: { default: "" },
|
|
84
|
+
inputAlign: { default: "left" },
|
|
85
|
+
required: { type: Boolean, default: false },
|
|
86
|
+
disabled: { type: Boolean, default: false },
|
|
87
|
+
readonly: { type: Boolean, default: false },
|
|
88
|
+
maxLength: { default: "" },
|
|
89
|
+
clearable: { type: Boolean, default: false },
|
|
90
|
+
clearSize: { default: "14" },
|
|
91
|
+
border: { type: Boolean, default: true },
|
|
92
|
+
formatTrigger: { default: "onChange" },
|
|
93
|
+
formatter: {},
|
|
94
|
+
showWordLimit: { type: Boolean, default: false },
|
|
95
|
+
autofocus: { type: Boolean, default: false },
|
|
96
|
+
confirmType: { default: "done" },
|
|
97
|
+
error: { type: Boolean, default: false },
|
|
98
|
+
showClearIcon: { type: Boolean, default: false }
|
|
140
99
|
},
|
|
141
|
-
components: { MaskClose },
|
|
142
100
|
emits: ["update:modelValue", "blur", "focus", "clear", "keypress", "click", "clickInput", "confirm"],
|
|
143
|
-
expose:
|
|
144
|
-
|
|
101
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
102
|
+
const props = __props;
|
|
103
|
+
const emit = __emit;
|
|
145
104
|
const disabled = useFormDisabled(toRef(props, "disabled"));
|
|
146
105
|
const active = ref(false);
|
|
147
106
|
const inputRef = ref();
|
|
@@ -158,14 +117,13 @@ const _sfc_main = create({
|
|
|
158
117
|
// 校验信息
|
|
159
118
|
});
|
|
160
119
|
const classes = computed(() => {
|
|
161
|
-
const prefixCls =
|
|
120
|
+
const prefixCls = "nut-input";
|
|
162
121
|
return {
|
|
163
122
|
[prefixCls]: true,
|
|
164
123
|
[`${prefixCls}--disabled`]: disabled.value,
|
|
165
124
|
[`${prefixCls}--required`]: props.required,
|
|
166
125
|
[`${prefixCls}--error`]: props.error,
|
|
167
|
-
[`${prefixCls}--border`]: props.border
|
|
168
|
-
[props.class]: !!props.class
|
|
126
|
+
[`${prefixCls}--border`]: props.border
|
|
169
127
|
};
|
|
170
128
|
});
|
|
171
129
|
const styles = computed(() => {
|
|
@@ -279,103 +237,75 @@ const _sfc_main = create({
|
|
|
279
237
|
emit("confirm", e);
|
|
280
238
|
}
|
|
281
239
|
};
|
|
282
|
-
|
|
283
|
-
renderInput,
|
|
284
|
-
inputRef,
|
|
285
|
-
active,
|
|
286
|
-
classes,
|
|
287
|
-
styles,
|
|
288
|
-
disabled,
|
|
289
|
-
onInput,
|
|
290
|
-
onFocus,
|
|
291
|
-
onBlur,
|
|
292
|
-
clear,
|
|
293
|
-
startComposing,
|
|
294
|
-
endComposing,
|
|
295
|
-
onClick,
|
|
296
|
-
onClickInput,
|
|
240
|
+
__expose({
|
|
297
241
|
focus,
|
|
298
242
|
blur,
|
|
299
|
-
select
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
key: 1,
|
|
358
|
-
class: "nut-input-clear-box",
|
|
359
|
-
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.clear && _ctx.clear(...args))
|
|
360
|
-
}, [
|
|
361
|
-
renderSlot(_ctx.$slots, "clear", {}, () => [
|
|
362
|
-
createVNode(_component_MaskClose, mergeProps({ class: "nut-input-clear" }, _ctx.$attrs, {
|
|
363
|
-
size: _ctx.clearSize,
|
|
364
|
-
width: _ctx.clearSize,
|
|
365
|
-
height: _ctx.clearSize
|
|
366
|
-
}), null, 16, ["size", "width", "height"])
|
|
243
|
+
select
|
|
244
|
+
});
|
|
245
|
+
return (_ctx, _cache) => {
|
|
246
|
+
return openBlock(), createElementBlock("view", {
|
|
247
|
+
class: normalizeClass(classes.value),
|
|
248
|
+
onClick
|
|
249
|
+
}, [
|
|
250
|
+
createElementVNode("view", _hoisted_1, [
|
|
251
|
+
createElementVNode("view", _hoisted_2, [
|
|
252
|
+
_ctx.$slots.left ? (openBlock(), createElementBlock("view", _hoisted_3, [
|
|
253
|
+
renderSlot(_ctx.$slots, "left")
|
|
254
|
+
])) : createCommentVNode("", true),
|
|
255
|
+
createElementVNode("view", _hoisted_4, [
|
|
256
|
+
(openBlock(), createBlock(resolveDynamicComponent(renderInput(_ctx.type)), {
|
|
257
|
+
ref_key: "inputRef",
|
|
258
|
+
ref: inputRef,
|
|
259
|
+
class: "input-text",
|
|
260
|
+
style: normalizeStyle(styles.value),
|
|
261
|
+
maxlength: _ctx.maxLength,
|
|
262
|
+
placeholder: _ctx.placeholder,
|
|
263
|
+
disabled: unref(disabled),
|
|
264
|
+
readonly: _ctx.readonly,
|
|
265
|
+
value: _ctx.modelValue,
|
|
266
|
+
"format-trigger": _ctx.formatTrigger,
|
|
267
|
+
autofocus: _ctx.autofocus,
|
|
268
|
+
enterkeyhint: _ctx.confirmType,
|
|
269
|
+
onInput,
|
|
270
|
+
onFocus,
|
|
271
|
+
onBlur,
|
|
272
|
+
onClick: onClickInput,
|
|
273
|
+
onChange: endComposing,
|
|
274
|
+
onCompositionend: endComposing,
|
|
275
|
+
onCompositionstart: startComposing,
|
|
276
|
+
onKeyup
|
|
277
|
+
}, null, 40, ["style", "maxlength", "placeholder", "disabled", "readonly", "value", "format-trigger", "autofocus", "enterkeyhint"])),
|
|
278
|
+
_ctx.showWordLimit && _ctx.maxLength ? (openBlock(), createElementBlock("view", _hoisted_5, [
|
|
279
|
+
createElementVNode("span", _hoisted_6, toDisplayString(getModelValue() ? getModelValue().length : 0), 1),
|
|
280
|
+
createTextVNode("/" + toDisplayString(_ctx.maxLength), 1)
|
|
281
|
+
])) : createCommentVNode("", true)
|
|
282
|
+
]),
|
|
283
|
+
_ctx.clearable && !_ctx.readonly ? withDirectives((openBlock(), createElementBlock("view", {
|
|
284
|
+
key: 1,
|
|
285
|
+
class: "nut-input-clear-box",
|
|
286
|
+
onClick: clear
|
|
287
|
+
}, [
|
|
288
|
+
renderSlot(_ctx.$slots, "clear", {}, () => [
|
|
289
|
+
createVNode(unref(MaskClose), mergeProps({ class: "nut-input-clear" }, _ctx.$attrs, {
|
|
290
|
+
size: _ctx.clearSize,
|
|
291
|
+
width: _ctx.clearSize,
|
|
292
|
+
height: _ctx.clearSize
|
|
293
|
+
}), null, 16, ["size", "width", "height"])
|
|
294
|
+
])
|
|
295
|
+
], 512)), [
|
|
296
|
+
[vShow, (active.value || _ctx.showClearIcon) && getModelValue().length > 0]
|
|
297
|
+
]) : createCommentVNode("", true),
|
|
298
|
+
createElementVNode("view", _hoisted_7, [
|
|
299
|
+
renderSlot(_ctx.$slots, "right")
|
|
300
|
+
])
|
|
367
301
|
])
|
|
368
|
-
], 512)), [
|
|
369
|
-
[vShow, (_ctx.active || _ctx.showClearIcon) && _ctx.getModelValue().length > 0]
|
|
370
|
-
]) : createCommentVNode("", true),
|
|
371
|
-
createElementVNode("view", _hoisted_7, [
|
|
372
|
-
renderSlot(_ctx.$slots, "right")
|
|
373
302
|
])
|
|
374
|
-
])
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
}
|
|
378
|
-
|
|
303
|
+
], 2);
|
|
304
|
+
};
|
|
305
|
+
}
|
|
306
|
+
}));
|
|
307
|
+
withInstall(_sfc_main);
|
|
379
308
|
export {
|
|
380
|
-
|
|
309
|
+
_sfc_main as Input,
|
|
310
|
+
_sfc_main as default
|
|
381
311
|
};
|
|
@@ -22,8 +22,8 @@ import { Form as _sfc_main$1 } from "../form/Form.js";
|
|
|
22
22
|
import { FormItem as _sfc_main$2 } from "../formitem/FormItem.js";
|
|
23
23
|
import { Radio as _sfc_main$4 } from "../radio/Radio.js";
|
|
24
24
|
import { RadioGroup as _sfc_main$3 } from "../radiogroup/RadioGroup.js";
|
|
25
|
-
import { Button as _sfc_main$
|
|
26
|
-
import
|
|
25
|
+
import { Button as _sfc_main$6 } from "../button/Button.js";
|
|
26
|
+
import { Input as _sfc_main$5 } from "../input/Input.js";
|
|
27
27
|
import { w as withInstall } from "../with-install-Ch3FF0uS.js";
|
|
28
28
|
const _hoisted_1 = { class: "nut-invoice" };
|
|
29
29
|
const _hoisted_2 = {
|
|
@@ -86,7 +86,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
|
|
|
86
86
|
}), 128))
|
|
87
87
|
]),
|
|
88
88
|
_: 2
|
|
89
|
-
}, 1032, ["modelValue", "onUpdate:modelValue"])) : (openBlock(), createBlock(
|
|
89
|
+
}, 1032, ["modelValue", "onUpdate:modelValue"])) : (openBlock(), createBlock(unref(_sfc_main$5), {
|
|
90
90
|
key: 1,
|
|
91
91
|
modelValue: _ctx.formValue[item.formItemProp],
|
|
92
92
|
"onUpdate:modelValue": ($event) => _ctx.formValue[item.formItemProp] = $event,
|
|
@@ -102,7 +102,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
|
|
|
102
102
|
_: 1
|
|
103
103
|
}, 8, ["model-value"]),
|
|
104
104
|
_ctx.submit ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
105
|
-
createVNode(unref(_sfc_main$
|
|
105
|
+
createVNode(unref(_sfc_main$6), {
|
|
106
106
|
type: "primary",
|
|
107
107
|
block: "",
|
|
108
108
|
onClick: submitFun
|
|
@@ -160,7 +160,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
160
160
|
class: normalizeClass(["nut-menu-item__span", [option.value === _ctx.modelValue ? _ctx.activeTitleClass : _ctx.inactiveTitleClass]])
|
|
161
161
|
}, [
|
|
162
162
|
renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
163
|
-
createVNode(_component_Check, mergeProps(_ctx.$attrs, {
|
|
163
|
+
createVNode(_component_Check, mergeProps({ ref_for: true }, _ctx.$attrs, {
|
|
164
164
|
color: _ctx.parent.props.activeColor
|
|
165
165
|
}), null, 16, ["color"])
|
|
166
166
|
])
|
|
@@ -51,7 +51,7 @@ const _sfc_main = create({
|
|
|
51
51
|
default: true
|
|
52
52
|
}
|
|
53
53
|
},
|
|
54
|
-
emits: ["input", "delete", "close", "blur", "update:modelValue", "update:visible"],
|
|
54
|
+
emits: ["input", "delete", "close", "blur", "confirm", "update:modelValue", "update:visible"],
|
|
55
55
|
setup(props, { emit }) {
|
|
56
56
|
const translate = useLocale(cN);
|
|
57
57
|
const clickKeyIndex = ref(void 0);
|
|
@@ -164,10 +164,14 @@ const _sfc_main = create({
|
|
|
164
164
|
emit("update:visible", false);
|
|
165
165
|
emit("close");
|
|
166
166
|
}
|
|
167
|
+
const confirm = () => {
|
|
168
|
+
emit("confirm");
|
|
169
|
+
};
|
|
167
170
|
return {
|
|
168
171
|
clickKeyIndex,
|
|
169
172
|
defaultKey,
|
|
170
173
|
closeBoard,
|
|
174
|
+
confirm,
|
|
171
175
|
onTouchEnd,
|
|
172
176
|
onTouchMove,
|
|
173
177
|
onTouchstart,
|
|
@@ -272,7 +276,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
272
276
|
]),
|
|
273
277
|
createElementVNode("div", {
|
|
274
278
|
class: "nut-key__wrapper nut-key__wrapper--finish",
|
|
275
|
-
onClick: _cache[6] || (_cache[6] = (
|
|
279
|
+
onClick: _cache[6] || (_cache[6] = (...args) => _ctx.confirm && _ctx.confirm(...args))
|
|
276
280
|
}, [
|
|
277
281
|
createElementVNode("div", {
|
|
278
282
|
class: normalizeClass(["nut-key", "nut-key--finish ", { activeFinsh: _ctx.clickKeyIndex == "finish" }])
|
|
@@ -42,7 +42,7 @@ const _sfc_main = create({
|
|
|
42
42
|
const parentOption = inject(TABS_KEY);
|
|
43
43
|
const paneStyle = computed(() => {
|
|
44
44
|
return {
|
|
45
|
-
display: parentOption.animatedTime.value == 0 && props.paneKey != parentOption.activeKey.value ? "none" : void 0
|
|
45
|
+
display: (parentOption == null ? void 0 : parentOption.animatedTime.value) == 0 && props.paneKey != (parentOption == null ? void 0 : parentOption.activeKey.value) ? "none" : void 0
|
|
46
46
|
};
|
|
47
47
|
});
|
|
48
48
|
return __spreadProps(__spreadValues({}, parentOption), {
|