@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.
- package/address-input/index.mjs +20 -57
- package/affix/index.mjs +26 -47
- package/aside-menu/index.mjs +18 -43
- package/avatar/index.mjs +27 -49
- package/awesome-button/index.mjs +35 -43
- package/capsule-tab/index.mjs +16 -34
- package/card/index.mjs +21 -76
- package/carousel/index.mjs +14 -49
- package/chat/index.mjs +104 -414
- package/chunk-file-uploader/index.mjs +21 -38
- package/chunks/FormTemp.aa57efb4.mjs +125 -0
- package/code-mirror-editor/index.mjs +69 -79
- package/color-picker/index.mjs +29 -60
- package/comment/index.mjs +17 -48
- package/confirm-button/index.mjs +11 -19
- package/confirmable/index.mjs +12 -20
- package/context-menu/index.mjs +42 -144
- package/count-up/index.mjs +18 -25
- package/custom-scrollbar/index.mjs +13 -22
- package/data-box/index.mjs +15 -66
- package/data-card/index.mjs +16 -65
- package/data-cardtext/index.mjs +16 -52
- package/data-display/index.mjs +18 -62
- package/data-icons/index.mjs +16 -68
- package/data-imgtext/index.mjs +18 -79
- package/data-operatext/index.mjs +18 -75
- package/data-panel/index.mjs +16 -63
- package/data-pay/index.mjs +20 -122
- package/data-price/index.mjs +18 -60
- package/data-progress/index.mjs +16 -67
- package/data-rotate/index.mjs +16 -66
- package/data-table-picker/index.mjs +25 -88
- package/data-tabs/index.mjs +16 -64
- package/dialog-form/index.mjs +48 -94
- package/dynamic-table/index.mjs +43 -127
- package/e-charts/index.mjs +21 -34
- package/easy-popup/index.mjs +35 -61
- package/editable-progress/index.mjs +22 -77
- package/editable-tree/index.mjs +235 -546
- package/egd-collapse/index.mjs +13 -26
- package/egd-collapse-item/index.mjs +27 -87
- package/element-dialog/index.mjs +69 -133
- package/empty-view/index.mjs +13 -33
- package/error-view/index.mjs +14 -34
- package/flex-column/index.mjs +15 -23
- package/flex-item/index.mjs +18 -26
- package/flex-row/index.mjs +23 -31
- package/flex-scroller/index.mjs +16 -27
- package/flow/index.mjs +70 -110
- package/flow-designer/index.mjs +1215 -4804
- package/flow-node/index.mjs +15 -51
- package/flow-viewer/index.mjs +64 -89
- package/form-block/index.mjs +43 -62
- package/form-button/index.mjs +10 -18
- package/form-cascader/index.mjs +49 -100
- package/form-checkbox-group/index.mjs +43 -110
- package/form-date-picker/index.mjs +51 -97
- package/form-holder/index.mjs +25 -42
- package/form-input/index.mjs +40 -90
- package/form-input-email/index.mjs +35 -79
- package/form-input-id-card/index.mjs +40 -87
- package/form-input-number/index.mjs +42 -102
- package/form-input-phone-number/index.mjs +34 -75
- package/form-input-tag/index.mjs +31 -73
- package/form-input-time/index.mjs +42 -87
- package/form-item/index.mjs +70 -89
- package/form-item-config-provider/index.mjs +12 -20
- package/form-item-group/index.mjs +46 -65
- package/form-radio-group/index.mjs +50 -108
- package/form-select/index.mjs +44 -95
- package/form-switch/index.mjs +38 -85
- package/form-textarea/index.mjs +31 -75
- package/form-view/index.mjs +112 -260
- package/fy-array/index.mjs +35 -121
- package/fy-article/index.mjs +12 -43
- package/fy-cascader/index.mjs +26 -67
- package/fy-checkbox/index.mjs +27 -77
- package/fy-code/index.mjs +19 -33
- package/fy-curd/index.mjs +810 -2017
- package/fy-date/index.mjs +18 -59
- package/fy-draggable/index.mjs +81 -140
- package/fy-dynamic/index.mjs +85 -204
- package/fy-empty/index.mjs +14 -35
- package/fy-form/index.mjs +254 -571
- package/fy-form-design/index.mjs +1489 -6084
- package/fy-form-design/style.css +1 -1
- package/fy-input/index.mjs +34 -104
- package/fy-input-color/index.mjs +22 -67
- package/fy-input-icon/index.mjs +37 -122
- package/fy-input-map/index.mjs +57 -149
- package/fy-input-number/index.mjs +18 -53
- package/fy-input-table/index.mjs +36 -102
- package/fy-input-tree/index.mjs +51 -138
- package/fy-progress/index.mjs +12 -31
- package/fy-radio/index.mjs +20 -51
- package/fy-rate/index.mjs +18 -51
- package/fy-select/index.mjs +49 -134
- package/fy-slider/index.mjs +19 -52
- package/fy-switch/index.mjs +18 -48
- package/fy-tabs/index.mjs +19 -51
- package/fy-time/index.mjs +22 -62
- package/fy-title/index.mjs +14 -25
- package/fy-tree/index.mjs +74 -216
- package/fy-u-editor/index.mjs +50 -64
- package/fy-upload/index.mjs +167 -338
- package/guide-steps/index.mjs +33 -53
- package/highlight-j-s/index.mjs +13 -27
- package/icon-card/index.mjs +12 -36
- package/icon-temp/index.mjs +12 -34
- package/iframe-window/index.mjs +13 -40
- package/image-cropper/index.mjs +46 -171
- package/image-preview/index.mjs +54 -168
- package/image-viewer/index.mjs +24 -50
- package/index.css +1 -0
- package/index.mjs +3973 -501
- package/input-number/index.mjs +84 -173
- package/input-number-range/index.mjs +20 -70
- package/j-s-x-component/index.mjs +3 -3
- package/keep-view-alive/index.mjs +47 -55
- package/keyboard/index.mjs +100 -113
- package/license/index.mjs +34 -51
- package/loading-view/index.mjs +14 -34
- package/login/index.mjs +33 -161
- package/monaco-editor/index.mjs +13 -21
- package/name-avatar/index.mjs +13 -32
- package/nav-bar/index.mjs +12 -31
- package/not-implement/index.mjs +14 -25
- package/notice/index.mjs +32 -80
- package/package.json +1 -1
- package/page/index.mjs +11 -23
- package/page-header/index.mjs +16 -37
- package/page-index/index.mjs +42 -93
- package/page-index-top/index.mjs +42 -84
- package/page-skeleton/index.mjs +24 -39
- package/page-skeleton-new/index.mjs +21 -68
- package/pageable-table/index.mjs +105 -227
- package/pageable-view/index.mjs +30 -83
- package/photo-swipe/index.mjs +62 -87
- package/present-view/index.mjs +114 -267
- package/queue/index.mjs +14 -29
- package/record-video/index.mjs +29 -66
- package/resize-observer/index.mjs +18 -30
- package/search/index.mjs +47 -81
- package/search-popover/index.mjs +57 -329
- package/sign/index.mjs +43 -60
- package/sign-panel/index.mjs +40 -151
- package/skeleton/index.mjs +18 -44
- package/split-pane/index.mjs +45 -129
- package/stateful/index.mjs +18 -26
- package/static-pageable-table/index.mjs +18 -44
- package/swiper/index.mjs +53 -94
- package/tab/index.mjs +13 -39
- package/tab-item/index.mjs +23 -37
- package/table-column/index.mjs +27 -35
- package/table-view/index.mjs +89 -209
- package/tag-render/index.mjs +34 -69
- package/text-ellipsis/index.mjs +22 -47
- package/tinymce-editor/index.mjs +174 -285
- package/toolbar/index.mjs +21 -42
- package/toolbar-button/index.mjs +25 -54
- package/verify/index.mjs +16 -29
- package/vue-cron/index.mjs +272 -1089
- package/vue-qr-code/index.mjs +19 -27
- package/vue-quill-editor/index.mjs +15 -27
- package/vue-tags-input/index.mjs +104 -224
- package/vue-tree-select/index.mjs +595 -742
- package/vue-video-player/index.mjs +42 -57
- package/watermark/index.mjs +27 -35
- package/web-types.json +1 -1
- package/x-input-tag/index.mjs +50 -112
- package/chunks/FormTemp.7f91629d.mjs +0 -165
- /package/chunks/{vueComponentNormalizer.446f5dc4.mjs → _plugin-vue2_normalizer.446f5dc4.mjs} +0 -0
package/form-view/index.mjs
CHANGED
|
@@ -1,212 +1,37 @@
|
|
|
1
|
-
var
|
|
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(
|
|
5
|
-
} catch (
|
|
6
|
-
s(
|
|
16
|
+
a(e.next(i));
|
|
17
|
+
} catch (d) {
|
|
18
|
+
s(d);
|
|
7
19
|
}
|
|
8
20
|
}, l = (i) => {
|
|
9
21
|
try {
|
|
10
|
-
a(
|
|
11
|
-
} catch (
|
|
12
|
-
s(
|
|
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((
|
|
27
|
+
a((e = e.apply(o, t)).next());
|
|
16
28
|
});
|
|
17
|
-
import { hasOwn as
|
|
18
|
-
import { merge as
|
|
19
|
-
import
|
|
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
|
|
22
|
-
|
|
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
|
-
],
|
|
230
|
-
if (
|
|
231
|
-
return
|
|
232
|
-
let
|
|
233
|
-
for (;
|
|
234
|
-
|
|
235
|
-
return
|
|
236
|
-
},
|
|
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:
|
|
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 ||
|
|
115
|
+
return this.loading || b(this.$parent, "isFormLoaded") ? !this.$parent.isFormLoaded : !1;
|
|
291
116
|
},
|
|
292
117
|
toolbarProps() {
|
|
293
118
|
var r;
|
|
294
|
-
const
|
|
295
|
-
return
|
|
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((
|
|
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
|
|
302
|
-
(
|
|
303
|
-
).map((
|
|
304
|
-
return
|
|
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", (
|
|
309
|
-
|
|
310
|
-
const r =
|
|
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(
|
|
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 =
|
|
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
|
-
}),
|
|
319
|
-
}), this.$on("FormView.removeGroup", (
|
|
320
|
-
if (
|
|
321
|
-
const
|
|
322
|
-
this.groups.splice(
|
|
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
|
|
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((
|
|
158
|
+
return Object.keys(this.$scopedSlots).filter((o) => _.includes(o));
|
|
334
159
|
},
|
|
335
160
|
getFooterSlotKeys() {
|
|
336
|
-
return Object.keys(this.$scopedSlots).filter((
|
|
161
|
+
return Object.keys(this.$scopedSlots).filter((o) => I.includes(o));
|
|
337
162
|
},
|
|
338
|
-
getFooterSlotKey(
|
|
339
|
-
return
|
|
163
|
+
getFooterSlotKey(o) {
|
|
164
|
+
return o.replace("-down", "");
|
|
340
165
|
},
|
|
341
|
-
onFormResize({ width:
|
|
342
|
-
this.showNav =
|
|
166
|
+
onFormResize({ width: o }) {
|
|
167
|
+
this.showNav = o > 1500;
|
|
343
168
|
},
|
|
344
169
|
onEdit() {
|
|
345
|
-
!this.toolbarListeners.edit &&
|
|
170
|
+
!this.toolbarListeners.edit && b(this.$parent, "disabled") && (this.$parent.disabled = !1);
|
|
346
171
|
},
|
|
347
|
-
navItemClick(
|
|
348
|
-
return
|
|
349
|
-
this.showNav && (yield this.$nextTick(), this.activeFormItemGroup(
|
|
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(
|
|
353
|
-
this.$refs.formScroller.scrollTop =
|
|
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
|
|
181
|
+
return u(this, null, function* () {
|
|
357
182
|
if (this.showNav) {
|
|
358
|
-
for (let
|
|
359
|
-
if (
|
|
360
|
-
this.activeIndex =
|
|
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(
|
|
370
|
-
|
|
194
|
+
scrollTo(o, t) {
|
|
195
|
+
o && (this.$refs.formScroller.scrollTop = o), t && (this.$refs.formScroller.scrollLeft = t);
|
|
371
196
|
}
|
|
372
197
|
}
|
|
373
|
-
}
|
|
374
|
-
var
|
|
375
|
-
|
|
376
|
-
|
|
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
|
-
|
|
237
|
+
null,
|
|
380
238
|
null,
|
|
381
239
|
null,
|
|
382
240
|
null
|
|
383
241
|
);
|
|
384
|
-
|
|
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
|
-
|
|
244
|
+
G as default
|
|
393
245
|
};
|
package/fy-array/index.mjs
CHANGED
|
@@ -1,106 +1,9 @@
|
|
|
1
|
-
import { p as
|
|
2
|
-
import { i as
|
|
3
|
-
import { n as
|
|
4
|
-
|
|
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: [
|
|
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(
|
|
126
|
-
return
|
|
28
|
+
isMediaType(i) {
|
|
29
|
+
return o(i, this.fileType);
|
|
127
30
|
},
|
|
128
|
-
add(
|
|
129
|
-
this.text.splice(
|
|
31
|
+
add(i) {
|
|
32
|
+
this.text.splice(i + 1, 0, "");
|
|
130
33
|
},
|
|
131
|
-
remove(
|
|
132
|
-
this.text.splice(
|
|
34
|
+
remove(i) {
|
|
35
|
+
this.text.splice(i, 1);
|
|
133
36
|
},
|
|
134
37
|
openImg() {
|
|
135
|
-
this.text.map((
|
|
38
|
+
this.text.map((i) => ({ thumbUrl: i, url: i, type: this.fileType }));
|
|
136
39
|
}
|
|
137
40
|
}
|
|
138
|
-
}
|
|
139
|
-
var
|
|
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
|
-
|
|
64
|
+
null,
|
|
145
65
|
null,
|
|
146
66
|
null,
|
|
147
67
|
null
|
|
148
68
|
);
|
|
149
|
-
|
|
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
|
-
|
|
71
|
+
f as default
|
|
158
72
|
};
|