@web-utils/form-ui 1.0.0-beta25 → 1.0.0-beta27

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 (69) hide show
  1. package/awesome-button/index.mjs +49 -2
  2. package/chunks/{BYNkR7-j.mjs → 3QpBKdDM.mjs} +2 -2
  3. package/chunks/{Uhf6MK26.mjs → ADvOhGAW.mjs} +1 -1
  4. package/chunks/{0nMB8MZ0.mjs → BAE_vglg.mjs} +2 -2
  5. package/chunks/{1UkAGJ03.mjs → BJP-5-0v.mjs} +2 -2
  6. package/chunks/{CjeZ3uKX.mjs → BhmGnR4F.mjs} +6 -6
  7. package/chunks/{DDc6e1uO.mjs → CCc9Zjms.mjs} +3 -3
  8. package/chunks/{Ckur6g6N.mjs → CE2akkTQ.mjs} +28 -29
  9. package/chunks/{DJjmr9R3.mjs → Cme51jl3.mjs} +2 -2
  10. package/chunks/{B2PYq5pM.mjs → CnP5qx9A.mjs} +2 -2
  11. package/chunks/{BM8sdTDJ.mjs → CotIhBXj.mjs} +2 -2
  12. package/chunks/{o7O5_GIP.mjs → D-ffcm89.mjs} +2 -2
  13. package/chunks/{U08ZaDiY.mjs → D1G2MMMx.mjs} +206 -199
  14. package/chunks/{4G13cKOo.mjs → DGYsSu6t.mjs} +2 -2
  15. package/chunks/{CAQ6-w1f.mjs → DJTwM7o_.mjs} +3 -3
  16. package/chunks/{CnVy7Ngb.mjs → DS8NSFKr.mjs} +10 -6
  17. package/chunks/{B8rugxZ0.mjs → DlFC9IZx.mjs} +2 -2
  18. package/chunks/{XKBWlv3M.mjs → Dn79Y_Rb.mjs} +2 -2
  19. package/chunks/{MVhpewST.mjs → DzMQIy5h.mjs} +1 -1
  20. package/chunks/{CtK74qPE.mjs → lVzx0-GH.mjs} +2 -2
  21. package/chunks/{BowPVbJ7.mjs → ltggbLWM.mjs} +2 -2
  22. package/chunks/{DnWeeCd1.mjs → mjEH6tHn.mjs} +1 -1
  23. package/chunks/{DdZcziWU.mjs → o5196FMX.mjs} +3 -3
  24. package/chunks/{Dl5QgkX_.mjs → qRpPD8iK.mjs} +2 -2
  25. package/chunks/{BdD1Rt-7.mjs → tRXOz6_G.mjs} +2 -2
  26. package/confirm-button/index.mjs +1 -1
  27. package/confirmable/index.mjs +1 -1
  28. package/element-dialog/index.mjs +1 -1
  29. package/empty-view/index.mjs +1 -1
  30. package/form-advice/index.mjs +1 -1
  31. package/form-cascader/index.mjs +1 -1
  32. package/form-check-box-group/index.mjs +1 -1
  33. package/form-checkbox/index.mjs +1 -1
  34. package/form-date-picker/index.mjs +1 -1
  35. package/form-holder/index.mjs +1 -1
  36. package/form-image/index.mjs +1 -1
  37. package/form-input/index.mjs +1 -1
  38. package/form-input-cron-expression/index.mjs +1 -1
  39. package/form-input-email/index.mjs +1 -1
  40. package/form-input-id-card/index.mjs +1 -1
  41. package/form-input-number/index.mjs +1 -1
  42. package/form-input-phone-number/index.mjs +1 -1
  43. package/form-item-group/index.mjs +1 -1
  44. package/form-item-x/index.mjs +1 -1
  45. package/form-radio-group/index.mjs +1 -1
  46. package/form-rate/index.mjs +1 -1
  47. package/form-red-table/index.mjs +1 -1
  48. package/form-row/index.mjs +1 -1
  49. package/form-select/index.mjs +1 -1
  50. package/form-slider/index.mjs +1 -1
  51. package/form-switch/index.mjs +1 -1
  52. package/form-text/index.mjs +1 -1
  53. package/helper/dictionary.mjs +1 -1
  54. package/iframe-window/index.mjs +1 -1
  55. package/index.mjs +27 -27
  56. package/package.json +1 -1
  57. package/toolbar/index.mjs +1 -1
  58. package/toolbar-button/index.mjs +1 -1
  59. package/vue-cron/index.mjs +1 -1
  60. package/web-types.json +1 -13047
  61. package/x-input-tag/index.mjs +6 -6
  62. package/year-calendar/index.mjs +1 -1
  63. package/chunks/iIcGTQmB.mjs +0 -50
  64. /package/chunks/{BdHFJ9cK.mjs → BVLgLg_s.mjs} +0 -0
  65. /package/chunks/{DOl--Hf9.mjs → Bgny2wyC.mjs} +0 -0
  66. /package/chunks/{DgL5zblr.mjs → Bm5eiSmT.mjs} +0 -0
  67. /package/chunks/{DETsVUo_.mjs → C9J3j0PX.mjs} +0 -0
  68. /package/chunks/{DJNXk_Cv.mjs → CkFapoKt.mjs} +0 -0
  69. /package/chunks/{eR-FlUht.mjs → pxFLMMUm.mjs} +0 -0
