@web-utils/form-ui 1.0.0-beta94 → 1.0.0-beta95

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 (219) hide show
  1. package/address-input/index.d.ts +2 -2
  2. package/awesome-button/index.d.ts +6 -4
  3. package/capsule-tab/index.d.ts +2 -2
  4. package/card/index.d.ts +2 -2
  5. package/chunks/{6dpdFLpv2.mjs → B0i3ywbn2.mjs} +35 -44
  6. package/chunks/{Cv1iIzzy2.mjs → BanS-yUY2.mjs} +1 -1
  7. package/chunks/{BZw-uhPj.mjs → C23Qaggp.mjs} +27 -26
  8. package/chunks/{n1KViU9y2.mjs → CIVnqVAQ2.mjs} +12 -9
  9. package/chunks/{JUkvPXqc.mjs → CZxWWk4N.mjs} +8 -8
  10. package/chunks/{BKdkhZkk2.mjs → D7kTwnJK2.mjs} +1 -1
  11. package/chunks/{C6l7TFPU.mjs → D8C17D2k.mjs} +7 -7
  12. package/chunks/{DngNYJVa2.mjs → DzfHfYvS2.mjs} +1 -1
  13. package/chunks/{5BOS55Lv2.mjs → NYkLWtyw2.mjs} +1 -1
  14. package/chunks/{BpZ0yk642.mjs → bBwzYT0T2.mjs} +23 -18
  15. package/chunks/{-d4DuTH12.mjs → dgRz6V6p2.mjs} +1 -1
  16. package/chunks/qIca9lDu2.mjs +108 -0
  17. package/chunks/{DRkvaPr32.mjs → q_m3gw_j2.mjs} +11 -8
  18. package/chunks/{BTVXdtOG.mjs → sCsjgWvR.mjs} +104 -95
  19. package/chunks/{D6B1lNKn2.mjs → v2GLQDzI2.mjs} +18 -18
  20. package/code-mirror-editor/index.d.ts +2 -2
  21. package/confirm-button/index.d.ts +121 -1
  22. package/confirmable/index.d.ts +92 -1
  23. package/context-menu/index.d.ts +3 -3
  24. package/count-up/index.d.ts +3 -3
  25. package/custom-scrollbar/index.d.ts +2 -2
  26. package/data-box/index.d.ts +2 -2
  27. package/data-card/index.d.ts +2 -2
  28. package/data-card-text/index.d.ts +2 -2
  29. package/data-display/index.d.ts +2 -2
  30. package/data-icons/index.d.ts +2 -2
  31. package/data-imgtext/index.d.ts +2 -2
  32. package/data-operatext/index.d.ts +2 -2
  33. package/data-panel/index.d.ts +2 -2
  34. package/data-pay/index.d.ts +2 -2
  35. package/data-price/index.d.ts +2 -2
  36. package/data-progress/index.d.ts +2 -2
  37. package/data-rotate/index.d.ts +2 -2
  38. package/data-table-picker/index.d.ts +2 -2
  39. package/data-table-picker/index.mjs +1 -1
  40. package/data-tabs/index.d.ts +2 -2
  41. package/dialog-form/index.d.ts +1 -1
  42. package/dict-render/index.d.ts +2 -2
  43. package/e-charts/index.d.ts +2 -2
  44. package/easy-popup/index.d.ts +3 -3
  45. package/editable-progress/index.d.ts +2 -2
  46. package/editable-tree/index.d.ts +4 -4
  47. package/element-dialog/index.d.ts +294 -16
  48. package/flex-box/index.d.ts +2 -2
  49. package/flex-column/index.d.ts +2 -2
  50. package/flex-item/index.d.ts +2 -2
  51. package/flex-row/index.d.ts +2 -2
  52. package/flex-scroll-area/index.d.ts +1 -1
  53. package/flex-scroller/index.d.ts +2 -2
  54. package/flow-designer/index.d.ts +6 -6
  55. package/flow-viewer/index.d.ts +2 -2
  56. package/form-button/index.d.ts +92 -1
  57. package/form-cascader/index.d.ts +9 -7
  58. package/form-cascader/index.mjs +1 -1
  59. package/form-checkbox/index.d.ts +8 -6
  60. package/form-checkbox-group/index.d.ts +372 -1
  61. package/form-checkbox-group/index.mjs +1 -1
  62. package/form-date-picker/index.d.ts +10 -8
  63. package/form-holder/index.d.ts +2 -2
  64. package/form-image/index.d.ts +7 -5
  65. package/form-input/index.d.ts +11 -9
  66. package/form-input/index.mjs +1 -1
  67. package/form-input-cron-expression/index.d.ts +8 -6
  68. package/form-input-email/index.d.ts +8 -8
  69. package/form-input-email/index.mjs +1 -1
  70. package/form-input-id-card/index.d.ts +8 -8
  71. package/form-input-id-card/index.mjs +1 -1
  72. package/form-input-number/index.d.ts +11 -9
  73. package/form-input-number/index.mjs +1 -1
  74. package/form-input-phone-number/index.d.ts +8 -8
  75. package/form-input-phone-number/index.mjs +1 -1
  76. package/form-input-tag/index.d.ts +8 -6
  77. package/form-input-time/index.d.ts +10 -8
  78. package/form-item/index.d.ts +5 -5
  79. package/form-item-config-provider/index.d.ts +3 -3
  80. package/form-item-group/index.d.ts +6 -4
  81. package/form-radio-group/index.d.ts +15 -13
  82. package/form-radio-group/index.mjs +1 -1
  83. package/form-rate/index.d.ts +8 -6
  84. package/form-row/index.d.ts +2 -2
  85. package/form-select/index.d.ts +11 -9
  86. package/form-select/index.mjs +1 -1
  87. package/form-slider/index.d.ts +9 -7
  88. package/form-switch/index.d.ts +8 -6
  89. package/form-table/index.d.ts +10 -6
  90. package/form-table/index.mjs +1 -1
  91. package/form-table-plus/index.d.ts +10 -8
  92. package/form-table-plus/index.mjs +1 -1
  93. package/form-text/index.d.ts +7 -5
  94. package/form-textarea/index.d.ts +6 -6
  95. package/form-textarea/index.mjs +1 -1
  96. package/form-time-select/index.d.ts +8 -6
  97. package/form-tree-select/index.d.ts +10 -8
  98. package/form-tree-select-multiple/index.d.ts +10 -8
  99. package/form-view/index.d.ts +4 -4
  100. package/fy-array/index.d.ts +266 -3
  101. package/fy-cascader/index.d.ts +266 -3
  102. package/fy-checkbox/index.d.ts +266 -3
  103. package/fy-curd/index.d.ts +10 -10
  104. package/fy-date/index.d.ts +266 -3
  105. package/fy-dynamic/index.d.ts +266 -3
  106. package/fy-empty/index.d.ts +2 -2
  107. package/fy-form/index.d.ts +9 -9
  108. package/fy-input/index.d.ts +266 -3
  109. package/fy-input-color/index.d.ts +266 -3
  110. package/fy-input-icon/index.d.ts +266 -3
  111. package/fy-input-map/index.d.ts +266 -3
  112. package/fy-input-number/index.d.ts +266 -3
  113. package/fy-input-table/index.d.ts +266 -3
  114. package/fy-input-tree/index.d.ts +267 -4
  115. package/fy-radio/index.d.ts +266 -3
  116. package/fy-rate/index.d.ts +266 -3
  117. package/fy-select/index.d.ts +267 -4
  118. package/fy-slider/index.d.ts +266 -3
  119. package/fy-switch/index.d.ts +266 -3
  120. package/fy-tabs/index.d.ts +2 -2
  121. package/fy-time/index.d.ts +731 -4
  122. package/fy-title/index.d.ts +266 -3
  123. package/fy-tree/index.d.ts +2 -2
  124. package/fy-u-editor/index.d.ts +3 -3
  125. package/fy-upload/index.d.ts +267 -4
  126. package/guide-steps/index.d.ts +2 -2
  127. package/helper/form-item.d.ts +1 -1
  128. package/helper/input.d.ts +18 -12
  129. package/highlight-j-s/index.d.ts +2 -2
  130. package/icon-temp/index.d.ts +2 -2
  131. package/image-cropper/index.d.ts +354 -1
  132. package/image-preview/index.d.ts +2 -2
  133. package/image-viewer/index.d.ts +2 -2
  134. package/index.mjs +15 -15
  135. package/input-number-range/index.d.ts +2 -2
  136. package/json-editor/index.d.ts +2 -2
  137. package/keyboard/index.d.ts +2 -2
  138. package/loading-view/index.d.ts +2 -2
  139. package/monaco-editor/index.d.ts +2 -2
  140. package/name-avatar/index.d.ts +2 -2
  141. package/package.json +3 -4
  142. package/page-index/index.d.ts +2 -2
  143. package/page-index-top/index.d.ts +2 -2
  144. package/page-skeleton/index.d.ts +2 -2
  145. package/page-skeleton-new/index.d.ts +2 -2
  146. package/pageable-table/index.d.ts +4 -4
  147. package/pageable-table/index.mjs +1 -1
  148. package/photo-swipe/index.d.ts +2 -2
  149. package/props/col.d.ts +1 -1
  150. package/props/form-item.d.ts +1 -1
  151. package/props/input-number.d.ts +1 -1
  152. package/props/input-number.mjs +5 -1
  153. package/props/input.d.ts +1 -1
  154. package/props/input.mjs +3 -2
  155. package/sign-panel/index.d.ts +2 -2
  156. package/split-pane/index.d.ts +4 -4
  157. package/stateful/index.d.ts +5 -3
  158. package/sub-table/index.d.ts +4 -2
  159. package/sub-table/index.mjs +1 -1
  160. package/sub-table-plus/index.d.ts +4 -2
  161. package/sub-table-plus/index.mjs +1 -1
  162. package/table-column/index.d.ts +3 -3
  163. package/table-column-def/index.d.ts +4 -4
  164. package/table-view/index.d.ts +7 -4
  165. package/table-view/index.mjs +13 -18
  166. package/tag-render/index.d.ts +2 -2
  167. package/text-ellipsis/index.d.ts +3 -3
  168. package/toolbar/index.d.ts +4 -4
  169. package/toolbar-button/index.d.ts +5 -5
  170. package/vue/directives/chat-drag.d.ts +2 -0
  171. package/vue/directives/chat-drag.mjs +12 -0
  172. package/vue/directives/click-outside.d.ts +10 -0
  173. package/vue/directives/click-outside.mjs +36 -0
  174. package/vue/directives/dialog-drag.d.ts +2 -0
  175. package/vue/directives/dialog-drag.mjs +15 -0
  176. package/vue/directives/drag-move.d.ts +10 -0
  177. package/vue/directives/drag-move.mjs +27 -0
  178. package/vue/directives/fix-fixed-column-height.d.ts +7 -0
  179. package/vue/directives/fix-fixed-column-height.mjs +20 -0
  180. package/vue/directives/index.d.ts +7 -0
  181. package/vue/directives/index.mjs +8 -0
  182. package/vue/directives/resize.d.ts +2 -0
  183. package/vue/directives/resize.mjs +12 -0
  184. package/vue/directives/scroll-bottom.d.ts +5 -0
  185. package/vue/directives/scroll-bottom.mjs +6 -0
  186. package/vue/hooks/index.d.ts +3 -0
  187. package/vue/hooks/index.mjs +4 -0
  188. package/vue/hooks/useDictionary.d.ts +60 -0
  189. package/{hook → vue/hooks}/useDictionary.mjs +2 -2
  190. package/vue/hooks/useEventBus.d.ts +1 -0
  191. package/vue/hooks/useEventBus.mjs +20 -0
  192. package/{hook → vue/hooks}/useVisibilityChange.mjs +1 -1
  193. package/vue/index.d.ts +3 -0
  194. package/vue/index.mjs +83 -0
  195. package/vue/mixin/bus.d.ts +5 -0
  196. package/vue/mixin/bus.mjs +33 -0
  197. package/vue/mixin/dialog.d.ts +38 -0
  198. package/vue/mixin/dialog.mjs +2 -0
  199. package/vue/mixin/index.d.ts +6 -0
  200. package/vue/mixin/index.mjs +7 -0
  201. package/vue/mixin/message.d.ts +2 -0
  202. package/vue/mixin/message.mjs +27 -0
  203. package/vue/mixin/multi-items.d.ts +43 -0
  204. package/vue/mixin/multi-items.mjs +70 -0
  205. package/vue/mixin/page.d.ts +28 -0
  206. package/vue/mixin/page.mjs +38 -0
  207. package/vue/mixin/resize-mixin.d.ts +15 -0
  208. package/vue/mixin/resize-mixin.mjs +24 -0
  209. package/vue-cron/index.d.ts +3 -3
  210. package/vue-qr-code/index.d.ts +2 -2
  211. package/vue-tags-input/index.d.ts +3 -3
  212. package/vue-tree-select/index.d.ts +13 -13
  213. package/vue-video-player/index.d.ts +2 -2
  214. package/watermark/index.d.ts +3 -3
  215. package/web-types.json +1 -1
  216. package/year-calendar/index.d.ts +2 -2
  217. package/chunks/DML17Idh2.mjs +0 -108
  218. package/hook/useDictionary.d.ts +0 -3
  219. /package/{hook → vue/hooks}/useVisibilityChange.d.ts +0 -0
