lew-ui 2.2.8 → 2.3.1

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.
@@ -33,8 +33,8 @@ declare const __VLS_component: import('vue').DefineComponent<{
33
33
  description: string;
34
34
  };
35
35
  iconSize: {
36
- type: NumberConstructor;
37
- default: string;
36
+ type: (StringConstructor | NumberConstructor)[];
37
+ default: number;
38
38
  description: string;
39
39
  };
40
40
  loading: {
@@ -91,8 +91,8 @@ declare const __VLS_component: import('vue').DefineComponent<{
91
91
  description: string;
92
92
  };
93
93
  iconSize: {
94
- type: NumberConstructor;
95
- default: string;
94
+ type: (StringConstructor | NumberConstructor)[];
95
+ default: number;
96
96
  description: string;
97
97
  };
98
98
  loading: {
@@ -127,7 +127,7 @@ declare const __VLS_component: import('vue').DefineComponent<{
127
127
  disabled: boolean;
128
128
  loading: boolean;
129
129
  iconPosition: string;
130
- iconSize: number;
130
+ iconSize: string | number;
131
131
  request: Function;
132
132
  }, {}>;
133
133
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
@@ -35,8 +35,8 @@ export declare const buttonProps: {
35
35
  description: string;
36
36
  };
37
37
  iconSize: {
38
- type: NumberConstructor;
39
- default: string;
38
+ type: (StringConstructor | NumberConstructor)[];
39
+ default: number;
40
40
  description: string;
41
41
  };
42
42
  loading: {
@@ -133,7 +133,7 @@ declare const __VLS_component: import('vue').DefineComponent<{
133
133
  disabled: boolean;
134
134
  loading: boolean;
135
135
  iconPosition: string;
136
- iconSize: number;
136
+ iconSize: string | number;
137
137
  request: Function;
138
138
  };
139
139
  cancelProps: {
@@ -146,7 +146,7 @@ declare const __VLS_component: import('vue').DefineComponent<{
146
146
  disabled: boolean;
147
147
  loading: boolean;
148
148
  iconPosition: string;
149
- iconSize: number;
149
+ iconSize: string | number;
150
150
  request: Function;
151
151
  };
152
152
  closeOnClickOverlay: boolean;
@@ -55,6 +55,7 @@ declare const _default: import('vue').DefineComponent<{
55
55
  };
56
56
  }, {
57
57
  toFocus: () => void;
58
+ validCheck: () => boolean;
58
59
  }, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
59
60
  input: (...args: any[]) => void;
60
61
  change: (...args: any[]) => void;
@@ -63,7 +63,6 @@ declare const __VLS_component: import('vue').DefineComponent<{
63
63
  description: string;
64
64
  };
65
65
  }, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
66
- show: (...args: any[]) => void;
67
66
  ok: (...args: any[]) => void;
68
67
  cancel: (...args: any[]) => void;
69
68
  close: (...args: any[]) => void;
@@ -127,7 +126,6 @@ declare const __VLS_component: import('vue').DefineComponent<{
127
126
  description: string;
128
127
  };
129
128
  }>> & {
130
- onShow?: ((...args: any[]) => any) | undefined;
131
129
  onOk?: ((...args: any[]) => any) | undefined;
132
130
  onClose?: ((...args: any[]) => any) | undefined;
133
131
  onCancel?: ((...args: any[]) => any) | undefined;
@@ -147,7 +145,7 @@ declare const __VLS_component: import('vue').DefineComponent<{
147
145
  disabled: boolean;
148
146
  loading: boolean;
149
147
  iconPosition: string;
150
- iconSize: number;
148
+ iconSize: string | number;
151
149
  request: Function;
152
150
  };
153
151
  cancelProps: {
@@ -160,7 +158,7 @@ declare const __VLS_component: import('vue').DefineComponent<{
160
158
  disabled: boolean;
161
159
  loading: boolean;
162
160
  iconPosition: string;
163
- iconSize: number;
161
+ iconSize: string | number;
164
162
  request: Function;
165
163
  };
166
164
  hideOkButton: boolean;
@@ -124,7 +124,7 @@ declare const __VLS_component: import('vue').DefineComponent<{
124
124
  disabled: boolean;
125
125
  loading: boolean;
126
126
  iconPosition: string;
127
- iconSize: number;
127
+ iconSize: string | number;
128
128
  request: Function;
129
129
  };
130
130
  cancelProps: {
@@ -137,7 +137,7 @@ declare const __VLS_component: import('vue').DefineComponent<{
137
137
  disabled: boolean;
138
138
  loading: boolean;
139
139
  iconPosition: string;
140
- iconSize: number;
140
+ iconSize: string | number;
141
141
  request: Function;
142
142
  };
143
143
  }, {}>;
package/dist/index.mjs CHANGED
@@ -8750,8 +8750,12 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
8750
8750
  };
8751
8751
  const checkValidationMessage = () => {
8752
8752
  validationMessage.value = lewInputRef.value.validationMessage;
8753
+ return (validationMessage.value || "").length === 0;
8753
8754
  };
8754
- __expose({ toFocus });
8755
+ const validCheck = () => {
8756
+ return (lewInputRef.value && lewInputRef.value.validationMessage || "").length === 0;
8757
+ };
8758
+ __expose({ toFocus, validCheck });
8755
8759
  return (_ctx, _cache) => {
8756
8760
  const _component_lew_icon = resolveComponent("lew-icon");
8757
8761
  const _component_lew_flex = resolveComponent("lew-flex");
@@ -8819,7 +8823,7 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
8819
8823
  };
8820
8824
  }
8821
8825
  });
