@xiaou66/u-web-ui 0.101.0 → 0.102.0
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/index.d.ts +2 -2
- package/dist/index.es.js +2 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -207,9 +207,9 @@ export declare interface ContextMenuProps {
|
|
|
207
207
|
/**
|
|
208
208
|
* 禁用
|
|
209
209
|
* - 默认: false
|
|
210
|
-
* - 可选: true/false
|
|
210
|
+
* - 可选: true/false/一个推断函数
|
|
211
211
|
*/
|
|
212
|
-
disabled?: boolean;
|
|
212
|
+
disabled?: boolean | (() => boolean);
|
|
213
213
|
}
|
|
214
214
|
|
|
215
215
|
export declare type ContextMenuSize = 'default' | 'small' | 'mini';
|
package/dist/index.es.js
CHANGED
|
@@ -427,7 +427,7 @@ var LeftMenu_default = /* @__PURE__ */ defineComponent({
|
|
|
427
427
|
y: 0
|
|
428
428
|
}) },
|
|
429
429
|
disabled: {
|
|
430
|
-
type: Boolean,
|
|
430
|
+
type: [Boolean, Function],
|
|
431
431
|
default: !1
|
|
432
432
|
}
|
|
433
433
|
},
|
|
@@ -446,7 +446,7 @@ var LeftMenu_default = /* @__PURE__ */ defineComponent({
|
|
|
446
446
|
return e.includes("click") && (t.onClick = O), e.includes("context-menu") && (t.onContextmenu = O), t;
|
|
447
447
|
}
|
|
448
448
|
let O = (e) => {
|
|
449
|
-
d.disabled || (e.preventDefault(), e.stopPropagation(), E.left = e.clientX + "px", E.top = e.clientY + "px", T.value = !0, nextTick(() => {
|
|
449
|
+
d.disabled || isFunction(d.disabled) && d.disabled() || (e.preventDefault(), e.stopPropagation(), E.left = e.clientX + "px", E.top = e.clientY + "px", T.value = !0, nextTick(() => {
|
|
450
450
|
k(e.clientX, e.clientY);
|
|
451
451
|
}), f("open"));
|
|
452
452
|
}, k = (e, t) => {
|