@silver-formily/element-plus 2.3.0 → 3.0.0

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 (145) hide show
  1. package/esm/__builtins__/index.mjs +20 -19
  2. package/esm/__builtins__/shared/index.mjs +11 -10
  3. package/esm/__builtins__/shared/transform-component.d.ts +1 -1
  4. package/esm/__builtins__/shared/utils.d.ts +1 -0
  5. package/esm/__builtins__/shared/utils.mjs +22 -18
  6. package/esm/__builtins__/shared/utils.mjs.map +1 -1
  7. package/esm/array-base/index.mjs +27 -27
  8. package/esm/array-base/index.mjs.map +1 -1
  9. package/esm/array-base/symbols.mjs +1 -1
  10. package/esm/array-base/symbols.mjs.map +1 -1
  11. package/esm/array-base/utils.d.ts +0 -1
  12. package/esm/array-base/utils.mjs +27 -35
  13. package/esm/array-base/utils.mjs.map +1 -1
  14. package/esm/array-cards/index.mjs +1 -1
  15. package/esm/array-cards/index.mjs.map +1 -1
  16. package/esm/array-collapse/index.mjs +2 -5
  17. package/esm/array-collapse/index.mjs.map +1 -1
  18. package/esm/array-items/index.mjs +1 -1
  19. package/esm/array-list-tabs/index.mjs +9 -9
  20. package/esm/array-table/index.mjs +7 -9
  21. package/esm/array-table/index.mjs.map +1 -1
  22. package/esm/array-tabs/index.mjs +1 -2
  23. package/esm/array-tabs/index.mjs.map +1 -1
  24. package/esm/autocomplete/autocomplete.d.ts +16 -16
  25. package/esm/autocomplete/index.d.ts +8 -8
  26. package/esm/autocomplete/index.mjs +2 -2
  27. package/esm/autocomplete/index.mjs.map +1 -1
  28. package/esm/cascader/index.mjs +2 -2
  29. package/esm/checkbox/index.d.ts +27 -27
  30. package/esm/checkbox/index.mjs +7 -12
  31. package/esm/checkbox/index.mjs.map +1 -1
  32. package/esm/editable/editable.d.ts +14 -12
  33. package/esm/editable/index.d.ts +7 -6
  34. package/esm/editable/index.mjs +57 -61
  35. package/esm/editable/index.mjs.map +1 -1
  36. package/esm/env.d.d.ts +1 -0
  37. package/esm/form/form.mjs +5 -5
  38. package/esm/form-button-group/form-button-group.d.ts +9 -0
  39. package/esm/form-button-group/index.d.ts +15 -0
  40. package/esm/form-button-group/index.mjs +33 -25
  41. package/esm/form-button-group/index.mjs.map +1 -1
  42. package/esm/form-collapse/index.mjs +1 -1
  43. package/esm/form-collapse/utils.mjs +0 -2
  44. package/esm/form-collapse/utils.mjs.map +1 -1
  45. package/esm/form-dialog/index.mjs +63 -70
  46. package/esm/form-dialog/index.mjs.map +1 -1
  47. package/esm/form-drawer/index.mjs +62 -69
  48. package/esm/form-drawer/index.mjs.map +1 -1
  49. package/esm/form-grid/form-grid.d.ts +2 -2
  50. package/esm/form-grid/hooks.d.ts +1 -2
  51. package/esm/form-grid/hooks.mjs +4 -11
  52. package/esm/form-grid/hooks.mjs.map +1 -1
  53. package/esm/form-grid/index.mjs +38 -35
  54. package/esm/form-grid/index.mjs.map +1 -1
  55. package/esm/form-item/index.d.ts +1 -0
  56. package/esm/form-item/index.mjs +102 -107
  57. package/esm/form-item/index.mjs.map +1 -1
  58. package/esm/form-item/types.d.ts +12 -6
  59. package/esm/form-layout/form-layout.mjs +2 -2
  60. package/esm/form-layout/utils.mjs +24 -24
  61. package/esm/form-layout/utils.mjs.map +1 -1
  62. package/esm/form-step/index.mjs +2 -2
  63. package/esm/form-step/utils.mjs +0 -3
  64. package/esm/form-step/utils.mjs.map +1 -1
  65. package/esm/form-tab/hooks.d.ts +2 -1
  66. package/esm/form-tab/hooks.mjs +13 -20
  67. package/esm/form-tab/hooks.mjs.map +1 -1
  68. package/esm/form-tab/index.mjs +38 -39
  69. package/esm/form-tab/index.mjs.map +1 -1
  70. package/esm/index.d.ts +2 -0
  71. package/esm/index.mjs +62 -58
  72. package/esm/index.mjs.map +1 -1
  73. package/esm/input/index.mjs +2 -2
  74. package/esm/input-number/index.d.ts +15 -15
  75. package/esm/input-tag/index.mjs +2 -2
  76. package/esm/mention/index.mjs +2 -2
  77. package/esm/pagination/pagination.mjs +1 -1
  78. package/esm/pagination/pagination.mjs.map +1 -1
  79. package/esm/preview-text/index.mjs +33 -42
  80. package/esm/preview-text/index.mjs.map +1 -1
  81. package/esm/preview-text/utils.mjs +1 -1
  82. package/esm/preview-text/utils.mjs.map +1 -1
  83. package/esm/query-form/default-components.d.ts +5 -0
  84. package/esm/query-form/default-components.mjs +47 -0
  85. package/esm/query-form/default-components.mjs.map +1 -0
  86. package/esm/query-form/hooks.d.ts +25 -0
  87. package/esm/query-form/hooks.mjs +29 -0
  88. package/esm/query-form/hooks.mjs.map +1 -0
  89. package/esm/query-form/index.d.ts +117 -0
  90. package/esm/query-form/index.mjs +331 -0
  91. package/esm/query-form/index.mjs.map +1 -0
  92. package/esm/query-form/query-form-light.d.ts +27 -0
  93. package/esm/query-form/query-form.d.ts +52 -0
  94. package/esm/query-form/types.d.ts +44 -0
  95. package/esm/query-form/types.mjs +2 -0
  96. package/esm/query-form/types.mjs.map +1 -0
  97. package/esm/query-form-item/index.d.ts +151 -0
  98. package/esm/query-form-item/index.mjs +181 -0
  99. package/esm/query-form-item/index.mjs.map +1 -0
  100. package/esm/query-form-item/query-form-item.d.ts +96 -0
  101. package/esm/query-form-item/types.d.ts +46 -0
  102. package/esm/query-form-item/types.mjs +2 -0
  103. package/esm/query-form-item/types.mjs.map +1 -0
  104. package/esm/radio/index.d.ts +18 -18
  105. package/esm/radio/index.mjs +7 -12
  106. package/esm/radio/index.mjs.map +1 -1
  107. package/esm/reset/index.mjs +2 -2
  108. package/esm/segmented/index.mjs +2 -2
  109. package/esm/select/index.d.ts +16 -16
  110. package/esm/select/index.mjs +1 -1
  111. package/esm/select-table/index.d.ts +6 -6
  112. package/esm/select-table/index.mjs +22 -24
  113. package/esm/select-table/index.mjs.map +1 -1
  114. package/esm/select-table/select-table.d.ts +2 -2
  115. package/esm/shared/overlay-elements.mjs +14 -11
  116. package/esm/shared/overlay-elements.mjs.map +1 -1
  117. package/esm/styles/form-button-group/index.css +1 -1
  118. package/esm/styles/form-grid/index.css +1 -1
  119. package/esm/styles/form-item/index.css +1 -1
  120. package/esm/styles/query-form/index.css +1 -0
  121. package/esm/styles/query-form-item/index.css +1 -0
  122. package/esm/submit/index.mjs +3 -3
  123. package/esm/submit/index.mjs.map +1 -1
  124. package/esm/switch/index.d.ts +9 -9
  125. package/esm/time-select/index.d.ts +12 -12
  126. package/esm/transfer/index.d.ts +12 -12
  127. package/esm/tree/index.mjs +3 -3
  128. package/esm/tree/utils.mjs +0 -2
  129. package/esm/tree/utils.mjs.map +1 -1
  130. package/esm/tree-select/index.mjs +2 -2
  131. package/esm/upload/index.d.ts +12 -12
  132. package/esm/upload/index.mjs +3 -3
  133. package/esm/upload/upload.d.ts +24 -24
  134. package/esm/vendor/icon.mjs.map +1 -1
  135. package/esm/vendor/lodash.mjs +777 -663
  136. package/esm/vendor/lodash.mjs.map +1 -1
  137. package/esm/vendor/runtime.mjs +23 -29
  138. package/esm/vendor/runtime.mjs.map +1 -1
  139. package/esm/vendor/shared.esm-bundler.mjs +2 -7
  140. package/esm/vendor/shared.esm-bundler.mjs.map +1 -1
  141. package/esm/vendor/sizes.mjs.map +1 -1
  142. package/esm/vendor/types.mjs +5 -5
  143. package/esm/vendor/types.mjs.map +1 -1
  144. package/package.json +89 -115
  145. package/LICENSE +0 -21
@@ -1,6 +1,6 @@
1
1
  import { useField as S, connect as b, mapProps as P } from "@silver-formily/vue";
2
2
  import { PreviewText as h } from "../preview-text/index.mjs";
3
- import { defineComponent as C, useSlots as E, createBlock as f, openBlock as s, unref as e, normalizeProps as K, guardReactiveProps as _, createSlots as B, withCtx as t, createElementBlock as u, Fragment as m, renderList as y, mergeProps as d, renderSlot as n, createCommentVNode as c } from "vue";
3
+ import { defineComponent as C, useSlots as E, openBlock as s, createBlock as f, unref as e, normalizeProps as K, guardReactiveProps as _, createSlots as B, withCtx as t, createElementBlock as u, Fragment as m, renderList as y, mergeProps as d, renderSlot as n, createCommentVNode as c } from "vue";
4
4
  import { ElSelect as F, ElOptionGroup as R, ElOption as k } from "element-plus";
5
5
  import { o as w } from "../vendor/lodash.mjs";
6
6
  import { useCleanAttrs as A } from "../__builtins__/shared/utils.mjs";
@@ -4,9 +4,9 @@ declare const SelectTable: {
4
4
  }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
5
5
  "update:modelValue": (...args: any[]) => void;