8822
- const LewInputNumber = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["__scopeId", "data-v-54fac130"]]);
8826
+ const LewInputNumber = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["__scopeId", "data-v-2dbde41e"]]);
8823
8827
  const textareaModel = {
8824
8828
  // 绑定值
8825
8829
  modelValue: {
@@ -12893,7 +12897,7 @@ const switchProps = {
12893
12897
  description: "加载状态"
12894
12898
  }
12895
12899
  };
12896
- const _withScopeId$1 = (n) => (pushScopeId("data-v-f7e2a179"), n = n(), popScopeId(), n);
12900
+ const _withScopeId$1 = (n) => (pushScopeId("data-v-b57530d9"), n = n(), popScopeId(), n);
12897
12901
  const _hoisted_1$s = ["disabled"];
12898
12902
  const _hoisted_2$j = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("div", { class: "lew-switch-dot" }, null, -1));
12899
12903
  const _sfc_main$x = /* @__PURE__ */ defineComponent({
@@ -12948,9 +12952,9 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
12948
12952
  "--lew-switch-view-height": "22px",
12949
12953
  "--lew-switch-dot-width": "14px",
12950
12954
  "--lew-switch-dot-height": "14px",
12951
- "--lew-switch-dot-width-active": "18px",
12955
+ "--lew-switch-dot-width-active": "16px",
12952
12956
  "--lew-switch-dot-transform": "translate(4px, 4px)",
12953
- "--lew-switch-dot-transform-active": "translate(14px, 4px)"
12957
+ "--lew-switch-dot-transform-active": "translate(16px, 4px)"
12954
12958
  };
12955
12959
  case "medium":
12956
12960
  return {
@@ -12958,9 +12962,9 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
12958
12962
  "--lew-switch-view-height": "24px",
12959
12963
  "--lew-switch-dot-width": "16px",
12960
12964
  "--lew-switch-dot-height": "16px",
12961
- "--lew-switch-dot-width-active": "20px",
12965
+ "--lew-switch-dot-width-active": "18px",
12962
12966
  "--lew-switch-dot-transform": "translate(4px, 4px)",
12963
- "--lew-switch-dot-transform-active": "translate(14px, 4px)"
12967
+ "--lew-switch-dot-transform-active": "translate(16px, 4px)"
12964
12968
  };
12965
12969
  case "large":
12966
12970
  return {
@@ -12968,9 +12972,9 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
12968
12972
  "--lew-switch-view-height": "26px",
12969
12973
  "--lew-switch-dot-width": "18px",
12970
12974
  "--lew-switch-dot-height": "18px",
12971
- "--lew-switch-dot-width-active": "24px",
12975
+ "--lew-switch-dot-width-active": "20px",
12972
12976
  "--lew-switch-dot-transform": "translate(4px, 4px)",
12973
- "--lew-switch-dot-transform-active": "translate(12px, 4px)"
12977
+ "--lew-switch-dot-transform-active": "translate(16px, 4px)"
12974
12978
  };
12975
12979
  default:
12976
12980
  return {
@@ -13003,7 +13007,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
13003
13007
  };
13004
13008
  }
