@web-utils/component 4.0.4 → 4.0.6

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.
Files changed (46) hide show
  1. package/chunks/configComponents.BHkQi547.mjs +45 -0
  2. package/chunks/{confirmable-mixin.D9aKzKZ9.mjs → confirmable-mixin.B2TtLAdk.mjs} +23 -22
  3. package/chunks/dictionary.D9gKwItv.mjs +68 -0
  4. package/chunks/{form-input.BsT_5fuJ.mjs → form-input.CvFdwlEV.mjs} +2 -2
  5. package/chunks/{form-item.CLZf7hCo.mjs → form-item.LWjePsPa.mjs} +16 -16
  6. package/chunks/{index.d3MV3Wq2.mjs → index.B2TRddqf.mjs} +30 -27
  7. package/confirm-button/index.mjs +1 -1
  8. package/confirmable/index.mjs +1 -1
  9. package/data-table-picker/index.mjs +1 -1
  10. package/editable-tree/index.mjs +1 -1
  11. package/element-dialog/index.mjs +17 -16
  12. package/form-cascader/index.mjs +24 -24
  13. package/form-checkbox/index.mjs +15 -15
  14. package/form-checkbox-group/index.mjs +14 -14
  15. package/form-date-picker/index.mjs +2 -2
  16. package/form-holder/index.mjs +1 -1
  17. package/form-input/index.mjs +11 -11
  18. package/form-input-cron-expression/index.mjs +11 -11
  19. package/form-input-email/index.mjs +13 -13
  20. package/form-input-id-card/index.mjs +12 -12
  21. package/form-input-number/index.mjs +2 -2
  22. package/form-input-phone-number/index.mjs +22 -22
  23. package/form-input-tag/index.mjs +2 -2
  24. package/form-input-time/index.mjs +15 -15
  25. package/form-item/index.mjs +1 -1
  26. package/form-radio-group/index.mjs +26 -26
  27. package/form-select/index.mjs +17 -17
  28. package/form-switch/index.mjs +13 -13
  29. package/form-table/index.mjs +6 -6
  30. package/form-table-plus/index.mjs +4 -4
  31. package/form-textarea/index.mjs +13 -13
  32. package/form-tree-select/index.mjs +8 -8
  33. package/form-tree-select-multiple/index.mjs +2 -2
  34. package/index.mjs +408 -406
  35. package/package.json +1 -1
  36. package/pageable-table/index.mjs +48 -48
  37. package/pageable-view/index.mjs +1 -1
  38. package/picker-table-view/index.mjs +25 -24
  39. package/table-column/index.mjs +1 -1
  40. package/table-view/index.mjs +35 -36
  41. package/tabs-view/index.mjs +2 -2
  42. package/toolbar/index.mjs +52 -53
  43. package/toolbar-button/index.mjs +2 -2
  44. package/web-types.json +1 -1
  45. package/chunks/configComponents.BDhlZU8F.mjs +0 -23
  46. package/chunks/dictionary.DsN-2ukC.mjs +0 -70