6
6
  }, import('vue').PublicProps, {
7
- mode: "multiple" | "single";
8
- loading: boolean;
9
7
  dataSource: any[];
8
+ loading: boolean;
9
+ mode: "multiple" | "single";
10
10
  columns: import('element-plus').Column<any>[];
11
11
  valueType: "all" | "parent" | "child" | "path";
12
12
  optionAsValue: boolean;
@@ -1522,9 +1522,9 @@ declare const SelectTable: {
1522
1522
  }, Readonly<import('./types').ISelectTableProps> & Readonly<{
1523
1523
  "onUpdate:modelValue"?: (...args: any[]) => any;
1524
1524
  }>, {}, {}, {}, {}, {
1525
- mode: "multiple" | "single";
1526
- loading: boolean;
1527
1525
  dataSource: any[];
1526
+ loading: boolean;
1527
+ mode: "multiple" | "single";
1528
1528
  columns: import('element-plus').Column<any>[];
1529
1529
  valueType: "all" | "parent" | "child" | "path";
1530
1530
  optionAsValue: boolean;
@@ -1540,9 +1540,9 @@ declare const SelectTable: {
1540
1540
  }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
1541
1541
  "update:modelValue": (...args: any[]) => void;
1542
1542
  }, string, {
1543
- mode: "multiple" | "single";
1544
- loading: boolean;
1545
1543
  dataSource: any[];
1544
+ loading: boolean;
1545
+ mode: "multiple" | "single";
1546
1546
  columns: import('element-plus').Column<any>[];
1547
1547
  valueType: "all" | "parent" | "child" | "path";
1548
1548
  optionAsValue: boolean;
@@ -1,5 +1,5 @@
1
1
  import { useField as W, connect as z, mapProps as G } from "@silver-formily/vue";
2
- import { defineComponent as U, ref as g, computed as j, watch as R, nextTick as v, createElementBlock as S, openBlock as c, normalizeClass as A, unref as n, createCommentVNode as J, withDirectives as Q, createElementVNode as X, createVNode as V, toDisplayString as Y, withCtx as f, createTextVNode as C, createBlock as y, mergeProps as w, renderSlot as Z, Fragment as ee, renderList as le } from "vue";
2
+ import { defineComponent as U, ref as g, computed as j, watch as R, nextTick as v, openBlock as s, createElementBlock as S, normalizeClass as A, unref as n, createElementVNode as J, toDisplayString as Q, createVNode as V, withCtx as f, createTextVNode as C, createCommentVNode as X, withDirectives as Y, createBlock as y, mergeProps as w, renderSlot as Z, Fragment as ee, renderList as le } from "vue";
3
3
  import { isValid as te, isEqual as oe, isFn as ae } from "@formily/shared";
4
4
  import { useAttrs as re, ElLink as ne, version as E, ElTable as ue, ElTableColumn as b, ElRadioGroup as ie, ElRadio as se, vLoading as ce } from "element-plus";
5
5
  import { u as x, x as de, d as me, a as fe, r as pe } from "../vendor/lodash.mjs";
@@ -26,11 +26,11 @@ import '../styles/select-table/index.css';const ye = /* @__PURE__ */ U({
26
26
  },
27
27
  emits: ["update:modelValue"],
28
28
  setup(B, { emit: D }) {
29
- const e = B, d = D, _ = re(), q = W();
29
+ const e = B, c = D, _ = re(), q = W();
30
30
  function F(l) {
31
31
  return L(E, "2.6.0") ? { label: l } : { value: l };
32
32
  }
33
- const s = g(), t = e.rowKey;
33
+ const d = g(), t = e.rowKey;
34
34
  function M() {
35
35
  return e.mode === "multiple" ? e.modelValue?.map((l) => e.optionAsValue ? l : {
36
36
  [t]: l
@@ -45,9 +45,9 @@ import '../styles/select-table/index.css';const ye = /* @__PURE__ */ U({
45
45
  const l = x(
46
46
  u.value.map((a) => a[t])
47
47
  );
48
- if (await v(), !!s.value)
49
- for (const a of e.dataSource)
50
- l.includes(a[t]) && (e.mode === "multiple" ? s.value?.toggleRowSelection(a, !0, e.ignoreSelectable) : (s.value?.setCurrentRow(a), T(a))), await v(), p = s.value?.getSelectionRows();
48
+ await v();
49
+ for (const a of e.dataSource)
50
+ l.includes(a[t]) && (e.mode === "multiple" ? d.value?.toggleRowSelection(a, !0, e.ignoreSelectable) : (d.value?.setCurrentRow(a), T(a))), await v(), p = d.value?.getSelectionRows();
51
51
  },
52
52
  { immediate: !0 }
53
53
  ), R(
@@ -57,9 +57,8 @@ import '../styles/select-table/index.css';const ye = /* @__PURE__ */ U({
57
57
  if (e.mode === "single")
58
58
  m.value = e.optionAsValue ? l[t] : l;
59
59
  else {
60
- if (await v(), !s.value)
61
- return;
62
- const r = s.value?.getSelectionRows().map((i) => i[t]), o = e.optionAsValue ? l?.map((i) => i[t]) : l ?? [];
60
+ await v();
61
+ const r = d.value?.getSelectionRows().map((i) => i[t]), o = e.optionAsValue ? l?.map((i) => i[t]) : l ?? [];
63
62
  if (u.value = u.value.filter(
64
63
  (i) => o.includes(i[t])
65
64
  ), oe(o, r))
@@ -68,7 +67,7 @@ import '../styles/select-table/index.css';const ye = /* @__PURE__ */ U({
68
67
  for (const i of e.dataSource)
69
68
  if (I.includes(i[t])) {
70
69
  const O = o.includes(i[t]);
71
- s.value.toggleRowSelection(i, O, e.ignoreSelectable);
70
+ d.value.toggleRowSelection(i, O, e.ignoreSelectable);
72
71
  }
73
72
  }
74
73
  },
@@ -77,7 +76,6 @@ import '../styles/select-table/index.css';const ye = /* @__PURE__ */ U({
77
76
  }
78
77
  );
79
78
  function h(l) {
80
- /* istanbul ignore if -- @preserve */
81
79
  if (!t)
82
80
  throw new Error("rowKey is required");
83
81
  const a = p.length > l.length ? me(
@@ -93,16 +91,16 @@ import '../styles/select-table/index.css';const ye = /* @__PURE__ */ U({
93
91
  pe(u.value, (o) => r.includes(o[t]));
94
92
  }
95
93
  if (e.optionAsValue)
96
- d("update:modelValue", u.value);
94
+ c("update:modelValue", u.value);
97
95
  else {
98
96
  const r = u.value.map(
99
97
  (o) => o[t]
100
98
  );
101
- d("update:modelValue", r);
99
+ c("update:modelValue", r);
102
100
  }
103
101
  }
104
102
  function T(l) {
105
- m.value = l[t], e.optionAsValue ? d("update:modelValue", l) : d("update:modelValue", l[t]);
103
+ m.value = l[t], e.optionAsValue ? c("update:modelValue", l) : c("update:modelValue", l[t]);
106
104
  }
107
105
  function P(l, a, r) {
108
106
  if (e.clickRowToSelect)
@@ -115,19 +113,19 @@ import '../styles/select-table/index.css';const ye = /* @__PURE__ */ U({
115
113
  }
116
114
  }
117
115
  function $() {
118
- e.mode === "multiple" ? (d("update:modelValue", []), u.value = []) : (m.value = null, d("update:modelValue", null));
116
+ e.mode === "multiple" ? (c("update:modelValue", []), u.value = []) : (m.value = null, c("update:modelValue", null));
119
117
  }
120
118
  function H(l, a) {
121
119
  return e.selectable && ae(e.selectable) ? e.selectable(l, a, q.value) : !0;
122
120
  }
123
- return (l, a) => (c(), S("div", {
121
+ return (l, a) => (s(), S("div", {
124
122
  class: A(`${n(K)}-select-table`)
125
123
  }, [
126
- k.value > 0 && e.showAlertToolbar ? (c(), S("div", {
124
+ k.value > 0 && e.showAlertToolbar ? (s(), S("div", {
127
125
  key: 0,
128
126
  class: A(`${n(K)}-select-table-alert-container`)
129
127
  }, [
130
- X("span", null, "已选择 " + Y(k.value) + " 项", 1),
128
+ J("span", null, "已选择 " + Q(k.value) + " 项", 1),
131
129
  V(n(ne), {
132
130
  type: "primary",
133
131
  underline: n(L)(n(E), "2.9.9") ? !1 : "never",
@@ -139,10 +137,10 @@ import '../styles/select-table/index.css';const ye = /* @__PURE__ */ U({
139
137
  ])]),
140
138
  _: 1
141
139
  }, 8, ["underline"])
142
- ], 2)) : J("", !0),
143
- Q((c(), y(n(ue), w({
140
+ ], 2)) : X("", !0),
141
+ Y((s(), y(n(ue), w({
144
142
  ref_key: "elTableRef",
145
- ref: s
143
+ ref: d
146
144
  }, n(_), {
147
145
  "row-key": n(t),
148
146
  "row-class-name": e.clickRowToSelect ? "--click-row-select" : "",
@@ -153,11 +151,11 @@ import '../styles/select-table/index.css';const ye = /* @__PURE__ */ U({
153
151
  onRowClick: P
154
152
  }), {
155
153
  default: f(() => [
156
- e.mode === "multiple" ? (c(), y(n(b), {
154
+ e.mode === "multiple" ? (s(), y(n(b), {
157
155
  key: 0,
158
156
  type: "selection",
159
157
  selectable: H
160
- })) : (c(), y(n(b), {
158
+ })) : (s(), y(n(b), {
161
159
  key: 1,
162
160
  width: "46"
163
161
  }, {
@@ -182,7 +180,7 @@ import '../styles/select-table/index.css';const ye = /* @__PURE__ */ U({
182
180
  ]),
183
181
  _: 1
184
182
  })),
185
- e.columns.length === 0 ? Z(l.$slots, "default", { key: 2 }) : (c(!0), S(ee, { key: 3 }, le(e.columns, (r) => (c(), y(n(b), w({ ref_for: !0 }, r, {
183
+ e.columns.length === 0 ? Z(l.$slots, "default", { key: 2 }) : (s(!0), S(ee, { key: 3 }, le(e.columns, (r) => (s(), y(n(b), w({ ref_for: !0 }, r, {
186
184
  key: r.prop || r.type
187
185
  }), null, 16))), 128))
188
186
  ]),
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../src/select-table/select-table.vue","../../src/select-table/index.ts"],"sourcesContent":["<script setup lang=\"ts\">\r\nimport type { TableInstance } from 'element-plus'\r\nimport type { ISelectTableProps } from './types'\r\nimport { isEqual, isFn, isValid } from '@formily/shared'\r\nimport { useField } from '@silver-formily/vue'\r\nimport {\r\n ElLink,\r\n ElRadio,\r\n ElRadioGroup,\r\n ElTable,\r\n ElTableColumn,\r\n useAttrs,\r\n version,\r\n vLoading,\r\n} from 'element-plus'\r\nimport { differenceWith, remove, uniq, uniqWith, xor } from 'lodash-es'\r\nimport { computed, nextTick, ref, watch } from 'vue'\r\nimport { lt, stylePrefix } from '../__builtins__'\r\n\r\ndefineOptions({\r\n name: 'FSelectTable',\r\n inheritAttrs: false,\r\n})\r\n\r\nconst props = withDefaults(defineProps<ISelectTableProps>(), {\r\n columns: () => [],\r\n mode: 'multiple',\r\n dataSource: () => [],\r\n optionAsValue: false,\r\n valueType: 'all',\r\n loading: false,\r\n clickRowToSelect: true,\r\n showAlertToolbar: true,\r\n ignoreSelectable: true,\r\n})\r\n\r\nconst emit = defineEmits(['update:modelValue'])\r\n\r\nconst elTableProps = useAttrs()\r\nconst field = useField()\r\n\r\nfunction compatibleRadioValue(key: string) {\r\n return lt(version, '2.6.0') ? { label: key } : { value: key }\r\n}\r\n\r\nconst elTableRef = ref<TableInstance>()\r\nconst rowKey = props.rowKey\r\nfunction getInitialSelectedList() {\r\n if (props.mode === 'multiple') {\r\n return props.modelValue?.map((item) => {\r\n if (!props.optionAsValue) {\r\n return {\r\n [rowKey]: item,\r\n }\r\n }\r\n return item\r\n }) ?? []\r\n }\r\n else {\r\n return props.optionAsValue ? [props.modelValue] : [{ [rowKey]: props.modelValue }]\r\n }\r\n}\r\nconst initialSelectedList = getInitialSelectedList()\r\nconst selectedFlatDataSource = ref(initialSelectedList)\r\n// 为了获取移除的项而缓存的当前页面的前一次选择。由于element-plus没有获取移除项的方法,需要通过这种方式移除field中移除的项\r\nlet prevSelection = []\r\n\r\nconst radioSelectedKey = ref()\r\n\r\nconst currentSelectLength = computed(() => {\r\n if (props.mode === 'multiple') {\r\n return Array.isArray(props.modelValue) ? props.modelValue.length : 0\r\n }\r\n else {\r\n return isValid(radioSelectedKey.value) ? 1 : 0\r\n }\r\n})\r\n\r\nwatch(\r\n () => props.dataSource,\r\n async () => {\n const selectedKeys = uniq(\n selectedFlatDataSource.value.map(item => item[rowKey]),\n )\n await nextTick()\n if (!elTableRef.value) {\n return\n }\n for (const item of props.dataSource) {\n if (selectedKeys.includes(item[rowKey])) {\n if (props.mode === 'multiple') {\n elTableRef.value?.toggleRowSelection(item, true, props.ignoreSelectable)\n }\n else {\n elTableRef.value?.setCurrentRow(item)\n onRadioClick(item)\n }\n }\n await nextTick()\n prevSelection = elTableRef.value?.getSelectionRows()\n }\n },\n { immediate: true },\n)\n\r\nwatch(\r\n () => [props.modelValue, props.loading],\r\n async ([value, loading]) => {\r\n if (loading) {\r\n return\r\n }\r\n if (props.mode === 'single') {\n radioSelectedKey.value = props.optionAsValue ? value[rowKey] : value\n }\n else {\n await nextTick()\n if (!elTableRef.value) {\n return\n }\n const currentDisplayDataKeys = elTableRef.value\n ?.getSelectionRows()\n .map(item => item[rowKey])\n const valueKeys = props.optionAsValue\r\n ? value?.map(item => item[rowKey])\r\n : value ?? []\r\n selectedFlatDataSource.value = selectedFlatDataSource.value.filter(\r\n item => valueKeys.includes(item[rowKey]),\r\n )\r\n if (isEqual(valueKeys, currentDisplayDataKeys)) {\r\n return\r\n }\r\n const diffItems = xor(valueKeys, currentDisplayDataKeys)\r\n for (const tableItem of props.dataSource) {\r\n if (diffItems.includes(tableItem[rowKey])) {\r\n const shouldSelect = valueKeys.includes(tableItem[rowKey])\r\n elTableRef.value.toggleRowSelection(tableItem, shouldSelect, props.ignoreSelectable)\r\n }\r\n }\r\n }\r\n },\r\n {\r\n immediate: true,\r\n },\r\n)\r\n\r\nfunction onSelect(newSelection: Record<string, any>[]) {\r\n /* istanbul ignore if -- @preserve */\r\n if (!rowKey) {\r\n throw new Error('rowKey is required')\r\n }\r\n\r\n const removedItemList\r\n = prevSelection.length > newSelection.length\r\n ? differenceWith(\r\n prevSelection,\r\n newSelection,\r\n (itemPrev, itemNext) => {\r\n return itemPrev[rowKey] === itemNext[rowKey]\r\n },\r\n )\r\n : []\r\n prevSelection = [...newSelection]\r\n selectedFlatDataSource.value = uniqWith(\r\n [...selectedFlatDataSource.value, ...newSelection],\r\n (itemPrev, itemNext) => {\r\n return itemPrev[rowKey] === itemNext[rowKey]\r\n },\r\n )\r\n if (removedItemList.length > 0) {\r\n const removedKeys = uniq(removedItemList.map(item => item[rowKey]))\r\n remove(selectedFlatDataSource.value, item =>\r\n removedKeys.includes(item[rowKey]))\r\n }\r\n\r\n if (props.optionAsValue) {\r\n emit('update:modelValue', selectedFlatDataSource.value)\r\n }\r\n else {\r\n const selectedKeys = selectedFlatDataSource.value.map(\r\n item => item[rowKey],\r\n )\r\n emit('update:modelValue', selectedKeys)\r\n }\r\n}\r\n\r\nfunction onRadioClick(item) {\r\n radioSelectedKey.value = item[rowKey]\r\n if (props.optionAsValue) {\r\n emit('update:modelValue', item)\r\n }\r\n else {\r\n emit('update:modelValue', item[rowKey])\r\n }\r\n}\r\n\r\nfunction onRowClick(row: Record<string, any>, _, event: Event) {\r\n if (!props.clickRowToSelect)\r\n return\r\n\r\n if (props.mode === 'multiple') {\r\n const checkboxDOM = (event.target as Element)\r\n .closest('tr')\r\n .querySelector('input[type=\"checkbox\"]')\r\n if (checkboxDOM instanceof HTMLElement) {\r\n checkboxDOM.click()\r\n }\r\n }\r\n else {\r\n const radioDOM = (event.target as Element)\r\n .closest('tr')\r\n .querySelector('input[type=\"radio\"]')\r\n if (radioDOM instanceof HTMLElement) {\r\n radioDOM.click()\r\n }\r\n }\r\n}\r\n\r\nfunction onClearSelectionClick() {\r\n if (props.mode === 'multiple') {\r\n emit('update:modelValue', [])\r\n selectedFlatDataSource.value = []\r\n }\r\n else {\r\n radioSelectedKey.value = null\r\n emit('update:modelValue', null)\r\n }\r\n}\r\n\r\nfunction selectable(row: Record<string, any>, index: number) {\r\n if (props.selectable && isFn(props.selectable)) {\r\n return props.selectable(row, index, field.value)\r\n }\r\n return true\r\n}\r\n</script>\r\n\r\n<template>\r\n <div :class=\"`${stylePrefix}-select-table`\">\r\n <div\r\n v-if=\"currentSelectLength > 0 && props.showAlertToolbar\"\r\n :class=\"`${stylePrefix}-select-table-alert-container`\"\r\n >\r\n <span>已选择 {{ currentSelectLength }} 项</span>\r\n <ElLink\r\n type=\"primary\"\r\n :underline=\"lt(version, '2.9.9') ? false : 'never'\"\r\n style=\"margin-left: 8px;\"\r\n @click=\"onClearSelectionClick\"\r\n >\r\n 取消选择\r\n </ElLink>\r\n </div>\r\n <ElTable\r\n ref=\"elTableRef\"\r\n v-loading=\"props.loading\"\r\n v-bind=\"elTableProps\"\r\n :row-key=\"rowKey\"\r\n :row-class-name=\"props.clickRowToSelect ? `--click-row-select` : ''\"\r\n :data=\"props.dataSource\"\r\n :highlight-current-row=\"props.mode === 'single'\"\r\n @select=\"onSelect\"\r\n @select-all=\"onSelect\"\r\n @row-click=\"onRowClick\"\r\n >\r\n <ElTableColumn\r\n v-if=\"props.mode === 'multiple'\"\r\n type=\"selection\"\r\n :selectable=\"selectable\"\r\n />\r\n <ElTableColumn\r\n v-else\r\n width=\"46\"\r\n >\r\n <template #default=\"{ row }\">\r\n <ElRadioGroup v-model=\"radioSelectedKey\" style=\"width: 100%;\">\r\n <ElRadio\r\n v-bind=\"compatibleRadioValue(row[rowKey])\"\r\n @change=\"() => onRadioClick(row)\"\r\n >\r\n &nbsp;\r\n </ElRadio>\r\n </ElRadioGroup>\r\n </template>\r\n </ElTableColumn>\r\n <template v-if=\"props.columns.length === 0\">\r\n <slot />\r\n </template>\r\n <template v-else>\r\n <ElTableColumn\r\n v-for=\"colItem of props.columns\"\r\n v-bind=\"colItem\"\r\n :key=\"colItem.prop || colItem.type\"\r\n />\r\n </template>\r\n </ElTable>\r\n </div>\r\n</template>\r\n","import { connect, mapProps } from '@silver-formily/vue'\r\nimport InnerSelectTable from './select-table.vue'\r\nimport './style.scss'\r\n\r\nconst SelectTable = connect<typeof InnerSelectTable>(\n InnerSelectTable,\n mapProps({ dataSource: 'dataSource', loading: 'loading' }),\r\n)\r\n\r\nexport { SelectTable }\r\n\r\nexport default SelectTable\r\n"],"names":["props","__props","emit","__emit","elTableProps","useAttrs","field","useField","compatibleRadioValue","key","lt","version","elTableRef","ref","rowKey","getInitialSelectedList","item","initialSelectedList","selectedFlatDataSource","prevSelection","radioSelectedKey","currentSelectLength","computed","isValid","watch","selectedKeys","uniq","nextTick","onRadioClick","value","loading","currentDisplayDataKeys","valueKeys","isEqual","diffItems","xor","tableItem","shouldSelect","onSelect","newSelection","removedItemList","differenceWith","itemPrev","itemNext","uniqWith","removedKeys","remove","onRowClick","row","_","event","checkboxDOM","radioDOM","onClearSelectionClick","selectable","index","isFn","_createElementBlock","_unref","stylePrefix","_createElementVNode","_toDisplayString","_createVNode","ElLink","_cache","_withDirectives","_openBlock","_createBlock","_mergeProps","ElTableColumn","_withCtx","ElRadioGroup","$event","_renderSlot","_ctx","_Fragment","_renderList","colItem","vLoading","SelectTable","connect","InnerSelectTable","mapProps"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,UAAMA,IAAQC,GAYRC,IAAOC,GAEPC,IAAeC,GAAA,GACfC,IAAQC,EAAA;AAEd,aAASC,EAAqBC,GAAa;AACzC,aAAOC,EAAGC,GAAS,OAAO,IAAI,EAAE,OAAOF,EAAA,IAAQ,EAAE,OAAOA,EAAA;AAAA,IAC1D;AAEA,UAAMG,IAAaC,EAAA,GACbC,IAASd,EAAM;AACrB,aAASe,IAAyB;AAChC,aAAIf,EAAM,SAAS,aACVA,EAAM,YAAY,IAAI,CAACgB,MACvBhB,EAAM,gBAKJgB,IAJE;AAAA,QACL,CAACF,CAAM,GAAGE;AAAA,MAAA,CAIf,KAAK,CAAA,IAGChB,EAAM,gBAAgB,CAACA,EAAM,UAAU,IAAI,CAAC,EAAE,CAACc,CAAM,GAAGd,EAAM,YAAY;AAAA,IAErF;AACA,UAAMiB,IAAsBF,EAAA,GACtBG,IAAyBL,EAAII,CAAmB;AAEtD,QAAIE,IAAgB,CAAA;AAEpB,UAAMC,IAAmBP,EAAA,GAEnBQ,IAAsBC,EAAS,MAC/BtB,EAAM,SAAS,aACV,MAAM,QAAQA,EAAM,UAAU,IAAIA,EAAM,WAAW,SAAS,IAG5DuB,GAAQH,EAAiB,KAAK,IAAI,IAAI,CAEhD;AAED,IAAAI;AAAA,MACE,MAAMxB,EAAM;AAAA,MACZ,YAAY;AACV,cAAMyB,IAAeC;AAAA,UACnBR,EAAuB,MAAM,IAAI,CAAAF,MAAQA,EAAKF,CAAM,CAAC;AAAA,QAAA;AAGvD,YADA,MAAMa,EAAA,GACF,EAACf,EAAW;AAGhB,qBAAWI,KAAQhB,EAAM;AACvB,YAAIyB,EAAa,SAAST,EAAKF,CAAM,CAAC,MAChCd,EAAM,SAAS,aACjBY,EAAW,OAAO,mBAAmBI,GAAM,IAAMhB,EAAM,gBAAgB,KA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":["<script setup lang=\"ts\">\r\nimport type { TableInstance } from 'element-plus'\r\nimport type { ISelectTableProps } from './types'\r\nimport { isEqual, isFn, isValid } from '@formily/shared'\r\nimport { useField } from '@silver-formily/vue'\r\nimport {\r\n ElLink,\r\n ElRadio,\r\n ElRadioGroup,\r\n ElTable,\r\n ElTableColumn,\r\n useAttrs,\r\n version,\r\n vLoading,\r\n} from 'element-plus'\r\nimport { differenceWith, remove, uniq, uniqWith, xor } from 'lodash-es'\r\nimport { computed, nextTick, ref, watch } from 'vue'\r\nimport { lt, stylePrefix } from '../__builtins__'\r\n\r\ndefineOptions({\r\n name: 'FSelectTable',\r\n inheritAttrs: false,\r\n})\r\n\r\nconst props = withDefaults(defineProps<ISelectTableProps>(), {\r\n columns: () => [],\r\n mode: 'multiple',\r\n dataSource: () => [],\r\n optionAsValue: false,\r\n valueType: 'all',\r\n loading: false,\r\n clickRowToSelect: true,\r\n showAlertToolbar: true,\r\n ignoreSelectable: true,\r\n})\r\n\r\nconst emit = defineEmits(['update:modelValue'])\r\n\r\nconst elTableProps = useAttrs()\r\nconst field = useField()\r\n\r\nfunction compatibleRadioValue(key: string) {\r\n return lt(version, '2.6.0') ? { label: key } : { value: key }\r\n}\r\n\r\nconst elTableRef = ref<TableInstance>()\r\nconst rowKey = props.rowKey\r\nfunction getInitialSelectedList() {\r\n if (props.mode === 'multiple') {\r\n return props.modelValue?.map((item) => {\r\n if (!props.optionAsValue) {\r\n return {\r\n [rowKey]: item,\r\n }\r\n }\r\n return item\r\n }) ?? []\r\n }\r\n else {\r\n return props.optionAsValue ? [props.modelValue] : [{ [rowKey]: props.modelValue }]\r\n }\r\n}\r\nconst initialSelectedList = getInitialSelectedList()\r\nconst selectedFlatDataSource = ref(initialSelectedList)\r\n// 为了获取移除的项而缓存的当前页面的前一次选择。由于element-plus没有获取移除项的方法,需要通过这种方式移除field中移除的项\r\nlet prevSelection = []\r\n\r\nconst radioSelectedKey = ref()\r\n\r\nconst currentSelectLength = computed(() => {\r\n if (props.mode === 'multiple') {\r\n return Array.isArray(props.modelValue) ? props.modelValue.length : 0\r\n }\r\n else {\r\n return isValid(radioSelectedKey.value) ? 1 : 0\r\n }\r\n})\r\n\r\nwatch(\r\n () => props.dataSource,\r\n async () => {\r\n const selectedKeys = uniq(\r\n selectedFlatDataSource.value.map(item => item[rowKey]),\r\n )\r\n await nextTick()\r\n for (const item of props.dataSource) {\r\n if (selectedKeys.includes(item[rowKey])) {\r\n if (props.mode === 'multiple') {\r\n elTableRef.value?.toggleRowSelection(item, true, props.ignoreSelectable)\r\n }\r\n else {\r\n elTableRef.value?.setCurrentRow(item)\r\n onRadioClick(item)\r\n }\r\n }\r\n await nextTick()\r\n prevSelection = elTableRef.value?.getSelectionRows()\r\n }\r\n },\r\n { immediate: true },\r\n)\r\n\r\nwatch(\r\n () => [props.modelValue, props.loading],\r\n async ([value, loading]) => {\r\n if (loading) {\r\n return\r\n }\r\n if (props.mode === 'single') {\r\n radioSelectedKey.value = props.optionAsValue ? value[rowKey] : value\r\n }\r\n else {\r\n await nextTick()\r\n const currentDisplayDataKeys = elTableRef.value\r\n ?.getSelectionRows()\r\n .map(item => item[rowKey])\r\n const valueKeys = props.optionAsValue\r\n ? value?.map(item => item[rowKey])\r\n : value ?? []\r\n selectedFlatDataSource.value = selectedFlatDataSource.value.filter(\r\n item => valueKeys.includes(item[rowKey]),\r\n )\r\n if (isEqual(valueKeys, currentDisplayDataKeys)) {\r\n return\r\n }\r\n const diffItems = xor(valueKeys, currentDisplayDataKeys)\r\n for (const tableItem of props.dataSource) {\r\n if (diffItems.includes(tableItem[rowKey])) {\r\n const shouldSelect = valueKeys.includes(tableItem[rowKey])\r\n elTableRef.value.toggleRowSelection(tableItem, shouldSelect, props.ignoreSelectable)\r\n }\r\n }\r\n }\r\n },\r\n {\r\n immediate: true,\r\n },\r\n)\r\n\r\nfunction onSelect(newSelection: Record<string, any>[]) {\r\n /* istanbul ignore if -- @preserve */\r\n if (!rowKey) {\r\n throw new Error('rowKey is required')\r\n }\r\n\r\n const removedItemList\r\n = prevSelection.length > newSelection.length\r\n ? differenceWith(\r\n prevSelection,\r\n newSelection,\r\n (itemPrev, itemNext) => {\r\n return itemPrev[rowKey] === itemNext[rowKey]\r\n },\r\n )\r\n : []\r\n prevSelection = [...newSelection]\r\n selectedFlatDataSource.value = uniqWith(\r\n [...selectedFlatDataSource.value, ...newSelection],\r\n (itemPrev, itemNext) => {\r\n return itemPrev[rowKey] === itemNext[rowKey]\r\n },\r\n )\r\n if (removedItemList.length > 0) {\r\n const removedKeys = uniq(removedItemList.map(item => item[rowKey]))\r\n remove(selectedFlatDataSource.value, item =>\r\n removedKeys.includes(item[rowKey]))\r\n }\r\n\r\n if (props.optionAsValue) {\r\n emit('update:modelValue', selectedFlatDataSource.value)\r\n }\r\n else {\r\n const selectedKeys = selectedFlatDataSource.value.map(\r\n item => item[rowKey],\r\n )\r\n emit('update:modelValue', selectedKeys)\r\n }\r\n}\r\n\r\nfunction onRadioClick(item) {\r\n radioSelectedKey.value = item[rowKey]\r\n if (props.optionAsValue) {\r\n emit('update:modelValue', item)\r\n }\r\n else {\r\n emit('update:modelValue', item[rowKey])\r\n }\r\n}\r\n\r\nfunction onRowClick(row: Record<string, any>, _, event: Event) {\r\n if (!props.clickRowToSelect)\r\n return\r\n\r\n if (props.mode === 'multiple') {\r\n const checkboxDOM = (event.target as Element)\r\n .closest('tr')\r\n .querySelector('input[type=\"checkbox\"]')\r\n if (checkboxDOM instanceof HTMLElement) {\r\n checkboxDOM.click()\r\n }\r\n }\r\n else {\r\n const radioDOM = (event.target as Element)\r\n .closest('tr')\r\n .querySelector('input[type=\"radio\"]')\r\n if (radioDOM instanceof HTMLElement) {\r\n radioDOM.click()\r\n }\r\n }\r\n}\r\n\r\nfunction onClearSelectionClick() {\r\n if (props.mode === 'multiple') {\r\n emit('update:modelValue', [])\r\n selectedFlatDataSource.value = []\r\n }\r\n else {\r\n radioSelectedKey.value = null\r\n emit('update:modelValue', null)\r\n }\r\n}\r\n\r\nfunction selectable(row: Record<string, any>, index: number) {\r\n if (props.selectable && isFn(props.selectable)) {\r\n return props.selectable(row, index, field.value)\r\n }\r\n return true\r\n}\r\n</script>\r\n\r\n<template>\r\n <div :class=\"`${stylePrefix}-select-table`\">\r\n <div\r\n v-if=\"currentSelectLength > 0 && props.showAlertToolbar\"\r\n :class=\"`${stylePrefix}-select-table-alert-container`\"\r\n >\r\n <span>已选择 {{ currentSelectLength }} 项</span>\r\n <ElLink\r\n type=\"primary\"\r\n :underline=\"lt(version, '2.9.9') ? false : 'never'\"\r\n style=\"margin-left: 8px;\"\r\n @click=\"onClearSelectionClick\"\r\n >\r\n 取消选择\r\n </ElLink>\r\n </div>\r\n <ElTable\r\n ref=\"elTableRef\"\r\n v-loading=\"props.loading\"\r\n v-bind=\"elTableProps\"\r\n :row-key=\"rowKey\"\r\n :row-class-name=\"props.clickRowToSelect ? `--click-row-select` : ''\"\r\n :data=\"props.dataSource\"\r\n :highlight-current-row=\"props.mode === 'single'\"\r\n @select=\"onSelect\"\r\n @select-all=\"onSelect\"\r\n @row-click=\"onRowClick\"\r\n >\r\n <ElTableColumn\r\n v-if=\"props.mode === 'multiple'\"\r\n type=\"selection\"\r\n :selectable=\"selectable\"\r\n />\r\n <ElTableColumn\r\n v-else\r\n width=\"46\"\r\n >\r\n <template #default=\"{ row }\">\r\n <ElRadioGroup v-model=\"radioSelectedKey\" style=\"width: 100%;\">\r\n <ElRadio\r\n v-bind=\"compatibleRadioValue(row[rowKey])\"\r\n @change=\"() => onRadioClick(row)\"\r\n >\r\n &nbsp;\r\n </ElRadio>\r\n </ElRadioGroup>\r\n </template>\r\n </ElTableColumn>\r\n <template v-if=\"props.columns.length === 0\">\r\n <slot />\r\n </template>\r\n <template v-else>\r\n <ElTableColumn\r\n v-for=\"colItem of props.columns\"\r\n v-bind=\"colItem\"\r\n :key=\"colItem.prop || colItem.type\"\r\n />\r\n </template>\r\n </ElTable>\r\n </div>\r\n</template>\r\n","import { connect, mapProps } from '@silver-formily/vue'\r\nimport InnerSelectTable from './select-table.vue'\r\nimport './style.scss'\r\n\r\nconst SelectTable = connect<typeof InnerSelectTable>(\n InnerSelectTable,\n mapProps({ dataSource: 'dataSource', loading: 'loading' }),\r\n)\r\n\r\nexport { SelectTable }\r\n\r\nexport default SelectTable\r\n"],"names":["props","__props","emit","__emit","elTableProps","useAttrs","field","useField","compatibleRadioValue","key","lt","version","elTableRef","ref","rowKey","getInitialSelectedList","item","initialSelectedList","selectedFlatDataSource","prevSelection","radioSelectedKey","currentSelectLength","computed","isValid","watch","selectedKeys","uniq","nextTick","onRadioClick","value","loading","currentDisplayDataKeys","valueKeys","isEqual","diffItems","xor","tableItem","shouldSelect","onSelect","newSelection","removedItemList","differenceWith","itemPrev","itemNext","uniqWith","removedKeys","remove","onRowClick","row","_","event","checkboxDOM","radioDOM","onClearSelectionClick","selectable","index","isFn","_createElementBlock","_unref","stylePrefix","_createElementVNode","_toDisplayString","_createVNode","ElLink","_cache","_withDirectives","_openBlock","_createBlock","_mergeProps","ElTableColumn","_withCtx","ElRadioGroup","$event","_renderSlot","_ctx","_Fragment","_renderList","colItem","vLoading","SelectTable","connect","InnerSelectTable","mapProps"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,UAAMA,IAAQC,GAYRC,IAAOC,GAEPC,IAAeC,GAAA,GACfC,IAAQC,EAAA;AAEd,aAASC,EAAqBC,GAAa;AACzC,aAAOC,EAAGC,GAAS,OAAO,IAAI,EAAE,OAAOF,EAAA,IAAQ,EAAE,OAAOA,EAAA;AAAA,IAC1D;AAEA,UAAMG,IAAaC,EAAA,GACbC,IAASd,EAAM;AACrB,aAASe,IAAyB;AAChC,aAAIf,EAAM,SAAS,aACVA,EAAM,YAAY,IAAI,CAACgB,MACvBhB,EAAM,gBAKJgB,IAJE;AAAA,QACL,CAACF,CAAM,GAAGE;AAAA,MAAA,CAIf,KAAK,CAAA,IAGChB,EAAM,gBAAgB,CAACA,EAAM,U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EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA;AAAA,wBAFC,OAED,EAAA;AAAA,oBAAA;;;;;;;;;UAIUhE,EAAM,QAAQ,WAAM,IAClCyE,EAAQC,EAAA,QAAA,WAAA,EAAA,KAAA,EAAA,CAAA,KAGRR,EAAA,EAAA,GAAAT,EAIEkB,IAAA,EAAA,KAAA,EAAA,GAAAC,GAHkB5E,EAAM,UAAjB6E,YADTV,EAIET,EAAAW,CAAA,GAJFD,EAIE,EAAA,SAAA,GAAA,GAFQS,GAAO;AAAA,YACd,KAAKA,EAAQ,QAAQA,EAAQ;AAAA,UAAA;;;;QArCvB,CAAAnB,EAAAoB,EAAA,GAAA9E,EAAM,OAAO;AAAA,MAAA;;;ICpPxB+E,KAAcC;AAAA,EAClBC;AAAAA,EACAC,EAAS,EAAE,YAAY,cAAc,SAAS,WAAW;AAC3D;"}
@@ -1512,9 +1512,9 @@ declare const __VLS_component: import('vue').DefineComponent<ISelectTableProps,
1512
1512
  }, string, import('vue').PublicProps, Readonly<ISelectTableProps> & Readonly<{
1513
1513
  "onUpdate:modelValue"?: (...args: any[]) => any;
1514
1514
  }>, {
1515
- mode: "multiple" | "single";
1516
- loading: boolean;
1517
1515
  dataSource: any[];
1516
+ loading: boolean;
1517
+ mode: "multiple" | "single";
1518
1518
  columns: import('element-plus').Column<any>[];
1519
1519
  valueType: "all" | "parent" | "child" | "path";
1520
1520
  optionAsValue: boolean;
@@ -1,16 +1,19 @@
1
- function l(e) {
2
- const o = (e?.dialogContentRef ?? e?.exposed?.dialogContentRef)?.$el;
3
- return o || (e?.$el ?? null);
1
+ function t(n) {
2
+ if (n instanceof HTMLElement)
3
+ return n;
4
+ const e = n?.$el;
5
+ return e instanceof HTMLElement ? e : null;
4
6
  }
5
- function n(e) {
6
- const r = e?.exposed?.drawerRef;
7
- if (r instanceof HTMLElement)
8
- return r;
9
- const o = e?.$refs?.drawerRef;
10
- return o instanceof HTMLElement ? o : e?.$el ?? null;
7
+ function o(n) {
8
+ const e = n;
9
+ return t(e?.dialogContentRef) ?? t(e?.exposed?.dialogContentRef) ?? t(e);
10
+ }
11
+ function r(n) {
12
+ const e = n;
13
+ return t(e?.exposed?.drawerRef) ?? t(e?.$refs?.drawerRef) ?? t(e);
11
14
  }
12
15
  export {
13
- l as resolveDialogElement,
14
- n as resolveDrawerElement
16
+ o as resolveDialogElement,
17
+ r as resolveDrawerElement
15
18
  };
16
19
  //# sourceMappingURL=overlay-elements.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"overlay-elements.mjs","sources":["../../src/shared/overlay-elements.ts"],"sourcesContent":["import type { ComponentPublicInstance } from 'vue'\r\n\r\nexport type DialogLikeInstance = ComponentPublicInstance<{ dialogContentRef?: ComponentPublicInstance | null }> | null\r\n\r\nexport function resolveDialogElement(instance: DialogLikeInstance): HTMLElement | null {\r\n const exposedDialogRef = (instance as ComponentPublicInstance & { dialogContentRef?: ComponentPublicInstance | null } | null)?.dialogContentRef\r\n ?? (instance as ComponentPublicInstance & { exposed?: Record<string, any> } | null)?.exposed?.dialogContentRef\r\n const dialogElement = exposedDialogRef?.$el as HTMLElement | undefined\r\n if (dialogElement)\r\n return dialogElement\r\n\r\n return (instance?.$el as HTMLElement | undefined) ?? null\r\n}\r\n\r\nexport function resolveDrawerElement(instance: ComponentPublicInstance | null): HTMLElement | null {\r\n const exposedDrawer = (instance as ComponentPublicInstance & { exposed?: Record<string, any> } | null)?.exposed?.drawerRef\r\n if (exposedDrawer instanceof HTMLElement)\r\n return exposedDrawer\r\n\r\n const drawerFromRefs = (instance as ComponentPublicInstance & { $refs?: Record<string, any> } | null)?.$refs?.drawerRef\r\n if (drawerFromRefs instanceof HTMLElement)\r\n return drawerFromRefs\r\n\r\n return (instance?.$el as HTMLElement | undefined) ?? null\r\n}\r\n"],"names":["resolveDialogElement","instance","dialogElement","resolveDrawerElement","exposedDrawer","drawerFromRefs"],"mappings":"AAIO,SAASA,EAAqBC,GAAkD;AAGrF,QAAMC,KAFoBD,GAAqG,oBACzHA,GAAiF,SAAS,mBACxD;AACxC,SAAIC,MAGID,GAAU,OAAmC;AACvD;AAEO,SAASE,EAAqBF,GAA8D;AACjG,QAAMG,IAAiBH,GAAiF,SAAS;AACjH,MAAIG,aAAyB;AAC3B,WAAOA;AAET,QAAMC,IAAkBJ,GAA+E,OAAO;AAC9G,SAAII,aAA0B,cACrBA,IAEDJ,GAAU,OAAmC;AACvD;"}
1
+ {"version":3,"file":"overlay-elements.mjs","sources":["../../src/shared/overlay-elements.ts"],"sourcesContent":["import type { ComponentPublicInstance } from 'vue'\r\n\r\nexport type DialogLikeInstance = ComponentPublicInstance<{ dialogContentRef?: ComponentPublicInstance | null }> | null\r\n\r\ntype OverlayLikeInstance = ComponentPublicInstance & {\r\n exposed?: Record<string, any>\r\n $refs?: Record<string, any>\r\n dialogContentRef?: ComponentPublicInstance | null\r\n}\r\n\r\nfunction toHTMLElement(target: unknown): HTMLElement | null {\r\n if (target instanceof HTMLElement)\r\n return target\r\n\r\n const element = (target as { $el?: unknown } | null | undefined)?.$el\r\n return element instanceof HTMLElement ? element : null\r\n}\r\n\r\nexport function resolveDialogElement(instance: DialogLikeInstance): HTMLElement | null {\r\n const vm = instance as OverlayLikeInstance | null\r\n return toHTMLElement(vm?.dialogContentRef)\r\n ?? toHTMLElement(vm?.exposed?.dialogContentRef)\r\n ?? toHTMLElement(vm)\r\n}\r\n\r\nexport function resolveDrawerElement(instance: ComponentPublicInstance | null): HTMLElement | null {\r\n const vm = instance as OverlayLikeInstance | null\r\n return toHTMLElement(vm?.exposed?.drawerRef)\r\n ?? toHTMLElement(vm?.$refs?.drawerRef)\r\n ?? toHTMLElement(vm)\r\n}\r\n"],"names":["toHTMLElement","target","element","resolveDialogElement","instance","vm","resolveDrawerElement"],"mappings":"AAUA,SAASA,EAAcC,GAAqC;AAC1D,MAAIA,aAAkB;AACpB,WAAOA;AAET,QAAMC,IAAWD,GAAiD;AAClE,SAAOC,aAAmB,cAAcA,IAAU;AACpD;AAEO,SAASC,EAAqBC,GAAkD;AACrF,QAAMC,IAAKD;AACX,SAAOJ,EAAcK,GAAI,gBAAgB,KACpCL,EAAcK,GAAI,SAAS,gBAAgB,KAC3CL,EAAcK,CAAE;AACvB;AAEO,SAASC,EAAqBF,GAA8D;AACjG,QAAMC,IAAKD;AACX,SAAOJ,EAAcK,GAAI,SAAS,SAAS,KACtCL,EAAcK,GAAI,OAAO,SAAS,KAClCL,EAAcK,CAAE;AACvB;"}
@@ -1 +1 @@
1
- .formily-element-plus-form-button-group{padding:10px 0;background-color:var(--el-bg-color)}.formily-element-plus-form-button-group__sticky .el-affix--fixed{border-top:1px solid var(--el-border-color)}
1
+ .formily-element-plus-form-item--isolated{display:flex;--font-size: 14px;--el-form-label-font-size: var(--font-size)}.formily-element-plus-form-item--isolated.is-required:not(.is-no-asterisk).asterisk-left>.el-form-item__label-wrap>.el-form-item__label:before,.formily-element-plus-form-item--isolated.is-required:not(.is-no-asterisk).asterisk-left>.el-form-item__label:before{color:var(--el-color-danger);content:"*";margin-right:4px}.formily-element-plus-form-item--isolated.is-required:not(.is-no-asterisk).asterisk-right>.el-form-item__label-wrap>.el-form-item__label:after,.formily-element-plus-form-item--isolated.is-required:not(.is-no-asterisk).asterisk-right>.el-form-item__label:after{color:var(--el-color-danger);content:"*";margin-left:4px}.formily-element-plus-form-item .el-form-item__content{display:block}.formily-element-plus-form-item.el-form-item--label-top .el-form-item__label{display:inline-flex;align-items:center}.formily-element-plus-form-item .formily-element-plus-form-item-col-0{display:none}.formily-element-plus-form-item .formily-element-plus-form-item-col-1{flex:0 0 4.1666666667%;max-width:4.1666666667%}.formily-element-plus-form-item .formily-element-plus-form-item-col-2{flex:0 0 8.3333333333%;max-width:8.3333333333%}.formily-element-plus-form-item .formily-element-plus-form-item-col-3{flex:0 0 12.5%;max-width:12.5%}.formily-element-plus-form-item .formily-element-plus-form-item-col-4{flex:0 0 16.6666666667%;max-width:16.6666666667%}.formily-element-plus-form-item .formily-element-plus-form-item-col-5{flex:0 0 20.8333333333%;max-width:20.8333333333%}.formily-element-plus-form-item .formily-element-plus-form-item-col-6{flex:0 0 25%;max-width:25%}.formily-element-plus-form-item .formily-element-plus-form-item-col-7{flex:0 0 29.1666666667%;max-width:29.1666666667%}.formily-element-plus-form-item .formily-element-plus-form-item-col-8{flex:0 0 33.3333333333%;max-width:33.3333333333%}.formily-element-plus-form-item .formily-element-plus-form-item-col-9{flex:0 0 37.5%;max-width:37.5%}.formily-element-plus-form-item .formily-element-plus-form-item-col-10{flex:0 0 41.6666666667%;max-width:41.6666666667%}.formily-element-plus-form-item .formily-element-plus-form-item-col-11{flex:0 0 45.8333333333%;max-width:45.8333333333%}.formily-element-plus-form-item .formily-element-plus-form-item-col-12{flex:0 0 50%;max-width:50%}.formily-element-plus-form-item .formily-element-plus-form-item-col-13{flex:0 0 54.1666666667%;max-width:54.1666666667%}.formily-element-plus-form-item .formily-element-plus-form-item-col-14{flex:0 0 58.3333333333%;max-width:58.3333333333%}.formily-element-plus-form-item .formily-element-plus-form-item-col-15{flex:0 0 62.5%;max-width:62.5%}.formily-element-plus-form-item .formily-element-plus-form-item-col-16{flex:0 0 66.6666666667%;max-width:66.6666666667%}.formily-element-plus-form-item .formily-element-plus-form-item-col-17{flex:0 0 70.8333333333%;max-width:70.8333333333%}.formily-element-plus-form-item .formily-element-plus-form-item-col-18{flex:0 0 75%;max-width:75%}.formily-element-plus-form-item .formily-element-plus-form-item-col-19{flex:0 0 79.1666666667%;max-width:79.1666666667%}.formily-element-plus-form-item .formily-element-plus-form-item-col-20{flex:0 0 83.3333333333%;max-width:83.3333333333%}.formily-element-plus-form-item .formily-element-plus-form-item-col-21{flex:0 0 87.5%;max-width:87.5%}.formily-element-plus-form-item .formily-element-plus-form-item-col-22{flex:0 0 91.6666666667%;max-width:91.6666666667%}.formily-element-plus-form-item .formily-element-plus-form-item-col-23{flex:0 0 95.8333333333%;max-width:95.8333333333%}.formily-element-plus-form-item .formily-element-plus-form-item-col-24{flex:0 0 100%;max-width:100%}.formily-element-plus-form-item-label__wrapper{display:flex;overflow:hidden}.is-warp .formily-element-plus-form-item-label-content>span{overflow:visible;white-space:wrap}.is-warp .el-form-item__content{align-items:flex-start;flex-direction:column}.is-warp .el-form-item__label{height:auto}.formily-element-plus-form-item-label-content{display:flex;align-items:center;flex:1;overflow:hidden}.formily-element-plus-form-item-label-content>span{display:inline;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.formily-element-plus-form-item-label-content.is-tooltip{border-bottom:1px dashed;border-color:var(--el-border-color)}.formily-element-plus-form-item-label-tooltip{margin-left:4px;color:var(--el-text-color-secondary);display:flex;align-items:center;height:32px;cursor:pointer}.formily-element-plus-form-item-colon{display:flex;margin-left:2px;line-height:2.3}.formily-element-plus-form-item-content__wrapper{display:flex;flex:1}.formily-element-plus-form-item-content__wrapper .is-fullness>div{width:100%}.formily-element-plus-form-item-addon-before{margin-right:8px;font-size:var(--el-font-size-base)}.formily-element-plus-form-item-addon-after{margin-left:8px}.formily-element-plus-form-item-addon-before,.formily-element-plus-form-item-addon-after{display:inline-flex;align-items:center;min-height:32px;flex-shrink:0;font-size:var(--el-font-size-base);color:var(--el-text-color-regular)}.el-form-item__content.is-addon-after{flex:unset}.formily-element-plus-form-item-feedback{color:var(--el-text-color-secondary);font-size:12px;line-height:1;padding-top:2px}.formily-element-plus-form-item-feedback.is-error{color:var(--el-color-danger)}.formily-element-plus-form-item-feedback.is-success{color:var(--el-color-success)}.formily-element-plus-form-item-feedback.is-warning{color:var(--el-color-warning)}.formily-element-plus-form-item-feedback.is-loose{position:absolute;top:100%;left:0}.formily-element-plus-form-item-feedback.is-tooltip{font-size:var(--el-font-size-base);display:inline-flex}.formily-element-plus-form-item-feedback.is-tooltip i{margin-right:4px}.formily-element-plus-form-item-extra{color:var(--el-text-color-secondary);font-size:12px;line-height:1;padding-top:2px}.formily-element-plus-form-item{margin-bottom:6px}.formily-element-plus-form-item.is-loose{margin-bottom:18px}.el-form-item.is-warning .el-input__wrapper,.el-form-item.is-warning .el-input__wrapper:hover,.el-form-item.is-warning .el-input__wrapper:focus,.el-form-item.is-warning .el-input__wrapper.is-focus,.el-form-item.is-warning .el-textarea__inner,.el-form-item.is-warning .el-textarea__inner:hover,.el-form-item.is-warning .el-textarea__inner:focus,.el-form-item.is-warning .el-textarea__inner.is-focus,.el-form-item.is-warning .el-select__wrapper,.el-form-item.is-warning .el-select__wrapper:hover,.el-form-item.is-warning .el-select__wrapper:focus,.el-form-item.is-warning .el-select__wrapper.is-focus,.el-form-item.is-warning .el-input-tag__wrapper,.el-form-item.is-warning .el-input-tag__wrapper:hover,.el-form-item.is-warning .el-input-tag__wrapper:focus,.el-form-item.is-warning .el-input-tag__wrapper.is-focus{box-shadow:0 0 0 1px var(--el-color-warning) inset}.formily-element-plus-form-button-group{padding:10px 0;background-color:var(--el-bg-color)}.formily-element-plus-form-button-group .formily-element-plus-form-item-colon{visibility:hidden}.formily-element-plus-form-button-group--inline{padding:0;background-color:transparent}.formily-element-plus-form-button-group__sticky .el-affix--fixed{border-top:1px solid var(--el-border-color)}
@@ -1 +1 @@
1
- .formily-element-plus-form-grid{display:grid}
1
+ .formily-element-plus-form-grid{display:grid}.formily-element-plus-form-grid>[data-grid-span="-1"],.formily-element-plus-form-grid>[gridspan="-1"],.formily-element-plus-form-grid>[gridspan="span -1"]{grid-column:1/-1}.formily-element-plus-form-grid>[data-grid-span="1"],.formily-element-plus-form-grid>[gridspan="1"],.formily-element-plus-form-grid>[gridspan="span 1"]{grid-column:span 1/auto}.formily-element-plus-form-grid>[data-grid-span="2"],.formily-element-plus-form-grid>[gridspan="2"],.formily-element-plus-form-grid>[gridspan="span 2"]{grid-column:span 2/auto}.formily-element-plus-form-grid>[data-grid-span="3"],.formily-element-plus-form-grid>[gridspan="3"],.formily-element-plus-form-grid>[gridspan="span 3"]{grid-column:span 3/auto}.formily-element-plus-form-grid>[data-grid-span="4"],.formily-element-plus-form-grid>[gridspan="4"],.formily-element-plus-form-grid>[gridspan="span 4"]{grid-column:span 4/auto}.formily-element-plus-form-grid>[data-grid-span="5"],.formily-element-plus-form-grid>[gridspan="5"],.formily-element-plus-form-grid>[gridspan="span 5"]{grid-column:span 5/auto}.formily-element-plus-form-grid>[data-grid-span="6"],.formily-element-plus-form-grid>[gridspan="6"],.formily-element-plus-form-grid>[gridspan="span 6"]{grid-column:span 6/auto}.formily-element-plus-form-grid>[data-grid-span="7"],.formily-element-plus-form-grid>[gridspan="7"],.formily-element-plus-form-grid>[gridspan="span 7"]{grid-column:span 7/auto}.formily-element-plus-form-grid>[data-grid-span="8"],.formily-element-plus-form-grid>[gridspan="8"],.formily-element-plus-form-grid>[gridspan="span 8"]{grid-column:span 8/auto}.formily-element-plus-form-grid>[data-grid-span="9"],.formily-element-plus-form-grid>[gridspan="9"],.formily-element-plus-form-grid>[gridspan="span 9"]{grid-column:span 9/auto}.formily-element-plus-form-grid>[data-grid-span="10"],.formily-element-plus-form-grid>[gridspan="10"],.formily-element-plus-form-grid>[gridspan="span 10"]{grid-column:span 10/auto}.formily-element-plus-form-grid>[data-grid-span="11"],.formily-element-plus-form-grid>[gridspan="11"],.formily-element-plus-form-grid>[gridspan="span 11"]{grid-column:span 11/auto}.formily-element-plus-form-grid>[data-grid-span="12"],.formily-element-plus-form-grid>[gridspan="12"],.formily-element-plus-form-grid>[gridspan="span 12"]{grid-column:span 12/auto}.formily-element-plus-form-grid>[data-grid-span="13"],.formily-element-plus-form-grid>[gridspan="13"],.formily-element-plus-form-grid>[gridspan="span 13"]{grid-column:span 13/auto}.formily-element-plus-form-grid>[data-grid-span="14"],.formily-element-plus-form-grid>[gridspan="14"],.formily-element-plus-form-grid>[gridspan="span 14"]{grid-column:span 14/auto}.formily-element-plus-form-grid>[data-grid-span="15"],.formily-element-plus-form-grid>[gridspan="15"],.formily-element-plus-form-grid>[gridspan="span 15"]{grid-column:span 15/auto}.formily-element-plus-form-grid>[data-grid-span="16"],.formily-element-plus-form-grid>[gridspan="16"],.formily-element-plus-form-grid>[gridspan="span 16"]{grid-column:span 16/auto}.formily-element-plus-form-grid>[data-grid-span="17"],.formily-element-plus-form-grid>[gridspan="17"],.formily-element-plus-form-grid>[gridspan="span 17"]{grid-column:span 17/auto}.formily-element-plus-form-grid>[data-grid-span="18"],.formily-element-plus-form-grid>[gridspan="18"],.formily-element-plus-form-grid>[gridspan="span 18"]{grid-column:span 18/auto}.formily-element-plus-form-grid>[data-grid-span="19"],.formily-element-plus-form-grid>[gridspan="19"],.formily-element-plus-form-grid>[gridspan="span 19"]{grid-column:span 19/auto}.formily-element-plus-form-grid>[data-grid-span="20"],.formily-element-plus-form-grid>[gridspan="20"],.formily-element-plus-form-grid>[gridspan="span 20"]{grid-column:span 20/auto}.formily-element-plus-form-grid>[data-grid-span="21"],.formily-element-plus-form-grid>[gridspan="21"],.formily-element-plus-form-grid>[gridspan="span 21"]{grid-column:span 21/auto}.formily-element-plus-form-grid>[data-grid-span="22"],.formily-element-plus-form-grid>[gridspan="22"],.formily-element-plus-form-grid>[gridspan="span 22"]{grid-column:span 22/auto}.formily-element-plus-form-grid>[data-grid-span="23"],.formily-element-plus-form-grid>[gridspan="23"],.formily-element-plus-form-grid>[gridspan="span 23"]{grid-column:span 23/auto}.formily-element-plus-form-grid>[data-grid-span="24"],.formily-element-plus-form-grid>[gridspan="24"],.formily-element-plus-form-grid>[gridspan="span 24"]{grid-column:span 24/auto}
@@ -1 +1 @@
1
- .formily-element-plus-form-item .el-form-item__content{display:block}.formily-element-plus-form-item.el-form-item--label-top .el-form-item__label{display:inline-flex;align-items:center}.formily-element-plus-form-item .formily-element-plus-form-item-col-0{display:none}.formily-element-plus-form-item .formily-element-plus-form-item-col-1{flex:0 0 4.1666666667%;max-width:4.1666666667%}.formily-element-plus-form-item .formily-element-plus-form-item-col-2{flex:0 0 8.3333333333%;max-width:8.3333333333%}.formily-element-plus-form-item .formily-element-plus-form-item-col-3{flex:0 0 12.5%;max-width:12.5%}.formily-element-plus-form-item .formily-element-plus-form-item-col-4{flex:0 0 16.6666666667%;max-width:16.6666666667%}.formily-element-plus-form-item .formily-element-plus-form-item-col-5{flex:0 0 20.8333333333%;max-width:20.8333333333%}.formily-element-plus-form-item .formily-element-plus-form-item-col-6{flex:0 0 25%;max-width:25%}.formily-element-plus-form-item .formily-element-plus-form-item-col-7{flex:0 0 29.1666666667%;max-width:29.1666666667%}.formily-element-plus-form-item .formily-element-plus-form-item-col-8{flex:0 0 33.3333333333%;max-width:33.3333333333%}.formily-element-plus-form-item .formily-element-plus-form-item-col-9{flex:0 0 37.5%;max-width:37.5%}.formily-element-plus-form-item .formily-element-plus-form-item-col-10{flex:0 0 41.6666666667%;max-width:41.6666666667%}.formily-element-plus-form-item .formily-element-plus-form-item-col-11{flex:0 0 45.8333333333%;max-width:45.8333333333%}.formily-element-plus-form-item .formily-element-plus-form-item-col-12{flex:0 0 50%;max-width:50%}.formily-element-plus-form-item .formily-element-plus-form-item-col-13{flex:0 0 54.1666666667%;max-width:54.1666666667%}.formily-element-plus-form-item .formily-element-plus-form-item-col-14{flex:0 0 58.3333333333%;max-width:58.3333333333%}.formily-element-plus-form-item .formily-element-plus-form-item-col-15{flex:0 0 62.5%;max-width:62.5%}.formily-element-plus-form-item .formily-element-plus-form-item-col-16{flex:0 0 66.6666666667%;max-width:66.6666666667%}.formily-element-plus-form-item .formily-element-plus-form-item-col-17{flex:0 0 70.8333333333%;max-width:70.8333333333%}.formily-element-plus-form-item .formily-element-plus-form-item-col-18{flex:0 0 75%;max-width:75%}.formily-element-plus-form-item .formily-element-plus-form-item-col-19{flex:0 0 79.1666666667%;max-width:79.1666666667%}.formily-element-plus-form-item .formily-element-plus-form-item-col-20{flex:0 0 83.3333333333%;max-width:83.3333333333%}.formily-element-plus-form-item .formily-element-plus-form-item-col-21{flex:0 0 87.5%;max-width:87.5%}.formily-element-plus-form-item .formily-element-plus-form-item-col-22{flex:0 0 91.6666666667%;max-width:91.6666666667%}.formily-element-plus-form-item .formily-element-plus-form-item-col-23{flex:0 0 95.8333333333%;max-width:95.8333333333%}.formily-element-plus-form-item .formily-element-plus-form-item-col-24{flex:0 0 100%;max-width:100%}.formily-element-plus-form-item-label__wrapper{display:flex;overflow:hidden}.is-warp .formily-element-plus-form-item-label-content>span{overflow:visible;white-space:wrap}.is-warp .el-form-item__content{align-items:flex-start;flex-direction:column}.is-warp .el-form-item__label{height:auto}.formily-element-plus-form-item-label-content{display:flex;align-items:center;flex:1;overflow:hidden}.formily-element-plus-form-item-label-content>span{display:inline;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.formily-element-plus-form-item-label-content.is-tooltip{border-bottom:1px dashed;border-color:var(--el-border-color)}.formily-element-plus-form-item-label-tooltip{margin-left:4px;color:var(--el-text-color-secondary);display:flex;align-items:center;height:32px;cursor:pointer}.formily-element-plus-form-item-colon{display:flex;margin-left:2px;line-height:2.3}.formily-element-plus-form-item-content__wrapper{display:flex;flex:1}.formily-element-plus-form-item-content__wrapper .is-fullness>div{width:100%}.formily-element-plus-form-item-addon-before{margin-right:8px;font-size:var(--el-font-size-base)}.formily-element-plus-form-item-addon-after{margin-left:8px}.formily-element-plus-form-item-addon-before,.formily-element-plus-form-item-addon-after{display:inline-flex;align-items:center;min-height:32px;flex-shrink:0;font-size:var(--el-font-size-base);color:var(--el-text-color-regular)}.el-form-item__content.is-addon-after{flex:unset}.formily-element-plus-form-item-feedback{color:var(--el-text-color-secondary);font-size:12px;line-height:1;padding-top:2px}.formily-element-plus-form-item-feedback.is-error{color:var(--el-color-danger)}.formily-element-plus-form-item-feedback.is-success{color:var(--el-color-success)}.formily-element-plus-form-item-feedback.is-warning{color:var(--el-color-warning)}.formily-element-plus-form-item-feedback.is-loose{position:absolute;top:100%;left:0}.formily-element-plus-form-item-feedback.is-tooltip{font-size:var(--el-font-size-base);display:inline-flex}.formily-element-plus-form-item-feedback.is-tooltip i{margin-right:4px}.formily-element-plus-form-item-extra{color:var(--el-text-color-secondary);font-size:12px;line-height:1;padding-top:2px}.formily-element-plus-form-item{margin-bottom:6px}.formily-element-plus-form-item.is-loose{margin-bottom:18px}.el-form-item.is-warning .el-input__wrapper,.el-form-item.is-warning .el-input__wrapper:hover,.el-form-item.is-warning .el-input__wrapper:focus,.el-form-item.is-warning .el-input__wrapper.is-focus,.el-form-item.is-warning .el-textarea__inner,.el-form-item.is-warning .el-textarea__inner:hover,.el-form-item.is-warning .el-textarea__inner:focus,.el-form-item.is-warning .el-textarea__inner.is-focus,.el-form-item.is-warning .el-select__wrapper,.el-form-item.is-warning .el-select__wrapper:hover,.el-form-item.is-warning .el-select__wrapper:focus,.el-form-item.is-warning .el-select__wrapper.is-focus,.el-form-item.is-warning .el-input-tag__wrapper,.el-form-item.is-warning .el-input-tag__wrapper:hover,.el-form-item.is-warning .el-input-tag__wrapper:focus,.el-form-item.is-warning .el-input-tag__wrapper.is-focus{box-shadow:0 0 0 1px var(--el-color-warning) inset}
1
+ .formily-element-plus-form-item--isolated{display:flex;--font-size: 14px;--el-form-label-font-size: var(--font-size)}.formily-element-plus-form-item--isolated.is-required:not(.is-no-asterisk).asterisk-left>.el-form-item__label-wrap>.el-form-item__label:before,.formily-element-plus-form-item--isolated.is-required:not(.is-no-asterisk).asterisk-left>.el-form-item__label:before{color:var(--el-color-danger);content:"*";margin-right:4px}.formily-element-plus-form-item--isolated.is-required:not(.is-no-asterisk).asterisk-right>.el-form-item__label-wrap>.el-form-item__label:after,.formily-element-plus-form-item--isolated.is-required:not(.is-no-asterisk).asterisk-right>.el-form-item__label:after{color:var(--el-color-danger);content:"*";margin-left:4px}.formily-element-plus-form-item .el-form-item__content{display:block}.formily-element-plus-form-item.el-form-item--label-top .el-form-item__label{display:inline-flex;align-items:center}.formily-element-plus-form-item .formily-element-plus-form-item-col-0{display:none}.formily-element-plus-form-item .formily-element-plus-form-item-col-1{flex:0 0 4.1666666667%;max-width:4.1666666667%}.formily-element-plus-form-item .formily-element-plus-form-item-col-2{flex:0 0 8.3333333333%;max-width:8.3333333333%}.formily-element-plus-form-item .formily-element-plus-form-item-col-3{flex:0 0 12.5%;max-width:12.5%}.formily-element-plus-form-item .formily-element-plus-form-item-col-4{flex:0 0 16.6666666667%;max-width:16.6666666667%}.formily-element-plus-form-item .formily-element-plus-form-item-col-5{flex:0 0 20.8333333333%;max-width:20.8333333333%}.formily-element-plus-form-item .formily-element-plus-form-item-col-6{flex:0 0 25%;max-width:25%}.formily-element-plus-form-item .formily-element-plus-form-item-col-7{flex:0 0 29.1666666667%;max-width:29.1666666667%}.formily-element-plus-form-item .formily-element-plus-form-item-col-8{flex:0 0 33.3333333333%;max-width:33.3333333333%}.formily-element-plus-form-item .formily-element-plus-form-item-col-9{flex:0 0 37.5%;max-width:37.5%}.formily-element-plus-form-item .formily-element-plus-form-item-col-10{flex:0 0 41.6666666667%;max-width:41.6666666667%}.formily-element-plus-form-item .formily-element-plus-form-item-col-11{flex:0 0 45.8333333333%;max-width:45.8333333333%}.formily-element-plus-form-item .formily-element-plus-form-item-col-12{flex:0 0 50%;max-width:50%}.formily-element-plus-form-item .formily-element-plus-form-item-col-13{flex:0 0 54.1666666667%;max-width:54.1666666667%}.formily-element-plus-form-item .formily-element-plus-form-item-col-14{flex:0 0 58.3333333333%;max-width:58.3333333333%}.formily-element-plus-form-item .formily-element-plus-form-item-col-15{flex:0 0 62.5%;max-width:62.5%}.formily-element-plus-form-item .formily-element-plus-form-item-col-16{flex:0 0 66.6666666667%;max-width:66.6666666667%}.formily-element-plus-form-item .formily-element-plus-form-item-col-17{flex:0 0 70.8333333333%;max-width:70.8333333333%}.formily-element-plus-form-item .formily-element-plus-form-item-col-18{flex:0 0 75%;max-width:75%}.formily-element-plus-form-item .formily-element-plus-form-item-col-19{flex:0 0 79.1666666667%;max-width:79.1666666667%}.formily-element-plus-form-item .formily-element-plus-form-item-col-20{flex:0 0 83.3333333333%;max-width:83.3333333333%}.formily-element-plus-form-item .formily-element-plus-form-item-col-21{flex:0 0 87.5%;max-width:87.5%}.formily-element-plus-form-item .formily-element-plus-form-item-col-22{flex:0 0 91.6666666667%;max-width:91.6666666667%}.formily-element-plus-form-item .formily-element-plus-form-item-col-23{flex:0 0 95.8333333333%;max-width:95.8333333333%}.formily-element-plus-form-item .formily-element-plus-form-item-col-24{flex:0 0 100%;max-width:100%}.formily-element-plus-form-item-label__wrapper{display:flex;overflow:hidden}.is-warp .formily-element-plus-form-item-label-content>span{overflow:visible;white-space:wrap}.is-warp .el-form-item__content{align-items:flex-start;flex-direction:column}.is-warp .el-form-item__label{height:auto}.formily-element-plus-form-item-label-content{display:flex;align-items:center;flex:1;overflow:hidden}.formily-element-plus-form-item-label-content>span{display:inline;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.formily-element-plus-form-item-label-content.is-tooltip{border-bottom:1px dashed;border-color:var(--el-border-color)}.formily-element-plus-form-item-label-tooltip{margin-left:4px;color:var(--el-text-color-secondary);display:flex;align-items:center;height:32px;cursor:pointer}.formily-element-plus-form-item-colon{display:flex;margin-left:2px;line-height:2.3}.formily-element-plus-form-item-content__wrapper{display:flex;flex:1}.formily-element-plus-form-item-content__wrapper .is-fullness>div{width:100%}.formily-element-plus-form-item-addon-before{margin-right:8px;font-size:var(--el-font-size-base)}.formily-element-plus-form-item-addon-after{margin-left:8px}.formily-element-plus-form-item-addon-before,.formily-element-plus-form-item-addon-after{display:inline-flex;align-items:center;min-height:32px;flex-shrink:0;font-size:var(--el-font-size-base);color:var(--el-text-color-regular)}.el-form-item__content.is-addon-after{flex:unset}.formily-element-plus-form-item-feedback{color:var(--el-text-color-secondary);font-size:12px;line-height:1;padding-top:2px}.formily-element-plus-form-item-feedback.is-error{color:var(--el-color-danger)}.formily-element-plus-form-item-feedback.is-success{color:var(--el-color-success)}.formily-element-plus-form-item-feedback.is-warning{color:var(--el-color-warning)}.formily-element-plus-form-item-feedback.is-loose{position:absolute;top:100%;left:0}.formily-element-plus-form-item-feedback.is-tooltip{font-size:var(--el-font-size-base);display:inline-flex}.formily-element-plus-form-item-feedback.is-tooltip i{margin-right:4px}.formily-element-plus-form-item-extra{color:var(--el-text-color-secondary);font-size:12px;line-height:1;padding-top:2px}.formily-element-plus-form-item{margin-bottom:6px}.formily-element-plus-form-item.is-loose{margin-bottom:18px}.el-form-item.is-warning .el-input__wrapper,.el-form-item.is-warning .el-input__wrapper:hover,.el-form-item.is-warning .el-input__wrapper:focus,.el-form-item.is-warning .el-input__wrapper.is-focus,.el-form-item.is-warning .el-textarea__inner,.el-form-item.is-warning .el-textarea__inner:hover,.el-form-item.is-warning .el-textarea__inner:focus,.el-form-item.is-warning .el-textarea__inner.is-focus,.el-form-item.is-warning .el-select__wrapper,.el-form-item.is-warning .el-select__wrapper:hover,.el-form-item.is-warning .el-select__wrapper:focus,.el-form-item.is-warning .el-select__wrapper.is-focus,.el-form-item.is-warning .el-input-tag__wrapper,.el-form-item.is-warning .el-input-tag__wrapper:hover,.el-form-item.is-warning .el-input-tag__wrapper:focus,.el-form-item.is-warning .el-input-tag__wrapper.is-focus{box-shadow:0 0 0 1px var(--el-color-warning) inset}
@@ -0,0 +1 @@
1
+ .formily-element-plus-query-form__actions{display:flex;justify-content:space-between;width:100%}.formily-element-plus-query-form__actions--row-end{justify-content:flex-end}.formily-element-plus-query-form__collapse-link .el-link__inner{display:inline-flex;align-items:center;gap:4px;margin:0 8px}.formily-element-plus-query-form__collapse-icon{font-size:12px}.formily-element-plus-query-form-light__content{display:flex;flex-wrap:wrap;align-items:flex-start;gap:8px 12px}
@@ -0,0 +1 @@
1
+ .formily-element-plus-query-form-item{display:flex;flex-direction:column}.formily-element-plus-query-form-item__pagination{justify-content:flex-end;margin-top:8px}.formily-element-plus-query-form-item__pagination .el-pagination__total{flex:1}
@@ -1,5 +1,5 @@
1
1
  import { observer as m } from "@silver-formily/reactive-vue";
2
- import { defineComponent as s, createBlock as a, openBlock as c, unref as e, mergeProps as l, withCtx as f, renderSlot as b } from "vue";
2
+ import { defineComponent as s, openBlock as a, createBlock as c, unref as e, mergeProps as l, withCtx as f, renderSlot as b } from "vue";
3
3
  import { useParentForm as p } from "@silver-formily/vue";
4
4
  import { ElButton as d } from "element-plus";
5
5
  const S = /* @__PURE__ */ s({
@@ -17,9 +17,9 @@ const S = /* @__PURE__ */ s({
17
17
  setup(i) {
18
18
  const t = i, n = p();
19
19
  function r(o) {
20
- t.onClick?.(o) !== !1 && t.onSubmit && n?.value?.submit(t.onSubmit).then(t.onSubmitSuccess).catch(t.onSubmitFailed ?? console.log);
20
+ t.onClick?.(o) !== !1 && t.onSubmit && n?.value?.submit(t.onSubmit).then(t.onSubmitSuccess).catch(t.onSubmitFailed ?? console.error);
21
21
  }
22
- return (o, u) => (c(), a(e(d), l({
22
+ return (o, u) => (a(), c(e(d), l({
23
23
  "native-type": t.submit ? "button" : "submit",
24
24
  type: "primary"
25
25
  }, o.$attrs, {
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../src/submit/submit.vue","../../src/submit/index.ts"],"sourcesContent":["<script lang=\"ts\" setup>\r\nimport type { IFormFeedback } from '@formily/core'\r\nimport type { PropType } from 'vue'\r\nimport { useParentForm } from '@silver-formily/vue'\r\nimport { ElButton } from 'element-plus'\r\n\r\ndefineOptions({\r\n name: 'FSubmit',\r\n inheritAttrs: false,\r\n})\r\n\r\nconst props = defineProps({\r\n onClick: Function as PropType<(e: MouseEvent) => any>,\r\n onSubmit: Function as PropType<(values: any) => Promise<any>>,\r\n onSubmitSuccess: Function as PropType<(payload: any) => void>,\r\n onSubmitFailed: Function as PropType<(feedbacks: IFormFeedback[]) => void>,\r\n submit: Boolean,\r\n loading: Boolean,\r\n})\r\n\r\nconst formRef = useParentForm()\r\n\r\nfunction handleClick(e: MouseEvent) {\r\n if (props.onClick?.(e) === false)\r\n return\r\n if (props.onSubmit) {\r\n const form = formRef?.value\r\n form?.submit(props.onSubmit)\r\n .then(props.onSubmitSuccess)\r\n .catch(props.onSubmitFailed ?? console.log)\r\n }\r\n}\r\n</script>\r\n\r\n<template>\r\n <ElButton\r\n :native-type=\"props.submit ? 'button' : 'submit'\"\r\n type=\"primary\"\r\n v-bind=\"$attrs\"\r\n :loading=\"formRef?.submitting ?? props.loading\"\r\n @click=\"handleClick\"\r\n >\r\n <template #default>\r\n <slot />\r\n </template>\r\n </ElButton>\r\n</template>\r\n","import { observer } from '@silver-formily/reactive-vue'\r\nimport FSubmit from './submit.vue'\r\n\r\nexport const Submit = observer(FSubmit)\r\n\r\nexport default Submit\r\n"],"names":["props","__props","formRef","useParentForm","handleClick","e","_openBlock","_createBlock","_unref","_mergeProps","$attrs","_renderSlot","_ctx","Submit","observer","FSubmit"],"mappings":";;;;;;;;;;;;;;;;;AAWA,UAAMA,IAAQC,GASRC,IAAUC,EAAA;AAEhB,aAASC,EAAYC,GAAe;AAClC,MAAIL,EAAM,UAAUK,CAAC,MAAM,MAEvBL,EAAM,YACKE,GAAS,OAChB,OAAOF,EAAM,QAAQ,EACxB,KAAKA,EAAM,eAAe,EAC1B,MAAMA,EAAM,kBAAkB,QAAQ,GAAG;AAAA,IAEhD;sBAIEM,KAAAC,EAUWC,MAVXC,EAUW;AAAA,MATR,eAAaT,EAAM,SAAM,WAAA;AAAA,MAC1B,MAAK;AAAA,IAAA,GACGU,EAAAA,QAAM;AAAA,MACb,SAASF,EAAAN,CAAA,GAAS,cAAcF,EAAM;AAAA,MACtC,SAAOI;AAAA,IAAA;MAEG,WACT,MAAQ;AAAA,QAARO,EAAQC,EAAA,QAAA,SAAA;AAAA,MAAA;;;;ICxCDC,IAASC,EAASC,CAAO;"}
1
+ {"version":3,"file":"index.mjs","sources":["../../src/submit/submit.vue","../../src/submit/index.ts"],"sourcesContent":["<script lang=\"ts\" setup>\r\nimport type { IFormFeedback } from '@formily/core'\r\nimport type { PropType } from 'vue'\r\nimport { useParentForm } from '@silver-formily/vue'\r\nimport { ElButton } from 'element-plus'\r\n\r\ndefineOptions({\r\n name: 'FSubmit',\r\n inheritAttrs: false,\r\n})\r\n\r\nconst props = defineProps({\r\n onClick: Function as PropType<(e: MouseEvent) => any>,\r\n onSubmit: Function as PropType<(values: any) => Promise<any>>,\r\n onSubmitSuccess: Function as PropType<(payload: any) => void>,\r\n onSubmitFailed: Function as PropType<(feedbacks: IFormFeedback[]) => void>,\r\n submit: Boolean,\r\n loading: Boolean,\r\n})\r\n\r\nconst formRef = useParentForm()\r\n\r\nfunction handleClick(e: MouseEvent) {\r\n if (props.onClick?.(e) === false)\r\n return\r\n if (props.onSubmit) {\r\n const form = formRef?.value\r\n form?.submit(props.onSubmit)\r\n .then(props.onSubmitSuccess)\r\n .catch(props.onSubmitFailed ?? console.error)\r\n }\r\n}\r\n</script>\r\n\r\n<template>\r\n <ElButton\r\n :native-type=\"props.submit ? 'button' : 'submit'\"\r\n type=\"primary\"\r\n v-bind=\"$attrs\"\r\n :loading=\"formRef?.submitting ?? props.loading\"\r\n @click=\"handleClick\"\r\n >\r\n <template #default>\r\n <slot />\r\n </template>\r\n </ElButton>\r\n</template>\r\n","import { observer } from '@silver-formily/reactive-vue'\r\nimport FSubmit from './submit.vue'\r\n\r\nexport const Submit = observer(FSubmit)\r\n\r\nexport default Submit\r\n"],"names":["props","__props","formRef","useParentForm","handleClick","e","_openBlock","_createBlock","_unref","_mergeProps","$attrs","_renderSlot","_ctx","Submit","observer","FSubmit"],"mappings":";;;;;;;;;;;;;;;;;AAWA,UAAMA,IAAQC,GASRC,IAAUC,EAAA;AAEhB,aAASC,EAAYC,GAAe;AAClC,MAAIL,EAAM,UAAUK,CAAC,MAAM,MAEvBL,EAAM,YACKE,GAAS,OAChB,OAAOF,EAAM,QAAQ,EACxB,KAAKA,EAAM,eAAe,EAC1B,MAAMA,EAAM,kBAAkB,QAAQ,KAAK;AAAA,IAElD;sBAIEM,KAAAC,EAUWC,MAVXC,EAUW;AAAA,MATR,eAAaT,EAAM,SAAM,WAAA;AAAA,MAC1B,MAAK;AAAA,IAAA,GACGU,EAAAA,QAAM;AAAA,MACb,SAASF,EAAAN,CAAA,GAAS,cAAcF,EAAM;AAAA,MACtC,SAAOI;AAAA,IAAA;MAEG,WACT,MAAQ;AAAA,QAARO,EAAQC,EAAA,QAAA,SAAA;AAAA,MAAA;;;;ICxCDC,IAASC,EAASC,CAAO;"}
@@ -17,12 +17,12 @@ export declare const Switch: import('element-plus/es/utils/index.mjs').SFCWithIn
17
17
  type: import('vue').PropType<boolean>;
18
18
  default: undefined;
19
19
  };
20
- id: {
21
- type: import('vue').PropType<string>;
22
- };
23
20
  loading: {
24
21
  type: import('vue').PropType<boolean>;
25
22
  };
23
+ id: {
24
+ type: import('vue').PropType<string>;
25
+ };
26
26
  modelValue: {
27
27
  type: import('vue').PropType<string | number | boolean>;
28
28
  default: boolean;
@@ -115,12 +115,12 @@ export declare const Switch: import('element-plus/es/utils/index.mjs').SFCWithIn
115
115
  type: import('vue').PropType<boolean>;
116
116
  default: undefined;
117
117
  };
118
- id: {
119
- type: import('vue').PropType<string>;
120
- };
121
118
  loading: {
122
119
  type: import('vue').PropType<boolean>;
123
120
  };
121
+ id: {
122
+ type: import('vue').PropType<string>;
123
+ };
124
124
  modelValue: {
125
125
  type: import('vue').PropType<string | number | boolean>;
126
126
  default: boolean;
@@ -206,12 +206,12 @@ export declare const Switch: import('element-plus/es/utils/index.mjs').SFCWithIn
206
206
  type: import('vue').PropType<boolean>;
207
207
  default: undefined;
208
208
  };
209
- id: {
210
- type: import('vue').PropType<string>;
211
- };
212
209
  loading: {
213
210
  type: import('vue').PropType<boolean>;
214
211
  };
212
+ id: {
213
+ type: import('vue').PropType<string>;
214
+ };
215
215
  modelValue: {
216
216
  type: import('vue').PropType<string | number | boolean>;
217
217
  default: boolean;
@@ -12,6 +12,10 @@ export declare const TimeSelect: import('element-plus/es/utils/index.mjs').SFCWi
12
12
  name: {
13
13
  type: import('vue').PropType<string>;
14
14
  };
15
+ format: {
16
+ type: import('vue').PropType<string>;
17
+ default: string;
18
+ };
15
19
  editable: {
16
20
  type: import('vue').PropType<boolean>;
17
21
  default: boolean;
@@ -20,8 +24,8 @@ export declare const TimeSelect: import('element-plus/es/utils/index.mjs').SFCWi
20
24
  type: import('vue').PropType<boolean>;
21
25
  default: undefined;
22
26
  };
23
- format: {
24
- type: import('vue').PropType<string>;
27
+ effect: {
28
+ type: import('vue').PropType<import('element-plus').PopperEffect>;
25
29
  default: string;
26
30
  };
27
31
  placeholder: {
@@ -62,10 +66,6 @@ export declare const TimeSelect: import('element-plus/es/utils/index.mjs').SFCWi
62
66
  type: import('vue').PropType<string>;
63
67
  default: string;
64
68
  };
65
- effect: {
66
- type: import('vue').PropType<import('element-plus').PopperEffect>;
67
- default: string;
68
- };
69
69
  minTime: {
70
70
  type: import('vue').PropType<string>;
71
71
  };
@@ -98,6 +98,10 @@ export declare const TimeSelect: import('element-plus/es/utils/index.mjs').SFCWi
98
98
  name: {
99
99
  type: import('vue').PropType<string>;
100
100
  };
101
+ format: {
102
+ type: import('vue').PropType<string>;
103
+ default: string;
104
+ };
101
105
  editable: {
102
106
  type: import('vue').PropType<boolean>;
103
107
  default: boolean;
@@ -106,8 +110,8 @@ export declare const TimeSelect: import('element-plus/es/utils/index.mjs').SFCWi
106
110
  type: import('vue').PropType<boolean>;
107
111
  default: undefined;
108
112
  };
109
- format: {
110
- type: import('vue').PropType<string>;
113
+ effect: {
114
+ type: import('vue').PropType<import('element-plus').PopperEffect>;
111
115
  default: string;
112
116
  };
113
117
  placeholder: {
@@ -148,10 +152,6 @@ export declare const TimeSelect: import('element-plus/es/utils/index.mjs').SFCWi
148
152
  type: import('vue').PropType<string>;
149
153
  default: string;
150
154
  };
151
- effect: {
152
- type: import('vue').PropType<import('element-plus').PopperEffect>;
153
- default: string;
154
- };
155
155
  minTime: {
156
156
  type: import('vue').PropType<string>;
157
157
  };
@@ -6,6 +6,10 @@ export declare const Transfer: import('element-plus/es/utils/index.mjs').SFCWith
6
6
  type: import('vue').PropType<import('element-plus').TransferDataItem[]>;
7
7
  default: () => never[];
8
8
  };
9
+ format: {
10
+ type: import('vue').PropType<import('element-plus').TransferFormat>;
11
+ default: () => {};
12
+ };
9
13
  props: {
10
14
  type: import('vue').PropType<import('element-plus').TransferPropsAlias>;
11
15
  default: () => {
@@ -14,10 +18,6 @@ export declare const Transfer: import('element-plus/es/utils/index.mjs').SFCWith
14
18
  disabled: string;
15
19
  };
16
20
  };
17
- format: {
18
- type: import('vue').PropType<import('element-plus').TransferFormat>;
19
- default: () => {};
20
- };
21
21
  modelValue: {
22
22
  type: import('vue').PropType<import('element-plus').TransferKey[]>;
23
23
  default: () => never[];
@@ -95,6 +95,10 @@ export declare const Transfer: import('element-plus/es/utils/index.mjs').SFCWith
95
95
  type: import('vue').PropType<import('element-plus').TransferDataItem[]>;
96
96
  default: () => never[];
97
97
  };
98
+ format: {
99
+ type: import('vue').PropType<import('element-plus').TransferFormat>;
100
+ default: () => {};
101
+ };
98
102
  props: {
99
103
  type: import('vue').PropType<import('element-plus').TransferPropsAlias>;
100
104
  default: () => {
@@ -103,10 +107,6 @@ export declare const Transfer: import('element-plus/es/utils/index.mjs').SFCWith
103
107
  disabled: string;
104
108
  };
105
109
  };
106
- format: {
107
- type: import('vue').PropType<import('element-plus').TransferFormat>;
108
- default: () => {};
109
- };
110
110
  modelValue: {
111
111
  type: import('vue').PropType<import('element-plus').TransferKey[]>;
112
112
  default: () => never[];
@@ -176,6 +176,10 @@ export declare const Transfer: import('element-plus/es/utils/index.mjs').SFCWith
176
176
  type: import('vue').PropType<import('element-plus').TransferDataItem[]>;
177
177
  default: () => never[];
178
178
  };
179
+ format: {
180
+ type: import('vue').PropType<import('element-plus').TransferFormat>;
181
+ default: () => {};
182
+ };
179
183
  props: {
180
184
  type: import('vue').PropType<import('element-plus').TransferPropsAlias>;
181
185
  default: () => {
@@ -184,10 +188,6 @@ export declare const Transfer: import('element-plus/es/utils/index.mjs').SFCWith
184
188
  disabled: string;
185
189
  };
186
190
  };
187
- format: {
188
- type: import('vue').PropType<import('element-plus').TransferFormat>;
189
- default: () => {};
190
- };
191
191
  modelValue: {
192
192
  type: import('vue').PropType<import('element-plus').TransferKey[]>;
193
193
  default: () => never[];