@@ -1,4 +1,4 @@
1
- declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
1
+ declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
2
2
  options: {
3
3
  type: ArrayConstructor;
4
4
  default(): never[];
@@ -19,7 +19,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
19
19
  };
20
20
  labelAsValue: BooleanConstructor;
21
21
  disabled: BooleanConstructor;
22
- }>, () => any, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
22
+ }>, () => any, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
23
23
  options: {
24
24
  type: ArrayConstructor;
25
25
  default(): never[];
@@ -1,4 +1,4 @@
1
- declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
1
+ declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
2
2
  type: {
3
3
  type: StringConstructor;
4
4
  default: string;
@@ -21,7 +21,9 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
21
21
  type: StringConstructor;
22
22
  default: string;
23
23
  };
24
- }>, () => any, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
24
+ }>, () => globalThis.VNode<import('vue').RendererNode, import('vue').RendererElement, {
25
+ [key: string]: any;
26
+ }>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
25
27
  type: {
26
28
  type: StringConstructor;
27
29
  default: string;
@@ -47,11 +49,11 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
47
49
  }>> & Readonly<{}>, {
48
50
  disabled: boolean;
49
51
  type: string;
50
- loading: boolean;
52
+ icon: string;
51
53
  plain: boolean;
54
+ loading: boolean;
52
55
  autofocus: boolean;
53
56
  round: boolean;
54
- icon: string;
55
57
  nativeType: string;
56
58
  text: string;
57
59
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
@@ -4,7 +4,7 @@ interface Tab {
4
4
  value: string;
5
5
  [key: string]: any;
6
6
  }
7
- declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
7
+ declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
8
8
  tabs: {
9
9
  type: PropType<Tab[]>;
10
10
  default: () => never[];
@@ -14,7 +14,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
14
14
  };
15
15
  }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