@@ -1,2 +1,49 @@
1
- import { t as e } from "../chunks/iIcGTQmB.mjs";
2
- export { e as default };
1
+ import { isFunction as e } from "@web-utils/core";
2
+ import { h as t, ref as n, resolveComponent as r } from "vue";
3
+ //#region src/components/button/AwesomeButton.vue
4
+ var i = {
5
+ name: "AwesomeButton",
6
+ inheritAttrs: !1,
7
+ props: {
8
+ type: {
9
+ type: String,
10
+ default: "primary"
11
+ },
12
+ size: String,
13
+ icon: {
14
+ type: String,
15
+ default: ""
16
+ },
17
+ nativeType: {
18
+ type: String,
19
+ default: "button"
20
+ },
21
+ loading: Boolean,
22
+ disabled: Boolean,
23
+ plain: Boolean,
24
+ autofocus: Boolean,
25
+ round: Boolean,
26
+ text: {
27
+ type: String,
28
+ default: ""
29
+ }
30
+ },
31
+ setup(i, { attrs: a, slots: o }) {
32
+ let s = r("ElButton"), { text: c, ...l } = i, { onClick: u, ...d } = a, f = n(!1), p = async (t) => {
33
+ if (f.value = !0, e(u)) try {
34
+ await u(t);
35
+ } catch (e) {
36
+ console.error(e);
37
+ }
38
+ f.value = !1;
39
+ };
40
+ return () => t(s, {
41
+ ...d,
42
+ ...l,
43
+ disabled: f.value,
44
+ onClick: p
45
+ }, { default: o.default || (() => c) });
46
+ }
47
+ };
48
+ //#endregion
49
+ export { i as default };
@@ -1,5 +1,5 @@
1
- import { i as e, n as t } from "./Uhf6MK26.mjs";
2
- import { n } from "./DnWeeCd1.mjs";
1
+ import { i as e, n as t } from "./ADvOhGAW.mjs";
2
+ import { n } from "./mjEH6tHn.mjs";
3
3
  import { computed as r, createVNode as i, isVNode as a, mergeProps as o } from "vue";
4
4
  import { ElCheckbox as s, ElCheckboxButton as c, ElCheckboxGroup as l } from "element-plus/es";
5
5
  //#region src/components/form/props/checkbox-group.ts
@@ -1,4 +1,4 @@
1
- import { t as e } from "./BdHFJ9cK.mjs";
1
+ import { t as e } from "./BVLgLg_s.mjs";
2
2
  import { formHolderContextKey as t, formItemConfigProviderContextKey as n, formItemGroupContextKey as r } from "../constants/index.mjs";
3
3
  import { computed as i, createVNode as a, h as o, inject as s, mergeProps as c, nextTick as l, unref as u, useTemplateRef as d } from "vue";
4
4
  import { ElCol as f, rowContextKey as p } from "element-plus";