@@ -1,13 +1,13 @@
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
- import { c as p, n as u } from "../chunks/index.d3MV3Wq2.mjs";
6
- import { isString as h, isPlainObject as m, isNumber as f } from "@web-utils/core";
7
- import { n as c } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
8
- const d = Object.keys(o.props || o.default.props).filter((e) => !["value", "placeholder", "disabled"].includes(e)), b = {
1
+ import { f as o } from "../chunks/form-input.CvFdwlEV.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";
5
+ import { c as p, d as u, n as h } from "../chunks/index.B2TRddqf.mjs";
6
+ import { isString as m, isPlainObject as f, isNumber as c } from "@web-utils/core";
7
+ import { n as d } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
8
+ const b = p(a).filter((e) => !["value", "placeholder", "disabled"].includes(e)), y = {
9
9
  name: "FormSelect",
10
- mixins: [l, n, a],
10
+ mixins: [o, l, n],
11
11
  props: {
12
12
  options: {
13
13
  type: Array,
@@ -59,7 +59,7 @@ const d = Object.keys(o.props || o.default.props).filter((e) => !["value", "plac
59
59
  return "请选择";
60
60
  },
61
61
  inputProps() {
62
- return p({ ...u(this.$attrs), ...this.$props }, d);
62
+ return u({ ...h(this.$attrs), ...this.$props }, b);
63
63
  },
64
64
  innerOptions() {
65
65
  if (this.dictType)
@@ -98,7 +98,7 @@ const d = Object.keys(o.props || o.default.props).filter((e) => !["value", "plac
98
98
  if (this.year) {
99
99
  const e = (/* @__PURE__ */ new Date()).getFullYear(), t = [];
100
100
  let i = 10;
101
- f(this.year) && (i = this.year);
101
+ c(this.year) && (i = this.year);
102
102
  for (let r = -i; r <= i; r++) {
103
103
  const s = e + r;
104
104
  t.push({
@@ -131,7 +131,7 @@ const d = Object.keys(o.props || o.default.props).filter((e) => !["value", "plac
131
131
  try {
132
132
  this.loading = !0;
133
133
  const i = await this.remoteMethod(e, this.prop);
134
- ((t = i.data.data) == null ? void 0 : t.length) >= 0 ? h(i.data.data[0]) ? this.remoteOptions = i.data.data.map((r) => ({ [this.props.value]: r, [this.props.label]: r })) : m(i.data.data[0]) && (this.remoteOptions = i.data.data) : this.remoteOptions = [];
134
+ ((t = i.data.data) == null ? void 0 : t.length) >= 0 ? m(i.data.data[0]) ? this.remoteOptions = i.data.data.map((r) => ({ [this.props.value]: r, [this.props.label]: r })) : f(i.data.data[0]) && (this.remoteOptions = i.data.data) : this.remoteOptions = [];
135
135
  } catch {
136
136
  }
137
137
  this.loading = !1;
@@ -144,7 +144,7 @@ const d = Object.keys(o.props || o.default.props).filter((e) => !["value", "plac
144
144
  }
145
145
  }
146
146
  };
147
- var y = function() {
147
+ var _ = function() {
148
148
  var t = this, i = t._self._c;
149
149
  return i("FormItem", t._b({ attrs: { rules: t.computeRules, disabled: t.inputDisabled }, scopedSlots: t._u([{ key: "default", fn: function() {
150
150
  return [i("ElSelect", t._g(t._b({ attrs: { value: t.innerValue, filterable: t.filterable || !!t.year, placeholder: t.inputDisabled ? "--" : t.computePlaceholder, "allow-create": t.allowCreate || !!t.year, disabled: t.inputDisabled, multiple: t.multiple, "multiple-limit": t.multipleLimit, loading: t.loading, remote: t.remote, "remote-method": t.fetchOptions, clearable: "" }, on: { clear: t.reloadOptions, input: t.emitInput } }, "ElSelect", t.inputProps, !1), t.listeners), [t._t("default", function() {
@@ -165,15 +165,15 @@ var y = function() {
165
165
  }, proxy: !0 }, { key: "tips", fn: function() {
166
166
  return [t._t("tips")];
167
167
  }, proxy: !0 }], null, !0) }, "FormItem", t.formItemProps, !1));
168
- }, _ = [], g = /* @__PURE__ */ c(
169
- b,
168
+ }, g = [], v = /* @__PURE__ */ d(
170
169
  y,
171
170
  _,
171
+ g,
172
172
  !1,
173
173
  null,
174
174
  null
175
175
  );
176
- const P = g.exports;
176
+ const k = v.exports;
177
177
  export {
178
- P as default
178
+ k as default
179
179
  };
@@ -1,10 +1,10 @@
1
- import { f as l } from "../chunks/form-input.BsT_5fuJ.mjs";
2
- import n from "element-ui/lib/switch";
3
- import { c as a, n as u } from "../chunks/index.d3MV3Wq2.mjs";
4
- import { n as i } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
5
- const s = Object.keys(n.props || n.default.props).filter((t) => !["value", "placeholder", "disabled"].includes(t)), p = {
1
+ import { f as o } from "../chunks/form-input.CvFdwlEV.mjs";
2
+ import l from "element-ui/lib/switch";
3
+ import { c as a, d as u, n as i } from "../chunks/index.B2TRddqf.mjs";
4
+ import { n as s } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
5
+ const p = a(l).filter((t) => !["value", "placeholder", "disabled"].includes(t)), c = {
6
6
  name: "FormSwitch",
7
- mixins: [l],
7
+ mixins: [o],
8
8
  props: {
9
9
  value: [String, Number, Boolean],
10
10
  activeValue: {
@@ -18,7 +18,7 @@ const s = Object.keys(n.props || n.default.props).filter((t) => !["value", "plac
18
18
  },
19
19
  computed: {
20
20
  inputProps() {
21
- return a({ ...u(this.$attrs), ...this.$props }, s);
21
+ return u({ ...i(this.$attrs), ...this.$props }, p);
22
22
  }
23
23
  },
24
24
  methods: {
@@ -27,7 +27,7 @@ const s = Object.keys(n.props || n.default.props).filter((t) => !["value", "plac
27
27
  }
28
28
  }
29
29
  };
30
- var c = function() {
30
+ var m = function() {
31
31
  var e = this, r = e._self._c;
32
32
  return r("FormItem", e._b({ attrs: { rules: e.computeRules, disabled: e.inputDisabled }, scopedSlots: e._u([{ key: "default", fn: function() {
33
33
  return [e._t("default", function() {
@@ -35,20 +35,20 @@ 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: o }) {
39
- return [e._t("error", null, { error: o })];
38
+ }, proxy: !0 }, { key: "error", fn: function({ error: n }) {
39
+ return [e._t("error", null, { error: n })];
40
40
  } }, { key: "label", fn: function() {
41
41
  return [e._t("label")];
42
42
  }, proxy: !0 }], null, !0) }, "FormItem", e.formItemProps, !1));
43
- }, m = [], d = /* @__PURE__ */ i(
44
- p,
43
+ }, d = [], f = /* @__PURE__ */ s(
45
44
  c,
46
45
  m,
46
+ d,
47
47
  !1,
48
48
  null,
49
49
  null
50
50
  );
51
- const b = d.exports;
51
+ const b = f.exports;
52
52
  export {
53
53
  b as default
54
54
  };
@@ -1,8 +1,8 @@
1
- import { f as a } from "../chunks/form-input.BsT_5fuJ.mjs";
2
- import { c as s, n as d } from "../chunks/index.d3MV3Wq2.mjs";
3
- import c from "../sub-table/index.mjs";
4
- import { n as m } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
5
- const i = Object.keys(c.props).filter((l) => !["value", "placeholder", "disabled"].includes(l)), p = {
1
+ import { f as a } from "../chunks/form-input.CvFdwlEV.mjs";
2
+ import { d as s, n as d } from "../chunks/index.B2TRddqf.mjs";
3
+ import m from "../sub-table/index.mjs";
4
+ import { n as c } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
5
+ const i = Object.keys(m.props).filter((l) => !["value", "placeholder", "disabled"].includes(l)), p = {
6
6
  name: "FormTable",
7
7
  mixins: [a],
8
8
  emits: ["add-row"],
@@ -71,7 +71,7 @@ var f = function() {
71
71
  } }, { key: "label", fn: function() {
72
72
  return [e._t("label")];
73
73
  }, proxy: !0 }], null, !0) }, "FormItem", e.formItemProps, !1));
74
- }, y = [], b = /* @__PURE__ */ m(
74
+ }, y = [], b = /* @__PURE__ */ c(
75
75
  p,
76
76
  f,
77
77
  y,
@@ -1,5 +1,5 @@
1
- import { f as p } from "../chunks/form-input.BsT_5fuJ.mjs";
2
- import { e as s, c as i, n as h } from "../chunks/index.d3MV3Wq2.mjs";
1
+ import { f as p } from "../chunks/form-input.CvFdwlEV.mjs";
2
+ import { h as s, d as i, n as h } from "../chunks/index.B2TRddqf.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";
5
5
  import { a as w } from "../chunks/form-validate.CVarNHKX.mjs";
@@ -70,8 +70,8 @@ var P = function() {
70
70
  var e = this, l = e._self._c;
71
71
  return l("FormItem", e._b({ attrs: { block: e.block, rules: e.computeRules, "prefix-add": "", disabled: e.inputDisabled }, scopedSlots: e._u([{ key: "default", fn: function() {
72
72
  return [l("SubTablePlus", e._g(e._b({ ref: "table", class: { "is-readonly": e.readonly }, attrs: { value: e.value, prop: e.prop, "fetch-api": e.fetchApi, "on-row-db-click": e.onRowDbClick, columns: e.columns, "show-message": e.showMessage, readonly: e.readonly, disabled: e.inputDisabled, "toolbar-menus": e.toolbarMenus, "handle-menus": e.handleMenus, "bottom-add-button": e.bottomAddButton, placeholder: e.computePlaceholder, descs: e.descs, "page-size": e.pageSize }, on: { input: (t) => e.$emit("input", t) }, scopedSlots: e._u([e._l(e.columns, function(t) {
73
- return { key: t.prop, fn: function({ row: o, column: n, index: d, prop: c, required: f }) {
74
- return [e._t(t.prop, null, { row: o, column: n, index: d, prop: c, required: f })];
73
+ return { key: t.prop, fn: function({ row: o, column: n, index: d, prop: f, required: c }) {
74
+ return [e._t(t.prop, null, { row: o, column: n, index: d, prop: f, required: c })];
75
75
  } };
76
76
  }), { key: "columns", fn: function({ columns: t }) {
77
77
  return [e._t("columns", null, { columns: t })];
@@ -1,12 +1,12 @@
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
- import { n as i } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
5
- const u = Object.keys(n.props || n.default.props).filter(
1
+ import { f as n } from "../chunks/form-input.CvFdwlEV.mjs";
2
+ import { c as a, d as s, n as l } from "../chunks/index.B2TRddqf.mjs";
3
+ import i from "element-ui/lib/input";
4
+ import { n as u } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
5
+ const p = a(i).filter(
6
6
  (o) => !["value", "placeholder", "type", "rows", "resize", "showWordLimit", "maxLength", "maxlength"].includes(o)
7
- ), p = {
7
+ ), m = {
8
8
  name: "FormTextarea",
9
- mixins: [s],
9
+ mixins: [n],
10
10
  props: {
11
11
  value: [String, Number],
12
12
  rows: {
@@ -30,11 +30,11 @@ const u = Object.keys(n.props || n.default.props).filter(
30
30
  },
31
31
  computed: {
32
32
  inputProps() {
33
- return a({ ...l(this.$attrs), ...this.$props }, u);
33
+ return s({ ...l(this.$attrs), ...this.$props }, p);
34
34
  }
35
35
  }
36
36
  };
37
- var m = function() {
37
+ var f = function() {
38
38
  var e = this, t = e._self._c;
39
39
  return t("FormItem", e._b({ attrs: { block: e.block, rules: e.computeRules, disabled: e.inputDisabled }, scopedSlots: e._u([{ key: "default", fn: function() {
40
40
  return [e.formView.printing ? t("div", { staticStyle: { "line-height": "1.5" } }, [e._v(" " + e._s(e.value) + " ")]) : t("ElInput", e._g(e._b({ ref: "textarea", attrs: { value: e.value, type: "textarea", rows: e.rows, autosize: e.autosize, resize: e.resize ? null : "none", "show-word-limit": e.showWordLimit, disabled: e.inputDisabled, maxlength: e.maxLength, placeholder: e.computePlaceholder }, on: { input: (r) => e.$emit("input", r) } }, "ElInput", e.inputProps, !1), e.listeners))];
@@ -43,15 +43,15 @@ var m = function() {
43
43
  } }, { key: "label", fn: function() {
44
44
  return [e._t("label")];
45
45
  }, proxy: !0 }], null, !0) }, "FormItem", e.formItemProps, !1));
46
- }, f = [], c = /* @__PURE__ */ i(
47
- p,
46
+ }, c = [], d = /* @__PURE__ */ u(
48
47
  m,
49
48
  f,
49
+ c,
50
50
  !1,
51
51
  null,
52
52
  null
53
53
  );
54
- const x = c.exports;
54
+ const b = d.exports;
55
55
  export {
56
- x as default
56
+ b as default
57
57
  };
@@ -1,8 +1,8 @@
1
- import { f as n } from "../chunks/form-input.BsT_5fuJ.mjs";
2
- import { v as s, c as a, n as i } from "../chunks/index.d3MV3Wq2.mjs";
1
+ import { f as n } from "../chunks/form-input.CvFdwlEV.mjs";
2
+ import { v as s, d as a, n as i } from "../chunks/index.B2TRddqf.mjs";
3
3
  import o from "../vue-tree-select/index.mjs";
4
4
  import { n as u } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
5
- const p = Object.keys(o.mixins[0].props).filter((r) => !["value", "placeholder", "disabled"].includes(r)), c = {
5
+ const p = Object.keys(o.mixins[0].props).filter((r) => !["value", "placeholder", "disabled"].includes(r)), m = {
6
6
  name: "FormTreeSelect",
7
7
  mixins: [n],
8
8
  props: {
@@ -39,7 +39,7 @@ const p = Object.keys(o.mixins[0].props).filter((r) => !["value", "placeholder",
39
39
  }
40
40
  }
41
41
  };
42
- var m = function() {
42
+ var c = function() {
43
43
  var e = this, l = e._self._c;
44
44
  return l("FormItem", e._b({ attrs: { rules: e.computeRules, disabled: e.inputDisabled }, scopedSlots: e._u([{ key: "default", fn: function() {
45
45
  return [e._t("default", function() {
@@ -58,15 +58,15 @@ var m = function() {
58
58
  }, proxy: !0 }, { key: "tips", fn: function() {
59
59
  return [e._t("tips")];
60
60
  }, proxy: !0 }], null, !0) }, "FormItem", e.formItemProps, !1));
61
- }, f = [], d = /* @__PURE__ */ u(
62
- c,
61
+ }, d = [], f = /* @__PURE__ */ u(
63
62
  m,
64
- f,
63
+ c,
64
+ d,
65
65
  !1,
66
66
  null,
67
67
  null
68
68
  );
69
- const y = d.exports;
69
+ const y = f.exports;
70
70
  export {
71
71
  y as default
72
72
  };
@@ -1,5 +1,5 @@
1
- import { f as n } from "../chunks/form-input.BsT_5fuJ.mjs";
2
- import { v as s, c as a, n as i } from "../chunks/index.d3MV3Wq2.mjs";
1
+ import { f as n } from "../chunks/form-input.CvFdwlEV.mjs";
2
+ import { v as s, d as a, n as i } from "../chunks/index.B2TRddqf.mjs";
3
3
  import o from "../vue-tree-select/index.mjs";
4
4
  import { n as u } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
5
5
  const c = Object.keys(o.mixins[0].props).filter((t) => !["value", "placeholder", "disabled"].includes(t)), d = {