@nutui/nutui 4.3.6 → 4.3.8
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 +37 -0
- package/dist/nutui.es.js +1 -1
- package/dist/nutui.js +4588 -4837
- package/dist/nutui.umd.js +1 -1
- package/dist/packages/actionsheet/ActionSheet.js +1 -1
- package/dist/packages/address/Address.js +1 -1
- package/dist/packages/badge/Badge.js +60 -72
- package/dist/packages/calendar/Calendar.js +1 -1
- package/dist/packages/cascader/Cascader.js +1 -1
- package/dist/packages/countdown/Countdown.js +2 -2
- package/dist/packages/dialog/Dialog.js +3 -3
- package/dist/packages/fixednav/FixedNav.js +2 -2
- package/dist/packages/image/Image.js +79 -111
- package/dist/packages/imagepreview/ImagePreview.js +3 -3
- package/dist/packages/{index-uHBD4dfS.js → index-wLaOjIn1.js} +2 -2
- package/dist/packages/input/Input.js +111 -181
- package/dist/packages/invoice/Invoice.js +4 -4
- package/dist/packages/menuitem/MenuItem.js +2 -2
- package/dist/packages/notify/Notify.js +1 -1
- package/dist/packages/numberkeyboard/NumberKeyboard.js +7 -3
- package/dist/packages/overlay/Overlay.js +40 -54
- package/dist/packages/popover/Popover.js +1 -1
- package/dist/packages/popup/Popup.js +1 -1
- package/dist/packages/shortpassword/ShortPassword.js +1 -1
- package/dist/packages/sku/Sku.js +1 -1
- package/dist/packages/tabbaritem/TabbarItem.js +3 -3
- package/dist/packages/tabpane/TabPane.js +1 -1
- package/dist/packages/timeselect/TimeSelect.js +1 -1
- package/dist/packages/watermark/Watermark.js +69 -159
- package/dist/smartips/web-types.json +3 -3
- package/dist/types/__VUE/actionsheet/index.vue.d.ts +3 -3
- package/dist/types/__VUE/address/index.vue.d.ts +5 -5
- package/dist/types/__VUE/badge/badge.vue.d.ts +93 -0
- package/dist/types/__VUE/badge/index.d.ts +5 -0
- package/dist/types/__VUE/calendar/index.vue.d.ts +2 -2
- package/dist/types/__VUE/cascader/index.vue.d.ts +2 -2
- package/dist/types/__VUE/circleprogress/circle-progress.vue.d.ts +2 -2
- package/dist/types/__VUE/collapseitem/collapse-item.vue.d.ts +1 -1
- package/dist/types/__VUE/dialog/index.vue.d.ts +4 -4
- package/dist/types/__VUE/divider/divider.vue.d.ts +1 -1
- package/dist/types/__VUE/fixednav/index.vue.d.ts +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/imagepreview/imagePreviewItem.vue.d.ts +1 -1
- 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/list/index.vue.d.ts +1 -1
- package/dist/types/__VUE/menu/index.vue.d.ts +1 -1
- package/dist/types/__VUE/menuitem/index.vue.d.ts +1 -1
- package/dist/types/__VUE/numberkeyboard/index.vue.d.ts +4 -2
- package/dist/types/__VUE/overlay/index.d.ts +5 -0
- package/dist/types/__VUE/overlay/overlay.vue.d.ts +87 -0
- package/dist/types/__VUE/picker/index.vue.d.ts +1 -1
- package/dist/types/__VUE/popover/index.vue.d.ts +4 -4
- package/dist/types/__VUE/popup/index.vue.d.ts +3 -3
- package/dist/types/__VUE/row/row.vue.d.ts +1 -1
- package/dist/types/__VUE/shortpassword/index.vue.d.ts +2 -2
- package/dist/types/__VUE/sku/index.vue.d.ts +2 -2
- package/dist/types/__VUE/swipe/swipe.vue.d.ts +1 -1
- package/dist/types/__VUE/tabs/index.vue.d.ts +1 -1
- package/dist/types/__VUE/tour/index.vue.d.ts +1 -1
- package/dist/types/__VUE/watermark/index.d.ts +6 -0
- package/dist/types/__VUE/watermark/watermark.vue.d.ts +127 -0
- package/dist/types/index.d.ts +11 -6
- package/dist/types/utils/index.d.ts +1 -0
- package/package.json +1 -1
- package/dist/types/__VUE/badge/index.vue.d.ts +0 -102
- 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/overlay/index.vue.d.ts +0 -85
- package/dist/types/__VUE/watermark/index.vue.d.ts +0 -201
- /package/dist/types/__VUE/image/{type.d.ts → types.d.ts} +0 -0
|
@@ -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
|
|
@@ -19,7 +19,7 @@ var __spreadValues = (a, b) => {
|
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
import { reactive, computed, resolveComponent, withDirectives, openBlock, createElementBlock, normalizeStyle, createElementVNode, vShow, createVNode, mergeProps, withCtx, Fragment, renderList, normalizeClass, renderSlot, createCommentVNode, toDisplayString } from "vue";
|
|
21
21
|
import { c as createComponent } from "../component-DQf3CENX.js";
|
|
22
|
-
import { N as NutPopup } from "../index-
|
|
22
|
+
import { N as NutPopup } from "../index-wLaOjIn1.js";
|
|
23
23
|
import { Check } from "@nutui/icons-vue";
|
|
24
24
|
import { u as useParent } from "../useParent-D6DiuxZZ.js";
|
|
25
25
|
import { M as MENU_KEY } from "../types-CkPfROfI.js";
|
|
@@ -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
|
])
|
|
@@ -19,7 +19,7 @@ var __spreadValues = (a, b) => {
|
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
import { ref, watch, resolveComponent, openBlock, createBlock, withCtx, createElementVNode, normalizeClass, normalizeStyle, renderSlot, createElementBlock, Fragment, createTextVNode, toDisplayString, createVNode, render, onMounted, h } from "vue";
|
|
21
21
|
import { c as createComponent } from "../component-DQf3CENX.js";
|
|
22
|
-
import { N as NutPopup } from "../index-
|
|
22
|
+
import { N as NutPopup } from "../index-wLaOjIn1.js";
|
|
23
23
|
import { _ as _export_sfc } from "../_plugin-vue_export-helper-1tPrXgE0.js";
|
|
24
24
|
const { create } = createComponent("notify");
|
|
25
25
|
const _sfc_main = create({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref, computed, watch, resolveComponent, openBlock, createElementBlock, createVNode, withCtx, createElementVNode, toDisplayString, createCommentVNode, Fragment, renderList, normalizeClass, createTextVNode } from "vue";
|
|
2
2
|
import { c as createComponent } from "../component-DQf3CENX.js";
|
|
3
|
-
import { N as NutPopup } from "../index-
|
|
3
|
+
import { N as NutPopup } from "../index-wLaOjIn1.js";
|
|
4
4
|
import { u as useLocale } from "../index-CFigyH92.js";
|
|
5
5
|
import { _ as _export_sfc } from "../_plugin-vue_export-helper-1tPrXgE0.js";
|
|
6
6
|
const { create } = createComponent("number-keyboard");
|
|
@@ -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" }])
|
|
@@ -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,10 +16,10 @@ var __spreadValues = (a, b) => {
|
|
|
14
16
|
}
|
|
15
17
|
return a;
|
|
16
18
|
};
|
|
17
|
-
|
|
18
|
-
import {
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
import { defineComponent, computed, watchEffect, openBlock, createBlock, Transition, withCtx, withDirectives, createElementVNode, normalizeClass, normalizeStyle, withModifiers, renderSlot, vShow } from "vue";
|
|
19
21
|
import { b as body } from "../util-DnfK0Qan.js";
|
|
20
|
-
import {
|
|
22
|
+
import { w as withInstall } from "../with-install-Ch3FF0uS.js";
|
|
21
23
|
let count = 0;
|
|
22
24
|
const CLSNAME = "nut-overflow-hidden";
|
|
23
25
|
const useLockScroll = (isLock) => {
|
|
@@ -43,42 +45,26 @@ const useLockScroll = (isLock) => {
|
|
|
43
45
|
};
|
|
44
46
|
return [lock, unlock];
|
|
45
47
|
};
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
+
const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, {
|
|
49
|
+
name: "NutOverlay"
|
|
50
|
+
}), {
|
|
51
|
+
__name: "overlay",
|
|
48
52
|
props: {
|
|
49
|
-
visible: {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
},
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
},
|
|
57
|
-
duration: {
|
|
58
|
-
type: [Number, String],
|
|
59
|
-
default: 0.3
|
|
60
|
-
},
|
|
61
|
-
lockScroll: {
|
|
62
|
-
type: Boolean,
|
|
63
|
-
default: true
|
|
64
|
-
},
|
|
65
|
-
overlayClass: {
|
|
66
|
-
type: String,
|
|
67
|
-
default: ""
|
|
68
|
-
},
|
|
69
|
-
overlayStyle: {
|
|
70
|
-
type: Object
|
|
71
|
-
},
|
|
72
|
-
closeOnClickOverlay: {
|
|
73
|
-
type: Boolean,
|
|
74
|
-
default: true
|
|
75
|
-
}
|
|
53
|
+
visible: { type: Boolean, default: false },
|
|
54
|
+
zIndex: { default: 2e3 },
|
|
55
|
+
duration: { default: 0.3 },
|
|
56
|
+
lockScroll: { type: Boolean, default: true },
|
|
57
|
+
overlayClass: { default: "" },
|
|
58
|
+
overlayStyle: {},
|
|
59
|
+
closeOnClickOverlay: { type: Boolean, default: true }
|
|
76
60
|
},
|
|
77
61
|
emits: ["click", "update:visible"],
|
|
78
|
-
setup(
|
|
62
|
+
setup(__props, { emit: __emit }) {
|
|
63
|
+
const props = __props;
|
|
64
|
+
const emit = __emit;
|
|
79
65
|
const [lock, unlock] = useLockScroll(() => props.lockScroll);
|
|
80
66
|
const classes = computed(() => {
|
|
81
|
-
const prefixCls =
|
|
67
|
+
const prefixCls = "nut-overlay";
|
|
82
68
|
return {
|
|
83
69
|
[prefixCls]: true,
|
|
84
70
|
[props.overlayClass]: true
|
|
@@ -99,26 +85,26 @@ const _sfc_main = create({
|
|
|
99
85
|
emit("update:visible", false);
|
|
100
86
|
}
|
|
101
87
|
};
|
|
102
|
-
return
|
|
88
|
+
return (_ctx, _cache) => {
|
|
89
|
+
return openBlock(), createBlock(Transition, { name: "overlay-fade" }, {
|
|
90
|
+
default: withCtx(() => [
|
|
91
|
+
withDirectives(createElementVNode("view", {
|
|
92
|
+
class: normalizeClass(classes.value),
|
|
93
|
+
style: normalizeStyle(style.value),
|
|
94
|
+
onClick: withModifiers(onClick, ["stop"])
|
|
95
|
+
}, [
|
|
96
|
+
renderSlot(_ctx.$slots, "default")
|
|
97
|
+
], 6), [
|
|
98
|
+
[vShow, _ctx.visible]
|
|
99
|
+
])
|
|
100
|
+
]),
|
|
101
|
+
_: 3
|
|
102
|
+
});
|
|
103
|
+
};
|
|
103
104
|
}
|
|
104
|
-
});
|
|
105
|
-
|
|
106
|
-
return openBlock(), createBlock(Transition, { name: "overlay-fade" }, {
|
|
107
|
-
default: withCtx(() => [
|
|
108
|
-
withDirectives(createElementVNode("view", {
|
|
109
|
-
class: normalizeClass(_ctx.classes),
|
|
110
|
-
style: normalizeStyle(_ctx.style),
|
|
111
|
-
onClick: _cache[0] || (_cache[0] = withModifiers((...args) => _ctx.onClick && _ctx.onClick(...args), ["stop"]))
|
|
112
|
-
}, [
|
|
113
|
-
renderSlot(_ctx.$slots, "default")
|
|
114
|
-
], 6), [
|
|
115
|
-
[vShow, _ctx.visible]
|
|
116
|
-
])
|
|
117
|
-
]),
|
|
118
|
-
_: 3
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
|
-
const NutOverlay = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
105
|
+
}));
|
|
106
|
+
withInstall(_sfc_main);
|
|
122
107
|
export {
|
|
123
|
-
|
|
108
|
+
_sfc_main as Overlay,
|
|
109
|
+
_sfc_main as default
|
|
124
110
|
};
|
|
@@ -2,7 +2,7 @@ import { ref, computed, onMounted, watch, nextTick, resolveComponent, openBlock,
|
|
|
2
2
|
import { c as createComponent } from "../component-DQf3CENX.js";
|
|
3
3
|
import { r as renderIcon } from "../renderIcon-BfOvhG7i.js";
|
|
4
4
|
import { u as useRect } from "../index-B1qsj2XR.js";
|
|
5
|
-
import { N as NutPopup } from "../index-
|
|
5
|
+
import { N as NutPopup } from "../index-wLaOjIn1.js";
|
|
6
6
|
import { _ as _export_sfc } from "../_plugin-vue_export-helper-1tPrXgE0.js";
|
|
7
7
|
const { create } = createComponent("popover");
|
|
8
8
|
const _sfc_main = create({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref, computed, watch, resolveComponent, openBlock, createElementBlock, createVNode, withCtx, createElementVNode, toDisplayString, Fragment, renderList, createCommentVNode } from "vue";
|
|
2
2
|
import { c as createComponent } from "../component-DQf3CENX.js";
|
|
3
|
-
import { N as NutPopup } from "../index-
|
|
3
|
+
import { N as NutPopup } from "../index-wLaOjIn1.js";
|
|
4
4
|
import { Tips } from "@nutui/icons-vue";
|
|
5
5
|
import { u as useLocale } from "../index-CFigyH92.js";
|
|
6
6
|
import { _ as _export_sfc } from "../_plugin-vue_export-helper-1tPrXgE0.js";
|
package/dist/packages/sku/Sku.js
CHANGED
|
@@ -4,7 +4,7 @@ import { c as createComponent } from "../component-DQf3CENX.js";
|
|
|
4
4
|
import { u as useLocale } from "../index-CFigyH92.js";
|
|
5
5
|
import { _ as _export_sfc } from "../_plugin-vue_export-helper-1tPrXgE0.js";
|
|
6
6
|
import { InputNumber as _sfc_main$6 } from "../inputnumber/InputNumber.js";
|
|
7
|
-
import { N as NutPopup } from "../index-
|
|
7
|
+
import { N as NutPopup } from "../index-wLaOjIn1.js";
|
|
8
8
|
const { create: create$4 } = createComponent("sku-header");
|
|
9
9
|
const cN$1 = "NutSkuHeader";
|
|
10
10
|
const _sfc_main$4 = create$4({
|
|
@@ -17,12 +17,12 @@ var __spreadValues = (a, b) => {
|
|
|
17
17
|
return a;
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, normalizeStyle, createVNode, normalizeProps, guardReactiveProps, withCtx, createElementVNode, renderSlot, createCommentVNode, createBlock, resolveDynamicComponent,
|
|
20
|
+
import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, normalizeStyle, createVNode, unref, normalizeProps, guardReactiveProps, withCtx, createElementVNode, renderSlot, createCommentVNode, createBlock, resolveDynamicComponent, toDisplayString } from "vue";
|
|
21
21
|
import { r as renderIcon } from "../renderIcon-BfOvhG7i.js";
|
|
22
22
|
import { u as useRouter } from "../index-aiGQ-EiA.js";
|
|
23
23
|
import { u as useParent } from "../useParent-D6DiuxZZ.js";
|
|
24
24
|
import { T as TABBAR_KEY } from "../types-MuhxzCWc.js";
|
|
25
|
-
import
|
|
25
|
+
import { Badge as _sfc_main$1 } from "../badge/Badge.js";
|
|
26
26
|
import { w as withInstall } from "../with-install-Ch3FF0uS.js";
|
|
27
27
|
const _hoisted_1 = { class: "nut-tabbar-item_icon-box" };
|
|
28
28
|
const _hoisted_2 = {
|
|
@@ -76,7 +76,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
|
|
|
76
76
|
}),
|
|
77
77
|
onClick: change
|
|
78
78
|
}, [
|
|
79
|
-
createVNode(
|
|
79
|
+
createVNode(unref(_sfc_main$1), normalizeProps(guardReactiveProps(_ctx.$attrs)), {
|
|
80
80
|
default: withCtx(() => [
|
|
81
81
|
createElementVNode("view", _hoisted_1, [
|
|
82
82
|
_ctx.$slots.icon ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
@@ -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), {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { computed, provide, resolveComponent, openBlock, createBlock, normalizeStyle, withCtx, createElementVNode, createElementBlock, toDisplayString, renderSlot } from "vue";
|
|
2
2
|
import { c as createComponent } from "../component-DQf3CENX.js";
|
|
3
|
-
import { N as NutPopup } from "../index-
|
|
3
|
+
import { N as NutPopup } from "../index-wLaOjIn1.js";
|
|
4
4
|
import { u as useLocale } from "../index-CFigyH92.js";
|
|
5
5
|
import { _ as _export_sfc } from "../_plugin-vue_export-helper-1tPrXgE0.js";
|
|
6
6
|
const { create } = createComponent("time-select");
|