@web-utils/form-ui 1.0.0-beta1 → 1.0.0-beta11

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 (89) hide show
  1. package/base.css +1 -1
  2. package/chunks/8R_Eq-Q1.mjs +94 -0
  3. package/chunks/{ClNahmiU.mjs → 9r0_sTqG.mjs} +6 -6
  4. package/chunks/{CdRsyF0n.mjs → B0sH1q9x.mjs} +10 -10
  5. package/chunks/{ZsLNWI9x.mjs → B7c_xqYl.mjs} +10 -9
  6. package/chunks/C-lymD_X.mjs +167 -0
  7. package/chunks/{Bxj372sF.mjs → CBsIU5Nz.mjs} +14 -13
  8. package/chunks/CItjaxJe.mjs +28622 -0
  9. package/chunks/{CBcdalMX.mjs → CnmwUrOm.mjs} +8 -8
  10. package/chunks/{CstztYMu.mjs → CoU4aVFm.mjs} +4 -4
  11. package/chunks/{jn_iQrVZ.mjs → D6lrfzE7.mjs} +4 -4
  12. package/chunks/{DpJQABVD.mjs → DDKk9iwV.mjs} +24 -23
  13. package/chunks/{C33EmJN8.mjs → DF-zPBqJ.mjs} +6 -6
  14. package/chunks/{C6Li3-l7.mjs → DPkBzek6.mjs} +4 -4
  15. package/chunks/{Bsz7y4Xp.mjs → DQS-CovH.mjs} +16 -15
  16. package/chunks/{BO9jWhBl.mjs → DuPXiRRS.mjs} +10 -9
  17. package/chunks/EReAG82c.mjs +4 -0
  18. package/chunks/{DC9b53M6.mjs → MyHLh1cw.mjs} +6 -6
  19. package/chunks/{BZ8aOa78.mjs → TVsbSR1G.mjs} +9 -9
  20. package/chunks/{DDVAgRED.mjs → nNDPU9_n.mjs} +6 -6
  21. package/constants.d.ts +7 -0
  22. package/constants.mjs +3 -3
  23. package/element-dialog/index.d.ts +53 -0
  24. package/element-dialog/index.mjs +46 -32
  25. package/element-dialog/style.css +1 -1
  26. package/empty-view/index.d.ts +29 -0
  27. package/flex-scroll-area/index.d.ts +22 -0
  28. package/form-advice/index.d.ts +9 -0
  29. package/form-cell/index.d.ts +25 -0
  30. package/form-check-box-group/index.d.ts +119 -0
  31. package/form-check-box-group/index.mjs +1 -1
  32. package/form-checkbox/index.d.ts +107 -0
  33. package/form-checkbox/index.mjs +1 -1
  34. package/form-date-picker/index.d.ts +134 -0
  35. package/form-date-picker/index.mjs +1 -1
  36. package/form-holder/index.d.ts +95 -0
  37. package/form-holder/index.mjs +1 -1
  38. package/form-image/index.d.ts +106 -0
  39. package/form-image/index.mjs +1 -1
  40. package/form-input/index.d.ts +146 -0
  41. package/form-input/index.mjs +1 -1
  42. package/form-input/style.css +1 -0
  43. package/form-input-email/index.d.ts +105 -0
  44. package/form-input-email/index.mjs +1 -1
  45. package/form-input-id-card/index.d.ts +105 -0
  46. package/form-input-id-card/index.mjs +1 -1
  47. package/form-input-number/index.d.ts +121 -0
  48. package/form-input-number/index.mjs +1 -1
  49. package/form-input-phone-number/index.d.ts +105 -0
  50. package/form-input-phone-number/index.mjs +1 -1
  51. package/form-input-tag/index.d.ts +2 -0
  52. package/form-input-time/index.d.ts +2 -0
  53. package/form-item-config-provider/index.d.ts +20 -0
  54. package/form-item-config-provider/index.mjs +24 -0
  55. package/form-item-group/index.d.ts +18 -0
  56. package/form-item-x/index.d.ts +75 -0
  57. package/form-item-x/index.mjs +1 -1
  58. package/form-radio-group/index.d.ts +107 -0
  59. package/form-radio-group/index.mjs +1 -1
  60. package/form-rate/index.d.ts +105 -0
  61. package/form-rate/index.mjs +1 -1
  62. package/form-red-table/index.d.ts +21 -0
  63. package/form-row/index.d.ts +11 -0
  64. package/form-row/index.mjs +1 -1
  65. package/form-select/index.d.ts +107 -0
  66. package/form-select/index.mjs +1 -1
  67. package/form-slider/index.d.ts +105 -0
  68. package/form-slider/index.mjs +1 -1
  69. package/form-switch/index.d.ts +105 -0
  70. package/form-switch/index.mjs +1 -1
  71. package/form-text/index.d.ts +101 -0
  72. package/form-text/index.mjs +1 -1
  73. package/form-view/index.d.ts +2 -0
  74. package/index.d.ts +38 -0
  75. package/index.mjs +64 -37
  76. package/input/style.css +1 -1
  77. package/json-editor/index.d.ts +32 -0
  78. package/json-editor/index.mjs +2 -0
  79. package/json-editor/style.css +1 -0
  80. package/package.json +7 -7
  81. package/resolver.d.ts +9 -0
  82. package/resolver.mjs +81 -0
  83. package/table-view/index.d.ts +2 -0
  84. package/toolbar/index.d.ts +2 -0
  85. package/toolbar-button/index.d.ts +2 -0
  86. package/web-types.json +1 -1
  87. package/chunks/B4M_TFeR.mjs +0 -152
  88. package/chunks/BHNKrW1j.mjs +0 -61
  89. /package/chunks/{B5BIQCcK.mjs → 5J-OUxoQ.mjs} +0 -0