13005
13009
  });
13006
- const LewSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__scopeId", "data-v-f7e2a179"]]);
13010
+ const LewSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__scopeId", "data-v-b57530d9"]]);
13007
13011
  const getHeadDate = ["一", "二", "三", "四", "五", "六", "日"];
13008
13012
  const getMonthDate = (year, month) => {
13009
13013
  const ret = [];
@@ -15385,8 +15389,8 @@ const buttonProps = {
15385
15389
  description: "大小"
15386
15390
  },
15387
15391
  iconSize: {
15388
- type: Number,
15389
- default: "",
15392
+ type: [Number, String],
15393
+ default: 16,
15390
15394
  description: "图标大小"
15391
15395
  },
15392
15396
  loading: {
@@ -15457,15 +15461,15 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
15457
15461
  const { size, iconSize } = props;
15458
15462
  switch (size) {
15459
15463
  case "mini":
15460
- return iconSize ? iconSize : 12;
15464
+ return iconSize ? Number(iconSize) : 12;
15461
15465
  case "small":
15462
- return iconSize ? iconSize : 14;
15466
+ return iconSize ? Number(iconSize) : 14;
15463
15467
  case "medium":
15464
- return iconSize ? iconSize : 16;
15468
+ return iconSize ? Number(iconSize) : 16;
15465
15469
  case "large":
15466
- return iconSize ? iconSize : 18;
15470
+ return iconSize ? Number(iconSize) : 18;
15467
15471
  default:
15468
- return iconSize ? iconSize : 16;
15472
+ return iconSize ? Number(iconSize) : 16;
15469
15473
  }
15470
15474
  });
15471
15475
  const getStyle = computed(() => {
@@ -15548,7 +15552,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
15548
15552
  };
15549
15553
  }
15550
15554
  });
15551
- const LewButton = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-7ab31f7b"]]);
15555
+ const LewButton = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-d5616ca8"]]);
15552
15556
  const badgeProps = {
15553
15557
  value: {
15554
15558
  type: String,
@@ -18653,7 +18657,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
18653
18657
  "visible": {},
18654
18658
  "visibleModifiers": {}
18655
18659
  }),
18656
- emits: /* @__PURE__ */ mergeModels(["ok", "cancel", "show", "close"], ["update:visible"]),
18660
+ emits: /* @__PURE__ */ mergeModels(["ok", "cancel", "close"], ["update:visible"]),
18657
18661
  setup(__props, { emit: __emit }) {
18658
18662
  const { x: x2, y: y2 } = useMouse();
18659
18663
  const { Escape } = useMagicKeys();
@@ -18676,6 +18680,10 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
18676
18680
  const ok = () => {
18677
18681
  emit("ok");
18678
18682
  };
18683
+ const close = () => {
18684
+ visible.value = false;
18685
+ emit("close");
18686
+ };
18679
18687
  const cancel = () => {
18680
18688
  emit("cancel");
18681
18689
  };
@@ -18684,9 +18692,6 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
18684
18692
  (newVal) => {
18685
18693
  if (newVal) {
18686
18694
  transformOrigin.value = `${x2.value}px ${y2.value}px`;
18687
- emit("show");
18688
- } else {
18689
- emit("close");
18690
18695
  }
18691
18696
  }
18692
18697
  );
