@web-utils/component 2.70.0 → 3.0.1

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 (189) hide show
  1. package/address-input/index.mjs +16 -14
  2. package/awesome-button/index.mjs +30 -29
  3. package/card/index.mjs +42 -40
  4. package/carousel/index.mjs +27 -25
  5. package/chat/index.mjs +70 -59
  6. package/chunk-file-uploader/index.mjs +594 -35
  7. package/chunk-file-uploader/style.css +1 -1
  8. package/chunks/CountUp.f1a19f35.mjs +124 -0
  9. package/chunks/CountUp.vue_vue_type_template_lang.1f68c96e.mjs +8 -0
  10. package/chunks/EasyPopup.vue_vue_type_style_index_0_lang.89350bda.mjs +32 -0
  11. package/chunks/EditableTree.vue_vue_type_style_index_0_lang.5dba9f89.mjs +356 -0
  12. package/chunks/ElementDialog.d8f3105c.mjs +211 -0
  13. package/chunks/ElementDialog.vue_vue_type_style_index_0_lang.57cb8e07.mjs +95 -0
  14. package/chunks/EmptyView.e2430422.mjs +51 -0
  15. package/chunks/EmptyView.vue_vue_type_style_index_0_lang.ffa84770.mjs +23 -0
  16. package/chunks/FlowNode.vue_vue_type_template_lang.662bdcfa.mjs +37 -0
  17. package/chunks/FormInput.vue_vue_type_template_lang.3cb79386.mjs +65 -0
  18. package/chunks/FormItem.2920ac0c.mjs +45 -0
  19. package/chunks/FormItem.vue_vue_type_style_index_0_lang.970bd712.mjs +258 -0
  20. package/chunks/FormItemGroup.41daddb6.mjs +64 -0
  21. package/chunks/FormItemGroup.vue_vue_type_style_index_0_lang.b588a8ea.mjs +155 -0
  22. package/chunks/FyCurd.8acd2983.mjs +548 -0
  23. package/chunks/FyCurd.vue_vue_type_style_index_0_lang.4fbd4b30.mjs +2945 -0
  24. package/chunks/FyDate.vue_vue_type_style_index_0_lang.429c03e3.mjs +47 -0
  25. package/chunks/FyDynamic.vue_vue_type_style_index_0_lang.304417ce.mjs +151 -0
  26. package/chunks/FyEmpty.vue_vue_type_style_index_0_lang.fc8bd24c.mjs +22 -0
  27. package/chunks/FyForm.0294e494.mjs +439 -0
  28. package/chunks/FyForm.vue_vue_type_style_index_0_lang.6e64daee.mjs +737 -0
  29. package/chunks/FyInput.vue_vue_type_template_lang.d2c56811.mjs +93 -0
  30. package/chunks/FyInputColor.vue_vue_type_template_lang.6eca0ddd.mjs +56 -0
  31. package/chunks/FyInputIcon.vue_vue_type_style_index_0_lang.11a6a221.mjs +158 -0
  32. package/chunks/FyRate.vue_vue_type_style_index_0_lang.82174185.mjs +39 -0
  33. package/chunks/FySelect.vue_vue_type_style_index_0_lang.5f0f3244.mjs +102 -0
  34. package/chunks/FyTabs.vue_vue_type_template_lang.66af5ac9.mjs +41 -0
  35. package/chunks/HighlightJS.vue_vue_type_style_index_0_lang.fefeaa3b.mjs +15 -0
  36. package/chunks/IconTemp.42c48e1f.mjs +32 -0
  37. package/chunks/IconTemp.vue_vue_type_style_index_0_lang.a0777b31.mjs +23 -0
  38. package/chunks/InputNumber.vue_vue_type_style_index_0_lang.18046bd3.mjs +172 -0
  39. package/chunks/LoadingView.vue_vue_type_style_index_0_lang.4c3fff2a.mjs +23 -0
  40. package/chunks/NavBar.vue_vue_type_style_index_0_lang.e21b57f3.mjs +21 -0
  41. package/chunks/Page.81f4b8d9.mjs +32 -0
  42. package/chunks/Page.vue_vue_type_style_index_0_lang.cb4f9bf2.mjs +13 -0
  43. package/chunks/PageHeader.vue_vue_type_style_index_0_lang.3bcca5aa.mjs +26 -0
  44. package/chunks/PageSkeleton.vue_vue_type_style_index_0_lang.8621381f.mjs +88 -0
  45. package/chunks/PageableTable.333cbdc1.mjs +335 -0
  46. package/chunks/PageableTable.vue_vue_type_style_index_0_lang.fd89fb43.mjs +148 -0
  47. package/chunks/ResizeObserver.60f728f0.mjs +54 -0
  48. package/chunks/ResizeObserver.vue_vue_type_style_index_0_lang.7079029c.mjs +13 -0
  49. package/chunks/TableColumn.8503272e.mjs +106 -0
  50. package/chunks/Toolbar.5c539dbb.mjs +24 -0
  51. package/chunks/Toolbar.vue_vue_type_style_index_0_lang.7594243c.mjs +275 -0
  52. package/chunks/ToolbarButton.vue_vue_type_style_index_0_lang.e2cb14ba.mjs +31 -0
  53. package/chunks/XInputTag.vue_vue_type_style_index_0_lang.7ad045b3.mjs +74 -0
  54. package/chunks/confirmable-mixin.26e1d0e0.mjs +197 -0
  55. package/chunks/{dataformat.f995e2f9.mjs → dataformat.816df805.mjs} +5 -5
  56. package/chunks/{dic.eaac0823.mjs → dic.3b4ba802.mjs} +40 -40
  57. package/chunks/{event.b5d855dd.mjs → event.4377230d.mjs} +2 -2
  58. package/chunks/{index.57f871af.mjs → index.d91bd77a.mjs} +7 -7
  59. package/chunks/{init.47f219b4.mjs → init.f0a03127.mjs} +2 -2
  60. package/chunks/{util.ae730cde.mjs → util.7844e2c2.mjs} +21 -21
  61. package/color-picker/index.mjs +200 -32
  62. package/confirm-button/index.mjs +1 -1
  63. package/confirmable/index.mjs +1 -1
  64. package/count-up/index.mjs +14 -17
  65. package/data-box/index.mjs +36 -33
  66. package/data-card/index.mjs +35 -33
  67. package/data-cardtext/index.mjs +29 -27
  68. package/data-display/index.mjs +37 -34
  69. package/data-icons/index.mjs +32 -29
  70. package/data-imgtext/index.mjs +30 -27
  71. package/data-operatext/index.mjs +41 -39
  72. package/data-panel/index.mjs +39 -36
  73. package/data-pay/index.mjs +26 -22
  74. package/data-price/index.mjs +34 -32
  75. package/data-progress/index.mjs +32 -28
  76. package/data-rotate/index.mjs +38 -35
  77. package/data-table-picker/index.mjs +25 -22
  78. package/data-tabs/index.mjs +35 -32
  79. package/dialog-form/index.mjs +41 -32
  80. package/dynamic-table/index.mjs +47 -42
  81. package/easy-popup/index.mjs +29 -56
  82. package/editable-progress/index.mjs +16 -14
  83. package/editable-tree/index.mjs +129 -476
  84. package/egd-collapse-item/index.mjs +1 -2
  85. package/element-dialog/index.mjs +37 -126
  86. package/empty-view/index.mjs +13 -31
  87. package/flex-column/index.mjs +1 -1
  88. package/flex-item/index.mjs +1 -1
  89. package/flex-row/index.mjs +1 -1
  90. package/flow/index.mjs +105 -40
  91. package/flow-designer/index.mjs +1190 -1114
  92. package/flow-node/index.mjs +15 -47
  93. package/flow-viewer/index.mjs +167 -78
  94. package/form-block/index.mjs +24 -22
  95. package/form-cascader/index.mjs +29 -29
  96. package/form-checkbox-group/index.mjs +76 -31
  97. package/form-date-picker/index.mjs +21 -20
  98. package/form-holder/index.mjs +16 -15
  99. package/form-input/index.mjs +30 -88
  100. package/form-input-email/index.mjs +28 -28
  101. package/form-input-id-card/index.mjs +37 -37
  102. package/form-input-number/index.mjs +219 -59
  103. package/form-input-phone-number/index.mjs +25 -25
  104. package/form-input-tag/index.mjs +160 -38
  105. package/form-input-time/index.mjs +23 -23
  106. package/form-item/index.mjs +15 -144
  107. package/form-item-group/index.mjs +15 -163
  108. package/form-radio-group/index.mjs +39 -38
  109. package/form-select/index.mjs +33 -32
  110. package/form-switch/index.mjs +26 -26
  111. package/form-textarea/index.mjs +26 -26
  112. package/form-view/index.mjs +46 -42
  113. package/fy-array/index.mjs +65 -61
  114. package/fy-cascader/index.mjs +14 -13
  115. package/fy-checkbox/index.mjs +37 -32
  116. package/fy-code/index.mjs +11 -14
  117. package/fy-curd/index.mjs +206 -2795
  118. package/fy-date/index.mjs +16 -57
  119. package/fy-draggable/index.mjs +21 -20
  120. package/fy-dynamic/index.mjs +64 -207
  121. package/fy-empty/index.mjs +12 -29
  122. package/fy-form/index.mjs +178 -732
  123. package/fy-form-design/index.mjs +1738 -1179
  124. package/fy-input/index.mjs +15 -101
  125. package/fy-input-color/index.mjs +17 -66
  126. package/fy-input-icon/index.mjs +21 -116
  127. package/fy-input-map/index.mjs +27 -24
  128. package/fy-input-number/index.mjs +23 -22
  129. package/fy-input-table/index.mjs +22 -18
  130. package/fy-input-tree/index.mjs +32 -28
  131. package/fy-progress/index.mjs +24 -23
  132. package/fy-radio/index.mjs +23 -18
  133. package/fy-rate/index.mjs +16 -49
  134. package/fy-select/index.mjs +29 -122
  135. package/fy-slider/index.mjs +18 -17
  136. package/fy-switch/index.mjs +21 -20
  137. package/fy-tabs/index.mjs +14 -48
  138. package/fy-time/index.mjs +20 -14
  139. package/fy-title/index.mjs +1 -1
  140. package/fy-tree/index.mjs +26 -20
  141. package/fy-u-editor/index.mjs +1 -1
  142. package/fy-upload/index.mjs +76 -74
  143. package/guide-steps/index.mjs +24 -22
  144. package/highlight-j-s/index.mjs +19 -29
  145. package/icon-temp/index.mjs +12 -30
  146. package/iframe-window/index.mjs +19 -18
  147. package/image-cropper/index.mjs +53 -51
  148. package/image-preview/index.mjs +27 -25
  149. package/input-number/index.mjs +63 -172
  150. package/input-number-range/index.mjs +24 -23
  151. package/license/index.mjs +1 -1
  152. package/loading-view/index.mjs +15 -33
  153. package/login/index.mjs +40 -35
  154. package/nav-bar/index.mjs +15 -30
  155. package/notice/index.mjs +19 -18
  156. package/package.json +1 -1
  157. package/page/index.mjs +12 -20
  158. package/page-header/index.mjs +13 -34
  159. package/page-index/index.mjs +34 -33
  160. package/page-index-top/index.mjs +100 -51
  161. package/page-skeleton/index.mjs +18 -35
  162. package/page-skeleton-new/index.mjs +16 -15
  163. package/pageable-table/index.mjs +85 -223
  164. package/pageable-view/index.mjs +34 -33
  165. package/present-view/index.mjs +75 -71
  166. package/record-video/index.mjs +1 -1
  167. package/resize-observer/index.mjs +21 -29
  168. package/search/index.mjs +29 -27
  169. package/search-popover/index.mjs +1 -1
  170. package/sign/index.mjs +1 -1
  171. package/split-pane/index.mjs +40 -45
  172. package/static-pageable-table/index.mjs +20 -18
  173. package/swiper/index.mjs +27 -25
  174. package/table-view/index.mjs +627 -89
  175. package/tag-render/index.mjs +21 -19
  176. package/text-ellipsis/index.mjs +13 -12
  177. package/tinymce-editor/index.mjs +73 -72
  178. package/toolbar/index.mjs +15 -208
  179. package/toolbar-button/index.mjs +32 -57
  180. package/verify/index.mjs +1 -1
  181. package/vue-cron/index.mjs +112 -104
  182. package/watermark/index.mjs +1 -1
  183. package/web-types.json +1 -1
  184. package/x-input-tag/index.mjs +51 -117
  185. package/chunks/FormTemp.7f91629d.mjs +0 -165
  186. package/chunks/confirmable-mixin.817b542f.mjs +0 -116
  187. package/chunks/form-input-mixin.4632ad36.mjs +0 -24
  188. package/chunks/form-item-mixin.ad148e7b.mjs +0 -140
  189. package/chunks/input-number-mixin.41a066be.mjs +0 -60
