@varlet/ui 3.20.10 → 3.20.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/es/index.bundle.mjs +1 -1
- package/es/index.mjs +1 -1
- package/es/menu-option/MenuOption.mjs +9 -7
- package/es/menu-select/MenuSelect.mjs +4 -0
- package/es/otp-input/OtpInput.mjs +1 -0
- package/es/varlet.esm.js +3902 -3896
- package/highlight/web-types.en-US.json +1 -1
- package/highlight/web-types.zh-CN.json +1 -1
- package/lib/varlet.cjs.js +16 -9
- package/package.json +7 -7
- package/umd/varlet.js +4 -4
package/es/index.bundle.mjs
CHANGED
|
@@ -310,7 +310,7 @@ import './tree-menu/style/index.mjs'
|
|
|
310
310
|
import './uploader/style/index.mjs'
|
|
311
311
|
import './watermark/style/index.mjs'
|
|
312
312
|
|
|
313
|
-
const version = '3.20.
|
|
313
|
+
const version = '3.20.11'
|
|
314
314
|
|
|
315
315
|
function install(app) {
|
|
316
316
|
ActionSheet.install && app.use(ActionSheet)
|
package/es/index.mjs
CHANGED
|
@@ -206,7 +206,7 @@ export * from './tree-menu/index.mjs'
|
|
|
206
206
|
export * from './uploader/index.mjs'
|
|
207
207
|
export * from './watermark/index.mjs'
|
|
208
208
|
|
|
209
|
-
const version = '3.20.
|
|
209
|
+
const version = '3.20.11'
|
|
210
210
|
|
|
211
211
|
function install(app) {
|
|
212
212
|
ActionSheet.install && app.use(ActionSheet)
|
|
@@ -47,11 +47,11 @@ function __render__(_ctx, _cache) {
|
|
|
47
47
|
_ctx.n("$--box"),
|
|
48
48
|
_ctx.n(`--${_ctx.size}`),
|
|
49
49
|
[_ctx.optionSelected, _ctx.n("--selected-color")],
|
|
50
|
-
[_ctx.
|
|
50
|
+
[_ctx.interactionDisabled, _ctx.n("--disabled")],
|
|
51
51
|
[_ctx.childrenTrigger, _ctx.n("--children-trigger")]
|
|
52
52
|
)
|
|
53
53
|
),
|
|
54
|
-
tabindex: _ctx.
|
|
54
|
+
tabindex: _ctx.interactionDisabled ? void 0 : "-1",
|
|
55
55
|
onClick: _cache[3] || (_cache[3] = (...args) => _ctx.handleClick && _ctx.handleClick(...args)),
|
|
56
56
|
onFocus: _cache[4] || (_cache[4] = ($event) => _ctx.isFocusing = true),
|
|
57
57
|
onBlur: _cache[5] || (_cache[5] = ($event) => _ctx.isFocusing = false)
|
|
@@ -72,7 +72,7 @@ function __render__(_ctx, _cache) {
|
|
|
72
72
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.optionSelected = $event),
|
|
73
73
|
indeterminate: _ctx.optionIndeterminate,
|
|
74
74
|
"onUpdate:indeterminate": _cache[1] || (_cache[1] = ($event) => _ctx.optionIndeterminate = $event),
|
|
75
|
-
disabled: _ctx.
|
|
75
|
+
disabled: _ctx.interactionDisabled,
|
|
76
76
|
onClick: _cache[2] || (_cache[2] = _withModifiers(() => {
|
|
77
77
|
}, ["stop"])),
|
|
78
78
|
onChange: _ctx.handleSelect
|
|
@@ -110,11 +110,11 @@ function __render__(_ctx, _cache) {
|
|
|
110
110
|
/* CLASS */
|
|
111
111
|
)) : _createCommentVNode("v-if", true),
|
|
112
112
|
_createVNode(_component_var_hover_overlay, {
|
|
113
|
-
hovering: (_ctx.hovering || _ctx.highlight) && !_ctx.
|
|
114
|
-
focusing: _ctx.isFocusing && !_ctx.
|
|
113
|
+
hovering: (_ctx.hovering || _ctx.highlight) && !_ctx.interactionDisabled,
|
|
114
|
+
focusing: _ctx.isFocusing && !_ctx.interactionDisabled
|
|
115
115
|
}, null, 8, ["hovering", "focusing"])
|
|
116
116
|
], 42, _hoisted_1)), [
|
|
117
|
-
[_directive_ripple, { disabled: _ctx.
|
|
117
|
+
[_directive_ripple, { disabled: _ctx.interactionDisabled || !_ctx.ripple }],
|
|
118
118
|
[_directive_hover, _ctx.handleHovering, "desktop"]
|
|
119
119
|
]);
|
|
120
120
|
}
|
|
@@ -141,6 +141,7 @@ const __sfc__ = defineComponent({
|
|
|
141
141
|
const ripple = computed(() => props2.ripple);
|
|
142
142
|
const { menuSelect, bindMenuSelect } = useMenuSelect();
|
|
143
143
|
const { size, multiple, onSelect, computeLabel } = menuSelect;
|
|
144
|
+
const interactionDisabled = computed(() => menuSelect.disabled.value || disabled.value);
|
|
144
145
|
const { hovering, handleHovering } = useHoverOverlay();
|
|
145
146
|
const labelVNode = computed(
|
|
146
147
|
() => {
|
|
@@ -170,7 +171,7 @@ const __sfc__ = defineComponent({
|
|
|
170
171
|
useEventListener(() => window, "keydown", handleKeydown);
|
|
171
172
|
useEventListener(() => window, "keyup", handleKeyup);
|
|
172
173
|
function handleClick() {
|
|
173
|
-
if (
|
|
174
|
+
if (interactionDisabled.value) {
|
|
174
175
|
return;
|
|
175
176
|
}
|
|
176
177
|
if (!multiple.value && props2.childrenTrigger) {
|
|
@@ -232,6 +233,7 @@ const __sfc__ = defineComponent({
|
|
|
232
233
|
checkbox,
|
|
233
234
|
optionSelected,
|
|
234
235
|
optionIndeterminate,
|
|
236
|
+
interactionDisabled,
|
|
235
237
|
size,
|
|
236
238
|
multiple,
|
|
237
239
|
hovering,
|
|
@@ -171,6 +171,7 @@ const __sfc__ = defineComponent({
|
|
|
171
171
|
return highlightOptions2;
|
|
172
172
|
});
|
|
173
173
|
const menuSelectProvider = {
|
|
174
|
+
disabled: computed(() => props2.disabled),
|
|
174
175
|
size: computed(() => props2.size),
|
|
175
176
|
multiple: computed(() => props2.multiple),
|
|
176
177
|
computeLabel,
|
|
@@ -230,6 +231,9 @@ const __sfc__ = defineComponent({
|
|
|
230
231
|
}
|
|
231
232
|
function onSelect(optionProvider) {
|
|
232
233
|
var _a, _b;
|
|
234
|
+
if (props2.disabled) {
|
|
235
|
+
return;
|
|
236
|
+
}
|
|
233
237
|
const { multiple, closeOnSelect } = props2;
|
|
234
238
|
const { value, label, selected, disabled, ripple } = optionProvider;
|
|
235
239
|
const enhancedOption = getEnhancedOption(value.value);
|
|
@@ -369,6 +369,7 @@ const __sfc__ = defineComponent({
|
|
|
369
369
|
function handlePaste(event) {
|
|
370
370
|
var _a, _b;
|
|
371
371
|
if (!props2.allowPaste || formDisabled.value || formReadonly.value || props2.disabled || props2.readonly) {
|
|
372
|
+
event.preventDefault();
|
|
372
373
|
return;
|
|
373
374
|
}
|
|
374
375
|
const text = (_b = (_a = event.clipboardData) == null ? void 0 : _a.getData("text")) != null ? _b : "";
|