lew-ui 2.3.3 → 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
- }, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
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
@@ -11420,7 +11420,6 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
11420
11420
  formMap.value[item.field] = v2;
11421
11421
  }
11422
11422
  });
11423
- emit("change", getForm());
11424
11423
  };
11425
11424
  const resetError = () => {
11426
11425
  componentOptions.forEach((item) => {
@@ -11516,7 +11515,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
11516
11515
  };
11517
11516
  }
11518
11517
  });
11519
- const LewForm = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["__scopeId", "data-v-4900b565"]]);
11518
+ const LewForm = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["__scopeId", "data-v-cf8d2885"]]);
11520
11519
  const checkboxModel = {
11521
11520
  modelValue: {
11522
11521
  type: Boolean,
@@ -15414,10 +15413,15 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
15414
15413
  __name: "LewButton",
15415
15414
  props: buttonProps,
15416
15415
  emits: ["click"],
15417
- setup(__props, { emit: __emit }) {
15416
+ setup(__props, { expose: __expose, emit: __emit }) {
15418
15417
  const emit = __emit;
15419
15418
  const props = __props;
15420
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
+ };
15421
15425
  const handleClick = async (e2) => {
15422
15426
  if (props.disabled || _loading.value || props.loading) return;
15423
15427
  emit("click", e2);
@@ -15493,8 +15497,11 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
15493
15497
  styleObj.borderRadius = round2 ? "50px" : "none";
15494
15498
  return styleObj;
15495
15499
  });
15500
+ __expose({ focus });
15496
15501
  return (_ctx, _cache) => {
15497
15502
  return openBlock(), createElementBlock("button", {
15503
+ ref_key: "buttonRef",
15504
+ ref: buttonRef,
15498
15505
  class: normalizeClass(["lew-button", unref(getButtonClass)]),
15499
15506
  disabled: _ctx.disabled,
15500
15507
  style: normalizeStyle(unref(getStyle)),
@@ -15542,7 +15549,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
15542
15549
  };
15543
15550
  }
15544
15551
  });
15545
- const LewButton = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["__scopeId", "data-v-d5616ca8"]]);
15552
+ const LewButton = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["__scopeId", "data-v-25a58a86"]]);
15546
15553
  const badgeProps = {
15547
15554
  value: {
15548
15555
  type: String,
@@ -24672,6 +24679,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
24672
24679
  const visible = ref(false);
24673
24680
  const okLoading = ref(false);
24674
24681
  const cancelLoading = ref(false);
24682
+ const okRef1 = ref();
24683
+ const okRef2 = ref();
24675
24684
  const maskClick = () => {
24676
24685
  if (props == null ? void 0 : props.closeOnClickOverlay) {
24677
24686
  visible.value = false;
@@ -24679,6 +24688,10 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
24679
24688
  };
24680
24689
  onMounted(() => {
24681
24690
  visible.value = true;
24691
+ nextTick(() => {
24692
+ okRef1.value && okRef1.value.focus();
24693
+ okRef2.value && okRef2.value.focus();
24694
+ });
24682
24695
  });
24683
24696
  watch(
24684
24697
  () => visible.value,
@@ -24782,6 +24795,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
24782
24795
  }, null, 8, ["text", "loading"])) : createCommentVNode("", true),
24783
24796
  _ctx.okText ? (openBlock(), createBlock(unref(LewButton), {
24784
24797
  key: 1,
24798
+ ref_key: "okRef1",
24799
+ ref: okRef1,
24785
24800
  text: _ctx.okText,
24786
24801
  size: "small",
24787
24802
  type: "fill",
@@ -24827,6 +24842,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
24827
24842
  }, null, 8, ["text", "loading"])) : createCommentVNode("", true),
24828
24843
  _ctx.okText ? (openBlock(), createBlock(unref(LewButton), {
24829
24844
  key: 1,
24845
+ ref_key: "okRef2",
24846
+ ref: okRef2,
24830
24847
  text: _ctx.okText,
24831
24848
  type: "fill",
24832
24849
  size: "small",
@@ -24851,7 +24868,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
24851
24868
  };
24852
24869
  }
24853
24870
  });
24854
- const _LewDialog = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-2cbef663"]]);
24871
+ const _LewDialog = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-61f5035a"]]);
24855
24872
  const { x, y } = useMouse();
24856
24873
  const warning$1 = (options) => {
24857
24874
  dialog("warning", options);