@@ -1,5 +1,5 @@
1
- import { i as e, n as t, t as n } from "./Uhf6MK26.mjs";
2
- import { n as r, t as i } from "./DnWeeCd1.mjs";
1
+ import { i as e, n as t, t as n } from "./ADvOhGAW.mjs";
2
+ import { n as r, t as i } from "./mjEH6tHn.mjs";
3
3
  import { validatePhoneNum as a } from "@web-utils/core";
4
4
  import { computed as o, createVNode as s, mergeProps as c, useModel as l } from "vue";
5
5
  import { ElInput as u } from "element-plus/es";
@@ -1,5 +1,5 @@
1
- import { i as e, n as t } from "./Uhf6MK26.mjs";
2
- import { n } from "./DnWeeCd1.mjs";
1
+ import { i as e, n as t } from "./ADvOhGAW.mjs";
2
+ import { n } from "./mjEH6tHn.mjs";
3
3
  import { createVNode as r, mergeProps as i, useModel as a } from "vue";
4
4
  import { ElRate as o } from "element-plus/es";
5
5
  //#region src/components/form/props/rate.ts
@@ -1,4 +1,4 @@
1
- import { a as e } from "./BdHFJ9cK.mjs";
1
+ import { a as e } from "./BVLgLg_s.mjs";
2
2
  import { computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createSlots as o, getCurrentInstance as s, mergeModels as c, mergeProps as l, normalizeClass as u, openBlock as d, ref as f, renderSlot as p, toDisplayString as m, unref as h, useModel as g, useTemplateRef as _, withCtx as v, withModifiers as y } from "vue";
3
3
  import { ElDialog as b } from "element-plus/es";
4
4
  //#region src/components/dialog/props.ts
