@web-utils/component 3.0.6 → 3.1.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 (172) hide show
  1. package/address-input/index.mjs +20 -57
  2. package/affix/index.mjs +26 -47
  3. package/aside-menu/index.mjs +18 -43
  4. package/avatar/index.mjs +27 -49
  5. package/awesome-button/index.mjs +35 -43
  6. package/capsule-tab/index.mjs +16 -34
  7. package/card/index.mjs +21 -76
  8. package/carousel/index.mjs +14 -49
  9. package/chat/index.mjs +104 -414
  10. package/chunk-file-uploader/index.mjs +21 -38
  11. package/chunks/FormTemp.aa57efb4.mjs +125 -0
  12. package/code-mirror-editor/index.mjs +69 -79
  13. package/color-picker/index.mjs +29 -60
  14. package/comment/index.mjs +17 -48
  15. package/confirm-button/index.mjs +11 -19
  16. package/confirmable/index.mjs +12 -20
  17. package/context-menu/index.mjs +42 -144
  18. package/count-up/index.mjs +18 -25
  19. package/custom-scrollbar/index.mjs +13 -22
  20. package/data-box/index.mjs +15 -66
  21. package/data-card/index.mjs +16 -65
  22. package/data-cardtext/index.mjs +16 -52
  23. package/data-display/index.mjs +18 -62
  24. package/data-icons/index.mjs +16 -68
  25. package/data-imgtext/index.mjs +18 -79
  26. package/data-operatext/index.mjs +18 -75
  27. package/data-panel/index.mjs +16 -63
  28. package/data-pay/index.mjs +20 -122
  29. package/data-price/index.mjs +18 -60
  30. package/data-progress/index.mjs +16 -67
  31. package/data-rotate/index.mjs +16 -66
  32. package/data-table-picker/index.mjs +25 -88
  33. package/data-tabs/index.mjs +16 -64
  34. package/dialog-form/index.mjs +48 -94
  35. package/dynamic-table/index.mjs +43 -127
  36. package/e-charts/index.mjs +21 -34
  37. package/easy-popup/index.mjs +35 -61
  38. package/editable-progress/index.mjs +22 -77
  39. package/editable-tree/index.mjs +235 -546
  40. package/egd-collapse/index.mjs +13 -26
  41. package/egd-collapse-item/index.mjs +27 -87
  42. package/element-dialog/index.mjs +69 -133
  43. package/empty-view/index.mjs +13 -33
  44. package/error-view/index.mjs +14 -34
  45. package/flex-column/index.mjs +15 -23
  46. package/flex-item/index.mjs +18 -26
  47. package/flex-row/index.mjs +23 -31
  48. package/flex-scroller/index.mjs +16 -27
  49. package/flow/index.mjs +70 -110
  50. package/flow-designer/index.mjs +1215 -4804
  51. package/flow-node/index.mjs +15 -51
  52. package/flow-viewer/index.mjs +64 -89
  53. package/form-block/index.mjs +43 -62
  54. package/form-button/index.mjs +10 -18
  55. package/form-cascader/index.mjs +49 -100
  56. package/form-checkbox-group/index.mjs +43 -110
  57. package/form-date-picker/index.mjs +51 -97
  58. package/form-holder/index.mjs +25 -42
  59. package/form-input/index.mjs +40 -90
  60. package/form-input-email/index.mjs +35 -79
  61. package/form-input-id-card/index.mjs +40 -87
  62. package/form-input-number/index.mjs +42 -102
  63. package/form-input-phone-number/index.mjs +34 -75
  64. package/form-input-tag/index.mjs +31 -73
  65. package/form-input-time/index.mjs +42 -87
  66. package/form-item/index.mjs +70 -89
  67. package/form-item-config-provider/index.mjs +12 -20
  68. package/form-item-group/index.mjs +46 -65
  69. package/form-radio-group/index.mjs +50 -108
  70. package/form-select/index.mjs +44 -95
  71. package/form-switch/index.mjs +38 -85
  72. package/form-textarea/index.mjs +31 -75
  73. package/form-view/index.mjs +112 -260
  74. package/fy-array/index.mjs +35 -121
  75. package/fy-article/index.mjs +12 -43
  76. package/fy-cascader/index.mjs +26 -67
  77. package/fy-checkbox/index.mjs +27 -77
  78. package/fy-code/index.mjs +19 -33
  79. package/fy-curd/index.mjs +810 -2017
  80. package/fy-date/index.mjs +18 -59
  81. package/fy-draggable/index.mjs +81 -140
  82. package/fy-dynamic/index.mjs +85 -204
  83. package/fy-empty/index.mjs +14 -35
  84. package/fy-form/index.mjs +254 -571
  85. package/fy-form-design/index.mjs +1489 -6084
  86. package/fy-form-design/style.css +1 -1
  87. package/fy-input/index.mjs +34 -104
  88. package/fy-input-color/index.mjs +22 -67
  89. package/fy-input-icon/index.mjs +37 -122
  90. package/fy-input-map/index.mjs +57 -149
  91. package/fy-input-number/index.mjs +18 -53
  92. package/fy-input-table/index.mjs +36 -102
  93. package/fy-input-tree/index.mjs +51 -138
  94. package/fy-progress/index.mjs +12 -31
  95. package/fy-radio/index.mjs +20 -51
  96. package/fy-rate/index.mjs +18 -51
  97. package/fy-select/index.mjs +49 -134
  98. package/fy-slider/index.mjs +19 -52
  99. package/fy-switch/index.mjs +18 -48
  100. package/fy-tabs/index.mjs +19 -51
  101. package/fy-time/index.mjs +22 -62
  102. package/fy-title/index.mjs +14 -25
  103. package/fy-tree/index.mjs +74 -216
  104. package/fy-u-editor/index.mjs +50 -64
  105. package/fy-upload/index.mjs +167 -338
  106. package/guide-steps/index.mjs +33 -53
  107. package/highlight-j-s/index.mjs +13 -27
  108. package/icon-card/index.mjs +12 -36
  109. package/icon-temp/index.mjs +12 -34
  110. package/iframe-window/index.mjs +13 -40
  111. package/image-cropper/index.mjs +46 -171
  112. package/image-preview/index.mjs +54 -168
  113. package/image-viewer/index.mjs +24 -50
  114. package/index.css +1 -0
  115. package/index.mjs +3973 -501
  116. package/input-number/index.mjs +84 -173
  117. package/input-number-range/index.mjs +20 -70
  118. package/j-s-x-component/index.mjs +3 -3
  119. package/keep-view-alive/index.mjs +47 -55
  120. package/keyboard/index.mjs +100 -113
  121. package/license/index.mjs +34 -51
  122. package/loading-view/index.mjs +14 -34
  123. package/login/index.mjs +33 -161
  124. package/monaco-editor/index.mjs +13 -21
  125. package/name-avatar/index.mjs +13 -32
  126. package/nav-bar/index.mjs +12 -31
  127. package/not-implement/index.mjs +14 -25
  128. package/notice/index.mjs +32 -80
  129. package/package.json +1 -1
  130. package/page/index.mjs +11 -23
  131. package/page-header/index.mjs +16 -37
  132. package/page-index/index.mjs +42 -93
  133. package/page-index-top/index.mjs +42 -84
  134. package/page-skeleton/index.mjs +24 -39
  135. package/page-skeleton-new/index.mjs +21 -68
  136. package/pageable-table/index.mjs +105 -227
  137. package/pageable-view/index.mjs +30 -83
  138. package/photo-swipe/index.mjs +62 -87
  139. package/present-view/index.mjs +114 -267
  140. package/queue/index.mjs +14 -29
  141. package/record-video/index.mjs +29 -66
  142. package/resize-observer/index.mjs +18 -30
  143. package/search/index.mjs +47 -81
  144. package/search-popover/index.mjs +57 -329
  145. package/sign/index.mjs +43 -60
  146. package/sign-panel/index.mjs +40 -151
  147. package/skeleton/index.mjs +18 -44
  148. package/split-pane/index.mjs +45 -129
  149. package/stateful/index.mjs +18 -26
  150. package/static-pageable-table/index.mjs +18 -44
  151. package/swiper/index.mjs +53 -94
  152. package/tab/index.mjs +13 -39
  153. package/tab-item/index.mjs +23 -37
  154. package/table-column/index.mjs +27 -35
  155. package/table-view/index.mjs +89 -209
  156. package/tag-render/index.mjs +34 -69
  157. package/text-ellipsis/index.mjs +22 -47
  158. package/tinymce-editor/index.mjs +174 -285
  159. package/toolbar/index.mjs +21 -42
  160. package/toolbar-button/index.mjs +25 -54
  161. package/verify/index.mjs +16 -29
  162. package/vue-cron/index.mjs +272 -1089
  163. package/vue-qr-code/index.mjs +19 -27
  164. package/vue-quill-editor/index.mjs +15 -27
  165. package/vue-tags-input/index.mjs +104 -224
  166. package/vue-tree-select/index.mjs +595 -742
  167. package/vue-video-player/index.mjs +42 -57
  168. package/watermark/index.mjs +27 -35
  169. package/web-types.json +1 -1
  170. package/x-input-tag/index.mjs +50 -112
  171. package/chunks/FormTemp.7f91629d.mjs +0 -165
  172. /package/chunks/{vueComponentNormalizer.446f5dc4.mjs → _plugin-vue2_normalizer.446f5dc4.mjs} +0 -0