16
16
  "update:modelValue": (value: string | undefined) => any;
17
- }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
17
+ }, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
18
18
  tabs: {
19
19
  type: PropType<Tab[]>;
20
20
  default: () => never[];
package/card/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
1
+ declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
2
2
  option: {
3
3
  type: ObjectConstructor;
4
4
  default: () => {};
@@ -22,7 +22,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
22
22
  }, {
23
23
  rowAdd(): void;
24
24
  rowClick(row: any, index: any): void;
25
- }, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("row-add" | "row-click")[], "row-add" | "row-click", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
25
+ }, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("row-add" | "row-click")[], "row-add" | "row-click", import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
26
26
  option: {
27
27
  type: ObjectConstructor;
28
28
  default: () => {};
@@ -1,49 +1,39 @@
1
1
  import { i as e } from "./ClVh1Lek.mjs";
2
2
  import { commonAutoBindProps as t, commonManualBindProps as n } from "../props/common.mjs";
3
3
  import { n as r, o as i } from "./_7MDfW_y.mjs";
4
- import { n as a } from "./BZw-uhPj.mjs";
5
- import { n as o, t as s } from "./DRkvaPr32.mjs";
4
+ import { n as a } from "./C23Qaggp.mjs";
5
+ import { n as o, t as s } from "./q_m3gw_j2.mjs";
6
6
  import { computed as c, createVNode as l, getCurrentInstance as u, mergeProps as d, useModel as f, useTemplateRef as p } from "vue";
7
- import { isArray as m, isString as h, trace as g, warning as _ } from "@web-utils/core";
8
- import { useEventBus as v } from "@web-utils/vue/hooks/useEventBus";
9
7
  //#region src/components/table/form-table-plus.ts
10
- var y = {
8
+ var m = {
11
9
  ...n,
12
10
  ...t,
13
11
  ...o,
14
12
  rowDbClick: Function,
15
- viewId: [String, Array],
16
13
  formPath: [String, Function]
17
- }, b = {
14
+ }, h = {
18
15
  readonly: !0,
19
- block: !0
20
- }, x = (e) => n[e] === void 0 && b[e] !== !0, S = {
16
+ block: !0,
17
+ viewId: !0
18
+ }, g = (e) => n[e] === void 0 && h[e] !== !0, _ = {
21
19
  name: "FormTablePlus",
22
- props: { ...y },
20
+ props: { ...m },
23
21
  emits: { ...r },
24
- setup(t, { emit: n, slots: r, attrs: o, expose: y }) {
25
- let b = f(t, "modelValue"), S = p("table"), C = [];
26
- t.viewId && C.push(t.viewId);
27
- let w = u();
28
- C.includes(w.parent.proxy.$options.name) || C.push(w.parent.proxy.$options.name);
29
- let T = () => {
22
+ setup(t, { emit: n, slots: r, attrs: o, expose: m }) {
23
+ let h = f(t, "modelValue"), _ = p("table"), v = u(), y = c(() => {
24
+ let e = [];
25
+ return t.viewId && e.push(t.viewId), e.includes(v.parent.proxy.$options.name) || e.push(v.parent.proxy.$options.name), e;
26
+ }), b = () => {
30
27
  var e;
31
- return (e = S.value.table) == null ? void 0 : e.reloadTable();
32
- }, E = async () => {
28
+ return (e = _.value.table) == null ? void 0 : e.reloadTable();
29
+ }, x = async () => {
33
30
  var e;
34
- return await ((e = S.value.table) == null ? void 0 : e.refreshTable());
35
- };
36
- v("reloadTableView", (e) => {
37
- if (C) if (h(e) || m(e)) {
38
- let t = e;
39
- h(t) && (t = t.split(",")), C.some((e) => t.includes(e)) && (g.call(w.parent.proxy || {}, "reloadTableView"), T());
40
- } else _.call(w.parent.proxy || {}, "`viewId`的类型必须是字符串或数组");
41
- });
42
- let D = (...n) => {
43
- t.rowDbClick ? t.rowDbClick(...n) : t.formPath && w.proxy.$router.push(e(t.formPath, n[0]));
44
- }, O = () => {
45
- w.proxy.$router.push(e(t.formPath));
46
- }, { render: k, placeholder: A, disabled: j, listeners: M, inputProps: N } = i(t, {
31
+ return await ((e = _.value.table) == null ? void 0 : e.refreshTable());
32
+ }, S = (...n) => {
33
+ t.rowDbClick ? t.rowDbClick(...n) : t.formPath && v.proxy.$router.push(e(t.formPath, n[0]));
34
+ }, C = () => {
35
+ v.proxy.$router.push(e(t.formPath));
36
+ }, { render: w, placeholder: T, disabled: E, listeners: D, inputProps: O } = i(t, {
47
37
  rules: c(() => [t.fetchApi ? {
48
38
  required: !0,
49
39
  validator: a
@@ -51,12 +41,12 @@ var y = {
51
41
  emit: n,
52
42
  slots: r,
53
43
  attrs: o,
54
- predicate: x,
44
+ predicate: g,
55
45
  block: t.block === void 0 ? !0 : t.block
56
46
  });
57
- return y({
58
- reloadTable: T,
59
- refreshTable: E
47
+ return m({
48
+ reloadTable: b,
49
+ refreshTable: x
60
50
  }), () => {
61
51
  var e;
62
52
  let n = {};
@@ -73,15 +63,16 @@ var y = {
73
63
  });
74
64
  };
75
65
  }
76
- return k({ vNodes: l(s, d({ ref: "table" }, M.value, N.value, {
66
+ return w({ vNodes: l(s, d({ ref: "table" }, D.value, O.value, {
77
67
  prop: t.prop,
78
- disabled: j.value,
79
- onRowDbClick: D,
80
- rowDbClick: D,
81
- modelValue: b.value,
82
- "onUpdate:modelValue": (e) => b.value = e,
83
- placeholder: A.value,
84
- onAddRow: O
68
+ disabled: E.value,
69
+ onRowDbClick: S,
70
+ rowDbClick: S,
71
+ modelValue: h.value,
72
+ "onUpdate:modelValue": (e) => h.value = e,
73
+ viewId: y.value,
74
+ placeholder: T.value,
75
+ onAddRow: C
85
76
  }), {
86
77
  ...n,
87
78
  columns: ({ columns: e }) => {
@@ -142,4 +133,4 @@ var y = {
142
133
  }
143
134
  };
144
135
  //#endregion
145
- export { S as t };
136
+ export { _ as t };
@@ -27,7 +27,7 @@ var l = {
27
27
  placeholder: p.value
28
28
  }), {
29
29
  prefix: l.prefix || e.prefix ? () => e.prefix : null,
30
- suffix: l.suffix || e.suffix ? () => e.suffix : e.append,
30
+ suffix: l.suffix || e.suffix ? () => e.suffix : () => e.append,
31
31
  "decrease-icon": l["decrease-icon"],
32
32
  "increase-icon": l["increase-icon"]
33
33
  }) });
@@ -4,14 +4,14 @@ import { ElInput as a } from "element-plus/es";
4
4
  import "element-plus/es/components/base/style/css";
5
5
  import "element-plus/es/components/input/style/css";
6
6
  import { computed as o, createVNode as s, mergeProps as c, useModel as l } from "vue";
7
- import { validatePhoneNum as u } from "@web-utils/core";
7
+ import { isString as u, validatePhoneNum as d } from "@web-utils/core";
8
8
  import "../form-input/style.css";
9
9
  //#region src/utils/form-validate.ts
10
- var d = (e, t, n) => t && !/^[A-Za-z0-9\u4e00-\u9fa5_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/.test(t) ? n(/* @__PURE__ */ Error("invalid")) : n();
11
- function f(e, t, n) {
10
+ var f = (e, t, n) => t && !/^[A-Za-z0-9\u4e00-\u9fa5_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/.test(t) ? n(/* @__PURE__ */ Error("invalid")) : n();
11
+ function p(e, t, n) {
12
12
  t && !/^[1-9][0-9]{5}(18|19|(2[0-9]))[0-9]{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)[0-9]{3}[0-9Xx]$/.test(t) ? n(/* @__PURE__ */ Error("invalid")) : n();
13
13
  }
14
- function p(e, t, n) {
14
+ function m(e, t, n) {
15
15
  if (this.$refs.table.$refs.table.records.length === 0) {
16
16
  n(Error(e.message || `请添加${e.label}`));
17
17
  return;
@@ -20,50 +20,51 @@ function p(e, t, n) {
20
20
  }
21
21
  //#endregion
22
22
  //#region src/components/form/FormInput.vue
23
- var m = {
23
+ var h = {
24
24
  name: "FormInput",
25
25
  inheritAttrs: !1,
26
26
  props: { ...r },
27
27
  emits: { ...e },
28
- setup(e, { emit: r, slots: p, attrs: m }) {
29
- let h = l(e, "modelValue"), g = `请输入正确的${e.label}!`, { render: _, placeholder: v, disabled: y, listeners: b, inputProps: x, printing: S } = t(e, {
28
+ setup(e, { emit: r, slots: m, attrs: h }) {
29
+ let g = l(e, "modelValue"), _ = `请输入正确的${e.label}!`, { render: v, placeholder: y, disabled: b, listeners: x, inputProps: S, printing: C } = t(e, {
30
30
  emit: r,
31
- slots: p,
32
- attrs: m,
31
+ slots: m,
32
+ attrs: h,
33
33
  rules: o(() => {
34
34
  if (!e.type || e.type === "textarea") return null;
35
35
  let t = {
36
- message: g,
36
+ message: _,
37
37
  trigger: "blur"
38
38
  };
39
- if (e.type === "email") t.validator = d;
40
- else if (e.type === "idcard") t.validator = f;
41
- else if (e.type === "phone") t.validator = u;
39
+ if (e.type === "email") t.validator = f;
40
+ else if (e.type === "idcard") t.validator = p;
41
+ else if (e.type === "phone") t.validator = d;
42
42
  else return null;
43
43
  return [t];
44
44
  }),
45
45
  predicate: i
46
- });
47
- return () => _({ vNodes: S.value ? e.modelValue : s(a, c(b.value, x.value, {
46
+ }), w = o(() => u(e.rows) ? Number(e.rows) : e.rows);
47
+ return () => v({ vNodes: C.value ? e.modelValue : s(a, c(x.value, S.value, {
48
48
  class: ["form-input", {
49
49
  "is-readonly": e.readonlyGrey && e.readonly && !e.picker,
50
- "el-input-cursor-pointer": e.picker && !y.value
50
+ "el-input-cursor-pointer": e.picker && !b.value
51
51
  }],
52
- modelValue: h.value,
53
- "onUpdate:modelValue": (e) => h.value = e,
54
- disabled: y.value,
55
- placeholder: v.value,
52
+ modelValue: g.value,
53
+ "onUpdate:modelValue": (e) => g.value = e,
54
+ disabled: b.value,
55
+ rows: w.value,
56
+ placeholder: y.value,
56
57
  readonly: e.readonly || e.picker,
57
58
  "prefix-icon": n({ icon: e.picker ? "el-icon-search" : e.prefixIcon }),
58
59
  "suffix-icon": n({ icon: e.suffixIcon })
59
60
  }), {
60
- prefix: p.prefix || e.prefix ? () => e.prefix : null,
61
- suffix: p.suffix || e.suffix ? () => e.suffix : null,
62
- "password-icon": p["password-icon"],
63
- prepend: p.prepend || e.prepend ? () => e.prepend : null,
64
- append: p.append || e.append ? () => e.append : null
61
+ prefix: m.prefix || e.prefix ? () => e.prefix : null,
62
+ suffix: m.suffix || e.suffix ? () => e.suffix : null,
63
+ "password-icon": m["password-icon"],
64
+ prepend: m.prepend || e.prepend ? () => e.prepend : null,
65
+ append: m.append || e.append ? () => e.append : null
65
66
  }) });
66
67
  }
67
68
  };
68
69
  //#endregion
69
- export { p as n, m as t };
70
+ export { m as n, h as t };
@@ -1,17 +1,17 @@
1
1
  import { t as e } from "./B1MSrc6f.mjs";
2
2
  import { t } from "./DTeHffqJ.mjs";
3
- import { t as n } from "./BTVXdtOG.mjs";
3
+ import { t as n } from "./sCsjgWvR.mjs";
4
4
  import { t as r } from "./tzjUpVIj.mjs";
5
5
  import { n as i } from "./_7MDfW_y.mjs";
6
- import { t as a } from "./C6l7TFPU.mjs";
7
- import { t as o } from "./BZw-uhPj.mjs";
8
- import { t as s } from "./JUkvPXqc.mjs";
6
+ import { t as a } from "./D8C17D2k.mjs";
7
+ import { t as o } from "./C23Qaggp.mjs";
8
+ import { t as s } from "./CZxWWk4N.mjs";
9
9
  import { t as c } from "./CCkHwxt7.mjs";
10
- import { t as l } from "./Cv1iIzzy2.mjs";
11
- import { t as u } from "./-d4DuTH12.mjs";
12
- import { t as d } from "./DML17Idh2.mjs";
10
+ import { t as l } from "./BanS-yUY2.mjs";
11
+ import { t as u } from "./dgRz6V6p2.mjs";
12
+ import { t as d } from "./qIca9lDu2.mjs";
13
13
  import f from "../table-column-def/index.mjs";
14
- import { t as p } from "./BKdkhZkk2.mjs";
14
+ import { t as p } from "./D7kTwnJK2.mjs";
15
15
  import { ElMessage as m, formContextKey as h, formItemContextKey as g } from "element-plus/es";
16
16
  import "element-plus/es/components/base/style/css";
17
17
  import { Fragment as _, createBlock as v, createCommentVNode as y, createElementBlock as b, createElementVNode as x, createSlots as S, createTextVNode as C, createVNode as w, mergeProps as T, openBlock as E, renderList as D, renderSlot as O, resolveComponent as k, toDisplayString as A, withCtx as j, withModifiers as M } from "vue";
@@ -57,7 +57,8 @@ var I = {
57
57
  rowKey: {
58
58
  type: [Function, String],
59
59
  default: "id"
60
- }
60
+ },
61
+ viewId: [String, Array]
61
62
  }, L = {
62
63
  name: "SubTable",
63
64
  emits: {
@@ -196,6 +197,7 @@ function V(e, i, m, h, g, N) {
196
197
  "show-summary": e.showSummary,
197
198
  "selection-width": e.selectionWidth
198
199
  }, e.$attrs, {
200
+ "view-id": e.viewId,
199
201
  "row-key": e.rowKey,
200
202
  "hide-on-single-page": "",
201
203
  selection: N.enabled,
@@ -415,6 +417,7 @@ function V(e, i, m, h, g, N) {
415
417
  "api",
416
418
  "show-summary",
417
419
  "selection-width",
420
+ "view-id",
418
421
  "row-key",
419
422
  "selection",
420
423
  "row-db-click",
@@ -1,7 +1,7 @@
1
1
  import { allProps as e, predicate as t } from "../props/checkbox-group.mjs";
2
- import { n, o as r } from "./_7MDfW_y.mjs";
3
- import { useDictionary as i } from "../hook/useDictionary.mjs";
4
- import { t as a } from "./BZw-uhPj.mjs";
2
+ import { useDictionary as n } from "../vue/hooks/useDictionary.mjs";
3
+ import { n as r, o as i } from "./_7MDfW_y.mjs";
4
+ import { t as a } from "./C23Qaggp.mjs";
5
5
  import { ElCheckbox as o, ElCheckboxButton as s, ElCheckboxGroup as c } from "element-plus/es";
6
6
  import "element-plus/es/components/base/style/css";
7
7
  import { computed as l, createVNode as u, defineComponent as d, isVNode as f, mergeProps as p, useModel as m } from "vue";
@@ -20,12 +20,12 @@ var g = /* @__PURE__ */ d({
20
20
  inheritAttrs: !1,
21
21
  props: { ...e },
22
22
  emits: {
23
- ...n,
23
+ ...r,
24
24
  "update:other": null
25
25
  },
26
- setup(e, { emit: n, slots: d, attrs: f }) {
27
- let g = m(e, "other"), { emitInput: _, render: v, disabled: y, listeners: b, inputProps: x } = r(e, {
28
- emit: n,
26
+ setup(e, { emit: r, slots: d, attrs: f }) {
27
+ let g = m(e, "other"), { emitInput: _, render: v, disabled: y, listeners: b, inputProps: x } = i(e, {
28
+ emit: r,
29
29
  slots: d,
30
30
  attrs: f,
31
31
  predicate: t,
@@ -44,7 +44,7 @@ var g = /* @__PURE__ */ d({
44
44
  return Array.isArray(e.modelValue) ? e.modelValue.filter((e) => e) : ((t = e.modelValue) == null ? void 0 : t.split(e.delimiter).filter((e) => e)) ?? [];
45
45
  }
46
46
  return e.modelValue || [];
47
- }), w = l(() => e.classic ? "label" : e.labelProp), T = l(() => e.classic ? "value" : e.valueProp), { dictItems: E } = i(e), D = l(() => e.dictType ? E.value : e.gender ? [{
47
+ }), w = l(() => e.classic ? "label" : e.labelProp), T = l(() => e.classic ? "value" : e.valueProp), { dictItems: E } = n(e), D = l(() => e.dictType ? E.value : e.gender ? [{
48
48
  [w.value]: "男",
49
49
  [T.value]: "男"
50
50
  }, {
@@ -1,5 +1,5 @@
1
1
  import { n as e } from "./_7MDfW_y.mjs";
2
- import { t } from "./BZw-uhPj.mjs";
2
+ import { t } from "./C23Qaggp.mjs";
3
3
  import { allProps as n } from "../props/textarea.mjs";
4
4
  import { createVNode as r, isVNode as i, mergeProps as a, useModel as o } from "vue";
5
5
  //#region src/components/form/FormTextarea.vue?vue&type=script&lang.jsx
@@ -1,6 +1,6 @@
1
1
  import { allProps as e, predicate as t } from "../props/cascader.mjs";
2
- import { n, o as r } from "./_7MDfW_y.mjs";
3
- import { useDictionary as i } from "../hook/useDictionary.mjs";
2
+ import { useDictionary as n } from "../vue/hooks/useDictionary.mjs";
3
+ import { n as r, o as i } from "./_7MDfW_y.mjs";
4
4
  import { ElCascader as a } from "element-plus/es";
5
5
  import "element-plus/es/components/base/style/css";
6
6
  import "element-plus/es/components/cascader/style/css";
@@ -12,14 +12,14 @@ import { cloneDeep as p } from "@web-utils/integrations/lodash";
12
12
  var m = {
13
13
  name: "FormCascader",
14
14
  props: { ...e },
15
- emits: { ...n },
16
- setup(e, { emit: n, slots: m, attrs: h }) {
17
- let { emitInput: g, render: _, placeholder: v, disabled: y, listeners: b, inputProps: x } = r(e, {
18
- emit: n,
15
+ emits: { ...r },
16
+ setup(e, { emit: r, slots: m, attrs: h }) {
17
+ let { emitInput: g, render: _, placeholder: v, disabled: y, listeners: b, inputProps: x } = i(e, {
18
+ emit: r,
19
19
  slots: m,
20
20
  attrs: h,
21
21
  predicate: t
22
- }), { dictItems: S } = i(e), C = o(() => {
22
+ }), { dictItems: S } = n(e), C = o(() => {
23
23
  if (e.dictType) return S.value;
24
24
  if (e.options) {
25
25
  let t = p(e.options);
@@ -1,5 +1,5 @@
1
1
  import { n as e } from "./_7MDfW_y.mjs";
2
- import { t } from "./BZw-uhPj.mjs";
2
+ import { t } from "./C23Qaggp.mjs";
3
3
  import { allProps as n } from "../props/input.mjs";
4
4
  import { createVNode as r, isVNode as i, mergeProps as a, useModel as o } from "vue";
5
5
  //#region src/components/form/FormInputIdCard.vue?vue&type=script&lang.jsx
@@ -1,5 +1,5 @@
1
1
  import { n as e } from "./_7MDfW_y.mjs";
2
- import { t } from "./BZw-uhPj.mjs";
2
+ import { t } from "./C23Qaggp.mjs";
3
3
  import { allProps as n } from "../props/input.mjs";
4
4
  import { createVNode as r, isVNode as i, mergeProps as a, useModel as o } from "vue";
5
5
  //#region src/components/form/FormInputEmail.vue?vue&type=script&lang.jsx
@@ -1,30 +1,34 @@
1
1
  import { commonAutoBindProps as e, commonManualBindProps as t } from "../props/common.mjs";
2
2
  import { n, o as r } from "./_7MDfW_y.mjs";
3
- import { n as i, t as a } from "./n1KViU9y2.mjs";
4
- import { createVNode as o, mergeProps as s, ref as c, useModel as l } from "vue";
3
+ import { n as i, t as a } from "./CIVnqVAQ2.mjs";
4
+ import { computed as o, createVNode as s, getCurrentInstance as c, mergeProps as l, ref as u, useModel as d } from "vue";
5
5
  //#region src/components/table/form-table.ts
6
- var u = {
6
+ var f = {
7
7
  ...t,
8
8
  ...e,
9
9
  ...i
10
- }, d = {
10
+ }, p = {
11
11
  modelValue: !0,
12
- block: !0
13
- }, f = (e) => t[e] === void 0 && d[e] !== !0, p = {
12
+ block: !0,
13
+ viewId: !0
14
+ }, m = (e) => t[e] === void 0 && p[e] !== !0, h = {
14
15
  name: "FormTable",
15
- props: { ...u },
16
+ props: { ...f },
16
17
  emits: {
17
18
  ...n,
18
19
  "add-row": null
19
20
  },
20
21
  setup(e, { emit: t, attrs: n, slots: i }) {
21
- let u = l(e, "modelValue"), d = c([]), p = (e) => {
22
- d.value = e;
23
- }, { render: m, placeholder: h, disabled: g, listeners: _, inputProps: v } = r(e, {
22
+ let f = d(e, "modelValue"), p = c(), h = o(() => {
23
+ let t = [];
24
+ return e.viewId && t.push(e.viewId), t.includes(p.parent.proxy.$options.name) || t.push(p.parent.proxy.$options.name), t;
25
+ }), g = u([]), _ = (e) => {
26
+ g.value = e;
27
+ }, { render: v, placeholder: y, disabled: b, listeners: x, inputProps: S } = r(e, {
24
28
  emit: t,
25
29
  slots: i,
26
30
  attrs: n,
27
- predicate: f,
31
+ predicate: m,
28
32
  block: e.block === void 0 ? !0 : e.block
29
33
  });
30
34
  return () => {
@@ -37,12 +41,13 @@ var u = {
37
41
  return (a = i[t.prop]) == null ? void 0 : a.call(i, e, n, r);
38
42
  };
39
43
  }
40
- return m({ vNodes: o(a, s(_.value, v.value, {
41
- disabled: g.value,
42
- modelValue: u.value,
43
- "onUpdate:modelValue": (e) => u.value = e,
44
- placeholder: h.value,
45
- onSelectionChange: p
44
+ return v({ vNodes: s(a, l(x.value, S.value, {
45
+ disabled: b.value,
46
+ viewId: h.value,
47
+ modelValue: f.value,
48
+ "onUpdate:modelValue": (e) => f.value = e,
49
+ placeholder: y.value,
50
+ onSelectionChange: _
46
51
  }), {
47
52
  ...n,
48
53
  columns: ({ columns: e }) => {
@@ -84,4 +89,4 @@ var u = {
84
89
  }
85
90
  };
86
91
  //#endregion
87
- export { p as t };
92
+ export { h as t };
@@ -1,5 +1,5 @@
1
1
  import { n as e } from "./_7MDfW_y.mjs";
2
- import { t } from "./BZw-uhPj.mjs";
2
+ import { t } from "./C23Qaggp.mjs";
3
3
  import { allProps as n } from "../props/input.mjs";
4
4
  import { createVNode as r, isVNode as i, mergeProps as a, useModel as o } from "vue";
5
5
  //#region src/components/form/FormInputPhoneNumber.vue?vue&type=script&lang.jsx
@@ -0,0 +1,108 @@
1
+ import { useDictionary as e } from "../vue/hooks/useDictionary.mjs";
2
+ import { n as t, o as n } from "./_7MDfW_y.mjs";
3
+ import { allProps as r, predicate as i } from "../props/select.mjs";
4
+ import { ElOption as a, ElSelect as o } from "element-plus/es";
5
+ import "element-plus/es/components/base/style/css";
6
+ import { computed as s, createVNode as c, mergeProps as l, ref as u, watchEffect as d } from "vue";
7
+ import { isNumber as f, isPlainObject as p, isString as m } from "@web-utils/core";
8
+ import "element-plus/es/components/select/style/css";
9
+ import "element-plus/es/components/option/style/css";
10
+ //#endregion
11
+ //#region src/components/form/FormSelect.vue
12
+ var h = {
13
+ name: "FormSelect",
14
+ inheritAttrs: !1,
15
+ props: { ...r },
16
+ emits: { ...t },
17
+ setup(t, { emit: r, slots: h, attrs: g }) {
18
+ let { emitInput: _, render: v, placeholder: y, disabled: b, listeners: x, inputProps: S } = n(t, {
19
+ emit: r,
20
+ slots: h,
21
+ attrs: g,
22
+ predicate: i,
23
+ messagePrefix: "请选择"
24
+ }), C = u(null), w = u(!1);
25
+ d(() => {
26
+ if (t.multiple && t.multipleStringMode) {
27
+ var e;
28
+ C.value = (e = t.modelValue) == null ? void 0 : e.split(",").filter((e) => e);
29
+ } else C.value = t.modelValue;
30
+ });
31
+ let T = (e) => {
32
+ if (t.multiple && t.multipleStringMode ? _(e.join(t.multipleStringSeparator)) : _(e), t.emitLabel) {
33
+ let n = O.value.find((n) => n[t.props.value] === e), i = n == null ? void 0 : n[t.props.label];
34
+ i !== t.optionLabel && r("update:optionLabel", i);
35
+ }
36
+ }, { dictItems: E } = e(t), D = u([]), O = s(() => {
37
+ if (t.dictType) return E.value;
38
+ if (t.remote) return D.value;
39
+ if (t.gender) return [{
40
+ [t.props.label]: "男",
41
+ [t.props.value]: t.chinese ? "男" : t.typing ? 1 : "1"
42
+ }, {
43
+ [t.props.label]: "女",
44
+ [t.props.value]: t.chinese ? "女" : t.typing ? 2 : "2"
45
+ }];
46
+ if (t.confirm) return [{
47
+ [t.props.label]: "是",
48
+ [t.props.value]: t.chinese ? "是" : t.english ? "Y" : t.typing ? 1 : "1"
49
+ }, {
50
+ [t.props.label]: "否",
51
+ [t.props.value]: t.chinese ? "否" : t.english ? "N" : t.typing ? 0 : "0"
52
+ }];
53
+ if (t.all) return [{
54
+ [t.props.value]: "",
55
+ [t.props.label]: "全部"
56
+ }, ...t.options];
57
+ if (t.start && t.end) return Array(t.end - t.start + 1).fill(1).map((e, n) => ({
58
+ [t.props.label]: t.start + n,
59
+ [t.props.value]: t.start + n
60
+ }));
61
+ if (t.year) {
62
+ let e = (/* @__PURE__ */ new Date()).getFullYear(), n = [], r = 10;
63
+ f(t.year) && (r = t.year);
64
+ for (let i = -r; i <= r; i++) {
65
+ let r = e + i;
66
+ n.push({
67
+ [t.props.label]: r,
68
+ [t.props.value]: r
69
+ });
70
+ }
71
+ return n;
72
+ }
73
+ return t.options ? t.options.map((e) => (e[t.props.value] = e[t.props.value] ?? e[t.props.label], e)) : [];
74
+ }), k = async (e) => {
75
+ try {
76
+ var n;
77
+ w.value = !0;
78
+ let r = await t.remoteMethod(e, t.prop);
79
+ ((n = r.data.data) == null ? void 0 : n.length) >= 0 ? m(r.data.data[0]) ? D.value = r.data.data.map((e) => ({
80
+ [t.props.value]: e,
81
+ [t.props.label]: e
82
+ })) : p(r.data.data[0]) && (D.value = r.data.data) : D.value = [];
83
+ } catch {}
84
+ w.value = !1;
85
+ };
86
+ return d(() => {
87
+ t.remote && k();
88
+ }), () => v({ vNodes: c(o, l(x.value, S.value, {
89
+ offset: t.dropDownOffset,
90
+ "model-value": C.value,
91
+ "onUpdate:modelValue": T,
92
+ disabled: b.value,
93
+ placeholder: y.value
94
+ }), {
95
+ ...h,
96
+ default: h.default || (() => {
97
+ var e;
98
+ return (e = O.value) == null ? void 0 : e.map(({ value: e, label: t }) => c(a, {
99
+ key: e,
100
+ label: t,
101
+ value: e
102
+ }, null));
103
+ })
104
+ }) });
105
+ }
106
+ };
107
+ //#endregion
108
+ export { h as t };