@web-utils/component 3.8.3 → 4.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 (211) hide show
  1. package/awesome-button/index.mjs +25 -55
  2. package/base.css +1 -1
  3. package/card/index.mjs +13 -13
  4. package/card/style.css +1 -1
  5. package/carousel/style.css +1 -1
  6. package/chat/index.mjs +2 -2
  7. package/chat/style.css +1 -1
  8. package/chunks/{ElementForm.8w6UkiuU.mjs → ElementForm.CQ3PN5qj.mjs} +17 -35
  9. package/chunks/{ElementListeners.DOy8wyD2.mjs → ElementListeners.De_PRuIm.mjs} +56 -95
  10. package/chunks/{ElementMultiInstance.3Z28ewuh.mjs → ElementMultiInstance.DQo2wuAQ.mjs} +16 -26
  11. package/chunks/{ElementProperties.B2I48muA.mjs → ElementProperties.CosfDrlW.mjs} +16 -16
  12. package/chunks/{ElementTaskConfig.MBbkLrth.mjs → ElementTaskConfig.Bko0kgTp.mjs} +104 -113
  13. package/chunks/{FlowCondition.BfU9kw6h.mjs → FlowCondition.Y6qEYi1T.mjs} +36 -66
  14. package/chunks/{FormTemp.BSpnNput.mjs → FormTemp.Bu2VCxUh.mjs} +2 -2
  15. package/chunks/{SignalAndMessage.CH6L7cYu.mjs → SignalAndMessage.Bb5PFX0N.mjs} +11 -22
  16. package/chunks/{UserTaskListeners.XXe5dC5I.mjs → UserTaskListeners.Bv3BDfEI.mjs} +45 -86
  17. package/chunks/configComponents.BDhlZU8F.mjs +23 -0
  18. package/chunks/confirmable-mixin.D9aKzKZ9.mjs +85 -0
  19. package/chunks/core.DJEgjQW6.mjs +54 -0
  20. package/chunks/{dataformat.B9UvztrQ.mjs → dataformat.CpqOeGBl.mjs} +2 -2
  21. package/chunks/{dic.CET0XdKP.mjs → dic.Dkl-leRW.mjs} +43 -43
  22. package/chunks/dictionary.DqiP9x2m.mjs +25 -0
  23. package/chunks/{event.BT1F_1vF.mjs → event.9aDS6jcw.mjs} +2 -2
  24. package/chunks/form-input.B8z37eqj.mjs +31 -0
  25. package/chunks/form-item.D-H-wCPE.mjs +233 -0
  26. package/chunks/form-validate.CVarNHKX.mjs +12 -0
  27. package/chunks/helper.BiMLcEEk.mjs +41 -0
  28. package/chunks/index.9OxHjTIE.mjs +16 -0
  29. package/chunks/{index.MAFc4eFi.mjs → index.d3MV3Wq2.mjs} +43 -47
  30. package/chunks/{init.ofpxEyAI.mjs → init.DAsXSoLW.mjs} +2 -2
  31. package/chunks/{packages.CWPkeLu9.mjs → packages.ByyangTp.mjs} +3 -3
  32. package/chunks/sub-table-plus-props.BVsD71hT.mjs +30 -0
  33. package/chunks/{tab-mixin.CVr9bZtn.mjs → tab-mixin.BNK6dxLN.mjs} +1 -1
  34. package/chunks/{util.CoahLDYn.mjs → util.DqFv_pWg.mjs} +54 -55
  35. package/chunks/utilSelf.Csq1766E.mjs +48 -0
  36. package/color-picker/index.mjs +19 -37
  37. package/comment/style.css +1 -1
  38. package/confirm-button/index.mjs +1 -1
  39. package/confirmable/index.mjs +1 -1
  40. package/context-menu/style.css +1 -1
  41. package/count-up/index.mjs +13 -24
  42. package/custom-scrollbar/index.mjs +1 -2
  43. package/data-operatext/style.css +1 -1
  44. package/data-panel/style.css +1 -1
  45. package/data-pay/style.css +1 -1
  46. package/data-price/style.css +1 -1
  47. package/data-rotate/style.css +1 -1
  48. package/data-table-picker/index.mjs +1 -1
  49. package/data-tabs/style.css +1 -1
  50. package/dialog-form/index.mjs +16 -28
  51. package/dynamic-table/style.css +1 -1
  52. package/easy-popup/index.mjs +22 -40
  53. package/easy-popup/style.css +1 -1
  54. package/editable-tree/index.mjs +203 -250
  55. package/editable-tree/style.css +1 -1
  56. package/element-dialog/index.mjs +30 -52
  57. package/element-dialog/style.css +1 -1
  58. package/flex-column/index.mjs +13 -25
  59. package/flex-item/index.mjs +15 -27
  60. package/flex-row/index.mjs +13 -25
  61. package/flow/index.mjs +30 -32
  62. package/flow-designer/index.mjs +344 -375
  63. package/flow-designer/style.css +1 -1
  64. package/flow-node/index.mjs +1 -1
  65. package/flow-viewer/index.mjs +64 -91
  66. package/form-block/index.mjs +33 -26
  67. package/form-card/index.mjs +25 -0
  68. package/form-cascader/index.mjs +70 -67
  69. package/form-checkbox/index.mjs +71 -0
  70. package/form-checkbox-group/index.mjs +33 -53
  71. package/form-date-picker/index.mjs +44 -73
  72. package/form-holder/index.mjs +60 -64
  73. package/form-holder/style.css +1 -0
  74. package/form-input/index.mjs +62 -40
  75. package/form-input-cron-expression/index.mjs +77 -0
  76. package/form-input-cron-expression/style.css +1 -0
  77. package/form-input-email/index.mjs +21 -33
  78. package/form-input-id-card/index.mjs +25 -38
  79. package/form-input-number/index.mjs +39 -42
  80. package/form-input-number/style.css +1 -1
  81. package/form-input-phone-number/index.mjs +26 -37
  82. package/form-input-tag/index.mjs +32 -34
  83. package/form-input-time/index.mjs +22 -37
  84. package/form-item/index.mjs +109 -101
  85. package/form-item/style.css +1 -1
  86. package/form-item-config-provider/index.mjs +18 -10
  87. package/form-item-group/index.mjs +73 -69
  88. package/form-item-group/style.css +1 -1
  89. package/form-radio-group/index.mjs +41 -36
  90. package/form-radio-group/style.css +1 -1
  91. package/form-select/index.mjs +142 -75
  92. package/form-select/style.css +1 -0
  93. package/form-switch/index.mjs +29 -34
  94. package/form-table/index.mjs +85 -0
  95. package/form-table-plus/index.mjs +109 -0
  96. package/form-textarea/index.mjs +23 -35
  97. package/form-tree-select/index.mjs +72 -0
  98. package/form-tree-select/style.css +1 -0
  99. package/form-tree-select-multiple/index.mjs +78 -0
  100. package/form-view/index.mjs +43 -77
  101. package/form-view/style.css +1 -1
  102. package/fy-array/index.mjs +2 -2
  103. package/fy-cascader/index.mjs +1 -1
  104. package/fy-checkbox/index.mjs +1 -1
  105. package/fy-code/index.mjs +1 -1
  106. package/fy-curd/index.mjs +12 -17
  107. package/fy-curd/style.css +1 -1
  108. package/fy-date/index.mjs +1 -1
  109. package/fy-draggable/index.mjs +5 -7
  110. package/fy-draggable/style.css +1 -1
  111. package/fy-dynamic/index.mjs +14 -16
  112. package/fy-empty/index.mjs +1 -1
  113. package/fy-empty/style.css +1 -1
  114. package/fy-form/index.mjs +117 -136
  115. package/fy-form/style.css +1 -1
  116. package/fy-form-design/index.mjs +319 -345
  117. package/fy-form-design/style.css +1 -1
  118. package/fy-input/index.mjs +2 -2
  119. package/fy-input-color/index.mjs +1 -1
  120. package/fy-input-icon/index.mjs +1 -1
  121. package/fy-input-map/index.mjs +21 -26
  122. package/fy-input-map/style.css +1 -1
  123. package/fy-input-number/index.mjs +1 -1
  124. package/fy-input-table/index.mjs +10 -12
  125. package/fy-input-tree/index.mjs +1 -1
  126. package/fy-radio/index.mjs +1 -1
  127. package/fy-rate/index.mjs +1 -1
  128. package/fy-select/index.mjs +4 -4
  129. package/fy-slider/index.mjs +2 -2
  130. package/fy-switch/index.mjs +1 -1
  131. package/fy-tabs/index.mjs +0 -1
  132. package/fy-time/index.mjs +1 -1
  133. package/fy-title/index.mjs +1 -1
  134. package/fy-tree/index.mjs +1 -1
  135. package/fy-u-editor/index.mjs +77 -103
  136. package/fy-upload/index.mjs +3 -3
  137. package/fy-upload/style.css +1 -1
  138. package/highlight-j-s/index.mjs +1 -1
  139. package/highlight-j-s/style.css +1 -1
  140. package/image-cropper/index.mjs +14 -65
  141. package/image-preview/index.mjs +17 -45
  142. package/image-preview/style.css +1 -1
  143. package/image-viewer/style.css +1 -1
  144. package/index.mjs +666 -496
  145. package/input-number/index.mjs +64 -9
  146. package/keyboard/style.css +1 -1
  147. package/license/index.mjs +1 -1
  148. package/login/index.mjs +1 -1
  149. package/monaco-editor/index.mjs +44 -74
  150. package/name-avatar/style.css +1 -1
  151. package/package.json +18 -17
  152. package/page-index/index.mjs +30 -54
  153. package/page-index-top/index.mjs +25 -47
  154. package/pageable-table/index.mjs +354 -226
  155. package/pageable-table/style.css +1 -1
  156. package/pageable-view/index.mjs +63 -106
  157. package/photo-swipe/index.mjs +51 -74
  158. package/picker-table-view/index.mjs +117 -0
  159. package/present-view/index.mjs +43 -77
  160. package/present-view/style.css +1 -1
  161. package/record-video/index.mjs +1 -1
  162. package/resize-observer/index.mjs +1 -1
  163. package/resize-observer/style.css +1 -1
  164. package/search/index.mjs +2 -2
  165. package/search/style.css +1 -1
  166. package/search-popover/index.mjs +28 -48
  167. package/search-popover/style.css +1 -1
  168. package/sign/index.mjs +2 -2
  169. package/sign-panel/style.css +1 -1
  170. package/skeleton-panel/index.mjs +38 -0
  171. package/skeleton-panel/style.css +1 -0
  172. package/split-pane/index.mjs +31 -49
  173. package/split-pane/style.css +1 -1
  174. package/sub-table/index.mjs +206 -0
  175. package/sub-table/style.css +1 -0
  176. package/sub-table-plus/index.mjs +231 -0
  177. package/sub-table-plus/style.css +1 -0
  178. package/swiper/index.mjs +18 -38
  179. package/swiper/style.css +1 -1
  180. package/tab/index.mjs +1 -1
  181. package/tab/style.css +1 -1
  182. package/tab-item/index.mjs +2 -2
  183. package/table-column/index.mjs +112 -37
  184. package/table-column/style.css +1 -0
  185. package/table-view/index.mjs +178 -135
  186. package/table-view/style.css +1 -1
  187. package/tabs-view/index.mjs +104 -0
  188. package/tabs-view/style.css +1 -0
  189. package/tag-render/index.mjs +13 -24
  190. package/text-ellipsis/index.mjs +1 -1
  191. package/toolbar/index.mjs +115 -58
  192. package/toolbar/style.css +1 -1
  193. package/toolbar-button/index.mjs +92 -48
  194. package/verify/index.mjs +1 -1
  195. package/vue-cron/index.mjs +48 -66
  196. package/vue-qr-code/index.mjs +14 -32
  197. package/vue-quill-editor/index.mjs +3 -3
  198. package/vue-tags-input/index.mjs +1 -1
  199. package/vue-tree-select/index.mjs +352 -393
  200. package/vue-tree-select/style.css +1 -1
  201. package/vue-video-player/index.mjs +36 -67
  202. package/watermark/index.mjs +21 -31
  203. package/web-types.json +9240 -3843
  204. package/x-input-tag/index.mjs +29 -61
  205. package/chunks/confirmable-mixin.D4LAArE5.mjs +0 -114
  206. package/chunks/form-input-mixin.BkKiqJhi.mjs +0 -24
  207. package/chunks/form-item-mixin.CG4ZwzMC.mjs +0 -140
  208. package/chunks/input-number-mixin.CzjtGf2n.mjs +0 -60
  209. package/chunks/utilSelf.CRqpl0Cz.mjs +0 -56
  210. package/toolbar-button/style.css +0 -1
  211. /package/chunks/{form-pick-mixin.BFTIVn_i.mjs → form-pick.BFTIVn_i.mjs} +0 -0
