lew-ui 2.3.4 → 2.3.5
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.
|
@@ -56,7 +56,9 @@ declare const __VLS_component: import('vue').DefineComponent<{
|
|
|
56
56
|
default: boolean;
|
|
57
57
|
description: string;
|
|
58
58
|
};
|
|
59
|
-
}, {
|
|
59
|
+
}, {
|
|
60
|
+
focus: () => void;
|
|
61
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
60
62
|
click: (...args: any[]) => void;
|
|
61
63
|
}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
62
64
|
color: {
|
package/dist/index.mjs
CHANGED
|
@@ -15413,10 +15413,15 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
15413
15413
|
__name: "LewButton",
|
|
15414
15414
|
props: buttonProps,
|
|
15415
15415
|
emits: ["click"],
|
|
15416
|
-
setup(__props, { emit: __emit }) {
|
|
15416
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
15417
15417
|
const emit = __emit;
|
|
15418
15418
|
const props = __props;
|
|
15419
15419
|
const _loading = ref(false);
|
|
15420
|
+
const buttonRef = ref();
|
|
15421
|
+
const focus = () => {
|
|
15422
|
+
var _a2;
|
|
15423
|
+
(_a2 = buttonRef.value) == null ? void 0 : _a2.focus();
|
|
15424
|
+
};
|
|
15420
15425
|
const handleClick = async (e2) => {
|
|
15421
15426
|
if (props.disabled || _loading.value || props.loading) return;
|
|
15422
15427
|
emit("click", e2);
|
|
@@ -15492,8 +15497,11 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
15492
15497
|
styleObj.borderRadius = round2 ? "50px" : "none";
|
|
15493
15498
|
return styleObj;
|
|
15494
15499
|
});
|
|
15500
|
+
__expose({ focus });
|
|
15495
15501
|
return (_ctx, _cache) => {
|
|
15496
15502
|
return openBlock(), createElementBlock("button", {
|
|
15503
|
+
ref_key: "buttonRef",
|
|
15504
|
+
ref: buttonRef,
|
|
15497
15505
|
class: normalizeClass(["lew-button", unref(getButtonClass)]),
|
|
15498
15506
|
disabled: _ctx.disabled,
|
|
15499
15507
|
style: normalizeStyle(unref(getStyle)),
|
|
@@ -15541,7 +15549,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
15541
15549
|
};
|
|
15542
15550
|
}
|
|
15543
15551
|
});
|
|
15544
|
-
const LewButton = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["__scopeId", "data-v-
|
|
15552
|
+
const LewButton = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["__scopeId", "data-v-25a58a86"]]);
|
|
15545
15553
|
const badgeProps = {
|
|
15546
15554
|
value: {
|
|
15547
15555
|
type: String,
|
|
@@ -24671,6 +24679,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
24671
24679
|
const visible = ref(false);
|
|
24672
24680
|
const okLoading = ref(false);
|
|
24673
24681
|
const cancelLoading = ref(false);
|
|
24682
|
+
const okRef1 = ref();
|
|
24683
|
+
const okRef2 = ref();
|
|
24674
24684
|
const maskClick = () => {
|
|
24675
24685
|
if (props == null ? void 0 : props.closeOnClickOverlay) {
|
|
24676
24686
|
visible.value = false;
|
|
@@ -24678,6 +24688,10 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
24678
24688
|
};
|
|
24679
24689
|
onMounted(() => {
|
|
24680
24690
|
visible.value = true;
|
|
24691
|
+
nextTick(() => {
|
|
24692
|
+
okRef1.value && okRef1.value.focus();
|
|
24693
|
+
okRef2.value && okRef2.value.focus();
|
|
24694
|
+
});
|
|
24681
24695
|
});
|
|
24682
24696
|
watch(
|
|
24683
24697
|
() => visible.value,
|
|
@@ -24781,6 +24795,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
24781
24795
|
}, null, 8, ["text", "loading"])) : createCommentVNode("", true),
|
|
24782
24796
|
_ctx.okText ? (openBlock(), createBlock(unref(LewButton), {
|
|
24783
24797
|
key: 1,
|
|
24798
|
+
ref_key: "okRef1",
|
|
24799
|
+
ref: okRef1,
|
|
24784
24800
|
text: _ctx.okText,
|
|
24785
24801
|
size: "small",
|
|
24786
24802
|
type: "fill",
|
|
@@ -24826,6 +24842,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
24826
24842
|
}, null, 8, ["text", "loading"])) : createCommentVNode("", true),
|
|
24827
24843
|
_ctx.okText ? (openBlock(), createBlock(unref(LewButton), {
|
|
24828
24844
|
key: 1,
|
|
24845
|
+
ref_key: "okRef2",
|
|
24846
|
+
ref: okRef2,
|
|
24829
24847
|
text: _ctx.okText,
|
|
24830
24848
|
type: "fill",
|
|
24831
24849
|
size: "small",
|
|
@@ -24850,7 +24868,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
24850
24868
|
};
|
|
24851
24869
|
}
|
|
24852
24870
|
});
|
|
24853
|
-
const _LewDialog = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
24871
|
+
const _LewDialog = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-61f5035a"]]);
|
|
24854
24872
|
const { x, y } = useMouse();
|
|
24855
24873
|
const warning$1 = (options) => {
|
|
24856
24874
|
dialog("warning", options);
|