@web-utils/component 4.0.2 → 4.0.4

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.
@@ -1,4 +1,4 @@
1
- import { f as r } from "./form-item.D-H-wCPE.mjs";
1
+ import { f as r } from "./form-item.CLZf7hCo.mjs";
2
2
  import { c as t } from "./index.d3MV3Wq2.mjs";
3
3
  const o = {
4
4
  name: "FormInput",
@@ -1,7 +1,7 @@
1
1
  import { c as s } from "./index.d3MV3Wq2.mjs";
2
- import u from "element-ui/lib/col";
3
- import m from "element-ui/lib/form-item";
4
- const p = ["span"], l = [...Object.keys(u.props)], d = l.filter((e) => !p.includes(e)), f = ["label", "prop", "rules", "labelWidth", "required"], a = [...Object.keys(m.props)], h = a.filter((e) => !f.includes(e)), c = [
2
+ import l from "element-ui/lib/col";
3
+ import a from "element-ui/lib/form-item";
4
+ const m = ["span"], n = [...Object.keys(l.props || l.default.props)], d = n.filter((e) => !m.includes(e)), f = ["label", "prop", "rules", "labelWidth", "required"], u = [...Object.keys(a.props || a.default.props)], h = u.filter((e) => !f.includes(e)), c = [
5
5
  "wrapCol",
6
6
  "wrapFormItem",
7
7
  "unwrap",
@@ -13,8 +13,8 @@ const p = ["span"], l = [...Object.keys(u.props)], d = l.filter((e) => !p.includ
13
13
  "tips",
14
14
  "hideLabel",
15
15
  "fixedSpan",
16
- ...l,
17
- ...a
16
+ ...n,
17
+ ...u
18
18
  ], o = ["disabled", "size", "statusIcon", "inlineMessage", "autoLabelWidth", "hideRequiredAsterisk", "$emit", "validate", "clearValidate"], b = ["$emit", "validate", "clearValidate"], S = {
19
19
  name: "FormInput",
20
20
  inject: {
@@ -173,7 +173,7 @@ const p = ["span"], l = [...Object.keys(u.props)], d = l.filter((e) => !p.includ
173
173
  var i;
174
174
  const e = [...this.rules || []], r = e.find((t) => t.required);
175
175
  if (this.required || r || (i = this.formHolder.requiredFields) != null && i.includes(this.prop)) {
176
- const t = e.find((n) => n.required);
176
+ const t = e.find((p) => p.required);
177
177
  t ? t.ref ? t.label = t.label || this.label : t.message = t.message || this.message : e.unshift(this.getRequireRule());
178
178
  }
179
179
  return e.concat(this.getRules());
@@ -1,16 +1,16 @@
1
- import { f as a } from "../chunks/form-input.B8z37eqj.mjs";
1
+ import { f as o } from "../chunks/form-input.BsT_5fuJ.mjs";
2
2
  import { f as i } from "../chunks/form-pick.BFTIVn_i.mjs";
3
- import o from "element-ui/lib/cascader";
3
+ import s from "element-ui/lib/cascader";
4
4
  import { c as n, n as u } from "../chunks/index.d3MV3Wq2.mjs";
5
- import { isArray as s, setParent as p, isString as c, findTreeChildren as f } from "@web-utils/core";
5
+ import { isArray as l, setParent as p, isString as f, findTreeChildren as c } from "@web-utils/core";
6
6
  import { cloneDeep as d } from "@web-utils/integrations/lodash";
7
7
  import { d as m } from "../chunks/dictionary.DqiP9x2m.mjs";
8
8
  import { n as h } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
9
- const y = Object.keys(o.props).filter(
9
+ const y = Object.keys(s.props || s.default.props).filter(
10
10
  (t) => !["value", "placeholder", "disabled", "options", "showAllLevels", "show-all-levels", "separator"].includes(t)
11
11
  ), v = {
12
12
  name: "FormCascader",
13
- mixins: [a, i, m],
13
+ mixins: [o, i, m],
14
14
  props: {
15
15
  value: [String, Number, Array],
16
16
  options: {
@@ -59,9 +59,9 @@ const y = Object.keys(o.props).filter(
59
59
  },
60
60
  inputVal() {
61
61
  if (this.join)
62
- return s(this.value) ? this.value : c(this.value) ? this.value.split(this.separator) : [];
62
+ return l(this.value) ? this.value : f(this.value) ? this.value.split(this.separator) : [];
63
63
  if (this.last) {
64
- let [t] = f(this.innerOptions, (r) => r[this.valueKey] === this.value);
64
+ let [t] = c(this.innerOptions, (r) => r[this.valueKey] === this.value);
65
65
  const e = [];
66
66
  for (; t; )
67
67
  e.push(t[this.valueKey]), t = t.parent;
@@ -81,7 +81,7 @@ const y = Object.keys(o.props).filter(
81
81
  },
82
82
  methods: {
83
83
  emitInput(t) {
84
- if (this.join && s(t))
84
+ if (this.join && l(t))
85
85
  this.$emit("input", t.join(this.separator));
86
86
  else {
87
87
  const e = this.last ? t[t.length - 1] : t;
@@ -96,8 +96,8 @@ var _ = function() {
96
96
  return [e._t("default", function() {
97
97
  return [r("ElCascader", e._g(e._b({ class: { "is-readonly": e.readonly }, staticStyle: { width: "100%" }, attrs: { clearable: "", value: e.inputVal, "show-all-levels": e.showAllLevels, separator: e.separator, readonly: e.readonly, options: e.innerOptions, props: { checkStrictly: e.checkStrictly, label: e.labelKey, value: e.valueKey, emitPath: e.emitPath, expandTrigger: "hover" }, disabled: e.inputDisabled, placeholder: e.computePlaceholder }, on: { input: e.emitInput } }, "ElCascader", e.inputProps, !1), e.listeners))];
98
98
  })];
99
- }, proxy: !0 }, { key: "error", fn: function({ error: l }) {
100
- return [e._t("error", null, { error: l })];
99
+ }, proxy: !0 }, { key: "error", fn: function({ error: a }) {
100
+ return [e._t("error", null, { error: a })];
101
101
  } }, { key: "label", fn: function() {
102
102
  return [e._t("label")];
103
103
  }, proxy: !0 }], null, !0) }, "FormItem", e.formItemProps, !1));
@@ -1,10 +1,10 @@
1
- import { f as o } from "../chunks/form-input.B8z37eqj.mjs";
2
- import a from "element-ui/lib/checkbox";
1
+ import { f as a } from "../chunks/form-input.BsT_5fuJ.mjs";
2
+ import o from "element-ui/lib/checkbox";
3
3
  import { v as s, c as n, n as i } from "../chunks/index.d3MV3Wq2.mjs";
4
4
  import { n as u } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
5
- const p = Object.keys(a.props).filter((r) => !["value", "placeholder", "disabled", "suffixIcon"].includes(r)), c = {
5
+ const p = Object.keys(o.props || o.default.props).filter((r) => !["value", "placeholder", "disabled", "suffixIcon"].includes(r)), c = {
6
6
  name: "FormCheckbox",
7
- mixins: [o],
7
+ mixins: [a],
8
8
  props: {
9
9
  value: [String, Number],
10
10
  readonlyGrey: {
@@ -1,12 +1,12 @@
1
- import { f as l } from "../chunks/form-input.B8z37eqj.mjs";
2
- import { f as i } from "../chunks/form-pick.BFTIVn_i.mjs";
3
- import { d as s } from "../chunks/dictionary.DqiP9x2m.mjs";
4
- import { c as n, n as a } from "../chunks/index.d3MV3Wq2.mjs";
5
- import u from "element-ui/lib/checkbox-group";
1
+ import { f as i } from "../chunks/form-input.BsT_5fuJ.mjs";
2
+ import { f as s } from "../chunks/form-pick.BFTIVn_i.mjs";
3
+ import { d as n } from "../chunks/dictionary.DqiP9x2m.mjs";
4
+ import { c as a, n as u } from "../chunks/index.d3MV3Wq2.mjs";
5
+ import l from "element-ui/lib/checkbox-group";
6
6
  import { n as p } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
7
- const h = Object.keys(u.props).filter((t) => !["value", "placeholder", "disabled"].includes(t)), c = {
7
+ const h = Object.keys(l.props || l.default.props).filter((t) => !["value", "placeholder", "disabled"].includes(t)), c = {
8
8
  name: "FormCheckboxGroup",
9
- mixins: [l, i, s],
9
+ mixins: [i, s, n],
10
10
  props: {
11
11
  options: {
12
12
  type: Array,
@@ -50,7 +50,7 @@ const h = Object.keys(u.props).filter((t) => !["value", "placeholder", "disabled
50
50
  return this.classic ? "value" : this.valueProp;
51
51
  },
52
52
  inputProps() {
53
- return n({ ...a(this.$attrs), ...this.$props }, h);
53
+ return a({ ...u(this.$attrs), ...this.$props }, h);
54
54
  },
55
55
  innerOptions() {
56
56
  return this.dictType ? this.dictItems : this.gender ? [
@@ -1,4 +1,4 @@
1
- import { f as n } from "../chunks/form-input.B8z37eqj.mjs";
1
+ import { f as n } from "../chunks/form-input.BsT_5fuJ.mjs";
2
2
  import { f as s } from "../chunks/form-pick.BFTIVn_i.mjs";
3
3
  import { toDate as a } from "@web-utils/integrations/dayjs";
4
4
  import { c as l, n as o } from "../chunks/index.d3MV3Wq2.mjs";
@@ -1,10 +1,10 @@
1
- import { f as i } from "../chunks/form-input.B8z37eqj.mjs";
2
- import o from "element-ui/lib/input";
1
+ import { f as o } from "../chunks/form-input.BsT_5fuJ.mjs";
2
+ import i from "element-ui/lib/input";
3
3
  import { v as a, c as s, n as l } from "../chunks/index.d3MV3Wq2.mjs";
4
- import { n as u } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
5
- const p = Object.keys(o.props).filter((t) => !["value", "placeholder", "disabled", "suffixIcon"].includes(t)), c = {
4
+ import { n as p } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
5
+ const u = Object.keys(i.props || i.default.props).filter((t) => !["value", "placeholder", "disabled", "suffixIcon"].includes(t)), c = {
6
6
  name: "FormInput",
7
- mixins: [i],
7
+ mixins: [o],
8
8
  props: {
9
9
  value: [String, Number],
10
10
  readonlyGrey: {
@@ -28,7 +28,7 @@ const p = Object.keys(o.props).filter((t) => !["value", "placeholder", "disabled
28
28
  },
29
29
  computed: {
30
30
  inputProps() {
31
- return s({ ...l(this.$attrs), ...this.$props }, p);
31
+ return s({ ...l(this.$attrs), ...this.$props }, u);
32
32
  }
33
33
  },
34
34
  watch: {
@@ -73,7 +73,7 @@ var d = function() {
73
73
  }, proxy: !0 }, { key: "tips", fn: function() {
74
74
  return [e._t("tips")];
75
75
  }, proxy: !0 }], null, !0) }, "FormItem", e.formItemProps, !1));
76
- }, f = [], m = /* @__PURE__ */ u(
76
+ }, f = [], m = /* @__PURE__ */ p(
77
77
  c,
78
78
  d,
79
79
  f,
@@ -1,10 +1,10 @@
1
- import { f as n } from "../chunks/form-input.B8z37eqj.mjs";
2
- import s from "element-ui/lib/input";
1
+ import { f as s } from "../chunks/form-input.BsT_5fuJ.mjs";
2
+ import n from "element-ui/lib/input";
3
3
  import { v as a, c as l, n as u } from "../chunks/index.d3MV3Wq2.mjs";
4
- import { n as i } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
5
- const p = Object.keys(s.props).filter((o) => !["value", "placeholder", "disabled"].includes(o)), c = {
4
+ import { n as p } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
5
+ const i = Object.keys(n.props || n.default.props).filter((o) => !["value", "placeholder", "disabled"].includes(o)), c = {
6
6
  name: "FormInputCronExpression",
7
- mixins: [n],
7
+ mixins: [s],
8
8
  props: {
9
9
  value: [String, Number],
10
10
  readonlyGrey: {
@@ -24,7 +24,7 @@ const p = Object.keys(s.props).filter((o) => !["value", "placeholder", "disabled
24
24
  },
25
25
  computed: {
26
26
  inputProps() {
27
- return l({ ...u(this.$attrs), ...this.$props }, p);
27
+ return l({ ...u(this.$attrs), ...this.$props }, i);
28
28
  }
29
29
  },
30
30
  watch: {
@@ -63,7 +63,7 @@ var d = function() {
63
63
  }, proxy: !0 }, { key: "tips", fn: function() {
64
64
  return [e._t("tips")];
65
65
  }, proxy: !0 }], null, !0) }, "FormItem", e.formItemProps, !1));
66
- }, f = [], m = /* @__PURE__ */ i(
66
+ }, f = [], m = /* @__PURE__ */ p(
67
67
  c,
68
68
  d,
69
69
  f,
@@ -1,11 +1,11 @@
1
- import { f as o } from "../chunks/form-input.B8z37eqj.mjs";
2
- import { v as l } from "../chunks/form-validate.CVarNHKX.mjs";
3
- import a from "element-ui/lib/input";
1
+ import { f as l } from "../chunks/form-input.BsT_5fuJ.mjs";
2
+ import { v as a } from "../chunks/form-validate.CVarNHKX.mjs";
3
+ import o from "element-ui/lib/input";
4
4
  import { c as s, n as u } from "../chunks/index.d3MV3Wq2.mjs";
5
5
  import { n as i } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
6
- const p = Object.keys(a.props).filter((t) => !["value", "placeholder", "disabled"].includes(t)), m = {
6
+ const p = Object.keys(o.props || o.default.props).filter((t) => !["value", "placeholder", "disabled"].includes(t)), m = {
7
7
  name: "FormInputEmail",
8
- mixins: [o],
8
+ mixins: [l],
9
9
  props: {
10
10
  value: String,
11
11
  maxLength: {
@@ -22,7 +22,7 @@ const p = Object.keys(a.props).filter((t) => !["value", "placeholder", "disabled
22
22
  getRules() {
23
23
  return [
24
24
  {
25
- validator: l,
25
+ validator: a,
26
26
  message: "请输入正确的邮箱!"
27
27
  }
28
28
  ];
@@ -1,11 +1,11 @@
1
- import { f as s } from "../chunks/form-input.B8z37eqj.mjs";
1
+ import { f as a } from "../chunks/form-input.BsT_5fuJ.mjs";
2
2
  import { validateIdCard as n } from "@web-utils/core";
3
- import a from "element-ui/lib/input";
3
+ import s from "element-ui/lib/input";
4
4
  import { c as l, n as i } from "../chunks/index.d3MV3Wq2.mjs";
5
5
  import { n as u } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
6
- const p = Object.keys(a.props).filter((o) => !["value", "placeholder", "disabled"].includes(o)), m = {
6
+ const p = Object.keys(s.props || s.default.props).filter((o) => !["value", "placeholder", "disabled"].includes(o)), m = {
7
7
  name: "FormInputIdCard",
8
- mixins: [s],
8
+ mixins: [a],
9
9
  props: {
10
10
  value: String,
11
11
  maxLength: {
@@ -41,15 +41,15 @@ var d = function() {
41
41
  } }, { key: "label", fn: function() {
42
42
  return [e._t("label")];
43
43
  }, proxy: !0 }], null, !0) }, "FormItem", e.formItemProps, !1));
44
- }, c = [], f = /* @__PURE__ */ u(
44
+ }, f = [], c = /* @__PURE__ */ u(
45
45
  m,
46
46
  d,
47
- c,
47
+ f,
48
48
  !1,
49
49
  null,
50
50
  null
51
51
  );
52
- const h = f.exports;
52
+ const h = c.exports;
53
53
  export {
54
54
  h as default
55
55
  };
@@ -1,4 +1,4 @@
1
- import { f as p } from "../chunks/form-input.B8z37eqj.mjs";
1
+ import { f as p } from "../chunks/form-input.BsT_5fuJ.mjs";
2
2
  import u from "../input-number/index.mjs";
3
3
  import { c as s, n as l } from "../chunks/index.d3MV3Wq2.mjs";
4
4
  import { n as a } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
@@ -1,11 +1,11 @@
1
- import { f as o } from "../chunks/form-input.B8z37eqj.mjs";
2
- import { validatePhoneNum as s } from "@web-utils/core";
3
- import { c as l, n as u } from "../chunks/index.d3MV3Wq2.mjs";
4
- import a from "element-ui/lib/input";
1
+ import { f as s } from "../chunks/form-input.BsT_5fuJ.mjs";
2
+ import { validatePhoneNum as l } from "@web-utils/core";
3
+ import { c as u, n as a } from "../chunks/index.d3MV3Wq2.mjs";
4
+ import n from "element-ui/lib/input";
5
5
  import { n as i } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
6
- const p = Object.keys(a.props).filter((r) => !["value", "placeholder", "disabled"].includes(r)), m = {
6
+ const p = Object.keys(n.props || n.default.props).filter((r) => !["value", "placeholder", "disabled"].includes(r)), m = {
7
7
  name: "FormInputPhoneNumber",
8
- mixins: [o],
8
+ mixins: [s],
9
9
  props: {
10
10
  value: String,
11
11
  maxLength: {
@@ -15,7 +15,7 @@ const p = Object.keys(a.props).filter((r) => !["value", "placeholder", "disabled
15
15
  },
16
16
  computed: {
17
17
  inputProps() {
18
- return l({ ...u(this.$attrs), ...this.$props }, p);
18
+ return u({ ...a(this.$attrs), ...this.$props }, p);
19
19
  }
20
20
  },
21
21
  methods: {
@@ -23,7 +23,7 @@ const p = Object.keys(a.props).filter((r) => !["value", "placeholder", "disabled
23
23
  return [
24
24
  {
25
25
  validator: (r, e, t) => {
26
- e && e.indexOf("*") > -1 && e.length === 11 ? t() : s(r, e, t);
26
+ e && e.indexOf("*") > -1 && e.length === 11 ? t() : l(r, e, t);
27
27
  },
28
28
  message: "请输入正确的手机号码!"
29
29
  }
@@ -38,8 +38,8 @@ var d = function() {
38
38
  var e = this, t = e._self._c;
39
39
  return t("FormItem", e._b({ attrs: { rules: e.computeRules, disabled: e.inputDisabled }, scopedSlots: e._u([{ key: "default", fn: function() {
40
40
  return [t("ElInput", e._g(e._b({ class: { "is-readonly": e.readonly }, attrs: { value: e.value, readonly: e.readonly, maxlength: e.maxLength, disabled: e.inputDisabled, placeholder: e.computePlaceholder }, on: { input: e.emitInput } }, "ElInput", e.inputProps, !1), e.listeners))];
41
- }, proxy: !0 }, { key: "error", fn: function({ error: n }) {
42
- return [e._t("error", null, { error: n })];
41
+ }, proxy: !0 }, { key: "error", fn: function({ error: o }) {
42
+ return [e._t("error", null, { error: o })];
43
43
  } }, { key: "label", fn: function() {
44
44
  return [e._t("label")];
45
45
  }, proxy: !0 }], null, !0) }, "FormItem", e.formItemProps, !1));
@@ -1,4 +1,4 @@
1
- import { f as a } from "../chunks/form-input.B8z37eqj.mjs";
1
+ import { f as a } from "../chunks/form-input.BsT_5fuJ.mjs";
2
2
  import { c as n, n as l } from "../chunks/index.d3MV3Wq2.mjs";
3
3
  import u from "../x-input-tag/index.mjs";
4
4
  import { n as s } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
@@ -1,10 +1,10 @@
1
- import { f as a } from "../chunks/form-input.B8z37eqj.mjs";
2
- import i from "element-ui/lib/time-picker";
3
- import { c as l, n as o } from "../chunks/index.d3MV3Wq2.mjs";
1
+ import { f as l } from "../chunks/form-input.BsT_5fuJ.mjs";
2
+ import n from "element-ui/lib/time-picker";
3
+ import { c as i, n as o } from "../chunks/index.d3MV3Wq2.mjs";
4
4
  import { n as s } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
5
- const m = Object.keys(i.props).filter((r) => !["value", "placeholder", "disabled"].includes(r)), p = {
5
+ const m = Object.keys(n.props || n.default.props).filter((r) => !["value", "placeholder", "disabled"].includes(r)), p = {
6
6
  name: "FormInputTime",
7
- mixins: [a],
7
+ mixins: [l],
8
8
  props: {
9
9
  range: Boolean,
10
10
  format: {
@@ -39,14 +39,14 @@ const m = Object.keys(i.props).filter((r) => !["value", "placeholder", "disabled
39
39
  return "请选择";
40
40
  },
41
41
  inputProps() {
42
- return l({ ...o(this.$attrs), ...this.$props }, m);
42
+ return i({ ...o(this.$attrs), ...this.$props }, m);
43
43
  }
44
44
  }
45
45
  };
46
46
  var u = function() {
47
- var e = this, n = e._self._c;
48
- return n("FormItem", e._b({ attrs: { rules: e.computeRules, disabled: e.inputDisabled }, scopedSlots: e._u([{ key: "default", fn: function() {
49
- return [n("ElTimePicker", e._g(e._b({ staticStyle: { width: "100%" }, attrs: { "is-range": e.range, value: e.value, disabled: e.inputDisabled, format: e.format, "value-format": e.valueFormat || e.format, clearable: "", "picker-options": {
47
+ var e = this, a = e._self._c;
48
+ return a("FormItem", e._b({ attrs: { rules: e.computeRules, disabled: e.inputDisabled }, scopedSlots: e._u([{ key: "default", fn: function() {
49
+ return [a("ElTimePicker", e._g(e._b({ staticStyle: { width: "100%" }, attrs: { "is-range": e.range, value: e.value, disabled: e.inputDisabled, format: e.format, "value-format": e.valueFormat || e.format, clearable: "", "picker-options": {
50
50
  start: e.start,
51
51
  end: e.end,
52
52
  step: e.step,
@@ -1,5 +1,5 @@
1
1
  import { h as m } from "vue";
2
- import { f as B } from "../chunks/form-item.D-H-wCPE.mjs";
2
+ import { f as B } from "../chunks/form-item.CLZf7hCo.mjs";
3
3
  import { hasOwn as I, isDef as D } from "@web-utils/core";
4
4
  import { n as L } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
5
5
  const N = {
@@ -1,12 +1,12 @@
1
- import { f as n } from "../chunks/form-input.B8z37eqj.mjs";
2
- import { f as l } from "../chunks/form-pick.BFTIVn_i.mjs";
3
- import a from "element-ui/lib/radio-group";
1
+ import { f as l } from "../chunks/form-input.BsT_5fuJ.mjs";
2
+ import { f as a } from "../chunks/form-pick.BFTIVn_i.mjs";
3
+ import n from "element-ui/lib/radio-group";
4
4
  import { c as s, n as u } from "../chunks/index.d3MV3Wq2.mjs";
5
5
  import { d as p } from "../chunks/dictionary.DqiP9x2m.mjs";
6
- import { n as c } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
7
- const d = Object.keys(a.props).filter((o) => !["value", "placeholder", "disabled"].includes(o)), f = {
6
+ import { n as d } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
7
+ const c = Object.keys(n.props || n.default.props).filter((o) => !["value", "placeholder", "disabled"].includes(o)), f = {
8
8
  name: "FormRadioGroup",
9
- mixins: [n, l, p],
9
+ mixins: [l, a, p],
10
10
  props: {
11
11
  options: {
12
12
  type: Array,
@@ -52,7 +52,7 @@ const d = Object.keys(a.props).filter((o) => !["value", "placeholder", "disabled
52
52
  return "请选择";
53
53
  },
54
54
  inputProps() {
55
- return s({ ...u(this.$attrs), ...this.$props }, d);
55
+ return s({ ...u(this.$attrs), ...this.$props }, c);
56
56
  },
57
57
  labelKey() {
58
58
  return this.classic ? "label" : this.labelProp;
@@ -108,7 +108,7 @@ var h = function() {
108
108
  }, proxy: !0 }, { key: "below", fn: function() {
109
109
  return [e._t("below")];
110
110
  }, proxy: !0 }], null, !0) }, "FormItem", e.formItemProps, !1));
111
- }, m = [], y = /* @__PURE__ */ c(
111
+ }, m = [], y = /* @__PURE__ */ d(
112
112
  f,
113
113
  h,
114
114
  m,
@@ -1,13 +1,13 @@
1
- import { f as o } from "../chunks/form-input.B8z37eqj.mjs";
2
- import { f as l } from "../chunks/form-pick.BFTIVn_i.mjs";
3
- import { d as n } from "../chunks/dictionary.DqiP9x2m.mjs";
4
- import a from "element-ui/lib/select";
1
+ import { f as l } from "../chunks/form-input.BsT_5fuJ.mjs";
2
+ import { f as n } from "../chunks/form-pick.BFTIVn_i.mjs";
3
+ import { d as a } from "../chunks/dictionary.DqiP9x2m.mjs";
4
+ import o from "element-ui/lib/select";
5
5
  import { c as p, n as u } from "../chunks/index.d3MV3Wq2.mjs";
6
6
  import { isString as h, isPlainObject as m, isNumber as f } from "@web-utils/core";
7
7
  import { n as c } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
8
- const d = Object.keys(a.props).filter((e) => !["value", "placeholder", "disabled"].includes(e)), b = {
8
+ const d = Object.keys(o.props || o.default.props).filter((e) => !["value", "placeholder", "disabled"].includes(e)), b = {
9
9
  name: "FormSelect",
10
- mixins: [o, l, n],
10
+ mixins: [l, n, a],
11
11
  props: {
12
12
  options: {
13
13
  type: Array,
@@ -1,10 +1,10 @@
1
- import { f as o } from "../chunks/form-input.B8z37eqj.mjs";
2
- import l from "element-ui/lib/switch";
1
+ import { f as l } from "../chunks/form-input.BsT_5fuJ.mjs";
2
+ import n from "element-ui/lib/switch";
3
3
  import { c as a, n as u } from "../chunks/index.d3MV3Wq2.mjs";
4
4
  import { n as i } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
5
- const s = Object.keys(l.props).filter((t) => !["value", "placeholder", "disabled"].includes(t)), p = {
5
+ const s = Object.keys(n.props || n.default.props).filter((t) => !["value", "placeholder", "disabled"].includes(t)), p = {
6
6
  name: "FormSwitch",
7
- mixins: [o],
7
+ mixins: [l],
8
8
  props: {
9
9
  value: [String, Number, Boolean],
10
10
  activeValue: {
@@ -35,8 +35,8 @@ var c = function() {
35
35
  return [e._t("append")];
36
36
  }, proxy: !0 }], null, !0) }, "ElSwitch", e.inputProps, !1), e.listeners))];
37
37
  })];
38
- }, proxy: !0 }, { key: "error", fn: function({ error: n }) {
39
- return [e._t("error", null, { error: n })];
38
+ }, proxy: !0 }, { key: "error", fn: function({ error: o }) {
39
+ return [e._t("error", null, { error: o })];
40
40
  } }, { key: "label", fn: function() {
41
41
  return [e._t("label")];
42
42
  }, proxy: !0 }], null, !0) }, "FormItem", e.formItemProps, !1));
@@ -1,4 +1,4 @@
1
- import { f as a } from "../chunks/form-input.B8z37eqj.mjs";
1
+ import { f as a } from "../chunks/form-input.BsT_5fuJ.mjs";
2
2
  import { c as s, n as d } from "../chunks/index.d3MV3Wq2.mjs";
3
3
  import c from "../sub-table/index.mjs";
4
4
  import { n as m } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
@@ -1,4 +1,4 @@
1
- import { f as p } from "../chunks/form-input.B8z37eqj.mjs";
1
+ import { f as p } from "../chunks/form-input.BsT_5fuJ.mjs";
2
2
  import { e as s, c as i, n as h } from "../chunks/index.d3MV3Wq2.mjs";
3
3
  import { S as u } from "../chunks/sub-table-plus-props.BVsD71hT.mjs";
4
4
  import { isString as a, isArray as m, trace as b, warning as _ } from "@web-utils/core";
@@ -1,12 +1,12 @@
1
- import { f as n } from "../chunks/form-input.B8z37eqj.mjs";
2
- import { c as s, n as a } from "../chunks/index.d3MV3Wq2.mjs";
3
- import l from "element-ui/lib/input";
1
+ import { f as s } from "../chunks/form-input.BsT_5fuJ.mjs";
2
+ import { c as a, n as l } from "../chunks/index.d3MV3Wq2.mjs";
3
+ import n from "element-ui/lib/input";
4
4
  import { n as i } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
5
- const u = Object.keys(l.props).filter(
5
+ const u = Object.keys(n.props || n.default.props).filter(
6
6
  (o) => !["value", "placeholder", "type", "rows", "resize", "showWordLimit", "maxLength", "maxlength"].includes(o)
7
7
  ), p = {
8
8
  name: "FormTextarea",
9
- mixins: [n],
9
+ mixins: [s],
10
10
  props: {
11
11
  value: [String, Number],
12
12
  rows: {
@@ -30,7 +30,7 @@ const u = Object.keys(l.props).filter(
30
30
  },
31
31
  computed: {
32
32
  inputProps() {
33
- return s({ ...a(this.$attrs), ...this.$props }, u);
33
+ return a({ ...l(this.$attrs), ...this.$props }, u);
34
34
  }
35
35
  }
36
36
  };
@@ -1,4 +1,4 @@
1
- import { f as n } from "../chunks/form-input.B8z37eqj.mjs";
1
+ import { f as n } from "../chunks/form-input.BsT_5fuJ.mjs";
2
2
  import { v as s, c as a, n as i } from "../chunks/index.d3MV3Wq2.mjs";
3
3
  import o from "../vue-tree-select/index.mjs";
4
4
  import { n as u } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
@@ -1,4 +1,4 @@
1
- import { f as n } from "../chunks/form-input.B8z37eqj.mjs";
1
+ import { f as n } from "../chunks/form-input.BsT_5fuJ.mjs";
2
2
  import { v as s, c as a, n as i } from "../chunks/index.d3MV3Wq2.mjs";
3
3
  import o from "../vue-tree-select/index.mjs";
4
4
  import { n as u } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@web-utils/component",
3
3
  "description": "Web Components",
4
- "version": "4.0.2",
4
+ "version": "4.0.4",
5
5
  "author": "Simple",
6
6
  "license": "MIT",
7
7
  "type": "module",
@@ -1,6 +1,6 @@
1
- import { ref as l, onMounted as S } from "vue";
2
- import N from "element-ui/lib/message";
3
- import { isPlainObject as y, isFunction as P } from "@web-utils/core";
1
+ import { ref as l, onMounted as N } from "vue";
2
+ import y from "element-ui/lib/message";
3
+ import { isPlainObject as _, isFunction as P } from "@web-utils/core";
4
4
  import { cloneDeep as T } from "@web-utils/integrations/lodash";
5
5
  import { n as B } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
6
6
  const O = {
@@ -52,46 +52,46 @@ const O = {
52
52
  },
53
53
  emits: ["cancel", "confirm", "update:visible"],
54
54
  setup(f, { expose: e, emit: n }) {
55
- const t = f, a = l([]), s = l(null), i = l([]), m = l([]), h = l(null), g = l(null), v = l(null), _ = l(null), b = (o) => {
55
+ const t = f, a = l([]), s = l(null), i = l([]), m = l([]), h = l(null), g = l(null), v = l(null), b = l(null), x = (o) => {
56
56
  a.value = o;
57
- }, x = (o) => {
57
+ }, k = (o) => {
58
58
  s.value = o;
59
59
  }, d = () => {
60
60
  h.value.reload();
61
- }, k = () => {
61
+ }, w = () => {
62
62
  g.value.resetFields(), d();
63
63
  }, u = () => {
64
64
  v.value.hide();
65
- }, w = () => {
66
- n("cancel"), u();
67
65
  }, C = () => {
66
+ n("cancel"), u();
67
+ }, F = () => {
68
68
  var p;
69
69
  let o;
70
70
  if (t.multiple ? (p = a.value) != null && p.length && (o = a.value) : s.value && (o = [s.value]), !o.length) {
71
- N.warning("请选择!");
71
+ (y.warning || y.default.warning)("请选择!");
72
72
  return;
73
73
  }
74
74
  n("confirm", o), u();
75
- }, F = (o) => {
75
+ }, S = (o) => {
76
76
  n("update:visible", o);
77
77
  };
78
- return S(async () => {
78
+ return N(async () => {
79
79
  var o;
80
80
  if (t.useTree) {
81
81
  const c = (await t.treeApi()).data.data;
82
- if (y(t.customRootNode)) {
82
+ if (_(t.customRootNode)) {
83
83
  const r = T(t.customRootNode);
84
84
  r[t.treeProps.children || "children"] = c, i.value = [r];
85
85
  } else if (P(t.customRootNode)) {
86
86
  const r = t.customRootNode(c);
87
- r[t.treeProps.children || "children"] = c, i.value = y(r) ? [r] : r;
87
+ r[t.treeProps.children || "children"] = c, i.value = _(r) ? [r] : r;
88
88
  } else
89
89
  i.value = c;
90
90
  t.expandFirstNode && (m.value = [(o = i.value[0]) == null ? void 0 : o.id]);
91
91
  }
92
92
  }), e({
93
93
  search: d
94
- }), { __sfc: !0, props: t, emits: n, rows: a, current: s, treeData: i, expandedKeys: m, table: h, form: g, dialog: v, tree: _, handleChange: b, handleCurrentChange: x, search: d, clear: k, closeDialog: u, onCancel: w, confirm: C, updateVisible: F };
94
+ }), { __sfc: !0, props: t, emits: n, rows: a, current: s, treeData: i, expandedKeys: m, table: h, form: g, dialog: v, tree: b, handleChange: x, handleCurrentChange: k, search: d, clear: w, closeDialog: u, onCancel: C, confirm: F, updateVisible: S };
95
95
  }
96
96
  });
97
97
  var R = function() {
package/web-types.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "framework": "vue",
4
4
  "name": "@web-utils/component",
5
- "version": "4.0.2",
5
+ "version": "4.0.4",
6
6
  "contributions": {
7
7
  "html": {
8
8
  "description-markup": "markdown",