@@ -0,0 +1,31 @@
1
+ import { f as r } from "./form-item.D-H-wCPE.mjs";
2
+ import { c as t } from "./index.d3MV3Wq2.mjs";
3
+ const o = {
4
+ name: "FormInput",
5
+ mixins: [r],
6
+ props: {
7
+ value: [Boolean, String, Array, Number, Object, Date],
8
+ readonly: Boolean,
9
+ disabled: Boolean
10
+ },
11
+ inject: {
12
+ formView: {
13
+ default: {}
14
+ }
15
+ },
16
+ computed: {
17
+ computePlaceholder() {
18
+ return this.formView.printing ? null : this.placeholder === !0 ? this.message : this.placeholder;
19
+ },
20
+ listeners() {
21
+ return t(this.$listeners, "input", !1);
22
+ },
23
+ inputDisabled() {
24
+ var e;
25
+ return (e = this.formHolder.enabledFields) != null && e.includes(this.prop) ? !1 : this.disabled || (this.elForm || {}).disabled;
26
+ }
27
+ }
28
+ };
29
+ export {
30
+ o as f
31
+ };
@@ -0,0 +1,233 @@
1
+ import { c as s } from "./index.d3MV3Wq2.mjs";
2
+ import u from "element-ui/lib/col";
3
+ import m from "element-ui/lib/form-item";
4
+ const p = ["span"], l = [...Object.keys(u.props)], d = l.filter((e) => !p.includes(e)), f = ["label", "prop", "rules", "labelWidth", "required"], a = [...Object.keys(m.props)], h = a.filter((e) => !f.includes(e)), c = [
5
+ "wrapCol",
6
+ "wrapFormItem",
7
+ "unwrap",
8
+ "prefixConfig",
9
+ "block",
10
+ "prefixPick",
11
+ "picker",
12
+ "half",
13
+ "tips",
14
+ "hideLabel",
15
+ "fixedSpan",
16
+ ...l,
17
+ ...a
18
+ ], o = ["disabled", "size", "statusIcon", "inlineMessage", "autoLabelWidth", "hideRequiredAsterisk", "$emit", "validate", "clearValidate"], b = ["$emit", "validate", "clearValidate"], S = {
19
+ name: "FormInput",
20
+ inject: {
21
+ elForm: {
22
+ default: {}
23
+ },
24
+ formItemGroup: {
25
+ default: {}
26
+ },
27
+ formHolder: {
28
+ default: {}
29
+ }
30
+ },
31
+ provide() {
32
+ return {
33
+ elForm: this.proxyForm,
34
+ formItemGroup: this
35
+ };
36
+ },
37
+ props: {
38
+ /**
39
+ * 是否作为内嵌使用
40
+ */
41
+ embed: Boolean,
42
+ /**
43
+ * 是否禁用
44
+ */
45
+ disabled: Boolean,
46
+ /**
47
+ * 是否固定栏数
48
+ */
49
+ fixedSpan: Number,
50
+ /**
51
+ * 是否被列组件包裹
52
+ */
53
+ wrapCol: {
54
+ type: Boolean,
55
+ default: !0
56
+ },
57
+ /**
58
+ * 是否被表单项组件包裹
59
+ */
60
+ wrapFormItem: {
61
+ type: Boolean,
62
+ default: !0
63
+ },
64
+ /**
65
+ * 是否不用列组件包裹
66
+ */
67
+ unwrap: Boolean,
68
+ /**
69
+ * 是否占一半宽度
70
+ */
71
+ half: Boolean,
72
+ /**
73
+ * placeholder 添加"配置"前缀
74
+ */
75
+ prefixConfig: Boolean,
76
+ /**
77
+ * placeholder 添加"添加"前缀
78
+ */
79
+ prefixAdd: Boolean,
80
+ /**
81
+ * placeholder 添加"选择"前缀
82
+ */
83
+ prefixPick: Boolean,
84
+ /**
85
+ * 是否占满一行
86
+ */
87
+ block: Boolean,
88
+ /**
89
+ * 表单项组件样式
90
+ */
91
+ formItemClass: String,
92
+ /**
93
+ * 提示信息
94
+ */
95
+ tips: String,
96
+ /**
97
+ * 校验规则触发方式
98
+ */
99
+ trigger: {
100
+ type: String,
101
+ default: "blur"
102
+ },
103
+ /**
104
+ * 是否隐藏 label
105
+ */
106
+ hideLabel: Boolean,
107
+ /**
108
+ * label 占列数
109
+ */
110
+ labelColspan: [Number, String],
111
+ /**
112
+ * input 占列数
113
+ */
114
+ inputColspan: [Number, String],
115
+ /**
116
+ * label 占行数
117
+ */
118
+ labelRowspan: [Number, String],
119
+ /**
120
+ * input 占行数
121
+ */
122
+ inputRowspan: [Number, String],
123
+ // el-form-item
124
+ prop: String,
125
+ label: String,
126
+ labelWidth: String,
127
+ required: Boolean,
128
+ rules: [Object, Array],
129
+ error: String,
130
+ showMessage: {
131
+ type: Boolean,
132
+ default: !0
133
+ },
134
+ inlineMessage: {
135
+ type: [String, Boolean],
136
+ default: ""
137
+ },
138
+ size: String,
139
+ validateStatus: String,
140
+ for: String,
141
+ // el-col
142
+ span: {
143
+ type: Number,
144
+ default: 12
145
+ },
146
+ offset: Number,
147
+ push: Number,
148
+ pull: Number,
149
+ xs: [Number, Object],
150
+ sm: [Number, Object],
151
+ md: [Number, Object],
152
+ lg: [Number, Object],
153
+ xl: [Number, Object],
154
+ tag: String
155
+ },
156
+ data() {
157
+ const e = {};
158
+ return o.forEach((r) => {
159
+ e[r] = null;
160
+ }), {
161
+ proxyForm: e
162
+ };
163
+ },
164
+ computed: {
165
+ prefix() {
166
+ return this.prefixConfig ? "请配置" : this.prefixPick || this.picker ? "请选择" : this.prefixAdd ? "请添加" : "请输入";
167
+ },
168
+ message() {
169
+ var e;
170
+ return `${this.prefix}${((e = this.label) == null ? void 0 : e.replace(":", "")) || ""}`;
171
+ },
172
+ computeRules() {
173
+ var i;
174
+ const e = [...this.rules || []], r = e.find((t) => t.required);
175
+ if (this.required || r || (i = this.formHolder.requiredFields) != null && i.includes(this.prop)) {
176
+ const t = e.find((n) => n.required);
177
+ t ? t.ref ? t.label = t.label || this.label : t.message = t.message || this.message : e.unshift(this.getRequireRule());
178
+ }
179
+ return e.concat(this.getRules());
180
+ },
181
+ computeSpan() {
182
+ return this.block ? 24 : this.span;
183
+ },
184
+ formItemProps() {
185
+ return s({ ...this.$props, ...this.$attrs }, c);
186
+ },
187
+ elFormItemProps() {
188
+ return s({ ...this.$props, ...this.$attrs }, h);
189
+ },
190
+ elColProps() {
191
+ return s({ ...this.$props, ...this.$attrs }, d);
192
+ },
193
+ formCfg() {
194
+ const e = {
195
+ disabled: this.disabled
196
+ };
197
+ return o.forEach((r) => {
198
+ e[r] = this.elForm[r];
199
+ }), e;
200
+ }
201
+ },
202
+ watch: {
203
+ computeRules() {
204
+ var e, r;
205
+ (r = (e = this.elForm) == null ? void 0 : e.clearValidate) == null || r.call(e, this.prop);
206
+ },
207
+ formCfg: {
208
+ immediate: !0,
209
+ handler() {
210
+ var e;
211
+ this.proxyForm.disabled = (e = this.formHolder.enabledFields) != null && e.includes(this.prop) ? !1 : (this.elForm || {}).disabled, o.forEach((r) => {
212
+ var i;
213
+ r !== "disabled" && (b.includes(r) ? this.proxyForm[r] = (i = this.elForm[r]) == null ? void 0 : i.bind(this.elForm) : this.proxyForm[r] = this.elForm[r]);
214
+ });
215
+ }
216
+ }
217
+ },
218
+ methods: {
219
+ getRules() {
220
+ return [];
221
+ },
222
+ getRequireRule() {
223
+ return {
224
+ required: !0,
225
+ trigger: this.trigger,
226
+ message: this.message
227
+ };
228
+ }
229
+ }
230
+ };
231
+ export {
232
+ S as f
233
+ };
@@ -0,0 +1,12 @@
1
+ const a = (r, t, e) => t && !/^[A-Za-z0-9\u4e00-\u9fa5_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/.test(t) ? e(new Error("invalid")) : e();
2
+ function s(r, t, e) {
3
+ if (this.$refs.table.$refs.table.records.length === 0) {
4
+ e(new Error(r.message || `请添加${r.label}`));
5
+ return;
6
+ }
7
+ e();
8
+ }
9
+ export {
10
+ s as a,
11
+ a as v
12
+ };
@@ -0,0 +1,41 @@
1
+ function O(o) {
2
+ return o && o.__esModule && Object.prototype.hasOwnProperty.call(o, "default") ? o.default : o;
3
+ }
4
+ var a, u;
5
+ function c() {
6
+ if (u) return a;
7
+ u = 1;
8
+ function o() {
9
+ return o = Object.assign ? Object.assign.bind() : function(s) {
10
+ for (var r, n = 1; n < arguments.length; n++) for (var e in r = arguments[n], r) Object.prototype.hasOwnProperty.call(r, e) && (s[e] = r[e]);
11
+ return s;
12
+ }, o.apply(this, arguments);
13
+ }
14
+ var l = ["attrs", "props", "domProps"], p = ["class", "style", "directives"], f = ["on", "nativeOn"], g = function(s) {
15
+ return s.reduce(function(r, n) {
16
+ for (var e in n) if (!r[e]) r[e] = n[e];
17
+ else if (l.indexOf(e) !== -1) r[e] = o({}, r[e], n[e]);
18
+ else if (p.indexOf(e) !== -1) {
19
+ var y = r[e] instanceof Array ? r[e] : [r[e]], m = n[e] instanceof Array ? n[e] : [n[e]];
20
+ r[e] = [].concat(y, m);
21
+ } else if (f.indexOf(e) !== -1)
22
+ for (var t in n[e]) if (r[e][t]) {
23
+ var d = r[e][t] instanceof Array ? r[e][t] : [r[e][t]], h = n[e][t] instanceof Array ? n[e][t] : [n[e][t]];
24
+ r[e][t] = [].concat(d, h);
25
+ } else r[e][t] = n[e][t];
26
+ else if (e === "hook") for (var i in n[e]) r[e][i] = r[e][i] ? v(r[e][i], n[e][i]) : n[e][i];
27
+ else r[e] = n[e];
28
+ return r;
29
+ }, {});
30
+ }, v = function(s, r) {
31
+ return function() {
32
+ s && s.apply(this, arguments), r && r.apply(this, arguments);
33
+ };
34
+ };
35
+ return a = g, a;
36
+ }
37
+ var j = c();
38
+ const A = /* @__PURE__ */ O(j);
39
+ export {
40
+ A as _
41
+ };
@@ -0,0 +1,16 @@
1
+ import { isPlainObject as i, isString as s, isArray as d } from "@web-utils/core";
2
+ const o = (n, r) => i(n) || s(n) ? [r, n] : d(n) ? [r, ...n] : [r], u = () => {
3
+ const n = window.navigator.userAgent, r = n.indexOf("MSIE ");
4
+ if (r > 0)
5
+ return parseInt(n.substring(r + 5, n.indexOf(".", r)), 10);
6
+ if (n.indexOf("Trident/") > 0) {
7
+ const t = n.indexOf("rv:");
8
+ return parseInt(n.substring(t + 3, n.indexOf(".", t)), 10);
9
+ }
10
+ const e = n.indexOf("Edge/");
11
+ return e > 0 ? parseInt(n.substring(e + 5, n.indexOf(".", e)), 10) : -1;
12
+ };
13
+ export {
14
+ u as a,
15
+ o as g
16
+ };
@@ -1,23 +1,6 @@
1
- import { isObject as u, isString as a, hasOwn as f, isPlainObject as p, isArray as h, camelize as g, isFunction as m } from "@web-utils/core";
2
- import x from "vue";
3
- const T = (e, r) => p(e) || a(e) ? [r, e] : h(e) ? [r, ...e] : [r];
4
- function E() {
5
- const e = window.navigator.userAgent, r = e.indexOf("MSIE ");
6
- if (r > 0)
7
- return parseInt(e.substring(r + 5, e.indexOf(".", r)), 10);
8
- if (e.indexOf("Trident/") > 0) {
9
- const o = e.indexOf("rv:");
10
- return parseInt(e.substring(o + 3, e.indexOf(".", o)), 10);
11
- }
12
- const l = e.indexOf("Edge/");
13
- return l > 0 ? parseInt(e.substring(l + 5, e.indexOf(".", l)), 10) : -1;
14
- }
15
- function z(e, r) {
16
- for (const t in r)
17
- x.set(e, t, r[t]);
18
- return e;
19
- }
20
- const I = (e, r) => {
1
+ import { isObject as u, isString as f, hasOwn as h, camelize as p, isFunction as m } from "@web-utils/core";
2
+ import g from "async-validator";
3
+ const z = (e, r) => {
21
4
  if (!e || !r)
22
5
  return null;
23
6
  let t = e;
@@ -58,7 +41,7 @@ const I = (e, r) => {
58
41
  "lazy",
59
42
  "load",
60
43
  "tree-props"
61
- ], b = [
44
+ ], x = [
62
45
  "select",
63
46
  "select-all",
64
47
  "selection-change",
@@ -130,7 +113,7 @@ const I = (e, r) => {
130
113
  "draggable",
131
114
  "allow-drag",
132
115
  "allow-drop"
133
- ], v = [
116
+ ], b = [
134
117
  "node-click",
135
118
  "node-contextmenu",
136
119
  "check-change",
@@ -144,42 +127,55 @@ const I = (e, r) => {
144
127
  "node-drag-over",
145
128
  "node-drag-end",
146
129
  "node-drop"
147
- ], s = (e, r, t = !0) => {
130
+ ], o = (e, r, t = !0) => {
148
131
  if (u(e)) {
149
132
  let l = r;
150
- a(r) && (l = l.split(","));
151
- const o = {};
152
- return l.forEach((n) => {
153
- f(e, n) && (t ? o[n] = e[n] : l.includes(n) || (o[n] = e[n]));
154
- }), o;
133
+ f(r) && (l = l.split(","));
134
+ const a = {};
135
+ if (t)
136
+ l.forEach((n) => {
137
+ h(e, n) && (a[n] = e[n]);
138
+ });
139
+ else
140
+ for (const n in e)
141
+ l.includes(n) || (a[n] = e[n]);
142
+ return a;
155
143
  }
156
144
  return e;
157
- }, A = (e) => {
145
+ }, E = (e) => {
158
146
  const r = {};
159
147
  for (const t in e)
160
- r[g(t)] = e[t];
148
+ r[p(t)] = e[t];
161
149
  return r;
162
- }, V = (e) => s(e, w), K = (e) => s(e, y), R = (e) => s(e, b), S = (e) => s(e, k), F = (e) => s(e, v), c = (e = "", r) => {
150
+ }, F = (e) => o(e, w), O = (e) => o(e, y), A = (e) => o(e, x), C = (e) => o(e, k), K = (e) => o(e, b), d = (e = "", r = {}) => {
163
151
  const t = r || {};
164
- return (e || "").replace(/{(.*?)}/g, (o, n) => {
152
+ return (e || "").replace(/{(.*?)}/g, (a, n) => {
165
153
  if (n.indexOf(":")) {
166
- const [i, d] = n.split(":");
167
- return t[i] ? t[i] : d;
154
+ const [s, c] = n.split(":");
155
+ return t[s] ? t[s] : c;
168
156
  } else
169
157
  return t[n] || "";
170
158
  });
171
- }, M = (e, r) => m(e) ? c(e(r), r) : a(e) ? c(e, r) : null;
159
+ }, V = (e, r) => m(e) ? d(e(r), r) : f(e) ? d(e, r) : null;
160
+ function R(e, r, t) {
161
+ return new Promise((l, a) => {
162
+ const n = {};
163
+ t && t.length > 0 && t.forEach((i) => {
164
+ delete i.trigger;
165
+ }), n[e] = t;
166
+ const s = new g(n), c = {};
167
+ c[e] = r, s.validate(c, { firstFields: !0 }, (i, v) => l(!i));
168
+ });
169
+ }
172
170
  export {
173
- F as a,
174
- S as b,
175
- z as c,
176
- s as d,
177
- I as e,
178
- K as f,
179
- T as g,
180
- R as h,
181
- V as i,
182
- E as j,
183
- M as k,
184
- A as n
171
+ K as a,
172
+ C as b,
173
+ o as c,
174
+ z as d,
175
+ V as e,
176
+ O as f,
177
+ A as g,
178
+ F as h,
179
+ E as n,
180
+ R as v
185
181
  };
@@ -1,5 +1,5 @@
1
- import { l as a, a as n, b as h, s as r } from "./dic.CET0XdKP.mjs";
2
- import { D as d, d as c } from "./util.CoahLDYn.mjs";
1
+ import { l as a, a as n, b as h, s as r } from "./dic.Dkl-leRW.mjs";
2
+ import { D as d, d as c } from "./util.DqFv_pWg.mjs";
3
3
  import { s as l } from "./slot.DXIbhGat.mjs";
4
4
  import { isBlank as s } from "@web-utils/core";
5
5
  const f = {
@@ -47,12 +47,12 @@ const a = {
47
47
  title: "需要引入mock模拟数据包",
48
48
  github: "https://github.com/Colingo/mock"
49
49
  }
50
- }, o = {
51
- logs: function(s) {
50
+ }, e = {
51
+ logs(s) {
52
52
  const t = a[s], i = l(s);
53
53
  i.warning(t.title), i.warning(`CDN:${t.url || "-"}`), i.warning(`GITHUB:${t.github || "-"}`);
54
54
  }
55
55
  };
56
56
  export {
57
- o as p
57
+ e as p
58
58
  };
@@ -0,0 +1,30 @@
1
+ const o = {
2
+ props: {
3
+ value: Array,
4
+ prop: String,
5
+ columns: Array,
6
+ descs: Array,
7
+ ascs: Array,
8
+ limit: {
9
+ type: Number,
10
+ default: 1 / 0
11
+ },
12
+ disabled: Boolean,
13
+ showSummary: Boolean,
14
+ selection: Boolean,
15
+ index: {
16
+ type: Boolean,
17
+ default: !0
18
+ },
19
+ selectionWidth: String,
20
+ toolbarMenus: Array,
21
+ handleMenus: Array,
22
+ fetchApi: Function,
23
+ delApi: Function,
24
+ bottomAddButton: Boolean,
25
+ initRow: Function
26
+ }
27
+ };
28
+ export {
29
+ o as S
30
+ };
@@ -55,7 +55,7 @@ const n = {
55
55
  this.$parent.$emit("on-before-index-change", this.currentIndex);
56
56
  return;
57
57
  }
58
- (typeof this.disabled == "undefined" || this.disabled === !1) && (this.currentSelected = !0, this.$parent.currentIndex = this.currentIndex, this.$nextTick(() => {
58
+ (typeof this.disabled > "u" || this.disabled === !1) && (this.currentSelected = !0, this.$parent.currentIndex = this.currentIndex, this.$nextTick(() => {
59
59
  this.$emit("on-item-click", this.currentIndex);
60
60
  }));
61
61
  }