@@ -1,212 +1,37 @@
1
- var c = (t, e, o) => new Promise((r, s) => {
1
+ var y = Object.defineProperty, g = Object.defineProperties;
2
+ var w = Object.getOwnPropertyDescriptors;
3
+ var h = Object.getOwnPropertySymbols;
4
+ var x = Object.prototype.hasOwnProperty, $ = Object.prototype.propertyIsEnumerable;
5
+ var p = (o, t, e) => t in o ? y(o, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[t] = e, c = (o, t) => {
6
+ for (var e in t || (t = {}))
7
+ x.call(t, e) && p(o, e, t[e]);
8
+ if (h)
9
+ for (var e of h(t))
10
+ $.call(t, e) && p(o, e, t[e]);
11
+ return o;
12
+ }, f = (o, t) => g(o, w(t));
13
+ var u = (o, t, e) => new Promise((r, s) => {
2
14
  var n = (i) => {
3
15
  try {
4
- a(o.next(i));
5
- } catch (f) {
6
- s(f);
16
+ a(e.next(i));
17
+ } catch (d) {
18
+ s(d);
7
19
  }
8
20
  }, l = (i) => {
9
21
  try {
10
- a(o.throw(i));
11
- } catch (f) {
12
- s(f);
22
+ a(e.throw(i));
23
+ } catch (d) {
24
+ s(d);
13
25
  }
14
26
  }, a = (i) => i.done ? r(i.value) : Promise.resolve(i.value).then(n, l);
15
- a((o = o.apply(t, e)).next());
27
+ a((e = e.apply(o, t)).next());
16
28
  });
17
- import { hasOwn as d, toStringArray as b, animate as v, isInContainer as _ } from "@web-utils/core";
18
- import { merge as g } from "@web-utils/integrations/lodash";
19
- import y from "@web-utils/component/resize-observer";
29
+ import { hasOwn as b, toStringArray as S, animate as F, isInContainer as k } from "@web-utils/core";
30
+ import { merge as B } from "@web-utils/integrations/lodash";
31
+ import C from "@web-utils/component/resize-observer";
20
32
  import "@web-utils/component/resize-observer/style.css";
21
- import { n as w } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
22
- var x = function() {
23
- var t = this, e = t.$createElement, o = t._self._c || e;
24
- return o("div", {
25
- class: ["form-view", t.className]
26
- }, [t.showToolbar ? o("div", {
27
- directives: [{
28
- name: "show",
29
- rawName: "v-show",
30
- value: !t.isFormLoading,
31
- expression: "!isFormLoading"
32
- }],
33
- staticClass: "form-view-toolbar"
34
- }, [t._t("form-view-toolbar", function() {
35
- return [o("Toolbar", t._g(t._b({
36
- on: {
37
- edit: t.onEdit
38
- },
39
- scopedSlots: t._u([{
40
- key: "default",
41
- fn: function(r) {
42
- var s = r.buttons;
43
- return [t._t("toolbar-button", null, {
44
- buttons: s
45
- })];
46
- }
47
- }, t._l(t.getToolbarSlotKeys(), function(r) {
48
- return {
49
- key: r,
50
- fn: function() {
51
- return [t._t(r)];
52
- },
53
- proxy: !0
54
- };
55
- }), {
56
- key: "toolbar-right",
57
- fn: function() {
58
- return [t._t("toolbar-right")];
59
- },
60
- proxy: !0
61
- }], null, !0)
62
- }, "Toolbar", Object.assign({}, t.toolbarProps, {
63
- buttons: t.toolbarButtons
64
- }), !1), t.toolbarListeners))];
65
- })], 2) : t._e(), o("div", {
66
- directives: [{
67
- name: "show",
68
- rawName: "v-show",
69
- value: !t.isFormLoading,
70
- expression: "!isFormLoading"
71
- }],
72
- staticClass: "form-scroller-wrapper"
73
- }, [o("div", {
74
- ref: "formScroller",
75
- class: ["form-scroller", t.contentClass],
76
- on: {
77
- scroll: t.onFormScroll
78
- }
79
- }, [t.notForm ? o("div", {
80
- staticClass: "not-form",
81
- style: {
82
- width: t.formWidth
83
- }
84
- }, [t.title ? o("div", {
85
- staticClass: "form-view-title"
86
- }, [t._v(" " + t._s(t.title) + " ")]) : t._e(), t._t("default", function() {
87
- return [o("EmptyView", {
88
- attrs: {
89
- "empty-tips": "请添加表单内容"
90
- }
91
- })];
92
- }), t.footerBarButtons.length ? o("Toolbar", t._g(t._b({
93
- attrs: {
94
- footer: ""
95
- },
96
- scopedSlots: t._u([{
97
- key: "default",
98
- fn: function(r) {
99
- var s = r.buttons, n = r.footer;
100
- return [t._t("footer-button", null, {
101
- buttons: s,
102
- footer: n
103
- })];
104
- }
105
- }, t._l(t.getFooterSlotKeys(), function(r) {
106
- return {
107
- key: t.getFooterSlotKey(r),
108
- fn: function() {
109
- return [t._t(r)];
110
- },
111
- proxy: !0
112
- };
113
- })], null, !0)
114
- }, "Toolbar", Object.assign({}, t.toolbarProps, {
115
- buttons: t.footerBarButtons
116
- }), !1), t.toolbarListeners)) : t._e(), t.$scopedSlots["form-bottom"] ? t._t("form-bottom") : t._e()], 2) : o("div", {
117
- class: ["form-card", {
118
- "un-limit": t.unLimit
119
- }],
120
- style: {
121
- width: `calc(${t.formWidth} + 40px)`
122
- }
123
- }, [o("div", {
124
- staticClass: "form-content"
125
- }, [t.title ? o("div", {
126
- staticClass: "form-view-title"
127
- }, [t._v(" " + t._s(t.title) + " ")]) : t._e(), t._t("default", function() {
128
- return [o("EmptyView", {
129
- attrs: {
130
- "empty-tips": "请添加表单内容"
131
- }
132
- })];
133
- }), t.footerBarButtons.length ? o("Toolbar", t._g(t._b({
134
- attrs: {
135
- footer: ""
136
- },
137
- scopedSlots: t._u([{
138
- key: "default",
139
- fn: function(r) {
140
- var s = r.buttons, n = r.footer;
141
- return [t._t("footer-button", null, {
142
- buttons: s,
143
- footer: n
144
- })];
145
- }
146
- }, t._l(t.getFooterSlotKeys(), function(r) {
147
- return {
148
- key: t.getFooterSlotKey(r),
149
- fn: function() {
150
- return [t._t(r)];
151
- },
152
- proxy: !0
153
- };
154
- })], null, !0)
155
- }, "Toolbar", Object.assign({}, t.toolbarProps, {
156
- buttons: t.footerBarButtons
157
- }), !1), t.toolbarListeners)) : t._e()], 2)]), t.$scopedSlots["form-bottom"] || t.$parent.$options.flowForm && t.flowContext.logs.length ? o("div", {
158
- class: ["form-card", {
159
- "un-limit": t.unLimit
160
- }],
161
- staticStyle: {
162
- "min-height": "0"
163
- },
164
- style: {
165
- width: `calc(${t.formWidth} + 40px)`
166
- }
167
- }, [o("div", {
168
- staticClass: "form-content"
169
- }, [t.$parent.$options.flowForm && t.flowContext.logs.length ? o("FormItemGroup", {
170
- attrs: {
171
- "block-title": "流程日志"
172
- }
173
- }, [o("FlowLog", {
174
- staticClass: "flow-log",
175
- attrs: {
176
- fetch: !1,
177
- "show-title": !1,
178
- "business-key": t.$parent.bizKey
179
- }
180
- })], 1) : t._e(), t._t("form-bottom")], 2)]) : t._e()]), o("ResizeObserver", {
181
- on: {
182
- notify: t.onFormResize
183
- }
184
- })], 1), t.formNav && !t.isFormLoading && t.showNav && t.groups.length ? o("div", {
185
- staticClass: "form-nav"
186
- }, [o("div", {
187
- staticClass: "form-nav-header"
188
- }, [t._v("表单导航")]), o("ul", {
189
- staticClass: "form-nav-list"
190
- }, t._l(t.groups, function(r, s) {
191
- return o("li", {
192
- key: r.blockTitle,
193
- class: ["form-nav-item", {
194
- active: t.activeIndex === s
195
- }],
196
- on: {
197
- click: function(n) {
198
- return t.navItemClick(r, s);
199
- }
200
- }
201
- }, [t._v(" " + t._s(r.blockTitle) + " ")]);
202
- }), 0)]) : t._e(), t.isFormLoading ? o("LoadingView", {
203
- attrs: {
204
- "icon-size": "34px",
205
- "font-size": "16px"
206
- }
207
- }) : t._e()], 1);
208
- }, $ = [];
209
- const p = [
33
+ import { n as L } from "../chunks/_plugin-vue2_normalizer.446f5dc4.mjs";
34
+ const _ = [
210
35
  "back",
211
36
  "create",
212
37
  "save",
@@ -226,17 +51,17 @@ const p = [
226
51
  "disabled",
227
52
  "reload",
228
53
  "slot"
229
- ], S = p.map((t) => `${t}-down`), F = ["back", "withdraw", "edit"], m = ["save", "submit", "", "publish", "agree", "disagree", "reject", "finish", "cancel"], u = (t, e) => {
230
- if (t.classList.contains(e))
231
- return t;
232
- let o = t.parentNode;
233
- for (; o && !o.classList.contains(e); )
234
- o = o.parentNode;
235
- return o.classList.contains(e) ? o : null;
236
- }, k = {
54
+ ], I = _.map((o) => `${o}-down`), T = ["back", "withdraw", "edit"], v = ["save", "submit", "", "publish", "agree", "disagree", "reject", "finish", "cancel"], m = (o, t) => {
55
+ if (o.classList.contains(t))
56
+ return o;
57
+ let e = o.parentNode;
58
+ for (; e && !e.classList.contains(t); )
59
+ e = e.parentNode;
60
+ return e.classList.contains(t) ? e : null;
61
+ }, O = {
237
62
  name: "FormView",
238
63
  components: {
239
- ResizeObserver: y
64
+ ResizeObserver: C
240
65
  },
241
66
  inject: {
242
67
  flowContext: {
@@ -287,77 +112,77 @@ const p = [
287
112
  },
288
113
  computed: {
289
114
  isFormLoading() {
290
- return this.loading || d(this.$parent, "isFormLoaded") ? !this.$parent.isFormLoaded : !1;
115
+ return this.loading || b(this.$parent, "isFormLoaded") ? !this.$parent.isFormLoaded : !1;
291
116
  },
292
117
  toolbarProps() {
293
118
  var r;
294
- const t = {}, e = ((r = this.toolbarAttrs) == null ? void 0 : r.buttons) || this.$parent.buttons, o = g({}, this.toolbarAttrs, t);
295
- return o.buttons = e || ["back"], o.buttons = b(o.buttons), o;
119
+ const o = {}, t = ((r = this.toolbarAttrs) == null ? void 0 : r.buttons) || this.$parent.buttons, e = B({}, this.toolbarAttrs, o);
120
+ return e.buttons = t || ["back"], e.buttons = S(e.buttons), e;
296
121
  },
297
122
  toolbarButtons() {
298
- return this.toolbarProps.buttons.filter((t) => !m.includes(t) && t.indexOf(":down") < 0).map((t) => t.replace(":up", ""));
123
+ return this.toolbarProps.buttons.filter((o) => !v.includes(o) && o.indexOf(":down") < 0).map((o) => o.replace(":up", ""));
299
124
  },
300
125
  footerBarButtons() {
301
- let t = this.toolbarProps.buttons.filter(
302
- (e) => !F.includes(e) && (m.includes(e) || e.indexOf(":down") > -1)
303
- ).map((e) => e.replace(":down", ""));
304
- return t = t || [], this.$parent.isEnabled && !t.includes("cancel") && t.push("cancel"), t;
126
+ let o = this.toolbarProps.buttons.filter(
127
+ (t) => !T.includes(t) && (v.includes(t) || t.indexOf(":down") > -1)
128
+ ).map((t) => t.replace(":down", ""));
129
+ return o = o || [], this.$parent.isEnabled && !o.includes("cancel") && o.push("cancel"), o;
305
130
  }
306
131
  },
307
132
  created() {
308
- this.$on("FormView.addGroup", (t) => {
309
- t && (this.activeIndex === -1 && (this.activeIndex = 0), this.groups.push(t), this.groups = this.groups.sort((e, o) => {
310
- const r = u(e.$el, "form-card"), s = u(o.$el, "form-card");
133
+ this.$on("FormView.addGroup", (o) => {
134
+ o && (this.activeIndex === -1 && (this.activeIndex = 0), this.groups.push(o), this.groups = this.groups.sort((t, e) => {
135
+ const r = m(t.$el, "form-card"), s = m(e.$el, "form-card");
311
136
  if (r === s) {
312
- const n = [].indexOf.call(e.$el.parentNode.children, e.$el), l = [].indexOf.call(o.$el.parentNode.children, o.$el);
137
+ const n = [].indexOf.call(t.$el.parentNode.children, t.$el), l = [].indexOf.call(e.$el.parentNode.children, e.$el);
313
138
  return n - l;
314
139
  } else {
315
- const n = u(r, "form-scroller"), l = [].indexOf.call(n.children, r), a = [].indexOf.call(n.children, s);
140
+ const n = m(r, "form-scroller"), l = [].indexOf.call(n.children, r), a = [].indexOf.call(n.children, s);
316
141
  return l - a;
317
142
  }
318
- }), t.active && (this.activeIndex = this.groups.indexOf(t), this.navItemClick(t, this.activeIndex)));
319
- }), this.$on("FormView.removeGroup", (t) => {
320
- if (t) {
321
- const e = this.groups.indexOf(t);
322
- this.groups.splice(e, 1), this.activeIndex > this.groups.length - 1 && (this.activeIndex = 0);
143
+ }), o.active && (this.activeIndex = this.groups.indexOf(o), this.navItemClick(o, this.activeIndex)));
144
+ }), this.$on("FormView.removeGroup", (o) => {
145
+ if (o) {
146
+ const t = this.groups.indexOf(o);
147
+ this.groups.splice(t, 1), this.activeIndex > this.groups.length - 1 && (this.activeIndex = 0);
323
148
  }
324
149
  }), this.onFormResize({ width: window.document.body.clientWidth });
325
150
  },
326
151
  activated() {
327
- return c(this, null, function* () {
152
+ return u(this, null, function* () {
328
153
  this.$refs.formScroller && (yield this.$nextTick(), this.scrollTo(this.formScrollTop, this.formScrollLeft));
329
154
  });
330
155
  },
331
156
  methods: {
332
157
  getToolbarSlotKeys() {
333
- return Object.keys(this.$scopedSlots).filter((t) => p.includes(t));
158
+ return Object.keys(this.$scopedSlots).filter((o) => _.includes(o));
334
159
  },
335
160
  getFooterSlotKeys() {
336
- return Object.keys(this.$scopedSlots).filter((t) => S.includes(t));
161
+ return Object.keys(this.$scopedSlots).filter((o) => I.includes(o));
337
162
  },
338
- getFooterSlotKey(t) {
339
- return t.replace("-down", "");
163
+ getFooterSlotKey(o) {
164
+ return o.replace("-down", "");
340
165
  },
341
- onFormResize({ width: t }) {
342
- this.showNav = t > 1500;
166
+ onFormResize({ width: o }) {
167
+ this.showNav = o > 1500;
343
168
  },
344
169
  onEdit() {
345
- !this.toolbarListeners.edit && d(this.$parent, "disabled") && (this.$parent.disabled = !1);
170
+ !this.toolbarListeners.edit && b(this.$parent, "disabled") && (this.$parent.disabled = !1);
346
171
  },
347
- navItemClick(t, e) {
348
- return c(this, null, function* () {
349
- this.showNav && (yield this.$nextTick(), this.activeFormItemGroup(t, e), t.expand || t.open());
172
+ navItemClick(o, t) {
173
+ return u(this, null, function* () {
174
+ this.showNav && (yield this.$nextTick(), this.activeFormItemGroup(o, t), o.expand || o.open());
350
175
  });
351
176
  },
352
- activeFormItemGroup(t, e) {
353
- this.$refs.formScroller.scrollTop = t.$el.offsetTop - 10, v(t.$el, "breathe-indicator-animation"), this.tryByClick = !0, this.activeIndex = e;
177
+ activeFormItemGroup(o, t) {
178
+ this.$refs.formScroller.scrollTop = o.$el.offsetTop - 10, F(o.$el, "breathe-indicator-animation"), this.tryByClick = !0, this.activeIndex = t;
354
179
  },
355
180
  tryActive() {
356
- return c(this, null, function* () {
181
+ return u(this, null, function* () {
357
182
  if (this.showNav) {
358
- for (let t = 0; t < this.groups.length; t++)
359
- if (_(this.groups[t].$el, this.$refs.formScroller, { bottomOffset: 10 })) {
360
- this.activeIndex = t;
183
+ for (let o = 0; o < this.groups.length; o++)
184
+ if (k(this.groups[o].$el, this.$refs.formScroller, { bottomOffset: 10 })) {
185
+ this.activeIndex = o;
361
186
  break;
362
187
  }
363
188
  }
@@ -366,28 +191,55 @@ const p = [
366
191
  onFormScroll() {
367
192
  this.formScrollTop = this.$refs.formScroller.scrollTop, this.formScrollLeft = this.$refs.formScroller.scrollLeft, !this.tryByClick && this.groups.length && window.requestAnimationFrame(this.tryActive), this.tryByClick = !1;
368
193
  },
369
- scrollTo(t, e) {
370
- t && (this.$refs.formScroller.scrollTop = t), e && (this.$refs.formScroller.scrollLeft = e);
194
+ scrollTo(o, t) {
195
+ o && (this.$refs.formScroller.scrollTop = o), t && (this.$refs.formScroller.scrollLeft = t);
371
196
  }
372
197
  }
373
- }, h = {};
374
- var B = /* @__PURE__ */ w(
375
- k,
376
- x,
377
- $,
198
+ };
199
+ var N = function() {
200
+ var t = this, e = t._self._c;
201
+ return e("div", { class: ["form-view", t.className] }, [t.showToolbar ? e("div", { directives: [{ name: "show", rawName: "v-show", value: !t.isFormLoading, expression: "!isFormLoading" }], staticClass: "form-view-toolbar" }, [t._t("form-view-toolbar", function() {
202
+ return [e("Toolbar", t._g(t._b({ on: { edit: t.onEdit }, scopedSlots: t._u([{ key: "default", fn: function({ buttons: r }) {
203
+ return [t._t("toolbar-button", null, { buttons: r })];
204
+ } }, t._l(t.getToolbarSlotKeys(), function(r) {
205
+ return { key: r, fn: function() {
206
+ return [t._t(r)];
207
+ }, proxy: !0 };
208
+ }), { key: "toolbar-right", fn: function() {
209
+ return [t._t("toolbar-right")];
210
+ }, proxy: !0 }], null, !0) }, "Toolbar", f(c({}, t.toolbarProps), { buttons: t.toolbarButtons }), !1), t.toolbarListeners))];
211
+ })], 2) : t._e(), e("div", { directives: [{ name: "show", rawName: "v-show", value: !t.isFormLoading, expression: "!isFormLoading" }], staticClass: "form-scroller-wrapper" }, [e("div", { ref: "formScroller", class: ["form-scroller", t.contentClass], on: { scroll: t.onFormScroll } }, [t.notForm ? e("div", { staticClass: "not-form", style: { width: t.formWidth } }, [t.title ? e("div", { staticClass: "form-view-title" }, [t._v(" " + t._s(t.title) + " ")]) : t._e(), t._t("default", function() {
212
+ return [e("EmptyView", { attrs: { "empty-tips": "请添加表单内容" } })];
213
+ }), t.footerBarButtons.length ? e("Toolbar", t._g(t._b({ attrs: { footer: "" }, scopedSlots: t._u([{ key: "default", fn: function({ buttons: r, footer: s }) {
214
+ return [t._t("footer-button", null, { buttons: r, footer: s })];
215
+ } }, t._l(t.getFooterSlotKeys(), function(r) {
216
+ return { key: t.getFooterSlotKey(r), fn: function() {
217
+ return [t._t(r)];
218
+ }, proxy: !0 };
219
+ })], null, !0) }, "Toolbar", f(c({}, t.toolbarProps), { buttons: t.footerBarButtons }), !1), t.toolbarListeners)) : t._e(), t.$scopedSlots["form-bottom"] ? t._t("form-bottom") : t._e()], 2) : e("div", { class: ["form-card", { "un-limit": t.unLimit }], style: { width: `calc(${t.formWidth} + 40px)` } }, [e("div", { staticClass: "form-content" }, [t.title ? e("div", { staticClass: "form-view-title" }, [t._v(" " + t._s(t.title) + " ")]) : t._e(), t._t("default", function() {
220
+ return [e("EmptyView", { attrs: { "empty-tips": "请添加表单内容" } })];
221
+ }), t.footerBarButtons.length ? e("Toolbar", t._g(t._b({ attrs: { footer: "" }, scopedSlots: t._u([{ key: "default", fn: function({ buttons: r, footer: s }) {
222
+ return [t._t("footer-button", null, { buttons: r, footer: s })];
223
+ } }, t._l(t.getFooterSlotKeys(), function(r) {
224
+ return { key: t.getFooterSlotKey(r), fn: function() {
225
+ return [t._t(r)];
226
+ }, proxy: !0 };
227
+ })], null, !0) }, "Toolbar", f(c({}, t.toolbarProps), { buttons: t.footerBarButtons }), !1), t.toolbarListeners)) : t._e()], 2)]), t.$scopedSlots["form-bottom"] || t.$parent.$options.flowForm && t.flowContext.logs.length ? e("div", { class: ["form-card", { "un-limit": t.unLimit }], staticStyle: { "min-height": "0" }, style: { width: `calc(${t.formWidth} + 40px)` } }, [e("div", { staticClass: "form-content" }, [t.$parent.$options.flowForm && t.flowContext.logs.length ? e("FormItemGroup", { attrs: { "block-title": "流程日志" } }, [e("FlowLog", { staticClass: "flow-log", attrs: { fetch: !1, "show-title": !1, "business-key": t.$parent.bizKey } })], 1) : t._e(), t._t("form-bottom")], 2)]) : t._e()]), e("ResizeObserver", { on: { notify: t.onFormResize } })], 1), t.formNav && !t.isFormLoading && t.showNav && t.groups.length ? e("div", { staticClass: "form-nav" }, [e("div", { staticClass: "form-nav-header" }, [t._v("表单导航")]), e("ul", { staticClass: "form-nav-list" }, t._l(t.groups, function(r, s) {
228
+ return e("li", { key: r.blockTitle, class: ["form-nav-item", { active: t.activeIndex === s }], on: { click: function(n) {
229
+ return t.navItemClick(r, s);
230
+ } } }, [t._v(" " + t._s(r.blockTitle) + " ")]);
231
+ }), 0)]) : t._e(), t.isFormLoading ? e("LoadingView", { attrs: { "icon-size": "34px", "font-size": "16px" } }) : t._e()], 1);
232
+ }, z = [], A = /* @__PURE__ */ L(
233
+ O,
234
+ N,
235
+ z,
378
236
  !1,
379
- C,
237
+ null,
380
238
  null,
381
239
  null,
382
240
  null
383
241
  );
384
- function C(t) {
385
- for (let e in h)
386
- this[e] = h[e];
387
- }
388
- const z = /* @__PURE__ */ function() {
389
- return B.exports;
390
- }();
242
+ const G = A.exports;
391
243
  export {
392
- z as default
244
+ G as default
393
245
  };
@@ -1,106 +1,9 @@
1
- import { p as a, e as o } from "../chunks/event.b5d855dd.mjs";
2
- import { i as c } from "../chunks/util.ae730cde.mjs";
3
- import { n as u } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
4
- var p = function() {
5
- var t = this, n = t.$createElement, e = t._self._c || n;
6
- return e("div", {
7
- staticClass: "avue-array"
8
- }, [t.text ? e("ElButton", {
9
- attrs: {
10
- type: "primary",
11
- icon: "el-icon-plus",
12
- circle: "",
13
- size: t.size,
14
- disabled: t.disabled
15
- },
16
- on: {
17
- click: function(i) {
18
- return t.add();
19
- }
20
- }
21
- }) : t._e(), t._l(t.text, function(i, r) {
22
- return e("div", {
23
- key: r,
24
- staticClass: "avue-array__item"
25
- }, [e("div", {
26
- staticClass: "avue-array__input"
27
- }, [e("ElTooltip", {
28
- attrs: {
29
- placement: "bottom",
30
- disabled: !t.isImg && !t.isUrl || !!i
31
- },
32
- scopedSlots: t._u([{
33
- key: "content",
34
- fn: function() {
35
- return [e("div", [t.isImg ? e(t.isMediaType(i), {
36
- tag: "Component",
37
- staticStyle: {
38
- width: "200px"
39
- },
40
- attrs: {
41
- src: i,
42
- controls: "controls"
43
- },
44
- on: {
45
- click: function(s) {
46
- return t.openImg(r);
47
- }
48
- }
49
- }) : t.isUrl ? e("ElLink", {
50
- attrs: {
51
- type: "primary",
52
- href: i,
53
- target: t.target
54
- }
55
- }, [t._v(" " + t._s(i) + " ")]) : t._e()], 1)];
56
- },
57
- proxy: !0
58
- }], null, !0)
59
- }, [e("ElInput", {
60
- attrs: {
61
- size: t.size,
62
- placeholder: t.placeholder,
63
- disabled: t.disabled
64
- },
65
- model: {
66
- value: t.text[r],
67
- callback: function(s) {
68
- t.$set(t.text, r, s);
69
- },
70
- expression: "text[index]"
71
- }
72
- })], 1), t.disabled || t.readonly || t.alone ? t._e() : [t.isLimit ? t._e() : e("ElButton", {
73
- attrs: {
74
- type: "primary",
75
- icon: "el-icon-plus",
76
- circle: "",
77
- size: t.size,
78
- disabled: t.disabled
79
- },
80
- on: {
81
- click: function(s) {
82
- return t.add(r);
83
- }
84
- }
85
- }), e("ElButton", {
86
- attrs: {
87
- type: "danger",
88
- icon: "el-icon-minus",
89
- circle: "",
90
- size: t.size,
91
- disabled: t.disabled
92
- },
93
- on: {
94
- click: function(s) {
95
- return t.remove(r);
96
- }
97
- }
98
- })]], 2)]);
99
- })], 2);
100
- }, d = [];
101
- const _ = {
1
+ import { p as l, e as a } from "../chunks/event.b5d855dd.mjs";
2
+ import { i as o } from "../chunks/util.ae730cde.mjs";
3
+ import { n as c } from "../chunks/_plugin-vue2_normalizer.446f5dc4.mjs";
4
+ const p = {
102
5
  name: "FyArray",
103
- mixins: [a, o],
6
+ mixins: [l, a],
104
7
  props: {
105
8
  fileType: String,
106
9
  alone: Boolean,
@@ -122,37 +25,48 @@ const _ = {
122
25
  }
123
26
  },
124
27
  methods: {
125
- isMediaType(t) {
126
- return c(t, this.fileType);
28
+ isMediaType(i) {
29
+ return o(i, this.fileType);
127
30
  },
128
- add(t) {
129
- this.text.splice(t + 1, 0, "");
31
+ add(i) {
32
+ this.text.splice(i + 1, 0, "");
130
33
  },
131
- remove(t) {
132
- this.text.splice(t, 1);
34
+ remove(i) {
35
+ this.text.splice(i, 1);
133
36
  },
134
37
  openImg() {
135
- this.text.map((t) => ({ thumbUrl: t, url: t, type: this.fileType }));
38
+ this.text.map((i) => ({ thumbUrl: i, url: i, type: this.fileType }));
136
39
  }
137
40
  }
138
- }, l = {};
139
- var m = /* @__PURE__ */ u(
140
- _,
41
+ };
42
+ var u = function() {
43
+ var e = this, t = e._self._c;
44
+ return t("div", { staticClass: "avue-array" }, [e.text ? t("ElButton", { attrs: { type: "primary", icon: "el-icon-plus", circle: "", size: e.size, disabled: e.disabled }, on: { click: function(r) {
45
+ return e.add();
46
+ } } }) : e._e(), e._l(e.text, function(r, s) {
47
+ return t("div", { key: s, staticClass: "avue-array__item" }, [t("div", { staticClass: "avue-array__input" }, [t("ElTooltip", { attrs: { placement: "bottom", disabled: !e.isImg && !e.isUrl || !!r }, scopedSlots: e._u([{ key: "content", fn: function() {
48
+ return [t("div", [e.isImg ? t(e.isMediaType(r), { tag: "Component", staticStyle: { width: "200px" }, attrs: { src: r, controls: "controls" }, on: { click: function(n) {
49
+ return e.openImg(s);
50
+ } } }) : e.isUrl ? t("ElLink", { attrs: { type: "primary", href: r, target: e.target } }, [e._v(" " + e._s(r) + " ")]) : e._e()], 1)];
51
+ }, proxy: !0 }], null, !0) }, [t("ElInput", { attrs: { size: e.size, placeholder: e.placeholder, disabled: e.disabled }, model: { value: e.text[s], callback: function(n) {
52
+ e.$set(e.text, s, n);
53
+ }, expression: "text[index]" } })], 1), e.disabled || e.readonly || e.alone ? e._e() : [e.isLimit ? e._e() : t("ElButton", { attrs: { type: "primary", icon: "el-icon-plus", circle: "", size: e.size, disabled: e.disabled }, on: { click: function(n) {
54
+ return e.add(s);
55
+ } } }), t("ElButton", { attrs: { type: "danger", icon: "el-icon-minus", circle: "", size: e.size, disabled: e.disabled }, on: { click: function(n) {
56
+ return e.remove(s);
57
+ } } })]], 2)]);
58
+ })], 2);
59
+ }, d = [], m = /* @__PURE__ */ c(
141
60
  p,
61
+ u,
142
62
  d,
143
63
  !1,
144
- y,
64
+ null,
145
65
  null,
146
66
  null,
147
67
  null
148
68
  );
149
- function y(t) {
150
- for (let n in l)
151
- this[n] = l[n];
152
- }
153
- const b = /* @__PURE__ */ function() {
154
- return m.exports;
155
- }();
69
+ const f = m.exports;
156
70
  export {
157
- b as default
71
+ f as default
158
72
  };