@@ -150,23 +150,23 @@ var x = {
150
150
  fullscreen: h(M),
151
151
  style: { "--dialog-body-height": h(P) }
152
152
  }), o({
153
- header: v(() => [p(e.$slots, "header", {}, () => [a("div", T, m(e.title), 1), a("div", E, [e.showFullscreen || e.showFullScreen ? (d(), i("i", {
153
+ header: v(() => [r(" @slot 对话框标题的内容;会替换标题部分,但会移除关闭按钮 "), p(e.$slots, "header", {}, () => [a("div", T, m(e.title), 1), a("div", E, [e.showFullscreen || e.showFullScreen ? (d(), i("i", {
154
154
  key: 0,
155
155
  class: u(["dialog-header-button", {
156
156
  "el-icon-full-screen": !e.fullscreen,
157
157
  "el-icon-copy-document": e.fullscreen
158
158
  }]),
159
159
  onClick: y(N, ["stop"])
160
- }, null, 2)) : r("", !0), e.showClose ? (d(), i("i", {
160
+ }, null, 2)) : r("v-if", !0), e.showClose ? (d(), i("i", {
161
161
  key: 1,
162
162
  class: "dialog-header-button el-icon-close",
163
163
  onClick: y(I, ["stop"])
164
- })) : r("", !0)])])]),
165
- default: v(() => [p(e.$slots, "default")]),
164
+ })) : r("v-if", !0)])])]),
165
+ default: v(() => [r(" @slot 对话框的默认内容 "), p(e.$slots, "default")]),
166
166
  _: 2
167
167
  }, [e.$slots.footer ? {
168
168
  name: "footer",
169
- fn: v(() => [p(e.$slots, "footer", { close: I })]),
169
+ fn: v(() => [r(" @slot Dialog 按钮操作区的内容 "), p(e.$slots, "footer", { close: I })]),
170
170
  key: "0"
171
171
  } : void 0]), 1040, [
172
172
  "modelValue",
@@ -1,6 +1,6 @@
1
- import { i as e, n as t } from "./Uhf6MK26.mjs";
2
- import { n, t as r } from "./DnWeeCd1.mjs";
3
- import { t as i } from "./U08ZaDiY.mjs";
1
+ import { i as e, n as t } from "./ADvOhGAW.mjs";
2
+ import { n, t as r } from "./mjEH6tHn.mjs";
3
+ import { t as i } from "./D1G2MMMx.mjs";
4
4
  import { createVNode as a, mergeProps as o, ref as s } from "vue";
5
5
  import { ElInput as c, ElPopover as l } from "element-plus/es";
6
6
  //#region src/components/form/props/input-cron.ts
@@ -1,11 +1,11 @@
1
- import { n as e } from "./BdHFJ9cK.mjs";
2
- import { hasAuthority as t } from "../api/index.mjs";
3
- import { toolbarContextKey as n } from "../constants/index.mjs";
4
- import { t as r } from "./DOl--Hf9.mjs";
5
- import { NOOP as i, capitalize as a } from "@web-utils/core";
6
- import { Comment as o, createVNode as s } from "vue";
1
+ import { n as e } from "./BVLgLg_s.mjs";
2
+ import { goBack as t, hasAuthority as n } from "../api/index.mjs";
3
+ import { toolbarContextKey as r } from "../constants/index.mjs";
4
+ import { t as i } from "./Bgny2wyC.mjs";
5
+ import { NOOP as a, capitalize as o } from "@web-utils/core";
6
+ import { Comment as s, createVNode as c } from "vue";
7
7
  //#region src/components/toolbar/Toolbar.vue?vue&type=script&lang.jsx
8
- var c = {
8
+ var l = {
9
9
  back: {
10
10
  label: "返回",
11
11
  type: "primary",
@@ -114,10 +114,10 @@ var c = {
114
114
  separateLine: !1,
115
115
  circle: !0
116
116
  }
117
- }, l = {
117
+ }, u = {
118
118
  name: "Toolbar",
119
119
  provide() {
120
- return { [n]: this };
120
+ return { [r]: this };
121
121
  },
122
122
  props: {
123
123
  searchable: Boolean,
@@ -138,47 +138,46 @@ var c = {
138
138
  computed: {},
139
139
  methods: {
140
140
  goBack() {
141
- let e = this.$route.path;
142
- this.tabs.length === 1 ? window.close() : this.$bus("closeTab", e, this);
141
+ t(this.$route.path);
143
142
  },
144
- createButton(t, { label: n, icon: o, type: c, separateLine: l = !0, loadable: u, circle: d, onClick: f, title: p }) {
143
+ createButton(t, { label: n, icon: r, type: s, separateLine: l = !0, loadable: u, circle: d, onClick: f, title: p }) {
145
144
  var m;
146
145
  let h, g = ((m = this.label) == null ? void 0 : m[t]) || n;
147
146
  return h = f || (["back", "cancel"].includes(t) ? this.goBack : (n) => {
148
- (e(this.$attrs, { withOn: !0 })[`on${a(t)}`] || i)(n);
149
- }), s(r, {
147
+ (e(this.$attrs, { withOn: !0 })[`on${o(t)}`] || a)(n);
148
+ }), c(i, {
150
149
  "separate-line": l,
151
- icon: o,
150
+ icon: r,
152
151
  title: p,
153
152
  label: g,
154
153
  loadable: u,
155
154
  circle: d,
156
155
  footer: this.footer,
157
- type: c,
156
+ type: s,
158
157
  onClick: h
159
158
  }, null);
160
159
  },
161
160
  getLeftButtons() {
162
- var e, n, r;
161
+ var e, t, r;
163
162
  let { createButton: i } = this;
164
- return (r = (((e = (n = this.$slots)["toolbar-left"]) == null ? void 0 : e.call(n)) || this.buttons.flatMap((e) => {
165
- let t = c[e];
163
+ return (r = (((e = (t = this.$slots)["toolbar-left"]) == null ? void 0 : e.call(t)) || this.buttons.flatMap((e) => {
164
+ let t = l[e];
166
165
  if (t) {
167
166
  var n, r;
168
167
  return ((n = (r = this.$slots)[e]) == null ? void 0 : n.call(r)) || i(e, t);
169
168
  } else if (e === "slot") {
170
- var a, s;
171
- let e = ((a = (s = this.$slots).default) == null ? void 0 : a.call(s, {
169
+ var a, o;
170
+ let e = ((a = (o = this.$slots).default) == null ? void 0 : a.call(o, {
172
171
  buttons: this.buttons,
173
172
  footer: this.footer
174
173
  })) ?? null;
175
174
  if (e && e.length === 1) {
176
- var l;
177
- return e == null || (l = e[0]) == null || (l = l.children) == null ? void 0 : l.filter((e) => e.type !== o);
175
+ var c;
176
+ return e == null || (c = e[0]) == null || (c = c.children) == null ? void 0 : c.filter((e) => e.type !== s);
178
177
  }
179
178
  return e || [];
180
179
  } else return null;
181
- })).filter((e) => e)) == null ? void 0 : r.filter((e) => e.props.privilege ? t(e.props.privilege) : !0);
180
+ })).filter((e) => e)) == null ? void 0 : r.filter((e) => e.props.privilege ? n(e.props.privilege) : !0);
182
181
  },
183
182
  getRightButtons() {
184
183
  var e, t, n, r;
@@ -191,18 +190,18 @@ var c = {
191
190
  return i || a;
192
191
  },
193
192
  getSearchButton() {
194
- return this.searchable ? this.createButton("search", c.search) : null;
193
+ return this.searchable ? this.createButton("search", l.search) : null;
195
194
  },
196
195
  getRefreshButton() {
197
- return this.refreshable ? this.createButton("reload", c.reload) : null;
196
+ return this.refreshable ? this.createButton("reload", l.reload) : null;
198
197
  },
199
198
  getSettingsButton() {
200
- return this.refreshable ? this.createButton("settings", c.settings) : null;
199
+ return this.refreshable ? this.createButton("settings", l.settings) : null;
201
200
  }
202
201
  },
203
202
  render() {
204
- return this.footer ? s("div", { class: "footer-bar" }, [this.getLeftButtons()]) : s("div", { class: "toolbar" }, [s("div", { class: "toolbar-left" }, [this.getLeftButtons()]), s("div", { class: "toolbar-right" }, [this.getRightButtons()])]);
203
+ return this.footer ? c("div", { class: "footer-bar" }, [this.getLeftButtons()]) : c("div", { class: "toolbar" }, [c("div", { class: "toolbar-left" }, [this.getLeftButtons()]), c("div", { class: "toolbar-right" }, [this.getRightButtons()])]);
205
204
  }
206
205
  };
207
206
  //#endregion
208
- export { l as t };
207
+ export { u as t };
@@ -1,5 +1,5 @@
1
- import { i as e, n as t } from "./Uhf6MK26.mjs";
2
- import { n } from "./DnWeeCd1.mjs";
1
+ import { i as e, n as t } from "./ADvOhGAW.mjs";
2
+ import { n } from "./mjEH6tHn.mjs";
3
3
  import { createVNode as r, mergeProps as i, useModel as a } from "vue";
4
4
  import { ElCheckbox as o } from "element-plus/es";
5
5
  //#region src/components/form/props/checkbox.ts
@@ -1,5 +1,5 @@
1
- import { i as e, n as t } from "./Uhf6MK26.mjs";
2
- import { n } from "./DnWeeCd1.mjs";
1
+ import { i as e, n as t } from "./ADvOhGAW.mjs";
2
+ import { n } from "./mjEH6tHn.mjs";
3
3
  import { computed as r, createVNode as i, mergeProps as a } from "vue";
4
4
  import { ElDatePicker as o } from "element-plus/es";
5
5
  //#region src/components/form/props/date.ts
@@ -1,5 +1,5 @@
1
- import { i as e, n as t } from "./Uhf6MK26.mjs";
2
- import { n } from "./DnWeeCd1.mjs";
1
+ import { i as e, n as t } from "./ADvOhGAW.mjs";
2
+ import { n } from "./mjEH6tHn.mjs";
3
3
  import { createVNode as r, mergeProps as i, useModel as a } from "vue";
4
4
  import { ElOption as o, ElSelect as s } from "element-plus/es";
5
5
  //#region src/components/form/props/select.ts
@@ -1,5 +1,5 @@
1
- import { i as e, n as t } from "./Uhf6MK26.mjs";
2
- import { n, t as r } from "./DnWeeCd1.mjs";
1
+ import { i as e, n as t } from "./ADvOhGAW.mjs";
2
+ import { n, t as r } from "./mjEH6tHn.mjs";
3
3
  import { useDictionary as i } from "../hook/useDictionary.mjs";
4
4
  import { findTreeChildren as a, isArray as o, isString as s, setParent as c } from "@web-utils/core";
5
5
  import { computed as l, createVNode as u, mergeProps as d } from "vue";