@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/photo-swipe/index.mjs
CHANGED
|
@@ -1,97 +1,71 @@
|
|
|
1
|
-
var u = (
|
|
2
|
-
var r = (
|
|
1
|
+
var u = (i, n, t) => new Promise((h, a) => {
|
|
2
|
+
var r = (o) => {
|
|
3
3
|
try {
|
|
4
|
-
s(
|
|
5
|
-
} catch (
|
|
6
|
-
|
|
4
|
+
s(t.next(o));
|
|
5
|
+
} catch (c) {
|
|
6
|
+
a(c);
|
|
7
7
|
}
|
|
8
|
-
},
|
|
8
|
+
}, e = (o) => {
|
|
9
9
|
try {
|
|
10
|
-
s(
|
|
11
|
-
} catch (
|
|
12
|
-
|
|
10
|
+
s(t.throw(o));
|
|
11
|
+
} catch (c) {
|
|
12
|
+
a(c);
|
|
13
13
|
}
|
|
14
|
-
}, s = (
|
|
15
|
-
s((
|
|
14
|
+
}, s = (o) => o.done ? h(o.value) : Promise.resolve(o.value).then(r, e);
|
|
15
|
+
s((t = t.apply(i, n)).next());
|
|
16
16
|
});
|
|
17
|
-
import
|
|
17
|
+
import g from "photoswipe";
|
|
18
18
|
import "photoswipe/dist/photoswipe.css";
|
|
19
|
-
import { n as
|
|
20
|
-
function
|
|
21
|
-
new
|
|
19
|
+
import { n as d } from "../chunks/_plugin-vue2_normalizer.446f5dc4.mjs";
|
|
20
|
+
function w(i) {
|
|
21
|
+
new g(i).init();
|
|
22
22
|
}
|
|
23
|
-
function l(h,
|
|
24
|
-
return u(this, arguments, function* (
|
|
25
|
-
const r =
|
|
26
|
-
if (!(!r || r.classList.contains(
|
|
23
|
+
function l(h, a) {
|
|
24
|
+
return u(this, arguments, function* (i, n, t = { selector: "chat-image" }) {
|
|
25
|
+
const r = i.target;
|
|
26
|
+
if (!(!r || r.classList.contains(t.selector) || r.tagName === "IMG"))
|
|
27
27
|
return;
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
), s = [...
|
|
31
|
-
s >= 0 && (
|
|
32
|
-
const
|
|
33
|
-
yield
|
|
28
|
+
const e = n.querySelectorAll(
|
|
29
|
+
t.selector === "img" ? t.selector : `.${t.selector}`
|
|
30
|
+
), s = [...e].findIndex((c) => c === r);
|
|
31
|
+
s >= 0 && (t.index = s);
|
|
32
|
+
const o = yield f(e);
|
|
33
|
+
yield w({ dataSource: o, index: s });
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function f(i) {
|
|
37
37
|
return u(this, null, function* () {
|
|
38
|
-
const
|
|
39
|
-
for (let
|
|
40
|
-
const
|
|
38
|
+
const n = [];
|
|
39
|
+
for (let t = 0, h = i.length; t < h; t++) {
|
|
40
|
+
const a = i[t], r = a.getAttribute("data-src") || a.getAttribute("src"), e = {
|
|
41
41
|
src: r,
|
|
42
42
|
msrc: r,
|
|
43
|
-
alt:
|
|
44
|
-
element:
|
|
45
|
-
}, s =
|
|
46
|
-
let
|
|
47
|
-
!s && !
|
|
43
|
+
alt: a.getAttribute("data-title") || a.getAttribute("alt"),
|
|
44
|
+
element: a
|
|
45
|
+
}, s = a.getAttribute("data-height"), o = a.getAttribute("data-width");
|
|
46
|
+
let c = { width: o, height: s };
|
|
47
|
+
!s && !o && (c = yield m(a), a.setAttribute("data-height", c.height), a.setAttribute("data-width", c.width)), e.w = c.width, e.width = c.width, e.h = c.height, e.height = c.height, n.push(e);
|
|
48
48
|
}
|
|
49
|
-
return
|
|
49
|
+
return n;
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
|
-
function
|
|
53
|
-
const
|
|
54
|
-
return
|
|
55
|
-
width:
|
|
56
|
-
height:
|
|
57
|
-
} : new Promise((
|
|
52
|
+
function m(i) {
|
|
53
|
+
const n = i.getAttribute("data-src") || i.getAttribute("src"), t = i.getAttribute("data-height"), h = i.getAttribute("data-width");
|
|
54
|
+
return t && h ? { width: h, height: t } : i.complete ? {
|
|
55
|
+
width: i.naturalWidth,
|
|
56
|
+
height: i.naturalHeight
|
|
57
|
+
} : new Promise((a) => {
|
|
58
58
|
const r = new Image();
|
|
59
|
-
r.src =
|
|
60
|
-
const
|
|
61
|
-
r.complete ? (
|
|
62
|
-
|
|
59
|
+
r.src = n;
|
|
60
|
+
const e = {};
|
|
61
|
+
r.complete ? (e.width = r.width, e.height = r.height, a(e)) : (r.onload = () => {
|
|
62
|
+
e.width = r.width, e.height = r.height, a(e);
|
|
63
63
|
}, r.onerror = () => {
|
|
64
|
-
|
|
64
|
+
e.width = 0, e.height = 0, a(e);
|
|
65
65
|
});
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
|
-
|
|
69
|
-
var t = this, a = t.$createElement, e = t._self._c || a;
|
|
70
|
-
return e("div", {
|
|
71
|
-
ref: "wrapper"
|
|
72
|
-
}, [t._t("default", function() {
|
|
73
|
-
return t._l(t.urls, function(h) {
|
|
74
|
-
return e("img", {
|
|
75
|
-
key: h.src,
|
|
76
|
-
staticStyle: {
|
|
77
|
-
cursor: "pointer"
|
|
78
|
-
},
|
|
79
|
-
attrs: {
|
|
80
|
-
width: "100",
|
|
81
|
-
src: h.src,
|
|
82
|
-
alt: ""
|
|
83
|
-
},
|
|
84
|
-
on: {
|
|
85
|
-
click: t.preview
|
|
86
|
-
}
|
|
87
|
-
});
|
|
88
|
-
});
|
|
89
|
-
}, {
|
|
90
|
-
urls: t.urls,
|
|
91
|
-
preview: t.preview
|
|
92
|
-
})], 2);
|
|
93
|
-
}, b = [];
|
|
94
|
-
const A = {
|
|
68
|
+
const p = {
|
|
95
69
|
name: "PhotoSwipe",
|
|
96
70
|
photoswipe: l,
|
|
97
71
|
props: {
|
|
@@ -102,30 +76,31 @@ const A = {
|
|
|
102
76
|
}
|
|
103
77
|
},
|
|
104
78
|
methods: {
|
|
105
|
-
preview(
|
|
79
|
+
preview(i) {
|
|
106
80
|
return u(this, null, function* () {
|
|
107
|
-
yield l(
|
|
81
|
+
yield l(i, this.$refs.wrapper, { selector: this.selector });
|
|
108
82
|
});
|
|
109
83
|
}
|
|
110
84
|
}
|
|
111
|
-
}
|
|
112
|
-
var
|
|
113
|
-
|
|
85
|
+
};
|
|
86
|
+
var _ = function() {
|
|
87
|
+
var n = this, t = n._self._c;
|
|
88
|
+
return t("div", { ref: "wrapper" }, [n._t("default", function() {
|
|
89
|
+
return n._l(n.urls, function(h) {
|
|
90
|
+
return t("img", { key: h.src, staticStyle: { cursor: "pointer" }, attrs: { width: "100", src: h.src, alt: "" }, on: { click: n.preview } });
|
|
91
|
+
});
|
|
92
|
+
}, { urls: n.urls, preview: n.preview })], 2);
|
|
93
|
+
}, b = [], A = /* @__PURE__ */ d(
|
|
94
|
+
p,
|
|
114
95
|
_,
|
|
115
96
|
b,
|
|
116
97
|
!1,
|
|
117
|
-
|
|
98
|
+
null,
|
|
118
99
|
null,
|
|
119
100
|
null,
|
|
120
101
|
null
|
|
121
102
|
);
|
|
122
|
-
|
|
123
|
-
for (let a in g)
|
|
124
|
-
this[a] = g[a];
|
|
125
|
-
}
|
|
126
|
-
const $ = /* @__PURE__ */ function() {
|
|
127
|
-
return v.exports;
|
|
128
|
-
}();
|
|
103
|
+
const I = A.exports;
|
|
129
104
|
export {
|
|
130
|
-
|
|
105
|
+
I as default
|
|
131
106
|
};
|
package/present-view/index.mjs
CHANGED
|
@@ -1,217 +1,37 @@
|
|
|
1
|
-
var
|
|
2
|
-
|
|
1
|
+
var w = Object.defineProperty, y = Object.defineProperties;
|
|
2
|
+
var g = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var h = Object.getOwnPropertySymbols;
|
|
4
|
+
var x = Object.prototype.hasOwnProperty, $ = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var b = (e, t, o) => t in e ? w(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o, c = (e, t) => {
|
|
6
|
+
for (var o in t || (t = {}))
|
|
7
|
+
x.call(t, o) && b(e, o, t[o]);
|
|
8
|
+
if (h)
|
|
9
|
+
for (var o of h(t))
|
|
10
|
+
$.call(t, o) && b(e, o, t[o]);
|
|
11
|
+
return e;
|
|
12
|
+
}, f = (e, t) => y(e, g(t));
|
|
13
|
+
var d = (e, t, o) => new Promise((r, s) => {
|
|
14
|
+
var i = (n) => {
|
|
3
15
|
try {
|
|
4
|
-
a(o.next(
|
|
5
|
-
} catch (
|
|
6
|
-
s(
|
|
16
|
+
a(o.next(n));
|
|
17
|
+
} catch (u) {
|
|
18
|
+
s(u);
|
|
7
19
|
}
|
|
8
|
-
}, l = (
|
|
20
|
+
}, l = (n) => {
|
|
9
21
|
try {
|
|
10
|
-
a(o.throw(
|
|
11
|
-
} catch (
|
|
12
|
-
s(
|
|
22
|
+
a(o.throw(n));
|
|
23
|
+
} catch (u) {
|
|
24
|
+
s(u);
|
|
13
25
|
}
|
|
14
|
-
}, a = (
|
|
15
|
-
a((o = o.apply(
|
|
26
|
+
}, a = (n) => n.done ? r(n.value) : Promise.resolve(n.value).then(i, l);
|
|
27
|
+
a((o = o.apply(e, t)).next());
|
|
16
28
|
});
|
|
17
|
-
import { hasOwn as
|
|
18
|
-
import { merge as
|
|
19
|
-
import
|
|
29
|
+
import { hasOwn as p, toStringArray as S, delay as F, isInContainer as k } from "@web-utils/core";
|
|
30
|
+
import { merge as B } from "@web-utils/integrations/lodash";
|
|
31
|
+
import L 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
|
-
}, [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
|
-
directives: [{
|
|
37
|
-
name: "show",
|
|
38
|
-
rawName: "v-show",
|
|
39
|
-
value: t.showToolbar,
|
|
40
|
-
expression: "showToolbar"
|
|
41
|
-
}],
|
|
42
|
-
on: {
|
|
43
|
-
edit: t.onEdit
|
|
44
|
-
},
|
|
45
|
-
scopedSlots: t._u([{
|
|
46
|
-
key: "default",
|
|
47
|
-
fn: function(r) {
|
|
48
|
-
var s = r.buttons;
|
|
49
|
-
return [t._t("toolbar-button", null, {
|
|
50
|
-
buttons: s
|
|
51
|
-
})];
|
|
52
|
-
}
|
|
53
|
-
}, t._l(t.getToolbarSlotKeys(), function(r) {
|
|
54
|
-
return {
|
|
55
|
-
key: r,
|
|
56
|
-
fn: function() {
|
|
57
|
-
return [t._t(r)];
|
|
58
|
-
},
|
|
59
|
-
proxy: !0
|
|
60
|
-
};
|
|
61
|
-
}), {
|
|
62
|
-
key: "toolbar-right",
|
|
63
|
-
fn: function() {
|
|
64
|
-
return [t._t("toolbar-right")];
|
|
65
|
-
},
|
|
66
|
-
proxy: !0
|
|
67
|
-
}], null, !0)
|
|
68
|
-
}, "Toolbar", Object.assign({}, t.toolbarProps, {
|
|
69
|
-
buttons: t.getToolbarButtons(t.toolbarProps.buttons)
|
|
70
|
-
}), !1), t.toolbarListeners))];
|
|
71
|
-
})], 2), o("div", {
|
|
72
|
-
directives: [{
|
|
73
|
-
name: "show",
|
|
74
|
-
rawName: "v-show",
|
|
75
|
-
value: !t.isFormLoading,
|
|
76
|
-
expression: "!isFormLoading"
|
|
77
|
-
}],
|
|
78
|
-
staticClass: "form-scroller-wrapper"
|
|
79
|
-
}, [o("div", {
|
|
80
|
-
ref: "formScroller",
|
|
81
|
-
class: ["form-scroller", "absolute-box", t.contentClass],
|
|
82
|
-
on: {
|
|
83
|
-
scroll: t.onFormScroll
|
|
84
|
-
}
|
|
85
|
-
}, [t.notForm ? o("div", {
|
|
86
|
-
staticClass: "not-form",
|
|
87
|
-
style: {
|
|
88
|
-
width: t.formWidth
|
|
89
|
-
}
|
|
90
|
-
}, [t.title ? o("div", {
|
|
91
|
-
staticClass: "form-view-title"
|
|
92
|
-
}, [t._v(t._s(t.title))]) : t._e(), t._t("default", function() {
|
|
93
|
-
return [o("EmptyView", {
|
|
94
|
-
attrs: {
|
|
95
|
-
"empty-tips": "请添加表单内容"
|
|
96
|
-
}
|
|
97
|
-
})];
|
|
98
|
-
}), o("Toolbar", t._g(t._b({
|
|
99
|
-
attrs: {
|
|
100
|
-
footer: ""
|
|
101
|
-
},
|
|
102
|
-
scopedSlots: t._u([{
|
|
103
|
-
key: "default",
|
|
104
|
-
fn: function(r) {
|
|
105
|
-
var s = r.buttons, n = r.footer;
|
|
106
|
-
return [t._t("footer-button", null, {
|
|
107
|
-
buttons: s,
|
|
108
|
-
footer: n
|
|
109
|
-
})];
|
|
110
|
-
}
|
|
111
|
-
}, t._l(t.getFooterSlotKeys(), function(r) {
|
|
112
|
-
return {
|
|
113
|
-
key: t.getFooterSlotKey(r),
|
|
114
|
-
fn: function() {
|
|
115
|
-
return [t._t(r)];
|
|
116
|
-
},
|
|
117
|
-
proxy: !0
|
|
118
|
-
};
|
|
119
|
-
})], null, !0)
|
|
120
|
-
}, "Toolbar", Object.assign({}, t.toolbarProps, {
|
|
121
|
-
buttons: t.getFooterBarButtons(t.toolbarProps.buttons)
|
|
122
|
-
}), !1), t.toolbarListeners)), t.$scopedSlots["form-bottom"] ? t._t("form-bottom") : t._e()], 2) : o("div", {
|
|
123
|
-
class: ["form-card", {
|
|
124
|
-
"un-limit": t.unLimit
|
|
125
|
-
}],
|
|
126
|
-
style: {
|
|
127
|
-
width: `calc(${t.formWidth} + 40px)`
|
|
128
|
-
}
|
|
129
|
-
}, [o("div", {
|
|
130
|
-
staticClass: "form-content"
|
|
131
|
-
}, [t.title ? o("div", {
|
|
132
|
-
staticClass: "form-view-title"
|
|
133
|
-
}, [t._v(t._s(t.title))]) : t._e(), t._t("default", function() {
|
|
134
|
-
return [o("EmptyView", {
|
|
135
|
-
attrs: {
|
|
136
|
-
"empty-tips": "请添加表单内容"
|
|
137
|
-
}
|
|
138
|
-
})];
|
|
139
|
-
}), t.getFooterBarButtons(t.toolbarProps.buttons).length ? o("Toolbar", t._g(t._b({
|
|
140
|
-
attrs: {
|
|
141
|
-
footer: ""
|
|
142
|
-
},
|
|
143
|
-
scopedSlots: t._u([{
|
|
144
|
-
key: "default",
|
|
145
|
-
fn: function(r) {
|
|
146
|
-
var s = r.buttons, n = r.footer;
|
|
147
|
-
return [t._t("footer-button", null, {
|
|
148
|
-
buttons: s,
|
|
149
|
-
footer: n
|
|
150
|
-
})];
|
|
151
|
-
}
|
|
152
|
-
}, t._l(t.getFooterSlotKeys(), function(r) {
|
|
153
|
-
return {
|
|
154
|
-
key: t.getFooterSlotKey(r),
|
|
155
|
-
fn: function() {
|
|
156
|
-
return [t._t(r)];
|
|
157
|
-
},
|
|
158
|
-
proxy: !0
|
|
159
|
-
};
|
|
160
|
-
})], null, !0)
|
|
161
|
-
}, "Toolbar", Object.assign({}, t.toolbarProps, {
|
|
162
|
-
buttons: t.getFooterBarButtons(t.toolbarProps.buttons)
|
|
163
|
-
}), !1), t.toolbarListeners)) : t._e()], 2)]), t.$scopedSlots["form-bottom"] || t.$parent.$options.flowForm && t.flowContext.logs.length ? o("div", {
|
|
164
|
-
class: ["form-card", {
|
|
165
|
-
"un-limit": t.unLimit
|
|
166
|
-
}],
|
|
167
|
-
staticStyle: {
|
|
168
|
-
"min-height": "0"
|
|
169
|
-
},
|
|
170
|
-
style: {
|
|
171
|
-
width: `calc(${t.formWidth} + 40px)`
|
|
172
|
-
}
|
|
173
|
-
}, [o("div", {
|
|
174
|
-
staticClass: "form-content"
|
|
175
|
-
}, [o("FormItemGroup", {
|
|
176
|
-
attrs: {
|
|
177
|
-
"block-title": "流程日志"
|
|
178
|
-
}
|
|
179
|
-
}, [o("FlowLog", {
|
|
180
|
-
attrs: {
|
|
181
|
-
fetch: !1,
|
|
182
|
-
"show-title": !1,
|
|
183
|
-
"business-key": t.$parent.bizKey
|
|
184
|
-
}
|
|
185
|
-
})], 1), t._t("form-bottom")], 2)]) : t._e()]), o("ResizeObserver", {
|
|
186
|
-
on: {
|
|
187
|
-
notify: t.onFormResize
|
|
188
|
-
}
|
|
189
|
-
})], 1), t.formNav && !t.isFormLoading && t.showNav && t.tabs.length ? o("div", {
|
|
190
|
-
staticClass: "form-nav"
|
|
191
|
-
}, [o("div", {
|
|
192
|
-
staticClass: "form-nav-header"
|
|
193
|
-
}, [t._v("表单导航")]), o("ul", {
|
|
194
|
-
staticClass: "form-nav-list"
|
|
195
|
-
}, t._l(t.tabs, function(r, s) {
|
|
196
|
-
return o("li", {
|
|
197
|
-
key: r.blockTitle,
|
|
198
|
-
class: ["form-nav-item", {
|
|
199
|
-
active: t.activeIndex === s
|
|
200
|
-
}],
|
|
201
|
-
on: {
|
|
202
|
-
click: function(n) {
|
|
203
|
-
return t.tabClick(r, s);
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
}, [t._v(" " + t._s(r.blockTitle) + " ")]);
|
|
207
|
-
}), 0)]) : t._e(), t.isFormLoading ? o("LoadingView", {
|
|
208
|
-
attrs: {
|
|
209
|
-
"icon-size": "34px",
|
|
210
|
-
"font-size": "16px"
|
|
211
|
-
}
|
|
212
|
-
}) : t._e()], 1);
|
|
213
|
-
}, $ = [];
|
|
214
|
-
const b = [
|
|
33
|
+
import { n as C } from "../chunks/_plugin-vue2_normalizer.446f5dc4.mjs";
|
|
34
|
+
const _ = [
|
|
215
35
|
"back",
|
|
216
36
|
"create",
|
|
217
37
|
"save",
|
|
@@ -231,17 +51,17 @@ const b = [
|
|
|
231
51
|
"disabled",
|
|
232
52
|
"reload",
|
|
233
53
|
"slot"
|
|
234
|
-
],
|
|
235
|
-
if (
|
|
236
|
-
return
|
|
237
|
-
let o =
|
|
238
|
-
for (; o && !o.classList.contains(
|
|
54
|
+
], T = _.map((e) => `${e}-down`), I = ["back", "withdraw", "edit"], v = ["save", "submit", "", "publish", "agree", "disagree", "reject", "finish", "cancel"], m = (e, t) => {
|
|
55
|
+
if (e.classList.contains(t))
|
|
56
|
+
return e;
|
|
57
|
+
let o = e.parentNode;
|
|
58
|
+
for (; o && !o.classList.contains(t); )
|
|
239
59
|
o = o.parentNode;
|
|
240
|
-
return o.classList.contains(
|
|
241
|
-
},
|
|
60
|
+
return o.classList.contains(t) ? o : null;
|
|
61
|
+
}, N = {
|
|
242
62
|
name: "PresentView",
|
|
243
63
|
components: {
|
|
244
|
-
ResizeObserver:
|
|
64
|
+
ResizeObserver: L
|
|
245
65
|
},
|
|
246
66
|
inject: {
|
|
247
67
|
flowContext: {
|
|
@@ -284,65 +104,65 @@ const b = [
|
|
|
284
104
|
},
|
|
285
105
|
computed: {
|
|
286
106
|
isFormLoading() {
|
|
287
|
-
return this.loading ||
|
|
107
|
+
return this.loading || p(this.$parent, "isFormLoaded") ? !this.$parent.isFormLoaded : !1;
|
|
288
108
|
},
|
|
289
109
|
toolbarProps() {
|
|
290
110
|
var r;
|
|
291
|
-
const
|
|
292
|
-
return o.buttons =
|
|
111
|
+
const e = {}, t = ((r = this.toolbarAttrs) == null ? void 0 : r.buttons) || this.$parent.buttons, o = B({}, this.toolbarAttrs, e);
|
|
112
|
+
return o.buttons = t || ["back"], o.buttons = S(o.buttons), o;
|
|
293
113
|
}
|
|
294
114
|
},
|
|
295
115
|
created() {
|
|
296
|
-
this.$on("FormView.addTab", (
|
|
297
|
-
|
|
298
|
-
const r =
|
|
116
|
+
this.$on("FormView.addTab", (e) => {
|
|
117
|
+
e && (this.activeIndex === -1 && (this.activeIndex = 0), this.tabs.push(e), this.tabs = this.tabs.sort((t, o) => {
|
|
118
|
+
const r = m(t.$el, "form-card"), s = m(o.$el, "form-card");
|
|
299
119
|
if (r === s) {
|
|
300
|
-
const
|
|
301
|
-
return
|
|
120
|
+
const i = [].indexOf.call(t.$el.parentNode.children, t.$el), l = [].indexOf.call(o.$el.parentNode.children, o.$el);
|
|
121
|
+
return i - l;
|
|
302
122
|
} else {
|
|
303
|
-
const
|
|
123
|
+
const i = m(r, "form-scroller"), l = [].indexOf.call(i.children, r), a = [].indexOf.call(i.children, s);
|
|
304
124
|
return l - a;
|
|
305
125
|
}
|
|
306
|
-
}),
|
|
307
|
-
}), this.$on("FormView.removeTab", (
|
|
308
|
-
if (
|
|
309
|
-
const
|
|
310
|
-
this.tabs.splice(
|
|
126
|
+
}), e.active && (this.activeIndex = this.tabs.indexOf(e), this.tabClick(e, this.activeIndex)));
|
|
127
|
+
}), this.$on("FormView.removeTab", (e) => {
|
|
128
|
+
if (e) {
|
|
129
|
+
const t = this.tabs.indexOf(e);
|
|
130
|
+
this.tabs.splice(t, 1), this.activeIndex > this.tabs.length - 1 && (this.activeIndex = 0);
|
|
311
131
|
}
|
|
312
132
|
}), this.onFormResize({ width: window.document.body.clientWidth });
|
|
313
133
|
},
|
|
314
134
|
activated() {
|
|
315
|
-
return
|
|
135
|
+
return d(this, null, function* () {
|
|
316
136
|
this.$refs.formScroller && (yield this.$nextTick(), this.scrollTo(this.formScrollTop, this.formScrollLeft));
|
|
317
137
|
});
|
|
318
138
|
},
|
|
319
139
|
methods: {
|
|
320
140
|
getToolbarSlotKeys() {
|
|
321
|
-
return Object.keys(this.$scopedSlots).filter((
|
|
141
|
+
return Object.keys(this.$scopedSlots).filter((e) => _.includes(e));
|
|
322
142
|
},
|
|
323
143
|
getFooterSlotKeys() {
|
|
324
|
-
return Object.keys(this.$scopedSlots).filter((
|
|
144
|
+
return Object.keys(this.$scopedSlots).filter((e) => T.includes(e));
|
|
325
145
|
},
|
|
326
|
-
getFooterSlotKey(
|
|
327
|
-
return
|
|
146
|
+
getFooterSlotKey(e) {
|
|
147
|
+
return e.replace("-down", "");
|
|
328
148
|
},
|
|
329
|
-
onFormResize({ width:
|
|
330
|
-
this.showNav =
|
|
149
|
+
onFormResize({ width: e }) {
|
|
150
|
+
this.showNav = e > 1500;
|
|
331
151
|
},
|
|
332
152
|
onEdit() {
|
|
333
|
-
!this.toolbarListeners.edit &&
|
|
153
|
+
!this.toolbarListeners.edit && p(this.$parent, "disabled") && (this.$parent.disabled = !1);
|
|
334
154
|
},
|
|
335
|
-
tabClick(
|
|
336
|
-
return
|
|
337
|
-
this.showNav && (yield this.$nextTick(),
|
|
155
|
+
tabClick(e, t) {
|
|
156
|
+
return d(this, null, function* () {
|
|
157
|
+
this.showNav && (yield this.$nextTick(), e.expand || (e.open(), yield F(200), yield this.$nextTick()), this.tryByClick = !0, this.activeIndex = t, this.$refs.formScroller.scrollTop = e.$el.offsetTop - 10);
|
|
338
158
|
});
|
|
339
159
|
},
|
|
340
160
|
tryActive() {
|
|
341
|
-
return
|
|
161
|
+
return d(this, null, function* () {
|
|
342
162
|
if (this.showNav) {
|
|
343
|
-
for (let
|
|
344
|
-
if (
|
|
345
|
-
this.activeIndex =
|
|
163
|
+
for (let e = 0; e < this.tabs.length; e++)
|
|
164
|
+
if (k(this.tabs[e].$el, this.$refs.formScroller, { bottomOffset: 10 })) {
|
|
165
|
+
this.activeIndex = e;
|
|
346
166
|
break;
|
|
347
167
|
}
|
|
348
168
|
}
|
|
@@ -351,37 +171,64 @@ const b = [
|
|
|
351
171
|
onFormScroll() {
|
|
352
172
|
this.formScrollTop = this.$refs.formScroller.scrollTop, this.formScrollLeft = this.$refs.formScroller.scrollLeft, !this.tryByClick && this.tabs.length && window.requestAnimationFrame(this.tryActive), this.tryByClick = !1;
|
|
353
173
|
},
|
|
354
|
-
scrollTo(
|
|
355
|
-
|
|
174
|
+
scrollTo(e, t) {
|
|
175
|
+
e && (this.$refs.formScroller.scrollTop = e), t && (this.$refs.formScroller.scrollLeft = t);
|
|
356
176
|
},
|
|
357
|
-
getToolbarButtons(
|
|
358
|
-
return
|
|
177
|
+
getToolbarButtons(e) {
|
|
178
|
+
return e.filter((t) => !v.includes(t) && t.indexOf(":down") < 0).map((t) => t.replace(":up", ""));
|
|
359
179
|
},
|
|
360
|
-
getFooterBarButtons(
|
|
361
|
-
let
|
|
362
|
-
(o) => !
|
|
180
|
+
getFooterBarButtons(e) {
|
|
181
|
+
let t = e.filter(
|
|
182
|
+
(o) => !I.includes(o) && (v.includes(o) || o.indexOf(":down") > -1)
|
|
363
183
|
).map((o) => o.replace(":down", ""));
|
|
364
|
-
return
|
|
184
|
+
return t = t || [], this.$parent.isEnabled && !t.includes("cancel") && t.push("cancel"), t;
|
|
365
185
|
}
|
|
366
186
|
}
|
|
367
|
-
}
|
|
368
|
-
var
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
187
|
+
};
|
|
188
|
+
var O = function() {
|
|
189
|
+
var t = this, o = t._self._c;
|
|
190
|
+
return o("div", { class: ["form-view", t.className] }, [o("div", { directives: [{ name: "show", rawName: "v-show", value: !t.isFormLoading, expression: "!isFormLoading" }], staticClass: "form-view-toolbar" }, [t._t("form-view-toolbar", function() {
|
|
191
|
+
return [o("Toolbar", t._g(t._b({ directives: [{ name: "show", rawName: "v-show", value: t.showToolbar, expression: "showToolbar" }], on: { edit: t.onEdit }, scopedSlots: t._u([{ key: "default", fn: function({ buttons: r }) {
|
|
192
|
+
return [t._t("toolbar-button", null, { buttons: r })];
|
|
193
|
+
} }, t._l(t.getToolbarSlotKeys(), function(r) {
|
|
194
|
+
return { key: r, fn: function() {
|
|
195
|
+
return [t._t(r)];
|
|
196
|
+
}, proxy: !0 };
|
|
197
|
+
}), { key: "toolbar-right", fn: function() {
|
|
198
|
+
return [t._t("toolbar-right")];
|
|
199
|
+
}, proxy: !0 }], null, !0) }, "Toolbar", f(c({}, t.toolbarProps), { buttons: t.getToolbarButtons(t.toolbarProps.buttons) }), !1), t.toolbarListeners))];
|
|
200
|
+
})], 2), o("div", { directives: [{ name: "show", rawName: "v-show", value: !t.isFormLoading, expression: "!isFormLoading" }], staticClass: "form-scroller-wrapper" }, [o("div", { ref: "formScroller", class: ["form-scroller", "absolute-box", t.contentClass], on: { scroll: t.onFormScroll } }, [t.notForm ? o("div", { staticClass: "not-form", style: { width: t.formWidth } }, [t.title ? o("div", { staticClass: "form-view-title" }, [t._v(t._s(t.title))]) : t._e(), t._t("default", function() {
|
|
201
|
+
return [o("EmptyView", { attrs: { "empty-tips": "请添加表单内容" } })];
|
|
202
|
+
}), o("Toolbar", t._g(t._b({ attrs: { footer: "" }, scopedSlots: t._u([{ key: "default", fn: function({ buttons: r, footer: s }) {
|
|
203
|
+
return [t._t("footer-button", null, { buttons: r, footer: s })];
|
|
204
|
+
} }, t._l(t.getFooterSlotKeys(), function(r) {
|
|
205
|
+
return { key: t.getFooterSlotKey(r), fn: function() {
|
|
206
|
+
return [t._t(r)];
|
|
207
|
+
}, proxy: !0 };
|
|
208
|
+
})], null, !0) }, "Toolbar", f(c({}, t.toolbarProps), { buttons: t.getFooterBarButtons(t.toolbarProps.buttons) }), !1), t.toolbarListeners)), t.$scopedSlots["form-bottom"] ? t._t("form-bottom") : t._e()], 2) : o("div", { class: ["form-card", { "un-limit": t.unLimit }], style: { width: `calc(${t.formWidth} + 40px)` } }, [o("div", { staticClass: "form-content" }, [t.title ? o("div", { staticClass: "form-view-title" }, [t._v(t._s(t.title))]) : t._e(), t._t("default", function() {
|
|
209
|
+
return [o("EmptyView", { attrs: { "empty-tips": "请添加表单内容" } })];
|
|
210
|
+
}), t.getFooterBarButtons(t.toolbarProps.buttons).length ? o("Toolbar", t._g(t._b({ attrs: { footer: "" }, scopedSlots: t._u([{ key: "default", fn: function({ buttons: r, footer: s }) {
|
|
211
|
+
return [t._t("footer-button", null, { buttons: r, footer: s })];
|
|
212
|
+
} }, t._l(t.getFooterSlotKeys(), function(r) {
|
|
213
|
+
return { key: t.getFooterSlotKey(r), fn: function() {
|
|
214
|
+
return [t._t(r)];
|
|
215
|
+
}, proxy: !0 };
|
|
216
|
+
})], null, !0) }, "Toolbar", f(c({}, t.toolbarProps), { buttons: t.getFooterBarButtons(t.toolbarProps.buttons) }), !1), t.toolbarListeners)) : t._e()], 2)]), t.$scopedSlots["form-bottom"] || t.$parent.$options.flowForm && t.flowContext.logs.length ? o("div", { class: ["form-card", { "un-limit": t.unLimit }], staticStyle: { "min-height": "0" }, style: { width: `calc(${t.formWidth} + 40px)` } }, [o("div", { staticClass: "form-content" }, [o("FormItemGroup", { attrs: { "block-title": "流程日志" } }, [o("FlowLog", { attrs: { fetch: !1, "show-title": !1, "business-key": t.$parent.bizKey } })], 1), t._t("form-bottom")], 2)]) : t._e()]), o("ResizeObserver", { on: { notify: t.onFormResize } })], 1), t.formNav && !t.isFormLoading && t.showNav && t.tabs.length ? o("div", { staticClass: "form-nav" }, [o("div", { staticClass: "form-nav-header" }, [t._v("表单导航")]), o("ul", { staticClass: "form-nav-list" }, t._l(t.tabs, function(r, s) {
|
|
217
|
+
return o("li", { key: r.blockTitle, class: ["form-nav-item", { active: t.activeIndex === s }], on: { click: function(i) {
|
|
218
|
+
return t.tabClick(r, s);
|
|
219
|
+
} } }, [t._v(" " + t._s(r.blockTitle) + " ")]);
|
|
220
|
+
}), 0)]) : t._e(), t.isFormLoading ? o("LoadingView", { attrs: { "icon-size": "34px", "font-size": "16px" } }) : t._e()], 1);
|
|
221
|
+
}, P = [], z = /* @__PURE__ */ C(
|
|
222
|
+
N,
|
|
223
|
+
O,
|
|
224
|
+
P,
|
|
372
225
|
!1,
|
|
373
|
-
|
|
226
|
+
null,
|
|
374
227
|
null,
|
|
375
228
|
null,
|
|
376
229
|
null
|
|
377
230
|
);
|
|
378
|
-
|
|
379
|
-
for (let e in h)
|
|
380
|
-
this[e] = h[e];
|
|
381
|
-
}
|
|
382
|
-
const j = /* @__PURE__ */ function() {
|
|
383
|
-
return B.exports;
|
|
384
|
-
}();
|
|
231
|
+
const W = z.exports;
|
|
385
232
|
export {
|
|
386
|
-
|
|
233
|
+
W as default
|
|
387
234
|
};
|