@@ -0,0 +1,47 @@
1
+ import r from "element-ui/lib/date-picker";
2
+ var s = function() {
3
+ var e = this, t = e.$createElement, a = e._self._c || t;
4
+ return a("div", {
5
+ staticClass: "avue-date"
6
+ }, [a(r, {
7
+ attrs: {
8
+ type: e.type,
9
+ "popper-class": e.popperClass,
10
+ size: e.size,
11
+ editable: e.editable,
12
+ "unlink-panels": e.unlinkPanels,
13
+ readonly: e.readonly,
14
+ "default-value": e.defaultValue,
15
+ "default-time": e.defaultTime,
16
+ "range-separator": e.rangeSeparator,
17
+ "start-placeholder": e.startPlaceholder || "开始",
18
+ "end-placeholder": e.endPlaceholder || "结束",
19
+ format: e.format,
20
+ clearable: e.clearableVal,
21
+ "picker-options": e.pickerOptions,
22
+ "value-format": e.valueFormat,
23
+ placeholder: e.placeholder,
24
+ disabled: e.disabled
25
+ },
26
+ on: {
27
+ blur: e.handleBlur,
28
+ focus: e.handleFocus
29
+ },
30
+ nativeOn: {
31
+ click: function(l) {
32
+ return e.handleClick.apply(null, arguments);
33
+ }
34
+ },
35
+ model: {
36
+ value: e.text,
37
+ callback: function(l) {
38
+ e.text = l;
39
+ },
40
+ expression: "text"
41
+ }
42
+ })], 1);
43
+ }, o = [];
44
+ export {
45
+ s as r,
46
+ o as s
47
+ };
@@ -0,0 +1,151 @@
1
+ import l from "element-ui/lib/button";
2
+ import { _ as s } from "./FyCurd.8acd2983.mjs";
3
+ import { _ as c } from "./FyForm.0294e494.mjs";
4
+ function d(e) {
5
+ if (e == null)
6
+ throw new TypeError("Cannot destructure " + e);
7
+ }
8
+ var v = function() {
9
+ var e = this, o = e.$createElement, n = e._self._c || o;
10
+ return n("div", {
11
+ key: e.reload,
12
+ staticClass: "avue-dynamic"
13
+ }, [e.isForm ? [n("div", {
14
+ staticClass: "avue-dynamic__header"
15
+ }, [!e.readonly && !e.disabled && !e.addBtn ? n(l, {
16
+ attrs: {
17
+ size: "mini",
18
+ circle: "",
19
+ disabled: e.disabled,
20
+ type: "primary",
21
+ icon: "el-icon-plus"
22
+ },
23
+ on: {
24
+ click: e.addRow
25
+ }
26
+ }) : e._e()], 1), n("div", e._l(e.text, function(r, t) {
27
+ return n("div", {
28
+ key: t,
29
+ staticClass: "avue-dynamic__row",
30
+ on: {
31
+ mouseenter: function(i) {
32
+ return e.cellMouseenter({
33
+ $index: t
34
+ });
35
+ },
36
+ mouseleave: function(i) {
37
+ return e.cellMouseLeave({
38
+ $index: t
39
+ });
40
+ }
41
+ }
42
+ }, [!e.readonly && !e.disabled && !e.delBtn && e.hoverList[t] ? n(l, {
43
+ staticClass: "avue-dynamic__menu",
44
+ attrs: {
45
+ type: "danger",
46
+ size: "mini",
47
+ disabled: e.disabled,
48
+ icon: "el-icon-delete",
49
+ circle: ""
50
+ },
51
+ on: {
52
+ click: function(i) {
53
+ return e.delRow(r.$index);
54
+ }
55
+ }
56
+ }) : e._e(), n(c, {
57
+ key: t,
58
+ ref: "main",
59
+ refInFor: !0,
60
+ attrs: {
61
+ option: e.deepClone(e.option)
62
+ },
63
+ scopedSlots: e._u([{
64
+ key: "_index",
65
+ fn: function(i) {
66
+ return d(i), [n("div", [n("span", [e._v(e._s(r.$index + 1))])])];
67
+ }
68
+ }, e._l(e.columnSlot, function(i) {
69
+ return {
70
+ key: i,
71
+ fn: function(a) {
72
+ return [e._t(i, null, null, Object.assign(a, {
73
+ row: e.text[t]
74
+ }))];
75
+ }
76
+ };
77
+ })], null, !0),
78
+ model: {
79
+ value: e.text[t],
80
+ callback: function(i) {
81
+ e.$set(e.text, t, i);
82
+ },
83
+ expression: "text[index]"
84
+ }
85
+ })], 1);
86
+ }), 0)] : e.isCrud ? n(s, {
87
+ ref: "main",
88
+ attrs: {
89
+ option: e.option,
90
+ disabled: e.disabled,
91
+ data: e.text
92
+ },
93
+ on: {
94
+ "cell-mouse-enter": e.cellMouseenter,
95
+ "cell-mouse-leave": e.cellMouseLeave,
96
+ "selection-change": e.handleSelectionChange,
97
+ "sortable-change": e.handleSortableChange
98
+ },
99
+ scopedSlots: e._u([{
100
+ key: "_indexHeader",
101
+ fn: function() {
102
+ return [!(e.addBtn || e.readonly) && e.maxFlag ? n(l, {
103
+ attrs: {
104
+ type: "primary",
105
+ size: "mini",
106
+ disabled: e.disabled,
107
+ icon: "el-icon-plus",
108
+ circle: ""
109
+ },
110
+ on: {
111
+ click: function(r) {
112
+ return e.addRow();
113
+ }
114
+ }
115
+ }) : e._e()];
116
+ },
117
+ proxy: !0
118
+ }, {
119
+ key: "_index",
120
+ fn: function(r) {
121
+ return [!e.readonly && !e.disabled && !e.delBtn && e.hoverList[r.row.$index] ? n(l, {
122
+ attrs: {
123
+ type: "danger",
124
+ size: "mini",
125
+ disabled: e.disabled,
126
+ icon: "el-icon-delete",
127
+ circle: ""
128
+ },
129
+ on: {
130
+ click: function(t) {
131
+ return e.delRow(r.row.$index);
132
+ }
133
+ }
134
+ }) : n("div", [e._v(" " + e._s(r.row.$index + 1) + " ")])];
135
+ }
136
+ }, e._l(e.columnSlot, function(r) {
137
+ return {
138
+ key: e.getSlotName({
139
+ prop: r
140
+ }, "F"),
141
+ fn: function(t) {
142
+ return [e._t(r, null, null, t)];
143
+ }
144
+ };
145
+ })], null, !0)
146
+ }) : e._e()], 2);
147
+ }, p = [];
148
+ export {
149
+ v as r,
150
+ p as s
151
+ };
@@ -0,0 +1,22 @@
1
+ var a = function() {
2
+ var e = this, s = e.$createElement, t = e._self._c || s;
3
+ return t("div", {
4
+ staticClass: "avue-empty"
5
+ }, [t("div", {
6
+ staticClass: "avue-empty__image",
7
+ style: {
8
+ height: e.setPx(e.size)
9
+ }
10
+ }, [t("img", {
11
+ attrs: {
12
+ src: e.image,
13
+ alt: ""
14
+ }
15
+ })]), t("p", {
16
+ staticClass: "avue-empty__desc"
17
+ }, [e._v(" " + e._s(e.desc) + " ")]), e._t("default")], 2);
18
+ }, _ = [];
19
+ export {
20
+ a as r,
21
+ _ as s
22
+ };
@@ -0,0 +1,439 @@
1
+ var c = (i, t, e) => new Promise((a, o) => {
2
+ var n = (s) => {
3
+ try {
4
+ r(e.next(s));
5
+ } catch (f) {
6
+ o(f);
7
+ }
8
+ }, h = (s) => {
9
+ try {
10
+ r(e.throw(s));
11
+ } catch (f) {
12
+ o(f);
13
+ }
14
+ }, r = (s) => s.done ? a(s.value) : Promise.resolve(s.value).then(n, h);
15
+ r((e = e.apply(i, t)).next());
16
+ });
17
+ import { s as b, r as O, F as $, a as y, b as D, d as v, m as C } from "./FyForm.vue_vue_type_style_index_0_lang.6e64daee.mjs";
18
+ import { i as F } from "./init.f0a03127.mjs";
19
+ import { s as p, d as u, u as g, a as E, g as k, f as d, D as x, o as P, c as V } from "./util.7844e2c2.mjs";
20
+ import { c as _, a as T, g as w, b as j, f as L } from "./dataformat.816df805.mjs";
21
+ import { s as B } from "./dic.3b4ba802.mjs";
22
+ import { isBlank as l } from "@web-utils/core";
23
+ import { n as I } from "./vueComponentNormalizer.446f5dc4.mjs";
24
+ const S = {
25
+ name: "FyForm",
26
+ components: { FormTemp: $, FyFormMenu: y, FormGroup: D },
27
+ mixins: [F],
28
+ provide() {
29
+ return {
30
+ formSafe: this
31
+ };
32
+ },
33
+ props: {
34
+ uploadBefore: Function,
35
+ uploadAfter: Function,
36
+ uploadDelete: Function,
37
+ uploadPreview: Function,
38
+ uploadError: Function,
39
+ uploadExceed: Function,
40
+ status: {
41
+ type: Boolean,
42
+ default: !1
43
+ },
44
+ isCrud: {
45
+ type: Boolean,
46
+ default: !1
47
+ },
48
+ value: {
49
+ type: Object,
50
+ required: !0,
51
+ default: () => ({})
52
+ }
53
+ },
54
+ data() {
55
+ return {
56
+ activeName: "",
57
+ labelWidth: 90,
58
+ allDisabled: !1,
59
+ optionIndex: [],
60
+ optionBox: !1,
61
+ tableOption: {},
62
+ itemSpanDefault: 12,
63
+ form: {},
64
+ formCreate: !1,
65
+ formList: [],
66
+ formBind: {}
67
+ };
68
+ },
69
+ computed: {
70
+ columnSlot() {
71
+ return Object.keys(this.$scopedSlots).filter((i) => !this.propOption.map((t) => t.prop).includes(i));
72
+ },
73
+ labelSuffix() {
74
+ return this.parentOption.labelSuffix || ":";
75
+ },
76
+ isMenu() {
77
+ return this.columnOption.length !== 1;
78
+ },
79
+ isDetail() {
80
+ return this.detail === !0;
81
+ },
82
+ isTabs() {
83
+ return this.parentOption.tabs === !0;
84
+ },
85
+ isAdd() {
86
+ return this.boxType === "add";
87
+ },
88
+ isEdit() {
89
+ return this.boxType === "edit";
90
+ },
91
+ isView() {
92
+ return this.boxType === "view";
93
+ },
94
+ gutter() {
95
+ return p((this.parentOption.gutter || 10) / 2);
96
+ },
97
+ detail() {
98
+ return this.parentOption.detail;
99
+ },
100
+ disabled() {
101
+ return this.parentOption.disabled;
102
+ },
103
+ readonly() {
104
+ return this.parentOption.readonly;
105
+ },
106
+ tabsType() {
107
+ return this.parentOption.tabsType;
108
+ },
109
+ columnLen() {
110
+ return this.columnOption.length;
111
+ },
112
+ dynamicOption() {
113
+ const i = [];
114
+ return this.propOption.forEach((t) => {
115
+ t.type === "dynamic" && this.vaildDisplay(t) && i.push(t);
116
+ }), i;
117
+ },
118
+ propOption() {
119
+ const i = [];
120
+ return this.columnOption.forEach((t) => {
121
+ t.display !== !1 && t.column.forEach((e) => {
122
+ i.push(e);
123
+ });
124
+ }), i;
125
+ },
126
+ parentOption() {
127
+ return this.tableOption || {};
128
+ },
129
+ columnOption() {
130
+ const i = this.tableOption.column || [], t = u(this.tableOption.group) || [], e = this.tableOption.footer || [];
131
+ return t.unshift({
132
+ header: !1,
133
+ column: i
134
+ }), e.length !== 0 && t.push({
135
+ header: !1,
136
+ column: e
137
+ }), t.forEach((a) => {
138
+ a.column = a.column || [], a.column.forEach((o, n) => {
139
+ o.display !== !1 && !this.isMobile && (o = _(o, this.itemSpanDefault, n === 0));
140
+ }), a.column = T(a.column), a.column = a.column.sort((o, n) => (n.order || 0) - (o.order || 0));
141
+ }), t;
142
+ },
143
+ menuPosition: function() {
144
+ return this.parentOption.menuPosition ? this.parentOption.menuPosition : "center";
145
+ },
146
+ boxType: function() {
147
+ return this.parentOption.boxType;
148
+ },
149
+ isPrint() {
150
+ return this.parentOption.printBtn === !0;
151
+ },
152
+ tabsActive() {
153
+ return this.tableOption.tabsActive || "1";
154
+ },
155
+ isMock() {
156
+ return this.parentOption.mockBtn === !0;
157
+ }
158
+ },
159
+ watch: {
160
+ value: {
161
+ handler() {
162
+ this.formCreate && this.setForm();
163
+ },
164
+ deep: !0
165
+ },
166
+ form: {
167
+ handler() {
168
+ this.formCreate && (this.setLabel(), this.setVal());
169
+ },
170
+ deep: !0
171
+ },
172
+ tabsActive: {
173
+ handler() {
174
+ this.activeName = this.tabsActive;
175
+ },
176
+ immediate: !0
177
+ },
178
+ DIC: {
179
+ handler() {
180
+ this.setLabel();
181
+ },
182
+ deep: !0,
183
+ immediate: !0
184
+ },
185
+ allDisabled: {
186
+ handler(i) {
187
+ this.$emit("update:status", i);
188
+ },
189
+ deep: !0,
190
+ immediate: !0
191
+ }
192
+ },
193
+ mounted() {
194
+ setTimeout(() => {
195
+ this.dataFormat();
196
+ });
197
+ },
198
+ beforeDestroy() {
199
+ Object.keys(this.formBind).forEach((i) => {
200
+ this.formBind[i].forEach((t) => {
201
+ t();
202
+ });
203
+ });
204
+ },
205
+ methods: {
206
+ setPx: p,
207
+ deepClone: u,
208
+ getComponent: w,
209
+ getPlaceholder: j,
210
+ uploadFun: g,
211
+ getDisabled(i) {
212
+ return this.vaildDetail(i) || this.isDetail || this.vaildDisabled(i) || this.allDisabled;
213
+ },
214
+ getSpan(i) {
215
+ return i.span || this.parentOption.span || this.itemSpanDefault;
216
+ },
217
+ isGroupShow(i, t) {
218
+ return this.isTabs ? `${t}` === this.activeName || t === 0 : !0;
219
+ },
220
+ // 初始化表单
221
+ dataFormat() {
222
+ const i = L(this.propOption).tableForm, t = this.value, e = {};
223
+ Object.entries(Object.assign(i, t)).forEach((a) => {
224
+ const o = a[0], n = a[1];
225
+ l(t[o]) ? e[o] = n : e[o] = t[o];
226
+ }), this.$set(this, "form", e), this.setLabel(), this.setControl(), this.setVal(), setTimeout(() => {
227
+ this.formCreate = !0, this.clearValidate();
228
+ });
229
+ },
230
+ setControl() {
231
+ this.propOption.forEach((i) => {
232
+ const t = i.prop, e = i.bind, a = i.control;
233
+ if (!this.formBind[t]) {
234
+ const o = [];
235
+ if (e) {
236
+ const n = this.$watch(`form.${t}`, (r, s) => {
237
+ r !== s && E(this.form, e, r);
238
+ }), h = this.$watch(`form.${e}`, (r, s) => {
239
+ r !== s && this.$set(this.form, t, r);
240
+ });
241
+ o.push(n), o.push(h), this.$set(this.form, t, k(this.form, e));
242
+ }
243
+ if (a) {
244
+ const n = () => {
245
+ const r = a(this.form[i.prop], this.form) || {};
246
+ Object.keys(r).forEach((s) => {
247
+ const f = Object.assign(this.objectOption[s] || {}, r[s]);
248
+ this.$set(this.objectOption, s, f), r[s].dicData && (this.DIC[s] = r[s].dicData);
249
+ });
250
+ }, h = this.$watch(`form.${t}`, () => {
251
+ n();
252
+ });
253
+ o.push(h), n();
254
+ }
255
+ this.formBind[t] = o;
256
+ }
257
+ });
258
+ },
259
+ setForm() {
260
+ Object.keys(this.value).forEach((i) => {
261
+ this.$set(this.form, i, this.value[i]);
262
+ });
263
+ },
264
+ setVal() {
265
+ this.$emit("input", this.form), this.$emit("change", this.form);
266
+ },
267
+ setLabel() {
268
+ this.tableOption.filterNull === !0 && (this.form = d(this.form, [""], !1)), this.tableOption.filterDic === !0 ? this.form = d(this.form, ["$"], !1) : this.propOption.forEach((i) => {
269
+ const t = this.DIC[i.prop];
270
+ if (l(t))
271
+ return;
272
+ const e = v(this.form, i, this.tableOption, t);
273
+ e ? this.$set(this.form, `$${i.prop}`, e) : this.$delete(this.form, `$${i.prop}`);
274
+ });
275
+ },
276
+ handleGroupClick(i) {
277
+ this.$emit("tab-click", i);
278
+ },
279
+ handleTabClick(i, t) {
280
+ this.$emit("tab-click", i, t);
281
+ },
282
+ getLabelWidth(i, t) {
283
+ let e;
284
+ return l(i.labelWidth) ? l(t.labelWidth) ? e = this.parentOption.labelWidth : e = t.labelWidth : e = i.labelWidth, p(e, this.labelWidth);
285
+ },
286
+ // 对部分表单字段进行校验的方法
287
+ validateField(i) {
288
+ return this.$refs.form.validateField(i);
289
+ },
290
+ validTip(i) {
291
+ return !i.tip || i.type === "upload";
292
+ },
293
+ getPropRef(i) {
294
+ return this.$refs[i][0];
295
+ },
296
+ handleChange(i, t) {
297
+ this.$nextTick(() => {
298
+ const e = t.cascader, a = e.join(",");
299
+ e.forEach((o) => {
300
+ const n = o, h = this.form[t.prop], r = this.findObject(i, n);
301
+ l(r) || (this.formList.includes(a) && e.forEach((s) => {
302
+ this.form[s] = "", this.$set(this.DIC, s, []);
303
+ }), !(l(e) || l(h) || l(r)) && B({
304
+ column: r,
305
+ value: h,
306
+ form: this.form
307
+ }).then((s) => {
308
+ this.formList.includes(a) || this.formList.push(a);
309
+ const f = s || [];
310
+ this.$set(this.DIC, n, f), !l(f) && !l(f) && !l(r.cascaderIndex) && l(this.form[n]) && (this.form[n] = f[r.cascaderIndex][(r.props || {}).value || x.value]);
311
+ }));
312
+ });
313
+ });
314
+ },
315
+ handlePrint() {
316
+ this.$Print(this.$el);
317
+ },
318
+ propChange(i, t) {
319
+ t.cascader && this.handleChange(i, t);
320
+ },
321
+ handleMock() {
322
+ this.isMock && (this.columnOption.forEach((i) => {
323
+ const t = C(i.column, this.DIC, this.form, this.isMock);
324
+ l(t) || Object.keys(t).forEach((e) => {
325
+ this.form[e] = t[e];
326
+ });
327
+ }), this.$nextTick(() => {
328
+ this.clearValidate(), this.$emit("mock-change", this.form);
329
+ }));
330
+ },
331
+ vaildDetail(i) {
332
+ let t;
333
+ if (this.detail)
334
+ return !1;
335
+ if (!l(i.detail))
336
+ t = "detail";
337
+ else if (this.isAdd)
338
+ t = "addDetail";
339
+ else if (this.isEdit)
340
+ t = "editDetail";
341
+ else if (this.isView)
342
+ return !1;
343
+ return t ? i[t] === !0 : !1;
344
+ },
345
+ // 验证表单是否禁止
346
+ vaildDisabled(i) {
347
+ let t;
348
+ if (this.disabled)
349
+ return !0;
350
+ if (!l(i.disabled))
351
+ t = "disabled";
352
+ else if (this.isAdd)
353
+ t = "addDisabled";
354
+ else if (this.isEdit)
355
+ t = "editDisabled";
356
+ else if (this.isView)
357
+ return !0;
358
+ return t ? i[t] === !0 : !1;
359
+ },
360
+ // 验证表单是否显隐
361
+ vaildDisplay(i) {
362
+ let t;
363
+ return l(i.display) ? this.isAdd ? t = "addDisplay" : this.isEdit ? t = "editDisplay" : this.isView && (t = "viewDisplay") : t = "display", t ? P(i[t], !0) : !0;
364
+ },
365
+ clearValidate(i) {
366
+ return c(this, null, function* () {
367
+ var t;
368
+ (t = this.$refs.form) == null || t.clearValidate(i);
369
+ });
370
+ },
371
+ validateCellForm() {
372
+ return new Promise((i) => {
373
+ this.$refs.form.validate((t, e) => {
374
+ i(e);
375
+ });
376
+ });
377
+ },
378
+ validate(i) {
379
+ this.$refs.form.validate((t, e) => {
380
+ const a = [], o = [], n = {};
381
+ this.dynamicOption.forEach((h) => {
382
+ const r = h.children.type === "form";
383
+ o.push(h.prop), r ? l(this.$refs[h.prop][0].$refs.temp.$refs.main) || this.$refs[h.prop][0].$refs.temp.$refs.main.forEach((s) => {
384
+ a.push(s.validateCellForm());
385
+ }) : a.push(this.$refs[h.prop][0].$refs.temp.$refs.main.validateCellForm());
386
+ }), Promise.all(a).then((h) => {
387
+ h.forEach((s, f) => {
388
+ l(s) || (n[o[f]] = s);
389
+ });
390
+ const r = Object.assign(n, e);
391
+ l(r) ? (this.show(), i(!0, this.hide)) : i(!1, this.hide, r);
392
+ });
393
+ });
394
+ },
395
+ resetForm(i = !0) {
396
+ if (i) {
397
+ const t = this.propOption.map((e) => e.prop);
398
+ this.form = V(this.form, t, (this.tableOption.filterParams || []).concat([this.rowKey]));
399
+ }
400
+ this.$nextTick(() => {
401
+ this.clearValidate(), this.$emit("reset-change");
402
+ });
403
+ },
404
+ resetFields() {
405
+ this.$refs.form.resetFields();
406
+ },
407
+ show() {
408
+ this.allDisabled = !0;
409
+ },
410
+ hide() {
411
+ this.allDisabled = !1;
412
+ },
413
+ submit() {
414
+ this.validate((i, t) => {
415
+ i ? this.$emit("submit", d(this.form, ["$"]), this.hide) : this.$emit("error", t);
416
+ });
417
+ }
418
+ }
419
+ }, m = {};
420
+ var A = /* @__PURE__ */ I(
421
+ S,
422
+ O,
423
+ b,
424
+ !1,
425
+ M,
426
+ null,
427
+ null,
428
+ null
429
+ );
430
+ function M(i) {
431
+ for (let t in m)
432
+ this[t] = m[t];
433
+ }
434
+ const J = /* @__PURE__ */ function() {
435
+ return A.exports;
436
+ }();
437
+ export {
438
+ J as _
439
+ };