@@ -1,4 +1,4 @@
1
- import { a as e, n as t, t as n } from "./B4M_TFeR.mjs";
1
+ import { n as e, o as t, r as n } from "./C-lymD_X.mjs";
2
2
  import { ElCheckbox as r } from "element-plus/es";
3
3
  import { createVNode as i } from "vue";
4
4
  //#endregion
@@ -7,7 +7,7 @@ var a = {
7
7
  name: "FormCheckbox",
8
8
  inheritAttrs: !1,
9
9
  props: {
10
- ...t,
10
+ ...n,
11
11
  modelValue: [
12
12
  String,
13
13
  Number,
@@ -16,16 +16,16 @@ var a = {
16
16
  value: String,
17
17
  label: String
18
18
  },
19
- emits: [...n],
20
- setup(t, { emit: n, slots: a }) {
21
- let { emitInput: o, render: s, disabled: c } = e(t, {
19
+ emits: { ...e },
20
+ setup(e, { emit: n, slots: a }) {
21
+ let { emitInput: o, render: s, disabled: c } = t(e, {
22
22
  emit: n,
23
23
  slots: a
24
24
  });
25
25
  return () => s({ vNodes: i(r, {
26
- modelValue: t.modelValue,
27
- value: t.value,
28
- label: t.label,
26
+ modelValue: e.modelValue,
27
+ value: e.value,
28
+ label: e.label,
29
29
  disabled: c.value,
30
30
  "onUpdate:modelValue": o
31
31
  }, { default: a.default }) });
@@ -1,5 +1,5 @@
1
- import { i as e, n as t, t as n } from "./B4M_TFeR.mjs";
2
- import { t as r } from "./BHNKrW1j.mjs";
1
+ import { a as e, n as t, r as n } from "./C-lymD_X.mjs";
2
+ import { t as r } from "./8R_Eq-Q1.mjs";
3
3
  import { createVNode as i, isVNode as a, mergeProps as o } from "vue";
4
4
  //#region src/components/form/FormInputIdCard.vue?vue&type=script&lang.jsx
5
5
  function s(e) {
@@ -11,10 +11,10 @@ var c = {
11
11
  name: "FormInputIdCard",
12
12
  inheritAttrs: !1,
13
13
  props: {
14
- ...t,
14
+ ...n,
15
15
  modelValue: String
16
16
  },
17
- emits: [...n],
17
+ emits: { ...t },
18
18
  setup(t, { emit: n, slots: a }) {
19
19
  let c = (t) => e(n, t);
20
20
  return () => i(r, o(t, {
@@ -1,5 +1,5 @@
1
- import { i as e, n as t, t as n } from "./B4M_TFeR.mjs";
2
- import { t as r } from "./BHNKrW1j.mjs";
1
+ import { a as e, n as t, r as n } from "./C-lymD_X.mjs";
2
+ import { t as r } from "./8R_Eq-Q1.mjs";
3
3
  import { createVNode as i, isVNode as a, mergeProps as o } from "vue";
4
4
  //#region src/components/form/FormInputPhoneNumber.vue?vue&type=script&lang.jsx
5
5
  function s(e) {
@@ -11,10 +11,10 @@ var c = {
11
11
  name: "FormInputPhoneNumber",
12
12
  inheritAttrs: !1,
13
13
  props: {
14
- ...t,
14
+ ...n,
15
15
  modelValue: String
16
16
  },
17
- emits: [...n],
17
+ emits: { ...t },
18
18
  setup(t, { emit: n, slots: a }) {
19
19
  let c = (t) => e(n, t);
20
20
  return () => i(r, o(t, {
@@ -15,51 +15,52 @@ var f = (e) => {
15
15
  e = e.filter((e) => e.type !== n);
16
16
  let s = [], c = e.length === 1;
17
17
  for (let n = 0; n < e.length; n++) {
18
- let g = e[n], { name: _ } = g.type;
19
- if (g.type === i) s.push({
20
- tag: _,
18
+ let v = e[n], { name: y } = v.type;
19
+ if (v.type === i) s.push({
20
+ tag: y,
21
21
  type: "text",
22
- content: g,
22
+ content: v,
23
23
  colspan: c ? o : 0
24
24
  });
25
- else if (g.type === r) s.push(...p(g.children, { columnSize: o }));
26
- else if (u(g.type) && g.type === "td") s.push({
27
- tag: g.type,
25
+ else if (v.type === r) s.push(...p(v.children, { columnSize: o }));
26
+ else if (u(v.type) && v.type === "td") s.push({
27
+ tag: v.type,
28
28
  type: "td",
29
- content: g
29
+ content: v
30
30
  });
31
- else if (_ === "FormCell") s.push({
32
- tag: _,
31
+ else if (y === "FormCell") s.push({
32
+ tag: y,
33
33
  type: "FormCell",
34
- content: g
34
+ content: v
35
35
  });
36
- else if (typeof g.type == "object") {
37
- let { label: e, hideLabel: n, labelColspan: r, inputColspan: i, labelRowspan: u, inputRowspan: p, tipsAfterLabel: v, tips: y } = f(g.props);
36
+ else if (typeof v.type == "object") {
37
+ var d, m;
38
+ let { label: e, hideLabel: n, labelColspan: r, inputColspan: i, labelRowspan: u, inputRowspan: p, tipsAfterLabel: b, tips: x } = f(v.props);
38
39
  if (!l(n)) {
39
- var d, m, h;
40
- let n = (d = g.children) == null ? void 0 : d.tips, i = n || y ? a(t, {
40
+ var h, g, _;
41
+ let n = (h = v.children) == null ? void 0 : h.tips, i = n || x ? a(t, {
41
42
  effect: "light",
42
- content: y,
43
+ content: x,
43
44
  offset: 4
44
45
  }, {
45
46
  default: () => a("i", { class: "el-icon-info form-item-input-info" }, null),
46
47
  content: n || null
47
48
  }) : null;
48
49
  s.push({
49
- tag: _,
50
+ tag: y,
50
51
  type: "label",
51
52
  colspan: r,
52
53
  rowspan: u,
53
- content: [((m = g.children) == null || (h = m.label) == null ? void 0 : h.call(m)) || e, v === "" ? i : null]
54
+ content: [((g = v.children) == null || (_ = g.label) == null ? void 0 : _.call(g)) || e, b === "" ? i : null]
54
55
  });
55
56
  }
56
- let b;
57
- b = c && l(n) ? o : l(i) ? i : c ? o - 1 : 0, s.push({
58
- tag: _,
57
+ let S;
58
+ S = c && l(n) ? o : l(i) ? i : c ? o - 1 : 0, s.push({
59
+ tag: y,
59
60
  type: "input",
60
- colspan: b,
61
+ colspan: S,
61
62
  rowspan: p,
62
- content: g
63
+ content: [v, (d = v.children) == null || (m = d.below) == null ? void 0 : m.call(d)]
63
64
  });
64
65
  } else console.error("未知节点");
65
66
  }
@@ -1,4 +1,4 @@
1
- import { a as e, n as t, t as n } from "./B4M_TFeR.mjs";
1
+ import { n as e, o as t, r as n } from "./C-lymD_X.mjs";
2
2
  import { ElSlider as r } from "element-plus/es";
3
3
  import { createVNode as i, isVNode as a } from "vue";
4
4
  //#region src/components/form/FormSlider.vue?vue&type=script&lang.jsx
@@ -11,17 +11,17 @@ var s = {
11
11
  name: "FormSlider",
12
12
  inheritAttrs: !1,
13
13
  props: {
14
- ...t,
14
+ ...n,
15
15
  modelValue: [Number, Array]
16
16
  },
17
- emits: [...n],
18
- setup(t, { emit: n, slots: a }) {
19
- let { emitInput: s, render: c, disabled: l } = e(t, {
17
+ emits: { ...e },
18
+ setup(e, { emit: n, slots: a }) {
19
+ let { emitInput: s, render: c, disabled: l } = t(e, {
20
20
  emit: n,
21
21
  slots: a
22
22
  });
23
23
  return () => c({ vNodes: i(r, {
24
- modelValue: t.modelValue,
24
+ modelValue: e.modelValue,
25
25
  clearable: !0,
26
26
  disabled: l.value,
27
27
  "onUpdate:modelValue": s
@@ -1,5 +1,5 @@
1
- import { i as e, n as t, t as n } from "./B4M_TFeR.mjs";
2
- import { t as r } from "./BHNKrW1j.mjs";
1
+ import { a as e, n as t, r as n } from "./C-lymD_X.mjs";
2
+ import { t as r } from "./8R_Eq-Q1.mjs";
3
3
  import { createVNode as i, isVNode as a, mergeProps as o } from "vue";
4
4
  //#region src/components/form/FormInputEmail.vue?vue&type=script&lang.jsx
5
5
  function s(e) {
@@ -11,10 +11,10 @@ var c = {
11
11
  name: "FormInputEmail",
12
12
  inheritAttrs: !1,
13
13
  props: {
14
- ...t,
14
+ ...n,
15
15
  modelValue: String
16
16
  },
17
- emits: [...n],
17
+ emits: { ...t },
18
18
  setup(t, { emit: n, slots: a }) {
19
19
  let c = (t) => e(n, t);
20
20
  return () => i(r, o(t, {
@@ -1,4 +1,4 @@
1
- import { a as e, n as t, t as n } from "./B4M_TFeR.mjs";
1
+ import { n as e, o as t, r as n } from "./C-lymD_X.mjs";
2
2
  import { ElDatePicker as r } from "element-plus/es";
3
3
  import { computed as i, createVNode as a } from "vue";
4
4
  //#endregion
@@ -7,7 +7,7 @@ var o = {
7
7
  name: "FormDatePicker",
8
8
  inheritAttrs: !1,
9
9
  props: {
10
- ...t,
10
+ ...n,
11
11
  modelValue: [
12
12
  String,
13
13
  Number,
@@ -26,34 +26,35 @@ var o = {
26
26
  startDate: String,
27
27
  endDate: String
28
28
  },
29
- emits: [
30
- ...n,
31
- "update:startDate",
32
- "update:endDate"
33
- ],
34
- setup(t, { emit: n, slots: o }) {
35
- let { emitInput: s, render: c, placeholder: l, disabled: u } = e(t, {
29
+ emits: {
30
+ ...e,
31
+ "update:startDate": null,
32
+ "update:endDate": null
33
+ },
34
+ setup(e, { emit: n, slots: o }) {
35
+ let { emitInput: s, render: c, placeholder: l, disabled: u } = t(e, {
36
36
  emit: n,
37
- slots: o
37
+ slots: o,
38
+ messagePrefix: "请选择"
38
39
  }), d = i(() => {
39
- switch (t.type) {
40
+ switch (e.type) {
40
41
  case "date":
41
42
  case "daterange": return "YYYY-MM-DD";
42
43
  case "datetime":
43
44
  case "datetimerange": return "YYYY-MM-DD HH:mm:ss";
44
45
  default: return "";
45
46
  }
46
- }), f = i(() => t.split && t.type.indexOf("range") > -1), p = (e, t) => {
47
+ }), f = i(() => e.split && e.type.indexOf("range") > -1), p = (e, t) => {
47
48
  n("update:startDate", e), n("update:endDate", t);
48
49
  }, m = (e) => {
49
50
  f.value ? e ? p(e[0], e[1]) : p(null, null) : s(e);
50
- }, h = i(() => f.value ? [t.startDate, t.endDate] : t.modelValue);
51
+ }, h = i(() => f.value ? [e.startDate, e.endDate] : e.modelValue);
51
52
  return () => c({ vNodes: a(r, {
52
53
  style: "width: 100%",
53
54
  clearable: !0,
54
55
  modelValue: h.value,
55
- type: t.type,
56
- unlinkPanels: t.unlinkPanels,
56
+ type: e.type,
57
+ unlinkPanels: e.unlinkPanels,
57
58
  disabled: u.value,
58
59
  "onUpdate:modelValue": m,
59
60
  format: d.value,
@@ -1,4 +1,4 @@
1
- import { a as e, n as t, t as n } from "./B4M_TFeR.mjs";
1
+ import { n as e, o as t, r as n } from "./C-lymD_X.mjs";
2
2
  import { ElRadio as r, ElRadioGroup as i } from "element-plus/es";
3
3
  import { createVNode as a, isVNode as o } from "vue";
4
4
  //#region src/components/form/FormRadioGroup.vue?vue&type=script&lang.jsx
@@ -11,7 +11,7 @@ var c = {
11
11
  name: "FormRadioGroup",
12
12
  inheritAttrs: !1,
13
13
  props: {
14
- ...t,
14
+ ...n,
15
15
  modelValue: [
16
16
  String,
17
17
  Number,
@@ -19,22 +19,23 @@ var c = {
19
19
  ],
20
20
  options: Array
21
21
  },
22
- emits: [...n],
23
- setup(t, { emit: n, slots: o }) {
24
- let { emitInput: c, render: l, placeholder: u, disabled: d } = e(t, {
22
+ emits: { ...e },
23
+ setup(e, { emit: n, slots: o }) {
24
+ let { emitInput: c, render: l, placeholder: u, disabled: d } = t(e, {
25
25
  emit: n,
26
- slots: o
26
+ slots: o,
27
+ messagePrefix: "请选择"
27
28
  });
28
29
  return () => l({ vNodes: a(i, {
29
- modelValue: t.modelValue,
30
+ modelValue: e.modelValue,
30
31
  disabled: d.value,
31
32
  "onUpdate:modelValue": c,
32
33
  placeholder: u.value
33
34
  }, {
34
35
  ...o,
35
36
  default: o.default || (() => {
36
- var e;
37
- return (e = t.options) == null ? void 0 : e.map(({ value: e, label: t }) => a(r, {
37
+ var t;
38
+ return (t = e.options) == null ? void 0 : t.map(({ value: e, label: t }) => a(r, {
38
39
  key: e,
39
40
  value: e
40
41
  }, s(t) ? t : { default: () => [t] }));
@@ -0,0 +1,4 @@
1
+ //#region src/components/constants.ts
2
+ var e = Symbol("formItemConfigProvider");
3
+ //#endregion
4
+ export { e as t };
@@ -1,4 +1,4 @@
1
- import { a as e, n as t, t as n } from "./B4M_TFeR.mjs";
1
+ import { n as e, o as t, r as n } from "./C-lymD_X.mjs";
2
2
  import { ElRate as r } from "element-plus/es";
3
3
  import { createVNode as i, isVNode as a } from "vue";
4
4
  //#region src/components/form/FormRate.vue?vue&type=script&lang.jsx
@@ -11,17 +11,17 @@ var s = {
11
11
  name: "FormRate",
12
12
  inheritAttrs: !1,
13
13
  props: {
14
- ...t,
14
+ ...n,
15
15
  modelValue: Number
16
16
  },
17
- emits: [...n],
18
- setup(t, { emit: n, slots: a }) {
19
- let { emitInput: s, render: c, disabled: l } = e(t, {
17
+ emits: { ...e },
18
+ setup(e, { emit: n, slots: a }) {
19
+ let { emitInput: s, render: c, disabled: l } = t(e, {
20
20
  emit: n,
21
21
  slots: a
22
22
  });
23
23
  return () => c({ vNodes: i(r, {
24
- modelValue: t.modelValue,
24
+ modelValue: e.modelValue,
25
25
  clearable: !0,
26
26
  disabled: l.value,
27
27
  "onUpdate:modelValue": s
@@ -1,4 +1,4 @@
1
- import { n as e, r as t, s as n } from "./B4M_TFeR.mjs";
1
+ import { c as e, i as t, r as n } from "./C-lymD_X.mjs";
2
2
  import { ElImage as r } from "element-plus/es";
3
3
  import { createVNode as i, isVNode as a } from "vue";
4
4
  //#region src/components/form/FormImage.vue?vue&type=script&lang.jsx
@@ -11,19 +11,19 @@ var s = {
11
11
  name: "FormImage",
12
12
  inheritAttrs: !1,
13
13
  props: {
14
- ...e,
14
+ ...n,
15
15
  src: String,
16
16
  fit: String,
17
17
  hideOnClickModal: Boolean
18
18
  },
19
- setup(e, { slots: a, attrs: s }) {
20
- let c = n(e);
21
- return () => t(e, {
19
+ setup(n, { slots: a, attrs: s }) {
20
+ let c = e(n);
21
+ return () => t(n, {
22
22
  vNodes: i(r, {
23
- src: e.src,
24
- fit: e.fit,
25
- "preview-src-list": [e.src],
26
- "hide-on-click-modal": e.hideOnClickModal,
23
+ src: n.src,
24
+ fit: n.fit,
25
+ "preview-src-list": [n.src],
26
+ "hide-on-click-modal": n.hideOnClickModal,
27
27
  style: s.style
28
28
  }, o(a) ? a : { default: () => [a] }),
29
29
  formItemProps: c,
@@ -1,4 +1,4 @@
1
- import { a as e, n as t, t as n } from "./B4M_TFeR.mjs";
1
+ import { n as e, o as t, r as n } from "./C-lymD_X.mjs";
2
2
  import { ElSwitch as r } from "element-plus/es";
3
3
  import { createVNode as i, isVNode as a } from "vue";
4
4
  //#region src/components/form/FormSwitch.vue?vue&type=script&lang.jsx
@@ -11,21 +11,21 @@ var s = {
11
11
  name: "FormSwitch",
12
12
  inheritAttrs: !1,
13
13
  props: {
14
- ...t,
14
+ ...n,
15
15
  modelValue: [
16
16
  Boolean,
17
17
  String,
18
18
  Number
19
19
  ]
20
20
  },
21
- emits: [...n],
22
- setup(t, { emit: n, slots: a }) {
23
- let { emitInput: s, render: c, disabled: l } = e(t, {
21
+ emits: { ...e },
22
+ setup(e, { emit: n, slots: a }) {
23
+ let { emitInput: s, render: c, disabled: l } = t(e, {
24
24
  emit: n,
25
25
  slots: a
26
26
  });
27
27
  return () => c({ vNodes: i(r, {
28
- modelValue: t.modelValue,
28
+ modelValue: e.modelValue,
29
29
  clearable: !0,
30
30
  disabled: l.value,
31
31
  "onUpdate:modelValue": s
package/constants.d.ts ADDED
@@ -0,0 +1,7 @@
1
+ import { InjectionKey } from 'vue';
2
+ export declare const formHolderContextKey: unique symbol;
3
+ export declare const formItemConfigProviderContextKey: InjectionKey<{
4
+ reactive: boolean;
5
+ block: boolean;
6
+ wrapCol: boolean;
7
+ }>;
package/constants.mjs CHANGED
@@ -1,4 +1,4 @@
1
- //#region src/components/constants.js
2
- var e = Symbol("formHolder");
1
+ //#region src/components/constants.ts
2
+ var e = Symbol("formHolder"), t = Symbol("formItemConfigProvider");
3
3
  //#endregion
4
- export { e as formHolderKey };
4
+ export { e as formHolderContextKey, t as formItemConfigProviderContextKey };
@@ -0,0 +1,53 @@
1
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
2
+ export default _default;
3
+ type __VLS_WithTemplateSlots<T, S> = T & (new () => {
4
+ $slots: S;
5
+ });
6
+ declare const __VLS_component: import('vue').DefineComponent<{}, {
7
+ close: () => void;
8
+ hide: () => void;
9
+ $emit: (event: "toggle-fullscreen", ...args: any[]) => void;
10
+ embed: boolean;
11
+ showClose: boolean;
12
+ overflow: boolean;
13
+ closeOnClickModal: boolean;
14
+ destroyOnClose: boolean;
15
+ draggable: boolean;
16
+ showFullscreen: boolean;
17
+ showFullScreen: boolean;
18
+ alignCenter: boolean;
19
+ appendToBody: boolean;
20
+ height?: string | undefined;
21
+ width?: string | undefined;
22
+ title?: string | undefined;
23
+ $props: {
24
+ readonly embed?: boolean | undefined;
25
+ readonly showClose?: boolean | undefined;
26
+ readonly overflow?: boolean | undefined;
27
+ readonly closeOnClickModal?: boolean | undefined;
28
+ readonly destroyOnClose?: boolean | undefined;
29
+ readonly draggable?: boolean | undefined;
30
+ readonly showFullscreen?: boolean | undefined;
31
+ readonly showFullScreen?: boolean | undefined;
32
+ readonly alignCenter?: boolean | undefined;
33
+ readonly appendToBody?: boolean | undefined;
34
+ readonly height?: string | undefined;
35
+ readonly width?: string | undefined;
36
+ readonly title?: string | undefined;
37
+ };
38
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
39
+ dialog: unknown;
40
+ }, any>;
41
+ type __VLS_TemplateResult = {
42
+ attrs: Partial<{}>;
43
+ slots: {
44
+ default?(_: {}): any;
45
+ footer?(_: {
46
+ close: () => void;
47
+ }): any;
48
+ };
49
+ refs: {
50
+ dialog: unknown;
51
+ };
52
+ rootEl: any;
53
+ };
@@ -1,12 +1,13 @@
1
1
  import { ElDialog as e } from "element-plus/es";
2
- import { computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createSlots as o, mergeModels as s, normalizeClass as c, openBlock as l, ref as u, renderSlot as d, toDisplayString as f, unref as p, useCssVars as m, useModel as h, useTemplateRef as g, withCtx as _, withModifiers as v } from "vue";
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, normalizeClass as l, normalizeStyle 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
  //#region src/components/ElementDialog.vue
4
- var y = { class: "dialog-title" }, b = { class: "dialog-header-buttons" }, x = /* @__PURE__ */ Object.assign({ name: "ElementDialog" }, {
4
+ var b = { class: "dialog-title" }, x = { class: "dialog-header-buttons" }, S = {
5
5
  __name: "ElementDialog",
6
- props: /* @__PURE__ */ s({
6
+ props: /* @__PURE__ */ c({
7
7
  height: String,
8
8
  width: String,
9
9
  title: String,
10
+ embed: Boolean,
10
11
  showClose: Boolean,
11
12
  overflow: Boolean,
12
13
  closeOnClickModal: Boolean,
@@ -16,62 +17,75 @@ var y = { class: "dialog-title" }, b = { class: "dialog-header-buttons" }, x = /
16
17
  default: !0
17
18
  },
18
19
  showFullscreen: Boolean,
19
- alignCenter: Boolean
20
+ showFullScreen: Boolean,
21
+ alignCenter: Boolean,
22
+ appendToBody: {
23
+ type: Boolean,
24
+ default: !0
25
+ }
20
26
  }, {
21
27
  modelValue: { type: Boolean },
22
28
  modelModifiers: {}
23
29
  }),
24
- emits: ["update:modelValue"],
25
- setup(s) {
26
- m((e) => ({ v0c07b947: p(T) }));
27
- let x = h(s, "modelValue"), S = s, C = g("dialog"), w = u(!1), T = t(() => w.value ? "100%" : S.height), E = () => {
28
- C.value.handleClose();
30
+ emits: /* @__PURE__ */ c(["toggle-fullscreen"], ["update:modelValue"]),
31
+ setup(c, { expose: S, emit: C }) {
32
+ let w = g(c, "modelValue"), T = c, E = C, D = _("dialog"), O = f(!1), k = () => {
33
+ O.value = !O.value, E("toggle-fullscreen", O.value);
34
+ }, A = t(() => O.value ? "100%" : T.height), j = s(), M = () => {
35
+ T.embed ? j.parent.emit("update:visible") : D.value.handleClose();
29
36
  };
30
- return (t, u) => {
31
- let m = e;
32
- return l(), n(m, {
37
+ return S({
38
+ close: M,
39
+ hide: M
40
+ }), (t, s) => {
41
+ let f = e;
42
+ return d(), n(f, {
33
43
  ref: "dialog",
34
- modelValue: x.value,
35
- "onUpdate:modelValue": u[1] || (u[1] = (e) => x.value = e),
36
- fullscreen: p(w),
37
- "show-close": s.showClose,
38
- "destroy-on-close": s.destroyOnClose,
39
- draggable: s.draggable,
40
- overflow: s.overflow,
41
- "align-center": s.alignCenter,
42
- width: s.width,
43
- "close-on-click-modal": s.closeOnClickModal
44
+ modelValue: w.value,
45
+ "onUpdate:modelValue": s[0] || (s[0] = (e) => w.value = e),
46
+ "append-to-body": c.appendToBody,
47
+ fullscreen: h(O),
48
+ "show-close": c.showClose,
49
+ "destroy-on-close": c.destroyOnClose,
50
+ draggable: c.draggable,
51
+ overflow: c.overflow,
52
+ "align-center": c.alignCenter,
53
+ style: u({ "--dialog-body-height": h(A) }),
54
+ width: c.width,
55
+ "close-on-click-modal": c.closeOnClickModal
44
56
  }, o({
45
- header: _(() => [a("div", y, f(s.title), 1), a("div", b, [s.showFullscreen ? (l(), i("i", {
57
+ header: v(() => [a("div", b, m(c.title), 1), a("div", x, [c.showFullscreen || c.showFullScreen ? (d(), i("i", {
46
58
  key: 0,
47
- class: c(["dialog-header-button", {
48
- "el-icon-full-screen": !p(w),
49
- "el-icon-copy-document": p(w)
59
+ class: l(["dialog-header-button", {
60
+ "el-icon-full-screen": !h(O),
61
+ "el-icon-copy-document": h(O)
50
62
  }]),
51
- onClick: u[0] || (u[0] = v((e) => w.value = !p(w), ["stop"]))
63
+ onClick: y(k, ["stop"])
52
64
  }, null, 2)) : r("v-if", !0), a("i", {
53
65
  class: "dialog-header-button el-icon-close",
54
- onClick: v(E, ["stop"])
66
+ onClick: y(M, ["stop"])
55
67
  })])]),
56
- default: _(() => [d(t.$slots, "default")]),
68
+ default: v(() => [p(t.$slots, "default")]),
57
69
  _: 2
58
70
  }, [t.$slots.footer ? {
59
71
  name: "footer",
60
- fn: _(() => [d(t.$slots, "footer", { close: E })]),
72
+ fn: v(() => [p(t.$slots, "footer", { close: M })]),
61
73
  key: "0"
62
74
  } : void 0]), 1032, [
63
75
  "modelValue",
76
+ "append-to-body",
64
77
  "fullscreen",
65
78
  "show-close",
66
79
  "destroy-on-close",
67
80
  "draggable",
68
81
  "overflow",
69
82
  "align-center",
83
+ "style",
70
84
  "width",
71
85
  "close-on-click-modal"
72
86
  ]);
73
87
  };
74
88
  }
75
- });
89
+ };
76
90
  //#endregion
77
- export { x as default };
91
+ export { S as default };
@@ -1 +1 @@
1
- .el-dialog{border-radius:4px 4px 0 0;flex-direction:column;padding:0;display:flex}.el-dialog .dialog-title{min-height:20px}.el-dialog .el-dialog__header{color:#fff;background-color:#025cde;border-radius:4px 4px 0 0;justify-content:center;align-items:center;padding:6px 10px;display:flex;position:relative}.el-dialog .dialog-header-buttons{display:flex;position:absolute;top:50%;right:10px;transform:translateY(-50%)}.el-dialog .dialog-header-button{cursor:pointer;padding:2px;font-size:14px}.el-dialog .dialog-header-button+.dialog-header-button{margin-left:10px}.el-dialog .dialog-header-button:hover{background-color:#0000004d;border-radius:2px}.el-dialog .dialog-header-button.el-icon-close:hover{background-color:#e34e55;border-radius:2px}.el-dialog .el-dialog__body{height:var(--v0c07b947);flex:auto;min-height:40vh;padding:10px}.el-dialog .el-dialog__footer{border-top:1px solid #dddee3;padding:10px}
1
+ :root{--dialog-header-background-color:#025cde}.el-dialog{border-radius:4px 4px 0 0;flex-direction:column;padding:0;display:flex}.el-dialog .dialog-title{min-height:20px}.el-dialog .el-dialog__header{color:#fff;background-color:var(--dialog-header-background-color);border-radius:4px 4px 0 0;justify-content:center;align-items:center;padding:6px 10px;line-height:normal;display:flex;position:relative}.el-dialog .dialog-header-buttons{display:flex;position:absolute;top:50%;right:10px;transform:translateY(-50%)}.el-dialog .dialog-header-button{cursor:pointer;padding:2px;font-size:14px}.el-dialog .dialog-header-button+.dialog-header-button{margin-left:10px}.el-dialog .dialog-header-button:hover{background-color:#0000004d;border-radius:2px}.el-dialog .dialog-header-button.el-icon-close:hover{background-color:#e34e55;border-radius:2px}.el-dialog .el-dialog__body{height:var(--dialog-body-height);flex:auto;min-height:40vh;padding:10px}.el-dialog .el-dialog__footer{border-top:1px solid #dddee3;padding:10px}
@@ -0,0 +1,29 @@
1
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
2
+ export default _default;
3
+ type __VLS_WithTemplateSlots<T, S> = T & (new () => {
4
+ $slots: S;
5
+ });
6
+ declare const __VLS_component: import('vue').DefineComponent<{}, {
7
+ height: string;
8
+ emptyTips: string;
9
+ fontSize: string;
10
+ icon: string;
11
+ iconSize: string;
12
+ showIcon: boolean;
13
+ $props: {
14
+ readonly height?: string | undefined;
15
+ readonly emptyTips?: string | undefined;
16
+ readonly fontSize?: string | undefined;
17
+ readonly icon?: string | undefined;
18
+ readonly iconSize?: string | undefined;
19
+ readonly showIcon?: boolean | undefined;
20
+ };
21
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
22
+ type __VLS_TemplateResult = {
23
+ attrs: Partial<{}>;
24
+ slots: {
25
+ default?(_: {}): any;
26
+ };
27
+ refs: {};
28
+ rootEl: HTMLDivElement;
29
+ };