@@ -18723,7 +18728,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
18723
18728
  createElementVNode("div", {
18724
18729
  style: normalizeStyle(unref(getModalStyle)),
18725
18730
  class: "lew-modal-box",
18726
- onClick: _cache[1] || (_cache[1] = withModifiers(() => {
18731
+ onClick: _cache[0] || (_cache[0] = withModifiers(() => {
18727
18732
  }, ["stop"]))
18728
18733
  }, [
18729
18734
  _ctx.$slots.header ? (openBlock(), createElementBlock("div", _hoisted_2$9, [
@@ -18743,7 +18748,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
18743
18748
  size: "18",
18744
18749
  class: "lew-form-icon-clear",
18745
18750
  type: "x",
18746
- onClick: _cache[0] || (_cache[0] = ($event) => visible.value = false)
18751
+ onClick: close
18747
18752
  })
18748
18753
  ]),
18749
18754
  _: 1
@@ -18782,7 +18787,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
18782
18787
  };
18783
18788
  }
18784
18789
  });
18785
- const LewModal = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-e032dd36"]]);
18790
+ const LewModal = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-9e6a39d2"]]);
18786
18791
  const popokProps = {
18787
18792
  type: {
18788
18793
  type: String,
@@ -19846,7 +19851,7 @@ const uploadProps = {
19846
19851
  description: "上传文件的处理方法"
19847
19852
  }
19848
19853
  };
19849
- const _withScopeId = (n) => (pushScopeId("data-v-a03567d9"), n = n(), popScopeId(), n);
19854
+ const _withScopeId = (n) => (pushScopeId("data-v-6c36f80c"), n = n(), popScopeId(), n);
19850
19855
  const _hoisted_1$6 = ["multiple", "accept"];
19851
19856
  const _hoisted_2$4 = ["src"];
19852
19857
  const _hoisted_3$2 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("span", { class: "lew-upload-progress-bar" }, null, -1));
@@ -19861,12 +19866,12 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
19861
19866
  setup(__props, { emit: __emit }) {
19862
19867
  const { isSupported } = useClipboardItems({ read: true });
19863
19868
  const tipFontSizeMap = {
19864
- small: 12,
19869
+ small: 14,
19865
19870
  medium: 14,
19866
19871
  large: 16
19867
19872
  };
19868
19873
  const fileIconSizeMap = {
19869
- small: 28,
19874
+ small: 30,
19870
19875
  medium: 36,
19871
19876
  large: 44
19872
19877
  };
@@ -19876,22 +19881,22 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
19876
19881
  large: 12
19877
19882
  };
19878
19883
  const maxSizeFontSizeMap = {
19879
- small: 10,
19884
+ small: 12,
19880
19885
  medium: 12,
19881
19886
  large: 14
19882
19887
  };
19883
19888
  const footerFontSizeMap = {
19884
- small: 10,
19889
+ small: 11,
19885
19890
  medium: 12,
19886
19891
  large: 14
19887
19892
  };
19888
19893
  const fileNameFontSizeMap = {
19889
- small: 12,
19894
+ small: 13,
19890
19895
  medium: 14,
19891
19896
  large: 16
19892
19897
  };
19893
19898
  const uploadIconFontSizeMap = {
19894
- small: 25,
19899
+ small: 32,
19895
19900
  medium: 35,
19896
19901
  large: 45
19897
19902
  };
@@ -20424,7 +20429,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
20424
20429
  };
20425
20430
  }
20426
20431
  });
20427
- const LewUpload = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-a03567d9"]]);
20432
+ const LewUpload = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-6c36f80c"]]);
20428
20433
  const collapseModel = {
20429
20434
  modelValue: {
20430
20435
  type: [Array, String],