agilebuilder-ui 1.1.65-tmp26 → 1.1.65-tmp28
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/dist/index.full.min.js +1381 -1349
- package/dist/style.css +42 -22
- package/es/IntervalSelection/src/sectionDate.vue.mjs +8 -8
- package/es/chat-embed/src/chat-addition-data.vue2.mjs +14 -11
- package/es/chat-embed/src/chat-ai-answer-tip.vue2.mjs +8 -8
- package/es/chat-embed/src/chat-bubble-footer.vue2.mjs +5 -5
- package/es/chat-embed/src/chat-sender.vue2.mjs +41 -41
- package/es/chat-embed/src/components/answer-auto-chart.vue2.mjs +1 -2
- package/es/chat-embed/src/components/answer-interaction-data.vue2.mjs +6 -7
- package/es/chat-embed/src/components/history-detail.vue2.mjs +18 -18
- package/es/chat-embed/src/header.vue2.mjs +16 -16
- package/es/chat-embed/src/index.vue2.mjs +161 -161
- package/es/chat-embed/src/recommendation-message.vue2.mjs +9 -6
- package/es/chat-embed/src/sidebar-item.vue2.mjs +65 -65
- package/es/chat-embed/src/voice/voice.vue.mjs +36 -35
- package/es/date-picker-range/index.vue2.mjs +39 -39
- package/es/department-tree-mobile/src/department-tree-app.vue.mjs +8 -7
- package/es/department-tree-mobile/src/department-tree-inline-app.vue.mjs +54 -54
- package/es/department-tree-mobile/src/dept-path.vue.mjs +7 -6
- package/es/department-tree-mobile/src/dept-result.vue.mjs +7 -6
- package/es/department-user-tree-inline/src/department-user-multiple-tree-inline.vue.mjs +5 -5
- package/es/department-user-tree-mobile/src/department-user-tree-app.vue.mjs +10 -9
- package/es/department-user-tree-mobile/src/department-user-tree-inline-app.vue.mjs +64 -64
- package/es/department-user-tree-mobile/src/dept-path.vue.mjs +7 -6
- package/es/department-user-tree-mobile/src/dept-result.vue.mjs +4 -3
- package/es/empty-state/index.vue.mjs +2 -2
- package/es/fs-upload/src/fs-upload-multi.vue.mjs +1 -1
- package/es/fs-upload-list/src/fs-upload-list.vue.mjs +1 -1
- package/es/fs-upload-new/src/file-upload-mobile/file-upload-app.vue.mjs +12 -12
- package/es/fs-upload-new/src/file-upload-mobile/file-upload-browser.vue.mjs +24 -24
- package/es/fs-upload-new/src/file-upload-mobile/file-upload-component.vue2.mjs +17 -17
- package/es/fs-upload-new/src/file-upload-mobile/file-upload.vue.mjs +12 -12
- package/es/fs-upload-new/src/fs-button-upload.vue2.mjs +23 -23
- package/es/fs-upload-new/src/fs-drag-upload.vue2.mjs +23 -23
- package/es/fs-upload-new/src/fs-preview-new.vue2.mjs +34 -34
- package/es/fs-upload-new/src/fs-upload-new.vue.mjs +15 -15
- package/es/json-view/json-view-dialog.vue.mjs +5 -5
- package/es/multipart-upload/src/multipart-upload-form.vue.mjs +1 -1
- package/es/multipart-upload/src/multipart-upload-list.vue.mjs +5 -5
- package/es/row-form/index.vue2.mjs +31 -31
- package/es/row-form/operation.vue.mjs +13 -13
- package/es/secret-info/index.vue.mjs +1 -1
- package/es/src/components/Affix/index.vue2.mjs +26 -26
- package/es/src/components/Scrollbar/index.vue.mjs +22 -22
- package/es/src/views/error-page/401.vue.mjs +8 -8
- package/es/src/views/error-page/404.vue.mjs +8 -8
- package/es/src/views/layout/components/Menubar/Item.vue.mjs +1 -1
- package/es/src/views/layout/components/Menubar/Item.vue2.mjs +2 -2
- package/es/src/views/super-icon/index.mjs +7 -0
- package/es/src/views/super-icon/src/index.vue.mjs +7 -0
- package/es/src/views/super-icon/src/index.vue2.mjs +13 -0
- package/es/src/views/super-icon/src/index.vue3.mjs +4 -0
- package/es/src/views/svg-icon/src/svg-icon.vue2.mjs +14 -0
- package/es/style.css +907 -887
- package/es/super-grid/src/columns-config.vue.mjs +1 -1
- package/es/super-grid/src/components/grid-radio-input.vue.mjs +5 -5
- package/es/super-grid/src/components/select-input.vue.mjs +55 -55
- package/es/super-grid/src/row-detail.vue.mjs +1 -1
- package/es/super-grid/src/search-form-advancedQuery.vue.mjs +1 -1
- package/es/super-grid/src/search-form-number.vue.mjs +4 -5
- package/es/super-grid/src/super-grid.vue.mjs +1 -1
- package/es/super-nine-grid/src/search-form-number.vue.mjs +4 -5
- package/es/super-nine-grid/src/search-form.vue.mjs +1 -1
- package/es/super-nine-grid/src/super-nine-grid.vue.mjs +1 -1
- package/es/workgroup-tree-inline/src/workgroup-tree-inline.vue.mjs +8 -8
- package/es/workgroup-tree-mobile/src/dept-result.vue.mjs +4 -3
- package/es/workgroup-tree-mobile/src/workgroup-tree-app.vue.mjs +8 -7
- package/es/workgroup-tree-mobile/src/workgroup-tree-inline-app.vue.mjs +51 -51
- package/es/workgroup-user-tree-inline/src/workgroup-user-tree-inline.vue.mjs +5 -5
- package/es/workgroup-user-tree-mobile/src/dept-path.vue.mjs +7 -6
- package/es/workgroup-user-tree-mobile/src/dept-result.vue.mjs +4 -3
- package/es/workgroup-user-tree-mobile/src/workgroup-user-tree-app.vue.mjs +7 -6
- package/es/workgroup-user-tree-mobile/src/workgroup-user-tree-inline-app.vue.mjs +65 -65
- package/es/year-range-picker/src/year-range-picker.vue.mjs +1 -1
- package/lib/IntervalSelection/src/sectionDate.vue.cjs +6 -6
- package/lib/chat-embed/src/chat-addition-data.vue2.cjs +13 -10
- package/lib/chat-embed/src/chat-ai-answer-tip.vue2.cjs +8 -8
- package/lib/chat-embed/src/chat-bubble-footer.vue2.cjs +5 -5
- package/lib/chat-embed/src/chat-sender.vue2.cjs +20 -20
- package/lib/chat-embed/src/components/answer-auto-chart.vue2.cjs +1 -2
- package/lib/chat-embed/src/components/answer-interaction-data.vue2.cjs +5 -6
- package/lib/chat-embed/src/components/history-detail.vue2.cjs +18 -18
- package/lib/chat-embed/src/header.vue2.cjs +17 -17
- package/lib/chat-embed/src/index.vue2.cjs +123 -123
- package/lib/chat-embed/src/recommendation-message.vue2.cjs +7 -4
- package/lib/chat-embed/src/sidebar-item.vue2.cjs +35 -35
- package/lib/chat-embed/src/voice/voice.vue.cjs +36 -35
- package/lib/date-picker-range/index.vue2.cjs +11 -11
- package/lib/department-tree-mobile/src/department-tree-app.vue.cjs +7 -6
- package/lib/department-tree-mobile/src/department-tree-inline-app.vue.cjs +53 -53
- package/lib/department-tree-mobile/src/dept-path.vue.cjs +6 -6
- package/lib/department-tree-mobile/src/dept-result.vue.cjs +7 -6
- package/lib/department-user-tree-inline/src/department-user-multiple-tree-inline.vue.cjs +5 -5
- package/lib/department-user-tree-mobile/src/department-user-tree-app.vue.cjs +9 -8
- package/lib/department-user-tree-mobile/src/department-user-tree-inline-app.vue.cjs +61 -61
- package/lib/department-user-tree-mobile/src/dept-path.vue.cjs +6 -6
- package/lib/department-user-tree-mobile/src/dept-result.vue.cjs +4 -3
- package/lib/empty-state/index.vue.cjs +2 -2
- package/lib/fs-upload/src/fs-upload-multi.vue.cjs +1 -1
- package/lib/fs-upload-list/src/fs-upload-list.vue.cjs +1 -1
- package/lib/fs-upload-new/src/file-upload-mobile/file-upload-app.vue.cjs +12 -12
- package/lib/fs-upload-new/src/file-upload-mobile/file-upload-browser.vue.cjs +24 -24
- package/lib/fs-upload-new/src/file-upload-mobile/file-upload-component.vue2.cjs +17 -17
- package/lib/fs-upload-new/src/file-upload-mobile/file-upload.vue.cjs +12 -12
- package/lib/fs-upload-new/src/fs-button-upload.vue2.cjs +23 -23
- package/lib/fs-upload-new/src/fs-drag-upload.vue2.cjs +23 -23
- package/lib/fs-upload-new/src/fs-preview-new.vue2.cjs +36 -36
- package/lib/fs-upload-new/src/fs-upload-new.vue.cjs +15 -15
- package/lib/json-view/json-view-dialog.vue.cjs +6 -6
- package/lib/multipart-upload/src/multipart-upload-form.vue.cjs +1 -1
- package/lib/multipart-upload/src/multipart-upload-list.vue.cjs +5 -5
- package/lib/row-form/index.vue2.cjs +31 -31
- package/lib/row-form/operation.vue.cjs +13 -13
- package/lib/secret-info/index.vue.cjs +1 -1
- package/lib/src/components/Affix/index.vue2.cjs +28 -28
- package/lib/src/components/Scrollbar/index.vue.cjs +22 -22
- package/lib/src/views/error-page/401.vue.cjs +7 -7
- package/lib/src/views/error-page/404.vue.cjs +4 -4
- package/lib/src/views/layout/components/Menubar/Item.vue.cjs +1 -1
- package/lib/src/views/layout/components/Menubar/Item.vue2.cjs +2 -2
- package/lib/src/views/super-icon/index.cjs +5 -0
- package/lib/src/views/super-icon/src/index.vue.cjs +5 -0
- package/lib/src/views/super-icon/src/index.vue2.cjs +10 -0
- package/lib/src/views/super-icon/src/index.vue3.cjs +2 -0
- package/lib/src/views/svg-icon/src/svg-icon.vue2.cjs +12 -0
- package/lib/style.css +920 -900
- package/lib/super-grid/src/columns-config.vue.cjs +1 -1
- package/lib/super-grid/src/components/grid-radio-input.vue.cjs +5 -5
- package/lib/super-grid/src/components/select-input.vue.cjs +56 -56
- package/lib/super-grid/src/row-detail.vue.cjs +1 -1
- package/lib/super-grid/src/search-form-advancedQuery.vue.cjs +1 -1
- package/lib/super-grid/src/search-form-number.vue.cjs +6 -6
- package/lib/super-grid/src/super-grid.vue.cjs +1 -1
- package/lib/super-nine-grid/src/search-form-number.vue.cjs +6 -6
- package/lib/super-nine-grid/src/search-form.vue.cjs +1 -1
- package/lib/super-nine-grid/src/super-nine-grid.vue.cjs +1 -1
- package/lib/workgroup-tree-inline/src/workgroup-tree-inline.vue.cjs +5 -5
- package/lib/workgroup-tree-mobile/src/dept-result.vue.cjs +4 -3
- package/lib/workgroup-tree-mobile/src/workgroup-tree-app.vue.cjs +9 -8
- package/lib/workgroup-tree-mobile/src/workgroup-tree-inline-app.vue.cjs +48 -48
- package/lib/workgroup-user-tree-inline/src/workgroup-user-tree-inline.vue.cjs +5 -5
- package/lib/workgroup-user-tree-mobile/src/dept-path.vue.cjs +6 -6
- package/lib/workgroup-user-tree-mobile/src/dept-result.vue.cjs +4 -3
- package/lib/workgroup-user-tree-mobile/src/workgroup-user-tree-app.vue.cjs +9 -8
- package/lib/workgroup-user-tree-mobile/src/workgroup-user-tree-inline-app.vue.cjs +63 -63
- package/lib/year-range-picker/src/year-range-picker.vue.cjs +1 -1
- package/package.json +2 -2
- package/src/views/layout/components/Menubar/Item.vue +1 -1
- package/src/views/super-icon/index.js +6 -0
- package/src/views/super-icon/src/index.vue +52 -0
- package/src/views/svg-icon/src/svg-icon.vue +5 -8
|
@@ -11,53 +11,53 @@ const _ = { key: 0 }, j = { style: { display: "flex", "align-items": "center" }
|
|
|
11
11
|
} }, beforeDownload: { type: Function, default: () => {
|
|
12
12
|
} }, file: { type: Object, default: null }, baseURL: { type: String, default: null }, disabledNoPreview: { type: Boolean, default: false }, disabledNoDownload: { type: Boolean, default: false }, watermark: { type: Object, default: () => ({}) } }, emits: ["remove"], setup(e2, { emit: $2 }) {
|
|
13
13
|
var _a, _b, _c, _d, _e;
|
|
14
|
-
const
|
|
15
|
-
let W =
|
|
16
|
-
W = w(W), D = w(D),
|
|
17
|
-
const O = o(false), B = o({}), F = o([]), z = o(v());
|
|
18
|
-
let
|
|
14
|
+
const { t: A } = R(), V = e2;
|
|
15
|
+
let W = V.baseURL ? V.baseURL : window.$vueApp.config.globalProperties.baseURL, D = window.$vueApp.config.globalProperties.baseAPI;
|
|
16
|
+
W = w(W), D = w(D), V.watermark.content || (V.watermark.isShowWatermark = void 0 === ((_b = (_a = V.configure.props) == null ? void 0 : _a.watermark) == null ? void 0 : _b.isShowWatermark) ? "true" : ((_c = V.configure.props) == null ? void 0 : _c.watermark.isShowWatermark) + "", V.watermark.content = (_e = (_d = V.configure.props) == null ? void 0 : _d.watermark) == null ? void 0 : _e.content);
|
|
17
|
+
const O = o(false), B = o({}), F = o([]), z = o(v()), E = $2;
|
|
18
|
+
let q = null;
|
|
19
19
|
U().then((e3) => {
|
|
20
|
-
|
|
20
|
+
q = e3;
|
|
21
21
|
});
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
false === o2 ||
|
|
25
|
-
}) : false ===
|
|
26
|
-
},
|
|
22
|
+
const G = (e3) => {
|
|
23
|
+
K(V.beforeDownload) ? V.beforeDownload(V.pageContext, V.configure, e3).then((o2) => {
|
|
24
|
+
false === o2 || H(e3);
|
|
25
|
+
}) : false === V.beforeDownload(V.pageContext, V.configure, e3) || H(e3);
|
|
26
|
+
}, H = (e3) => {
|
|
27
27
|
var _a2, _b2;
|
|
28
28
|
const o2 = y(), t2 = (e3.showName ? e3.showName : e3.name).replace("#", "~~").replace("?", "~$").replace("&", "$");
|
|
29
29
|
let l2 = false;
|
|
30
|
-
|
|
31
|
-
let a2 = (_b2 =
|
|
30
|
+
q && q.useRange && q.useRange.indexOf("annex") >= 0 && (l2 = (_a2 = V.watermark) == null ? void 0 : _a2.isShowWatermark);
|
|
31
|
+
let a2 = (_b2 = V.watermark) == null ? void 0 : _b2.content;
|
|
32
32
|
a2 || (a2 = "");
|
|
33
33
|
let r2 = W + "/common/super-form/downloads?showName=" + encodeURI(t2) + "&serverPath=" + e3.serverPath + "&jwt=" + o2 + "&isShowWatermark=" + l2 + "&watermark=" + encodeURI(a2);
|
|
34
|
-
h(
|
|
35
|
-
},
|
|
34
|
+
h(V.systemCode) && (r2 = D + "/component/super-form/downloads?showName=" + encodeURI(t2) + "&serverPath=" + e3.serverPath + "&jwt=" + o2), window.location.href = r2;
|
|
35
|
+
}, J = (e3) => {
|
|
36
36
|
let o2 = true;
|
|
37
|
-
if (
|
|
37
|
+
if (V.beforeRemove && "function" == typeof V.beforeRemove) {
|
|
38
38
|
const t3 = true;
|
|
39
|
-
o2 =
|
|
39
|
+
o2 = V.beforeRemove(V.pageContext, V.configure, e3, t3);
|
|
40
40
|
}
|
|
41
41
|
if (void 0 !== o2 && !o2)
|
|
42
42
|
return;
|
|
43
|
-
const t2 =
|
|
44
|
-
|
|
45
|
-
},
|
|
46
|
-
if (
|
|
43
|
+
const t2 = V.fileList.findIndex((o3) => o3.serverPath === e3.uuid || o3.serverPath === e3.serverPath);
|
|
44
|
+
V.fileList, V.fileList.splice(t2, 1), E("remove", { file: e3, index: t2 }), V.onRemove(e3);
|
|
45
|
+
}, K = (e3) => e3 && "[object Promise]" === Object.prototype.toString.call(e3), M = (e3, o2) => {
|
|
46
|
+
if (V.fileList, V.disabled && V.disabledNoPreview)
|
|
47
47
|
return;
|
|
48
48
|
let t2 = false;
|
|
49
49
|
if (e3 && P(e3) && (t2 = true), t2) {
|
|
50
|
-
B.value.src =
|
|
50
|
+
B.value.src = T(e3, o2);
|
|
51
51
|
const t3 = [];
|
|
52
|
-
|
|
52
|
+
V.fileList.forEach((e4) => {
|
|
53
53
|
const o3 = e4.showName ? e4.showName : e4.name;
|
|
54
|
-
t3.push(
|
|
54
|
+
t3.push(T(o3, e4.serverPath));
|
|
55
55
|
}), F.value = t3, O.value = true;
|
|
56
56
|
} else
|
|
57
|
-
|
|
58
|
-
},
|
|
57
|
+
Q(e3, o2);
|
|
58
|
+
}, Q = (e3, o2) => {
|
|
59
59
|
const t2 = y();
|
|
60
|
-
if (e3 = e3 =
|
|
60
|
+
if (e3 = e3 = X(e3), window.$vueApp.config.globalProperties.customPreviewUrl)
|
|
61
61
|
window.open(b(window.$vueApp.config.globalProperties.portalUrl) + "/#/file-service/preview?serverPath=" + o2 + "&showName=" + encodeURI(e3), e3);
|
|
62
62
|
else {
|
|
63
63
|
let l2, a2 = W;
|
|
@@ -70,21 +70,21 @@ const _ = { key: 0 }, j = { style: { display: "flex", "align-items": "center" }
|
|
|
70
70
|
l2 = a2 + "/common/fs-upload/preview?jwt=" + t2, l2 = l2 + "&showName=" + encodeURI(e3) + "&serverPath=" + o2, l2 = w(l2), window.open(l2, e3);
|
|
71
71
|
}
|
|
72
72
|
};
|
|
73
|
-
function
|
|
73
|
+
function T(e3, o2) {
|
|
74
74
|
var _a2, _b2;
|
|
75
|
-
e3 =
|
|
75
|
+
e3 = X(e3);
|
|
76
76
|
const t2 = y();
|
|
77
77
|
let l2 = false;
|
|
78
|
-
|
|
79
|
-
let a2 = (_b2 =
|
|
78
|
+
q && q.useRange && q.useRange.indexOf("annex") >= 0 && (l2 = (_a2 = V.watermark) == null ? void 0 : _a2.isShowWatermark);
|
|
79
|
+
let a2 = (_b2 = V.watermark) == null ? void 0 : _b2.content;
|
|
80
80
|
a2 || (a2 = "");
|
|
81
81
|
let r2 = W + "/common/super-form/downloads?jwt=" + t2 + "&isShowWatermark=" + l2 + "&watermark=" + encodeURI(a2);
|
|
82
|
-
return h(
|
|
82
|
+
return h(V.systemCode) && (r2 = D + "/component/super-form/downloads?jwt=" + t2 + "&isShowWatermark=" + l2 + "&watermark=" + encodeURI(a2)), r2 = g(r2), r2 + "&showName=" + encodeURI(e3) + "&serverPath=" + o2;
|
|
83
83
|
}
|
|
84
|
-
const
|
|
84
|
+
const X = (e3) => (e3 && (e3 = e3.replace("#", "~~").replace("?", "~$").replace("&", "$")), e3);
|
|
85
85
|
return (o2, w2) => {
|
|
86
86
|
const v2 = t("super-icon"), h2 = t("el-tooltip"), b2 = t("el-tag"), k2 = t("zoom-in"), g2 = t("el-icon"), y2 = t("Delete"), R2 = t("el-image"), U2 = t("el-dialog");
|
|
87
|
-
return l(), a("div", null, [z.value ? (l(), a("span", S, [($3 = e2.file.showName ? e2.file.showName : e2.file.name, !z.value || $3 && P($3) ? (l(), a("span", { key: 0, class: "el-upload-list__item-preview", onClick: w2[0] || (w2[0] = (o3) =>
|
|
87
|
+
return l(), a("div", null, [z.value ? (l(), a("span", S, [($3 = e2.file.showName ? e2.file.showName : e2.file.name, !z.value || $3 && P($3) ? (l(), a("span", { key: 0, class: "el-upload-list__item-preview", onClick: w2[0] || (w2[0] = (o3) => M(e2.file.showName ? e2.file.showName : e2.file.name, e2.file.serverPath)) }, [i(g2, null, { default: s(() => [i(k2)]), _: 1 })])) : p("", true)), e2.disabled ? p("", true) : (l(), a("span", { key: 1, class: "el-upload-list__item-delete", onClick: w2[1] || (w2[1] = (o3) => G(e2.file)) }, [i(g2, null, { default: s(() => [i(d(f))]), _: 1 })])), e2.disabled ? p("", true) : (l(), a("span", { key: 2, class: "el-upload-list__item-delete", onClick: w2[2] || (w2[2] = (o3) => J(e2.file)) }, [i(g2, null, { default: s(() => [i(y2)]), _: 1 })]))])) : (l(), a("div", _, [(l(true), a(r, null, n(e2.fileList, (o3, t2) => (l(), a("div", { key: t2, style: { width: "100%" } }, [i(b2, { color: "white", size: "large", class: "amb-fs-preview-tag" }, { default: s(() => [c("div", j, [i(v2, { iconValue: d(N)(o3.showName) }, null, 8, ["iconValue"]), e2.disabled && e2.disabledNoPreview ? (l(), a("span", C, [c("span", x, m(o3.showName), 1)])) : p("", true), e2.disabled && e2.disabledNoPreview ? p("", true) : (l(), u(h2, { key: 1, content: d(A)("fsUpload.preview"), placement: "top" }, { default: s(() => [c("span", { style: { cursor: "pointer" }, onClick: (e3) => M(o3.showName, o3.serverPath) }, [c("span", L, m(o3.showName), 1)], 8, I)]), _: 2 }, 1032, ["content"])), e2.disabled && e2.disabledNoDownload ? p("", true) : (l(), u(h2, { key: 2, content: d(A)("fsUpload.download"), placement: "top" }, { default: s(() => [i(v2, { class: "fs-preview-icon", onClick: (e3) => G(o3), iconValue: "amb-color-icon-xiazai" }, null, 8, ["onClick"])]), _: 2 }, 1032, ["content"])), e2.disabled ? p("", true) : (l(), u(h2, { key: 3, content: d(A)("fsUpload.delete"), placement: "top" }, { default: s(() => [i(v2, { class: "fs-preview-icon", onClick: (e3) => J(o3), iconValue: "amb-color-icon-shanchu" }, null, 8, ["onClick"])]), _: 2 }, 1032, ["content"]))])]), _: 2 }, 1024)]))), 128))])), i(U2, { modelValue: O.value, "onUpdate:modelValue": w2[3] || (w2[3] = (e3) => O.value = e3), title: d(A)("fsUpload.preview"), width: "500" }, { default: s(() => [i(R2, { "preview-src-list": F.value, src: B.value.src }, null, 8, ["preview-src-list", "src"])]), _: 1 }, 8, ["modelValue", "title"])]);
|
|
88
88
|
var $3;
|
|
89
89
|
};
|
|
90
90
|
} });
|
|
@@ -18,32 +18,32 @@ const c = e({ __name: "fs-upload-new", props: { openFsUpload: { type: Object, de
|
|
|
18
18
|
return "file-upload";
|
|
19
19
|
} }, listCode: { type: String, default: null }, openCameraOrChoosePhoto: { type: String, default: "openCameraAndChoosePhoto" }, disabledNoPreview: { type: Boolean, default: false }, disabledNoDownload: { type: Boolean, default: false }, watermark: { type: Object, default: () => ({}) } }, setup(e2, { expose: c2 }) {
|
|
20
20
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
21
|
-
const
|
|
22
|
-
w.value, h.value,
|
|
21
|
+
const { t: b } = m(), v = e2, w = o(f()), h = o(v.pageContext.pageType);
|
|
22
|
+
w.value, h.value, v.systemCode, v.configure, v.pageContext, v.watermark.content || (v.watermark.isShowWatermark = void 0 === ((_c = (_b = (_a = v.configure) == null ? void 0 : _a.props) == null ? void 0 : _b.watermark) == null ? void 0 : _c.isShowWatermark) ? "true" : ((_e = (_d = v.configure) == null ? void 0 : _d.props) == null ? void 0 : _e.watermark.isShowWatermark) + "", v.watermark.content = (_h = (_g = (_f = v.configure) == null ? void 0 : _f.props) == null ? void 0 : _g.watermark) == null ? void 0 : _h.content);
|
|
23
23
|
const y = o("");
|
|
24
|
-
"input" ===
|
|
24
|
+
"input" === v.displayType && (y.value = v.fileInfo.showName || "");
|
|
25
25
|
let C = o(1);
|
|
26
|
-
|
|
26
|
+
v.limit ? C.value = v.limit : v.multiple && (C.value = 9);
|
|
27
27
|
const g = (e3) => {
|
|
28
|
-
y.value ? y.value = y.value + "," + e3.showName : y.value = e3.showName,
|
|
28
|
+
y.value ? y.value = y.value + "," + e3.showName : y.value = e3.showName, v.fileList.push({ showName: e3.showName, serverPath: e3.serverPath }), v.onSuccess();
|
|
29
29
|
}, S = (e3) => {
|
|
30
30
|
const o2 = e3.deleteFile;
|
|
31
|
-
let l2 =
|
|
32
|
-
l2 > -1 &&
|
|
31
|
+
let l2 = v.fileList.findIndex((e4) => e4.serverPath === o2.serverPath);
|
|
32
|
+
l2 > -1 && v.fileList.splice(l2, 1), l2 = e3.all.findIndex((e4) => e4.serverPath === o2.serverPath), l2 > -1 && e3.all.splice(l2, 1), y.value = v.fileList.map((e4) => e4.showName).join(","), v.onRemove();
|
|
33
33
|
};
|
|
34
34
|
function F(e3) {
|
|
35
|
-
const o2 = Array.from(
|
|
35
|
+
const o2 = Array.from(v.fileList, ({ serverPath: e4 }) => e4);
|
|
36
36
|
e3.forEach((e4) => {
|
|
37
|
-
o2.indexOf(e4.serverPath) < 0 &&
|
|
38
|
-
}),
|
|
37
|
+
o2.indexOf(e4.serverPath) < 0 && v.fileList.push({ showName: e4.name, serverPath: e4.serverPath });
|
|
38
|
+
}), v.onSuccess();
|
|
39
39
|
}
|
|
40
40
|
function U(e3) {
|
|
41
41
|
const o2 = e3.rmFiles && e3.rmFiles.length > 0 ? e3.rmFiles[0] : null;
|
|
42
42
|
if (o2) {
|
|
43
|
-
let e4 =
|
|
44
|
-
e4 > -1 &&
|
|
43
|
+
let e4 = v.fileList.findIndex((e5) => e5.serverPath === o2.serverPath);
|
|
44
|
+
e4 > -1 && v.fileList.splice(e4, 1);
|
|
45
45
|
}
|
|
46
|
-
|
|
46
|
+
v.onRemove();
|
|
47
47
|
}
|
|
48
48
|
const k = o(null), N = o();
|
|
49
49
|
function R(e3) {
|
|
@@ -51,13 +51,13 @@ const c = e({ __name: "fs-upload-new", props: { openFsUpload: { type: Object, de
|
|
|
51
51
|
let o2 = JSON.parse(e3.message);
|
|
52
52
|
o2 && o2.message && (o2 = JSON.parse(o2.message)), u.error(o2);
|
|
53
53
|
} else
|
|
54
|
-
u.error(
|
|
54
|
+
u.error(b("fsUpload.uploadFailed"));
|
|
55
55
|
}
|
|
56
56
|
return navigator.userAgent.indexOf(" uni-app ") > 0 ? k.value = "app" : k.value = "browser", c2({ pickFileDone: function(e3) {
|
|
57
57
|
"app" === k.value && N.value.pickFileDone(e3);
|
|
58
58
|
}, uploadFileDone: function(e3) {
|
|
59
59
|
"app" === k.value && N.value.uploadFileDone(e3);
|
|
60
|
-
} }), (o2, f2) => w.value || "input" !== e2.displayType ? w.value || "button" !== e2.displayType ? w.value || "drag" !== e2.displayType ? w.value && "input" === e2.displayType ? (l(), a(s, { key: 3, ref_key: "fileUploadRef", ref: N, disabled: e2.disabled, fileInfo: e2.fileInfo, systemCode: e2.systemCode, accept: e2.accept, multiple: e2.multiple, limit: t(C), limitFileSize: e2.limitFileSize, "disabled-no-preview": e2.disabledNoPreview, "disabled-no-download": e2.disabledNoDownload, placeholder: e2.placeholder, action: e2.action, headers: e2.headers, "file-list": e2.fileList, watermark: e2.watermark, beforeUpload: e2.beforeUpload, onSuccess: e2.onSuccess, beforeRemove: e2.beforeRemove, onRemove: e2.onRemove, beforeDownload: e2.beforeDownload, pageContext: e2.pageContext, configure: e2.configure, openFsUpload: e2.openFsUpload, componentId: e2.componentId, componentName: e2.componentName, listCode: e2.listCode, openCameraOrChoosePhoto: e2.openCameraOrChoosePhoto }, null, 8, ["disabled", "fileInfo", "systemCode", "accept", "multiple", "limit", "limitFileSize", "disabled-no-preview", "disabled-no-download", "placeholder", "action", "headers", "file-list", "watermark", "beforeUpload", "onSuccess", "beforeRemove", "onRemove", "beforeDownload", "pageContext", "configure", "openFsUpload", "componentId", "componentName", "listCode", "openCameraOrChoosePhoto"])) : w.value ? (l(), a(r, { key: 4, ref_key: "fileUploadRef", ref: N, disabled: e2.disabled, fileInfo: e2.fileInfo, systemCode: e2.systemCode, accept: e2.accept, multiple: e2.multiple, limit: t(C), limitFileSize: e2.limitFileSize, "disabled-no-preview": e2.disabledNoPreview, "disabled-no-download": e2.disabledNoDownload, placeholder: e2.placeholder, action: e2.action, headers: e2.headers, "file-list": e2.fileList, watermark: e2.watermark, beforeUpload: e2.beforeUpload, onSuccess: e2.onSuccess, beforeRemove: e2.beforeRemove, onRemove: [e2.onRemove, U], beforeDownload: e2.beforeDownload, pageContext: e2.pageContext, configure: e2.configure, openFsUpload: e2.openFsUpload, componentId: e2.componentId, componentName: e2.componentName, listCode: e2.listCode, openCameraOrChoosePhoto: e2.openCameraOrChoosePhoto, onUploadend: F }, null, 8, ["disabled", "fileInfo", "systemCode", "accept", "multiple", "limit", "limitFileSize", "disabled-no-preview", "disabled-no-download", "placeholder", "action", "headers", "file-list", "watermark", "beforeUpload", "onSuccess", "beforeRemove", "onRemove", "beforeDownload", "pageContext", "configure", "openFsUpload", "componentId", "componentName", "listCode", "openCameraOrChoosePhoto"])) : i("", true) : (l(), a(n, { key: 2, disabled: e2.disabled, fileInfo: e2.fileInfo, systemCode: e2.systemCode, accept: e2.accept, multiple: e2.multiple, limit: t(C), limitFileSize: e2.limitFileSize, "disabled-no-preview": e2.disabledNoPreview, "disabled-no-download": e2.disabledNoDownload, placeholder: e2.placeholder, action: e2.action, headers: e2.headers, "file-list": e2.fileList, watermark: e2.watermark, beforeUpload: e2.beforeUpload, onSuccess: e2.onSuccess, beforeRemove: e2.beforeRemove, onRemove: e2.onRemove, beforeDownload: e2.beforeDownload, pageContext: e2.pageContext, configure: e2.configure, openFsUpload: e2.openFsUpload }, null, 8, ["disabled", "fileInfo", "systemCode", "accept", "multiple", "limit", "limitFileSize", "disabled-no-preview", "disabled-no-download", "placeholder", "action", "headers", "file-list", "watermark", "beforeUpload", "onSuccess", "beforeRemove", "onRemove", "beforeDownload", "pageContext", "configure", "openFsUpload"])) : (l(), a(d, { key: 1, disabled: e2.disabled, fileInfo: e2.fileInfo, systemCode: e2.systemCode, accept: e2.accept, multiple: e2.multiple, "disabled-no-preview": e2.disabledNoPreview, "disabled-no-download": e2.disabledNoDownload, limit: t(C), limitFileSize: e2.limitFileSize, placeholder: e2.placeholder, action: e2.action, headers: e2.headers, "file-list": e2.fileList, beforeUpload: e2.beforeUpload, onSuccess: e2.onSuccess, beforeRemove: e2.beforeRemove, onRemove: e2.onRemove, beforeDownload: e2.beforeDownload, pageContext: e2.pageContext, configure: e2.configure, watermark: e2.watermark, openFsUpload: e2.openFsUpload }, null, 8, ["disabled", "fileInfo", "systemCode", "accept", "multiple", "disabled-no-preview", "disabled-no-download", "limit", "limitFileSize", "placeholder", "action", "headers", "file-list", "beforeUpload", "onSuccess", "beforeRemove", "onRemove", "beforeDownload", "pageContext", "configure", "watermark", "openFsUpload"])) : (l(), a(p, { key: 0, value:
|
|
60
|
+
} }), (o2, f2) => w.value || "input" !== e2.displayType ? w.value || "button" !== e2.displayType ? w.value || "drag" !== e2.displayType ? w.value && "input" === e2.displayType ? (l(), a(s, { key: 3, ref_key: "fileUploadRef", ref: N, disabled: e2.disabled, fileInfo: e2.fileInfo, systemCode: e2.systemCode, accept: e2.accept, multiple: e2.multiple, limit: t(C), limitFileSize: e2.limitFileSize, "disabled-no-preview": e2.disabledNoPreview, "disabled-no-download": e2.disabledNoDownload, placeholder: e2.placeholder, action: e2.action, headers: e2.headers, "file-list": e2.fileList, watermark: e2.watermark, beforeUpload: e2.beforeUpload, onSuccess: e2.onSuccess, beforeRemove: e2.beforeRemove, onRemove: e2.onRemove, beforeDownload: e2.beforeDownload, pageContext: e2.pageContext, configure: e2.configure, openFsUpload: e2.openFsUpload, componentId: e2.componentId, componentName: e2.componentName, listCode: e2.listCode, openCameraOrChoosePhoto: e2.openCameraOrChoosePhoto }, null, 8, ["disabled", "fileInfo", "systemCode", "accept", "multiple", "limit", "limitFileSize", "disabled-no-preview", "disabled-no-download", "placeholder", "action", "headers", "file-list", "watermark", "beforeUpload", "onSuccess", "beforeRemove", "onRemove", "beforeDownload", "pageContext", "configure", "openFsUpload", "componentId", "componentName", "listCode", "openCameraOrChoosePhoto"])) : w.value ? (l(), a(r, { key: 4, ref_key: "fileUploadRef", ref: N, disabled: e2.disabled, fileInfo: e2.fileInfo, systemCode: e2.systemCode, accept: e2.accept, multiple: e2.multiple, limit: t(C), limitFileSize: e2.limitFileSize, "disabled-no-preview": e2.disabledNoPreview, "disabled-no-download": e2.disabledNoDownload, placeholder: e2.placeholder, action: e2.action, headers: e2.headers, "file-list": e2.fileList, watermark: e2.watermark, beforeUpload: e2.beforeUpload, onSuccess: e2.onSuccess, beforeRemove: e2.beforeRemove, onRemove: [e2.onRemove, U], beforeDownload: e2.beforeDownload, pageContext: e2.pageContext, configure: e2.configure, openFsUpload: e2.openFsUpload, componentId: e2.componentId, componentName: e2.componentName, listCode: e2.listCode, openCameraOrChoosePhoto: e2.openCameraOrChoosePhoto, onUploadend: F }, null, 8, ["disabled", "fileInfo", "systemCode", "accept", "multiple", "limit", "limitFileSize", "disabled-no-preview", "disabled-no-download", "placeholder", "action", "headers", "file-list", "watermark", "beforeUpload", "onSuccess", "beforeRemove", "onRemove", "beforeDownload", "pageContext", "configure", "openFsUpload", "componentId", "componentName", "listCode", "openCameraOrChoosePhoto"])) : i("", true) : (l(), a(n, { key: 2, disabled: e2.disabled, fileInfo: e2.fileInfo, systemCode: e2.systemCode, accept: e2.accept, multiple: e2.multiple, limit: t(C), limitFileSize: e2.limitFileSize, "disabled-no-preview": e2.disabledNoPreview, "disabled-no-download": e2.disabledNoDownload, placeholder: e2.placeholder, action: e2.action, headers: e2.headers, "file-list": e2.fileList, watermark: e2.watermark, beforeUpload: e2.beforeUpload, onSuccess: e2.onSuccess, beforeRemove: e2.beforeRemove, onRemove: e2.onRemove, beforeDownload: e2.beforeDownload, pageContext: e2.pageContext, configure: e2.configure, openFsUpload: e2.openFsUpload }, null, 8, ["disabled", "fileInfo", "systemCode", "accept", "multiple", "limit", "limitFileSize", "disabled-no-preview", "disabled-no-download", "placeholder", "action", "headers", "file-list", "watermark", "beforeUpload", "onSuccess", "beforeRemove", "onRemove", "beforeDownload", "pageContext", "configure", "openFsUpload"])) : (l(), a(d, { key: 1, disabled: e2.disabled, fileInfo: e2.fileInfo, systemCode: e2.systemCode, accept: e2.accept, multiple: e2.multiple, "disabled-no-preview": e2.disabledNoPreview, "disabled-no-download": e2.disabledNoDownload, limit: t(C), limitFileSize: e2.limitFileSize, placeholder: e2.placeholder, action: e2.action, headers: e2.headers, "file-list": e2.fileList, beforeUpload: e2.beforeUpload, onSuccess: e2.onSuccess, beforeRemove: e2.beforeRemove, onRemove: e2.onRemove, beforeDownload: e2.beforeDownload, pageContext: e2.pageContext, configure: e2.configure, watermark: e2.watermark, openFsUpload: e2.openFsUpload }, null, 8, ["disabled", "fileInfo", "systemCode", "accept", "multiple", "disabled-no-preview", "disabled-no-download", "limit", "limitFileSize", "placeholder", "action", "headers", "file-list", "beforeUpload", "onSuccess", "beforeRemove", "onRemove", "beforeDownload", "pageContext", "configure", "watermark", "openFsUpload"])) : (l(), a(p, { key: 0, value: v.fileInfo.showName, row: e2.entity, disabled: e2.disabled, fileInfo: e2.fileInfo, openFsUpload: e2.openFsUpload, fileSetObj: { accept: e2.accept, disabledNoPreview: e2.disabledNoPreview, disabledNoDownload: e2.disabledNoDownload, multiple: e2.multiple, limitFileSize: e2.limitFileSize, limit: t(C), downloadable: e2.downloadable, watermark: e2.watermark }, onUploadSuccess: g, onDeleteSuccess: S, onOnError: R }, null, 8, ["value", "row", "disabled", "fileInfo", "openFsUpload", "fileSetObj"]));
|
|
61
61
|
} });
|
|
62
62
|
export {
|
|
63
63
|
c as default
|
|
@@ -2,16 +2,16 @@ import { defineComponent as e, ref as t, watch as o, resolveComponent as l, open
|
|
|
2
2
|
import p from "./json-view.vue2.mjs";
|
|
3
3
|
const i = e({ name: "JsonViewDialog", inheritAttrs: false, __name: "json-view-dialog", props: { jsonObject: { type: Object, default: () => {
|
|
4
4
|
} }, appendToBody: { type: Boolean, default: false }, modelValue: { type: Boolean, default: false }, title: { type: String, default: "JSON 预览" } }, emits: ["update:modelValue"], setup(e2, { emit: i2 }) {
|
|
5
|
-
const s = e2, m = t(false);
|
|
5
|
+
const s = e2, m = i2, r = t(false);
|
|
6
6
|
o(() => s.modelValue, (e3) => {
|
|
7
|
-
e3 && (
|
|
7
|
+
e3 && (r.value = true);
|
|
8
8
|
});
|
|
9
|
-
const
|
|
10
|
-
|
|
9
|
+
const j = () => {
|
|
10
|
+
r.value = false, m("update:modelValue", false);
|
|
11
11
|
};
|
|
12
12
|
return (t2, o2) => {
|
|
13
13
|
const i3 = l("el-dialog");
|
|
14
|
-
return a(), d(i3, { "append-to-body": "", modelValue:
|
|
14
|
+
return a(), d(i3, { "append-to-body": "", modelValue: r.value, "onUpdate:modelValue": o2[0] || (o2[0] = (e3) => r.value = e3), title: e2.title, width: "600", onClose: j }, { default: n(() => [u(p, { jsonObject: e2.jsonObject }, null, 8, ["jsonObject"])]), _: 1 }, 8, ["modelValue", "append-to-body", "title"]);
|
|
15
15
|
};
|
|
16
16
|
} });
|
|
17
17
|
export {
|
|
@@ -75,7 +75,7 @@ const F = { data() {
|
|
|
75
75
|
} }, emits: ["close", "upload-success", "delete-success", "delete", "update:value", , "close", , "update:value"] }, y = { class: "group-link-btn-main" };
|
|
76
76
|
const $ = U(F, [["render", function(e2, l2, i2, t2, o2, s2) {
|
|
77
77
|
const a2 = d("ElIconUpload2"), n2 = d("el-icon"), r2 = d("el-link"), p2 = d("ElIconZoomIn"), P2 = d("el-input"), U2 = d("el-button"), F2 = d("el-upload"), $2 = d("el-dialog"), x = d("el-image"), L = d("el-table-column"), j = d("el-icon-view"), k = d("el-tooltip"), A = d("el-icon-delete"), N = d("el-table"), _ = d("fs-preview");
|
|
78
|
-
return u(), c("div", null, [i2.disabled ? (u(), v(_, { key: 1, "file-list": o2.showFileList, label: i2.value }, null, 8, ["file-list", "label"])) : (u(), c(h, { key: 0 }, [m(P2, { ref: "item", disabled: i2.disabled, "model-value": i2.value, placeholder: e2.$t("imatrixUIMessage.fileUpload"), readonly: true }, { append: f(() => [w("div", y, [i2.disabled ? g("", true) : (u(), v(r2, { key: 0, type: "info", underline: false, onClick: s2.openAnnexUpload }, { icon: f(() => [m(n2, { size: 14 }, { default: f(() => [m(a2)]), _: 1 })]), _: 1 }, 8, ["onClick"])), m(r2, { size: "default", type: "info", underline: false, onClick: s2.preview }, { icon: f(() => [m(n2, { size: 14 }, { default: f(() => [m(p2)]), _: 1 })]), _: 1 }, 8, ["onClick"])])]), _: 1 }, 8, ["disabled", "model-value", "placeholder"]), m($2, { modelValue: o2.annexUploadFlag, "onUpdate:modelValue": l2[0] || (l2[0] = (e3) => o2.annexUploadFlag = e3), "append-to-body": true, "show-close": true, title: e2.$t("imatrixUIMessage.tips"), width: "30%" }, { default: f(() => [o2.annexUploadFlag ? (u(), v(F2, { key: 0, accept: i2.fileSetObj.accept ? i2.fileSetObj.accept : null, action: o2.defaultAction, "before-upload": s2.handleBeforeUpload, headers: o2.headers, "on-success": s2.uploadOnSuccess, "with-credentials": true, name: "file" }, { default: f(() => [m(U2, null, { default: f(() => [I(b(e2.$t("imatrixUIMessage.upload")), 1)]), _: 1 })]), _: 1 }, 8, ["accept", "action", "before-upload", "headers", "on-success"])) : g("", true)]), _: 1 }, 8, ["modelValue", "title"]), m($2, { modelValue: o2.showPreviewSingleImage, "onUpdate:modelValue": l2[1] || (l2[1] = (e3) => o2.showPreviewSingleImage = e3), "append-to-body": true, "show-close": true, title: e2.$t("imatrixUIPublicModel.previewImage"), onClose: l2[2] || (l2[2] = (l3) => e2.$emit("close")) }, { title: f(() => [w("span", null, b(e2.$t("imatrixUIPublicModel.previewImage"))
|
|
78
|
+
return u(), c("div", null, [i2.disabled ? (u(), v(_, { key: 1, "file-list": o2.showFileList, label: i2.value }, null, 8, ["file-list", "label"])) : (u(), c(h, { key: 0 }, [m(P2, { ref: "item", disabled: i2.disabled, "model-value": i2.value, placeholder: e2.$t("imatrixUIMessage.fileUpload"), readonly: true }, { append: f(() => [w("div", y, [i2.disabled ? g("", true) : (u(), v(r2, { key: 0, type: "info", underline: false, onClick: s2.openAnnexUpload }, { icon: f(() => [m(n2, { size: 14 }, { default: f(() => [m(a2)]), _: 1 })]), _: 1 }, 8, ["onClick"])), m(r2, { size: "default", type: "info", underline: false, onClick: s2.preview }, { icon: f(() => [m(n2, { size: 14 }, { default: f(() => [m(p2)]), _: 1 })]), _: 1 }, 8, ["onClick"])])]), _: 1 }, 8, ["disabled", "model-value", "placeholder"]), m($2, { modelValue: o2.annexUploadFlag, "onUpdate:modelValue": l2[0] || (l2[0] = (e3) => o2.annexUploadFlag = e3), "append-to-body": true, "show-close": true, title: e2.$t("imatrixUIMessage.tips"), width: "30%" }, { default: f(() => [o2.annexUploadFlag ? (u(), v(F2, { key: 0, accept: i2.fileSetObj.accept ? i2.fileSetObj.accept : null, action: o2.defaultAction, "before-upload": s2.handleBeforeUpload, headers: o2.headers, "on-success": s2.uploadOnSuccess, "with-credentials": true, name: "file" }, { default: f(() => [m(U2, null, { default: f(() => [I(b(e2.$t("imatrixUIMessage.upload")), 1)]), _: 1 })]), _: 1 }, 8, ["accept", "action", "before-upload", "headers", "on-success"])) : g("", true)]), _: 1 }, 8, ["modelValue", "title"]), m($2, { modelValue: o2.showPreviewSingleImage, "onUpdate:modelValue": l2[1] || (l2[1] = (e3) => o2.showPreviewSingleImage = e3), "append-to-body": true, "show-close": true, title: e2.$t("imatrixUIPublicModel.previewImage"), onClose: l2[2] || (l2[2] = (l3) => e2.$emit("close")) }, { title: f(() => [w("span", null, b(e2.$t("imatrixUIPublicModel.previewImage")), 1)]), default: f(() => [o2.previewImageInfo && o2.previewImageInfo.isImg ? (u(), v(x, { key: 0, "preview-src-list": [o2.previewImageInfo.src], src: o2.previewImageInfo.src }, null, 8, ["preview-src-list", "src"])) : g("", true)]), _: 1 }, 8, ["modelValue", "title"]), m($2, { modelValue: o2.showPreviewMulti, "onUpdate:modelValue": l2[3] || (l2[3] = (e3) => o2.showPreviewMulti = e3), "append-to-body": true, "show-close": true, title: e2.$t("imatrixUIPublicModel.preview"), width: "30%", onClose: l2[4] || (l2[4] = (l3) => e2.$emit("close")) }, { title: f(() => [w("span", null, b(e2.$t("imatrixUIPublicModel.preview")), 1)]), default: f(() => [m(N, { data: o2.showFileList, "show-header": false }, { default: f(() => [m(L, { prop: "showName", width: "300" }), m(L, { align: "right" }, { default: f((l3) => [m(k, { content: e2.$t("imatrixUIPublicModel.preview"), class: "item", effect: "dark", placement: "top" }, { default: f(() => [m(n2, { style: { cursor: "pointer" }, onClick: (e3) => s2.previewSingle(l3.row) }, { default: f(() => [m(j)]), _: 1 }, 8, ["onClick"])]), _: 2 }, 1032, ["content"])]), _: 1 }), i2.disabled ? g("", true) : (u(), v(L, { key: 0 }, { default: f((l3) => [m(k, { content: e2.$t("imatrixUIPublicModel.delete"), class: "item", effect: "dark", placement: "top" }, { default: f(() => [m(n2, { style: { cursor: "pointer" }, onClick: (e3) => s2.deleteRow(l3.$index) }, { default: f(() => [m(A)]), _: 1 }, 8, ["onClick"])]), _: 2 }, 1032, ["content"])]), _: 1 }))]), _: 1 }, 8, ["data"])]), _: 1 }, 8, ["modelValue", "title"])], 64))]);
|
|
79
79
|
}]]);
|
|
80
80
|
export {
|
|
81
81
|
$ as default
|
|
@@ -94,11 +94,11 @@ const F = { data() {
|
|
|
94
94
|
}), this.setEntityValue(e3.join(","), l2.join(","));
|
|
95
95
|
} else
|
|
96
96
|
this.setEntityValue(null, null);
|
|
97
|
-
} }, emits: ["close", "update:value", "update:value"] }, I = { class: "el-upload__tip", style: { "margin-left": "12px" } }, $ = { key: 0 }, k =
|
|
98
|
-
const
|
|
99
|
-
const n2 = d("el-button"), s2 = d("el-input"), p2 = d("el-upload"), r2 = d("el-icon-paperclip"), U2 = d("el-icon"), N2 = d("el-icon-close"), F2 = d("el-tooltip"),
|
|
100
|
-
return u(), c("div", null, [i2.disabled ? (u(), w(
|
|
97
|
+
} }, emits: ["close", "update:value", "update:value"] }, I = { class: "el-upload__tip", style: { "margin-left": "12px" } }, $ = { key: 0 }, k = { style: { "margin-left": "6.5px" } }, S = { style: { "line-height": "30px" } }, _ = ["onClick"], j = { style: { "margin-left": "6.5px" } };
|
|
98
|
+
const x = N(F, [["render", function(e2, l2, i2, t2, o2, a2) {
|
|
99
|
+
const n2 = d("el-button"), s2 = d("el-input"), p2 = d("el-upload"), r2 = d("el-icon-paperclip"), U2 = d("el-icon"), N2 = d("el-icon-close"), F2 = d("el-tooltip"), x2 = d("el-tag"), C = d("el-progress"), A = d("el-row"), O = d("el-col"), z = d("el-dialog"), V = d("el-image"), M = d("el-table-column"), E = d("el-icon-view"), R = d("el-icon-delete"), D = d("el-table"), L = d("fs-preview");
|
|
100
|
+
return u(), c("div", null, [i2.disabled ? (u(), w(L, { key: 1, "file-list": o2.showFileList, label: i2.value }, null, 8, ["file-list", "label"])) : (u(), c(m, { key: 0 }, [h(s2, { ref: "item", disabled: i2.disabled, "model-value": i2.value, placeholder: e2.$t("imatrixUIMessage.fileUpload"), readonly: true }, { append: f(() => [i2.disabled ? g("", true) : (u(), w(n2, { key: 0, icon: o2.ElIconUpload2, size: "default", onClick: a2.openAnnexUpload }, null, 8, ["icon", "onClick"]))]), _: 1 }, 8, ["disabled", "model-value", "placeholder"]), h(z, { modelValue: o2.annexUploadFlag, "onUpdate:modelValue": l2[0] || (l2[0] = (e3) => o2.annexUploadFlag = e3), "append-to-body": true, "show-close": true, title: e2.$t("imatrixUIMessage.tips"), width: "40%" }, { default: f(() => [h(p2, { id: "upload", "auto-upload": false, "on-change": a2.uploadFile, "show-file-list": false, action: "" }, { tip: f(() => [v("span", I, [b(" 上传文件不能超过" + y(i2.fileSetObj.limitFileSize) + "M ", 1), i2.fileSetObj.accept ? (u(), c("span", $, ",并且只接受" + y(i2.fileSetObj.accept) + "类型文件", 1)) : g("", true)])]), default: f(() => [h(n2, { size: "default", type: "primary" }, { default: f(() => [...l2[5] || (l2[5] = [b(" 选择文件", -1)])]), _: 1 })]), _: 1 }, 8, ["on-change"]), l2[6] || (l2[6] = v("br", null, null, -1)), (u(true), c(m, null, P(o2.uploadingFile, (e3, l3) => (u(), w(A, { key: l3 }, { default: f(() => [h(x2, { size: "small form-list-file" }, { default: f(() => [v("span", null, [h(U2, null, { default: f(() => [h(r2)]), _: 1 }), v("span", k, y(e3.name), 1)]), h(F2, { content: "取消上传", effect: "light", placement: "right" }, { default: f(() => [h(U2, { style: { "margin-left": "8px" }, onClick: (l4) => a2.cancelUpload(e3.serverName) }, { default: f(() => [h(N2)]), _: 1 }, 8, ["onClick"])]), _: 2 }, 1024)]), _: 2 }, 1024), h(C, { percentage: e3.uploadProgress }, null, 8, ["percentage"])]), _: 2 }, 1024))), 128)), v("div", S, [h(A, null, { default: f(() => [h(O, null, { default: f(() => [(u(true), c(m, null, P(o2.fileContent, (e3, l3) => (u(), w(x2, { key: l3, size: "small form-list-file" }, { default: f(() => [v("span", { onClick: (l4) => a2.preview(e3.name, e3.serverName) }, [h(U2, null, { default: f(() => [h(r2)]), _: 1 }), v("span", j, y(e3.name), 1)], 8, _), h(F2, { content: "移除已上传文件", effect: "light", placement: "right" }, { default: f(() => [h(U2, { style: { "margin-left": "8px" }, onClick: (i3) => a2.handleOnRemove(l3, e3) }, { default: f(() => [h(N2)]), _: 1 }, 8, ["onClick"])]), _: 2 }, 1024)]), _: 2 }, 1024))), 128))]), _: 1 })]), _: 1 })])]), _: 1 }, 8, ["modelValue", "title"]), h(z, { modelValue: o2.showPreviewSingleImage, "onUpdate:modelValue": l2[1] || (l2[1] = (e3) => o2.showPreviewSingleImage = e3), "append-to-body": true, "show-close": true, title: e2.$t("imatrixUIPublicModel.previewImage"), onClose: l2[2] || (l2[2] = (l3) => e2.$emit("close")) }, { title: f(() => [v("span", null, y(e2.$t("imatrixUIPublicModel.previewImage")), 1)]), default: f(() => [h(V, { "preview-src-list": [o2.previewImageInfo.src], src: o2.previewImageInfo.src }, null, 8, ["preview-src-list", "src"])]), _: 1 }, 8, ["modelValue", "title"]), h(z, { modelValue: o2.showPreviewMulti, "onUpdate:modelValue": l2[3] || (l2[3] = (e3) => o2.showPreviewMulti = e3), "append-to-body": true, "show-close": true, title: e2.$t("imatrixUIPublicModel.preview"), width: "30%", onClose: l2[4] || (l2[4] = (l3) => e2.$emit("close")) }, { title: f(() => [v("span", null, y(e2.$t("imatrixUIPublicModel.preview")), 1)]), default: f(() => [h(D, { data: o2.showFileList, "show-header": false }, { default: f(() => [h(M, { prop: "showName", width: "300" }), h(M, { align: "right" }, { default: f((l3) => [h(F2, { content: e2.$t("imatrixUIPublicModel.preview"), class: "item", effect: "dark", placement: "top" }, { default: f(() => [h(U2, { style: { cursor: "pointer" }, onClick: (i3) => e2.previewSingle(l3.row) }, { default: f(() => [h(E)]), _: 1 }, 8, ["onClick"])]), _: 2 }, 1032, ["content"])]), _: 1 }), i2.disabled ? g("", true) : (u(), w(M, { key: 0 }, { default: f((l3) => [h(F2, { content: e2.$t("imatrixUIPublicModel.delete"), class: "item", effect: "dark", placement: "top" }, { default: f(() => [h(U2, { style: { cursor: "pointer" }, onClick: (i3) => e2.deleteRow(l3.$index) }, { default: f(() => [h(R)]), _: 1 }, 8, ["onClick"])]), _: 2 }, 1032, ["content"])]), _: 1 }))]), _: 1 }, 8, ["data"])]), _: 1 }, 8, ["modelValue", "title"])], 64))]);
|
|
101
101
|
}]]);
|
|
102
102
|
export {
|
|
103
|
-
|
|
103
|
+
x as default
|
|
104
104
|
};
|
|
@@ -4,57 +4,57 @@ import { getHeaderLable as D } from "../super-grid/src/utils.mjs";
|
|
|
4
4
|
import w from "../super-grid/src/store.mjs";
|
|
5
5
|
import P from "./operation.vue.mjs";
|
|
6
6
|
const h = { style: { "text-align": "center" } }, b = { class: "row-form-item" }, x = e({ ...{ components: { operation: P }, name: "RowForm" }, props: { columns: {}, listCode: {}, isSql: {}, dragColumnProp: {}, tableName: {}, pageCode: {}, listName: {}, currentPage: {}, gridData: {}, pageGridData: {}, listToolbarFormData: {}, rowIndex: {}, options: {}, lineEdit: {}, showPage: {}, pageSize: {} }, emits: ["open-page", "close", "prohibitToEdit", "refresData", "refresPortData", "refresPortsData", "refresMainTableFields", "refreshList"], setup(e2, { emit: x2 }) {
|
|
7
|
-
const C = e2, k = r(function() {
|
|
7
|
+
const C = e2, k = x2, y = r(function() {
|
|
8
8
|
let e3 = C.rowIndex;
|
|
9
9
|
C.showPage && (e3 = C.rowIndex < C.pageSize ? (C.currentPage - 1) * C.pageSize + C.rowIndex : C.currentPage * C.pageSize - 1);
|
|
10
10
|
return e3;
|
|
11
|
-
}()),
|
|
12
|
-
let
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
const
|
|
16
|
-
function
|
|
11
|
+
}()), E = r(true), R = r(true);
|
|
12
|
+
let F;
|
|
13
|
+
const T = w.get(C.listCode), G = T.options;
|
|
14
|
+
T.options.extraParam && T.options.extraParam.entityMap && (F = T.options.extraParam.entityMap);
|
|
15
|
+
const I = r(null), M = C.columns ? C.columns.filter((e3) => e3.prop && "operation" === e3.prop) : null;
|
|
16
|
+
function S(e3) {
|
|
17
17
|
return D(e3);
|
|
18
18
|
}
|
|
19
|
-
function S() {
|
|
20
|
-
E.value = false, --k.value, f(() => {
|
|
21
|
-
E.value = true;
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
19
|
function _() {
|
|
25
|
-
|
|
26
|
-
|
|
20
|
+
R.value = false, --y.value, f(() => {
|
|
21
|
+
R.value = true;
|
|
27
22
|
});
|
|
28
23
|
}
|
|
29
|
-
function z(
|
|
30
|
-
|
|
24
|
+
function z() {
|
|
25
|
+
R.value = false, ++y.value, f(() => {
|
|
26
|
+
R.value = true;
|
|
27
|
+
});
|
|
31
28
|
}
|
|
32
29
|
function L(e3) {
|
|
33
|
-
|
|
30
|
+
k("open-page", e3);
|
|
34
31
|
}
|
|
35
32
|
function $(e3) {
|
|
36
|
-
|
|
33
|
+
k("prohibitToEdit", e3);
|
|
37
34
|
}
|
|
38
|
-
function j(e3
|
|
39
|
-
|
|
35
|
+
function j(e3) {
|
|
36
|
+
k("refresData", e3);
|
|
40
37
|
}
|
|
41
|
-
function q(e3) {
|
|
42
|
-
C && C.lineEdit && C.lineEdit.editingCell ?
|
|
38
|
+
function q(e3, r2) {
|
|
39
|
+
C && C.lineEdit && C.lineEdit.editingCell ? k("refresPortData", e3, r2, C.lineEdit.editingCell.row) : k("refresPortData", e3, r2, this.index);
|
|
43
40
|
}
|
|
44
41
|
function N(e3) {
|
|
45
|
-
|
|
42
|
+
C && C.lineEdit && C.lineEdit.editingCell ? k("refresPortsData", e3, C.lineEdit.editingCell.row) : k("refresPortsData", e3, this.index);
|
|
43
|
+
}
|
|
44
|
+
function V(e3) {
|
|
45
|
+
k("refresMainTableFields", e3);
|
|
46
46
|
}
|
|
47
|
-
function
|
|
48
|
-
|
|
47
|
+
function A() {
|
|
48
|
+
k("refreshList");
|
|
49
49
|
}
|
|
50
|
-
function
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
function O(e3) {
|
|
51
|
+
R.value = false, y.value = C.gridData.length - 1, f(() => {
|
|
52
|
+
R.value = true;
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
|
-
return
|
|
56
|
-
const
|
|
57
|
-
return t(), o(C2, { modelValue:
|
|
55
|
+
return M && M.length > 0 && (I.value = M[0]), (r2, f2) => {
|
|
56
|
+
const D2 = a("el-form-item"), w2 = a("el-form"), x3 = a("el-button"), C2 = a("el-drawer");
|
|
57
|
+
return t(), o(C2, { modelValue: E.value, "onUpdate:modelValue": f2[0] || (f2[0] = (e3) => E.value = e3), "close-on-click-modal": false, "close-on-press-escape": false, direction: "btt", size: "100%", onClose: f2[1] || (f2[1] = (e3) => (E.value = false, void k("close"))) }, { header: i(() => [l("div", h, n(r2.$t("superGrid.recordLine", { row: y.value + 1 })), 1)]), default: i(() => [I.value ? (t(), o(P, { key: 0, column: I.value, "list-code": e2.listCode, currentPage: e2.currentPage, "grid-data": e2.gridData, "page-grid-data": e2.pageGridData, row: e2.gridData[y.value], rowIndex: y.value, parentFormData: s(F), onRefreshList: A, onAfterClick: O }, null, 8, ["column", "list-code", "currentPage", "grid-data", "page-grid-data", "row", "rowIndex", "parentFormData"])) : d("", true), u(w2, { "label-width": "auto" }, { default: i(() => [(t(true), p(c, null, m(e2.columns, (r3, a2) => (t(), p(c, null, ["$index" != r3.prop && "$selection" != r3.prop && "operation" != r3.prop ? (t(), o(D2, { key: a2, label: S(r3) }, { default: i(() => [l("div", b, [u(v, { ref_for: true, ref: r3.prop, "is-sql": e2.isSql, column: r3, "list-code": e2.listCode, "drag-column-prop": e2.dragColumnProp, "right-click-menu-arr": s(G).rightClickMenuArr, "table-name": e2.tableName, "page-code": e2.pageCode, "list-toolbar-form-data": e2.listToolbarFormData, "list-name": e2.listName, options: s(G), "current-page": e2.currentPage, "grid-data": e2.gridData, "page-grid-data": e2.pageGridData, row: e2.gridData[y.value], "row-index": y.value, "is-show-form": true, onOpenPage: L, onRefresData: j, onRefreshList: A, onRefresPortData: q, onRefresPortsData: N, onRefresMainTableFields: V, onProhibitToEdit: $ }, null, 8, ["is-sql", "column", "list-code", "drag-column-prop", "right-click-menu-arr", "table-name", "page-code", "list-toolbar-form-data", "list-name", "options", "current-page", "grid-data", "page-grid-data", "row", "row-index"])])]), _: 2 }, 1032, ["label"])) : d("", true)], 64))), 256))]), _: 1 }), 0 !== y.value ? (t(), o(x3, { key: 1, type: "primary", link: "", onClick: _ }, { default: i(() => [g(n(r2.$t("superGrid.prevRow")), 1)]), _: 1 })) : d("", true), y.value !== e2.gridData.length - 1 ? (t(), o(x3, { key: 2, type: "primary", link: "", onClick: z }, { default: i(() => [g(n(r2.$t("superGrid.nextRow")), 1)]), _: 1 })) : d("", true)]), _: 1 }, 8, ["modelValue"]);
|
|
58
58
|
};
|
|
59
59
|
} });
|
|
60
60
|
export {
|
|
@@ -2,10 +2,10 @@ import { defineComponent as o, ref as r, resolveComponent as e, resolveDirective
|
|
|
2
2
|
import x from "../super-grid/src/row-operation.vue.mjs";
|
|
3
3
|
import b from "../super-grid/src/custom-formatter.mjs";
|
|
4
4
|
const k = { key: 0, class: "grid-operation-buttons" }, I = o({ name: "RowForm", props: { column: {}, listCode: {}, currentPage: {}, gridData: {}, pageGridData: {}, rowIndex: {}, parentFormData: {}, row: {} }, emits: ["refreshList", "afterClick"], setup(o2, { emit: I2 }) {
|
|
5
|
-
const C = o2;
|
|
5
|
+
const C = o2, y = I2;
|
|
6
6
|
r(C.rowIndex);
|
|
7
|
-
const
|
|
8
|
-
function
|
|
7
|
+
const h = r(true);
|
|
8
|
+
function D(o3) {
|
|
9
9
|
let r2 = null;
|
|
10
10
|
C.column.operations.forEach((e2) => {
|
|
11
11
|
e2.isGroup && e2.buttons.forEach((e3) => {
|
|
@@ -13,18 +13,18 @@ const k = { key: 0, class: "grid-operation-buttons" }, I = o({ name: "RowForm",
|
|
|
13
13
|
});
|
|
14
14
|
}), r2 && b.onClickFun(o3.row, C.column, r2.onClick, o3.rowIndex);
|
|
15
15
|
}
|
|
16
|
-
function D() {
|
|
17
|
-
I2("refreshList");
|
|
18
|
-
}
|
|
19
16
|
function v() {
|
|
20
|
-
|
|
17
|
+
y("refreshList");
|
|
18
|
+
}
|
|
19
|
+
function G() {
|
|
20
|
+
y("afterClick", { row: C.row, column: C.column, rowIndex: C.rowIndex });
|
|
21
21
|
}
|
|
22
|
-
return r(true), (
|
|
23
|
-
const
|
|
24
|
-
return
|
|
25
|
-
return t(), a("span", { key:
|
|
26
|
-
var
|
|
27
|
-
}), 128))]), _: 2 }, 1024)]), default: d(() => [m(w(
|
|
22
|
+
return r(true), (r2, b2) => {
|
|
23
|
+
const I3 = e("el-dropdown-item"), C2 = e("el-dropdown-menu"), y2 = e("el-dropdown"), F = n("permission");
|
|
24
|
+
return o2.column.operations ? (t(), a("div", k, [(t(true), a(i, null, p(o2.column.operations, (e2, n2) => (t(), a("span", { key: n2, class: s([h.value ? "" : "cell--span", "buttons-row-operation-span"]) }, [e2.isGroup ? (t(), l(y2, { key: 0, size: e2.buttons && e2.buttons.length > 0 ? e2.buttons[0].props.size : "small", "split-button": "", onCommand: D }, { dropdown: d(() => [c(C2, null, { default: d(() => [(t(true), a(i, null, p(e2.buttons, (e3, n3) => {
|
|
25
|
+
return t(), a("span", { key: e3.props.code + n3 }, [u((t(), l(I3, { command: (i2 = e3.props.code, p2 = o2.row, s2 = o2.rowIndex, { comman: i2, row: p2, rowIndex: s2 }), disabled: r2.preventReclick }, { default: d(() => [m(w(r2.$escapeHtml(e3.props.label)), 1)]), _: 2 }, 1032, ["command", "disabled"])), [[F, e3.props.permission]])]);
|
|
26
|
+
var i2, p2, s2;
|
|
27
|
+
}), 128))]), _: 2 }, 1024)]), default: d(() => [m(w(r2.$escapeHtml(e2.label)) + " ", 1)]), _: 2 }, 1032, ["size"])) : e2.props.customControl ? u((t(), l(g(e2.props.customControl), { key: o2.column.prop + "_" + o2.rowIndex + "_" + o2.currentPage, disabled: true, row: o2.pageGridData[o2.rowIndex], entity: o2.pageGridData[o2.rowIndex], prop: o2.column.prop, parent: o2.parentFormData, "row-index": o2.rowIndex, "grid-data": o2.gridData, "page-grid-data": o2.pageGridData, "current-page": o2.currentPage, onRefreshList: v }, null, 40, ["row", "entity", "prop", "parent", "row-index", "grid-data", "page-grid-data", "current-page"])), [[F, e2.props.permission]]) : (t(), l(x, { key: 2, column: o2.column, editing: o2.row.$editing, entity: o2.row, "is-show": e2.isShow, label: e2.props.label ? e2.props.label : o2.row[o2.column.prop], "on-click": e2.onClick, "operation-index": n2, "operation-setting": e2.props, "row-index": o2.rowIndex, "list-code": o2.listCode, "parent-form-data": o2.parentFormData, onAfterClick: G }, null, 8, ["column", "editing", "entity", "is-show", "label", "on-click", "operation-index", "operation-setting", "row-index", "list-code", "parent-form-data"]))], 2))), 128))])) : f("", true);
|
|
28
28
|
};
|
|
29
29
|
} });
|
|
30
30
|
export {
|
|
@@ -9,7 +9,7 @@ const u = a({ name: "SecretInfo", props: { entity: { type: Object, default: null
|
|
|
9
9
|
this.decryInfo = e3, this.isShow = true;
|
|
10
10
|
});
|
|
11
11
|
} }, emits: ["update:value"] }, [["render", function(a2, u2, h, p, f, y) {
|
|
12
|
-
return void 0 !== h.value && null !== h.value && "" !== h.value ? (e(), t("span", o, [f.isShow ? (e(), t("span", d, [i(l(f.decryInfo), 1), s("i", { class: "fa fa-eye", style: { "margin-left": "5px" }, onClick: u2[0] || (u2[0] = (...e2) => y.showHideSecretInfo && y.showHideSecretInfo(...e2)) })])) : (e(), t("span", r, [i(" ******"), s("i", { class: "fa fa-eye-slash", style: { "margin-left": "5px" }, onClick: u2[1] || (u2[1] = (...e2) => y.showHideSecretInfo && y.showHideSecretInfo(...e2)) })]))])) : n("", true);
|
|
12
|
+
return void 0 !== h.value && null !== h.value && "" !== h.value ? (e(), t("span", o, [f.isShow ? (e(), t("span", d, [i(l(f.decryInfo), 1), s("i", { class: "fa fa-eye", style: { "margin-left": "5px" }, onClick: u2[0] || (u2[0] = (...e2) => y.showHideSecretInfo && y.showHideSecretInfo(...e2)) })])) : (e(), t("span", r, [u2[2] || (u2[2] = i(" ******", -1)), s("i", { class: "fa fa-eye-slash", style: { "margin-left": "5px" }, onClick: u2[1] || (u2[1] = (...e2) => y.showHideSecretInfo && y.showHideSecretInfo(...e2)) })]))])) : n("", true);
|
|
13
13
|
}]]);
|
|
14
14
|
export {
|
|
15
15
|
u as default
|
|
@@ -1,49 +1,49 @@
|
|
|
1
1
|
import { defineComponent as e, ref as t, onMounted as o, nextTick as n, onUnmounted as i, watchEffect as l, computed as a, resolveDirective as r, openBlock as s, createElementBlock as u, normalizeStyle as f, withDirectives as c, normalizeClass as d, renderSlot as v } from "vue";
|
|
2
2
|
const p = e({ __name: "index", props: { offset: { type: Number, default: 0 }, position: { type: String, default: "top", validator: (e2) => ["top", "bottom"].includes(e2) }, target: { type: [String, HTMLElement], default: () => window }, autoDetectParentScroll: { type: Boolean, default: true }, stickyInScrollContainer: { type: Boolean, default: true }, zIndex: { type: Number, default: 100 }, enableIntervalUpdate: { type: Boolean, default: true }, enableIntervalTime: { type: Number, default: 2e3 } }, emits: ["change"], setup(e2, { emit: p2 }) {
|
|
3
|
-
const h = e2, m = t(null),
|
|
4
|
-
e3.contentRect.height && (
|
|
5
|
-
},
|
|
3
|
+
const h = e2, m = p2, g = t(null), w = t(null), y = t(false), x = t({}), b = t([]), T = t(window), B = t(0), I = t(null), E = (e3) => {
|
|
4
|
+
e3.contentRect.height && (x.value.height = e3.contentRect.height);
|
|
5
|
+
}, S = () => {
|
|
6
6
|
try {
|
|
7
|
-
if (!
|
|
7
|
+
if (!w.value)
|
|
8
8
|
return;
|
|
9
|
-
const e3 =
|
|
9
|
+
const e3 = w.value.getBoundingClientRect(), t2 = T.value;
|
|
10
10
|
if (t2 === window) {
|
|
11
11
|
const t3 = "top" === h.position ? e3.top <= h.offset : e3.bottom >= window.innerHeight - h.offset;
|
|
12
|
-
|
|
12
|
+
B.value = 0, R(t3, e3);
|
|
13
13
|
} else if (h.stickyInScrollContainer) {
|
|
14
14
|
const o2 = t2.getBoundingClientRect(), { isFixTop: n2, isFixBottom: i2, containerOffset: l2 } = ((e4) => {
|
|
15
15
|
const t3 = ["top"].includes(h.position), o3 = ["bottom"].includes(h.position);
|
|
16
|
-
if (!
|
|
16
|
+
if (!g.value)
|
|
17
17
|
return { isTop: t3, isBottom: o3 };
|
|
18
|
-
const n3 =
|
|
18
|
+
const n3 = g.value.getBoundingClientRect(), i3 = n3.top - e4.top, l3 = n3.left - e4.left, a2 = e4.height - n3.height - i3, r2 = e4.top, s2 = window.innerHeight - e4.bottom;
|
|
19
19
|
return { isTop: t3, isBottom: o3, containerTop: r2, containerBottom: s2, containerOffset: t3 ? r2 : o3 ? s2 : 0, offsetTop: i3, offsetLeft: l3, offsetBottom: a2, isFixTop: t3 && i3 <= 0, isFixBottom: o3 && a2 <= 0 };
|
|
20
20
|
})(o2);
|
|
21
|
-
|
|
21
|
+
B.value = l2 ?? 0, R(n2 || i2 || false, e3);
|
|
22
22
|
}
|
|
23
23
|
} catch (e3) {
|
|
24
24
|
console.error(e3);
|
|
25
25
|
}
|
|
26
|
-
},
|
|
26
|
+
}, R = (e3, t2) => {
|
|
27
27
|
var _a;
|
|
28
|
-
t2.height && (e3 ===
|
|
29
|
-
},
|
|
30
|
-
requestAnimationFrame(
|
|
28
|
+
t2.height && (e3 === y.value && ((_a = x.value) == null ? void 0 : _a.height) === `${t2.height}px` || (y.value = e3, m("change", e3), x.value = e3 ? { width: "100%", height: `${t2.height}px` } : {}));
|
|
29
|
+
}, z = () => {
|
|
30
|
+
requestAnimationFrame(S);
|
|
31
31
|
};
|
|
32
|
-
let
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
let C;
|
|
33
|
+
const L = () => {
|
|
34
|
+
y.value = false, clearTimeout(C), C = window.setTimeout(() => {
|
|
35
|
+
S();
|
|
36
36
|
}, 100);
|
|
37
37
|
};
|
|
38
38
|
o(() => {
|
|
39
39
|
setTimeout(() => {
|
|
40
40
|
n(() => {
|
|
41
41
|
try {
|
|
42
|
-
h.enableIntervalUpdate && (
|
|
42
|
+
h.enableIntervalUpdate && (I.value = setInterval(z, h.enableIntervalTime));
|
|
43
43
|
const e3 = (() => {
|
|
44
|
-
if (h.autoDetectParentScroll &&
|
|
44
|
+
if (h.autoDetectParentScroll && w.value) {
|
|
45
45
|
const e4 = [];
|
|
46
|
-
let t2 =
|
|
46
|
+
let t2 = w.value.parentElement;
|
|
47
47
|
for (; t2 && t2 !== document.body; ) {
|
|
48
48
|
const { overflowY: o2 } = window.getComputedStyle(t2);
|
|
49
49
|
/(auto|scroll)/.test(o2) && e4.push(t2), t2 = t2.parentElement;
|
|
@@ -56,26 +56,26 @@ const p = e({ __name: "index", props: { offset: { type: Number, default: 0 }, po
|
|
|
56
56
|
}
|
|
57
57
|
return [window];
|
|
58
58
|
})();
|
|
59
|
-
|
|
59
|
+
b.value = e3, T.value = e3[0], b.value.forEach((e4) => e4.addEventListener("scroll", z)), window.addEventListener("resize", L), S();
|
|
60
60
|
} catch (e3) {
|
|
61
61
|
console.error(e3);
|
|
62
62
|
}
|
|
63
63
|
});
|
|
64
64
|
}, 100);
|
|
65
65
|
}), i(() => {
|
|
66
|
-
|
|
66
|
+
T.value && b.value.forEach((e3) => e3.removeEventListener("scroll", z)), window.removeEventListener("resize", L), clearTimeout(C), I.value && clearInterval(I.value);
|
|
67
67
|
}), l(() => {
|
|
68
68
|
n(() => {
|
|
69
|
-
|
|
69
|
+
z();
|
|
70
70
|
});
|
|
71
71
|
});
|
|
72
|
-
const
|
|
72
|
+
const F = a(() => {
|
|
73
73
|
var _a, _b;
|
|
74
|
-
return
|
|
74
|
+
return y.value && ((_a = w.value) == null ? void 0 : _a.offsetWidth) ? { position: "fixed", width: `${(_b = w.value) == null ? void 0 : _b.offsetWidth}px`, zIndex: h.zIndex, [h.position]: `${h.offset + B.value}px` } : { position: "relative" };
|
|
75
75
|
});
|
|
76
76
|
return (e3, t2) => {
|
|
77
77
|
const o2 = r("resize");
|
|
78
|
-
return s(), u("div", { ref_key: "affixMainRef", ref:
|
|
78
|
+
return s(), u("div", { ref_key: "affixMainRef", ref: g, class: "yx-affix", style: f({ height: y.value ? x.value.height : void 0 }) }, [c((s(), u("div", { ref_key: "affixRef", ref: w, style: f(F.value), class: d([{ "is-fixed": y.value, "is-top": "top" === h.position, "is-bottom": "bottom" === h.position }, "yx-affix-content"]) }, [v(e3.$slots, "default", {}, void 0, true)], 6)), [[o2, E]])], 4);
|
|
79
79
|
};
|
|
80
80
|
} });
|
|
81
81
|
export {
|