super-page-runtime 2.3.43-sit2 → 2.3.44-sit1

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.
@@ -1,91 +1,106 @@
1
- import { defineComponent as e, ref as l, watch as t, onMounted as o, nextTick as i, onUnmounted as a, resolveComponent as n, createBlock as u, createCommentVNode as r, openBlock as s, normalizeStyle as p, normalizeClass as f, unref as d, createSlots as m, withCtx as v, createElementVNode as c, toDisplayString as g } from "vue";
1
+ import { defineComponent as e, ref as t, watch as l, onMounted as o, nextTick as a, onUnmounted as i, resolveComponent as n, createBlock as u, createCommentVNode as r, openBlock as p, normalizeStyle as s, normalizeClass as f, unref as d, createSlots as m, withCtx as c, createElementVNode as v, toDisplayString as g } from "vue";
2
2
  import { getVariableValue as h, setVariableValue as y } from "../../../../utils/page-helper-util.js";
3
3
  import { handleAfterInitEvent as C, fileUploadBeforeUpload as w, fileUploadBeforeDelete as b, fileUploadUploaded as x, fileUploadDeleted as k } from "../../../../utils/events/event-util.js";
4
4
  import I from "agilebuilder-ui/src/utils/request";
5
5
  import { FsUploadNew as P } from "agilebuilder-ui";
6
- import S from "../../../../utils/eventBus.js";
7
- import { $t as j } from "../../../../utils/i18n-util.js";
8
- import { addRequiredClassUtil as N } from "../../../../utils/common-util.js";
9
- import { getRelativeBaseUrl as T } from "agilebuilder-ui/src/utils/common-util";
6
+ import N from "../../../../utils/eventBus.js";
7
+ import { $t as S } from "../../../../utils/i18n-util.js";
8
+ import { addRequiredClassUtil as j } from "../../../../utils/common-util.js";
9
+ import { getRelativeBaseUrl as D } from "agilebuilder-ui/src/utils/common-util";
10
+ import { getDefaultValue as T } from "../../../../utils/page-init-util.js";
10
11
  const _ = e({ __name: "fileupload-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: _2 }) {
11
12
  var _a, _b, _c, _d, _e, _f, _g;
12
- const z = e2, R = l(null), F = z.configure.runtime ? z.configure.runtime : {}, O = l(F.props ? F.props : {}), D = F.style, q = F.class, W = F.headerStyle, $ = F.titleExceedStyle, A = z.pageContext.entity ? z.pageContext.entity : {}, E = z.configure.props.base ? z.configure.props.base : {}, U = Y(E.prop), B = Y(E.propName);
13
- let G = l({});
14
- G.value.isShowWatermark = void 0 === ((_b = (_a = z.configure.props) == null ? void 0 : _a.watermark) == null ? void 0 : _b.isShowWatermark) ? "true" : ((_c = z.configure.props) == null ? void 0 : _c.watermark.isShowWatermark) + "", G.value.content = ((_e = (_d = z.configure.props) == null ? void 0 : _d.watermark) == null ? void 0 : _e.content) ? (_g = (_f = z.configure.props) == null ? void 0 : _f.watermark) == null ? void 0 : _g.content : "", U && U.length > 1 && t(() => z.pageContext.entity[U[0]][U[1]], (e3) => {
15
- X(h(A, U));
13
+ const z = e2, R = t(null), F = z.configure.runtime ? z.configure.runtime : {}, O = t(F.props ? F.props : {}), q = F.style, W = F.class, V = F.headerStyle, $ = F.titleExceedStyle, A = z.pageContext.entity ? z.pageContext.entity : {}, E = z.configure.props.base ? z.configure.props.base : {}, U = Z(E.prop), B = Z(E.propName);
14
+ let G = t({});
15
+ G.value.isShowWatermark = void 0 === ((_b = (_a = z.configure.props) == null ? void 0 : _a.watermark) == null ? void 0 : _b.isShowWatermark) ? "true" : ((_c = z.configure.props) == null ? void 0 : _c.watermark.isShowWatermark) + "", G.value.content = ((_e = (_d = z.configure.props) == null ? void 0 : _d.watermark) == null ? void 0 : _e.content) ? (_g = (_f = z.configure.props) == null ? void 0 : _f.watermark) == null ? void 0 : _g.content : "", U && U.length > 1 && l(() => z.pageContext.entity[U[0]][U[1]], (e3) => {
16
+ Y(h(A, U));
16
17
  });
17
- const H = z.pageContext.code, J = l(U ? H + "__" + U.join("__") : null), K = h(A, U), L = l(null), M = l(false), Q = l([]), V = l({});
18
- function X(e3) {
18
+ const H = z.pageContext.code, J = t(U ? H + "__" + U.join("__") : null), K = h(A, U), L = t(null), M = t(false), Q = t([]), X = t({});
19
+ function Y(e3) {
19
20
  if (e3) {
20
- const l2 = e3.split(",");
21
- if (l2.length > 0) {
22
- const e4 = T(window.$vueApp.config.globalProperties.baseAPI) + "/component/fs-upload/search-file-metadata";
23
- I.post(e4, l2).then((e5) => {
21
+ const t2 = e3.split(",");
22
+ if (t2.length > 0) {
23
+ const e4 = D(window.$vueApp.config.globalProperties.baseAPI) + "/component/fs-upload/search-file-metadata";
24
+ I.post(e4, t2).then((e5) => {
24
25
  Q.value = [];
25
- const t2 = [], o2 = {};
26
+ const l2 = [], o2 = {};
26
27
  e5.forEach((e6) => {
27
28
  o2[e6.uuid] = e6;
28
29
  });
29
- for (let e6 = 0; e6 < l2.length; e6++) {
30
- const i2 = l2[e6];
31
- t2.push(o2[i2].fileName), Q.value.push({ showName: o2[i2].fileName, serverPath: i2, fileSize: o2[i2].fileSize });
30
+ for (let e6 = 0; e6 < t2.length; e6++) {
31
+ const a2 = t2[e6];
32
+ l2.push(o2[a2].fileName), Q.value.push({ showName: o2[a2].fileName, serverPath: a2, fileSize: o2[a2].fileSize });
32
33
  }
33
- "input" === O.value.displayType && (V.value.showName = t2.join(","), V.value.serverPath = l2.join(","));
34
+ "input" === O.value.displayType && (X.value.showName = l2.join(","), X.value.serverPath = t2.join(","));
34
35
  }).finally(() => {
35
36
  M.value = true;
36
37
  });
37
38
  } else M.value = true;
38
- } else Q.value = [], V.value = {}, M.value = true;
39
+ } else Q.value = [], X.value = {}, M.value = true;
39
40
  }
40
- function Y(e3) {
41
+ function Z(e3) {
41
42
  return e3 ? (e3.startsWith("${") && (e3 = e3.substring(2, e3.length - 1)), e3.split(".")) : [];
42
43
  }
43
- function Z(e3) {
44
+ function ee(e3) {
44
45
  z.pageContext.fileuploadInfo || (z.pageContext.fileuploadInfo = []);
45
- return -1 === z.pageContext.fileuploadInfo.findIndex((e4) => e4.uuid === z.configure.uuid) && z.pageContext.fileuploadInfo.push({ uuid: z.configure.uuid, label: j(O.value.title) }), e3.pageContext || (e3.pageContext = z.pageContext), e3.configure || (e3.configureObj = z.configure), w(e3);
46
+ return -1 === z.pageContext.fileuploadInfo.findIndex((e4) => e4.uuid === z.configure.uuid) && z.pageContext.fileuploadInfo.push({ uuid: z.configure.uuid, label: S(O.value.title) }), e3.pageContext || (e3.pageContext = z.pageContext), e3.configure || (e3.configureObj = z.configure), w(e3);
46
47
  }
47
- function ee() {
48
+ function te() {
48
49
  if (z.pageContext.fileuploadInfo && z.configure.uuid) {
49
50
  const e3 = z.pageContext.fileuploadInfo.findIndex((e4) => e4.uuid === z.configure.uuid);
50
51
  -1 !== e3 && z.pageContext.fileuploadInfo.splice(e3, 1);
51
52
  }
52
53
  }
53
54
  function le(e3) {
54
- ee();
55
+ te();
55
56
  }
56
- function te(e3) {
57
+ function oe(e3) {
57
58
  return b(z.pageContext, z.configure, e3);
58
59
  }
59
- X(K);
60
- const oe = (e3, l2, t2) => {
60
+ Y(K);
61
+ const ae = (e3, t2, l2) => {
61
62
  var o2;
62
- ee(), ae(), o2 = { response: e3, uploadFile: l2, uploadFiles: t2 }, x(z.pageContext, z.configure, o2);
63
+ te(), ne(), o2 = { response: e3, uploadFile: t2, uploadFiles: l2 }, x(z.pageContext, z.configure, o2);
63
64
  }, ie = (e3) => {
64
- var l2;
65
- ae(), l2 = { file: e3 }, k(z.pageContext, z.configure, l2);
66
- }, ae = () => {
67
- const e3 = [], l2 = [];
65
+ var t2;
66
+ ne(), t2 = { file: e3 }, k(z.pageContext, z.configure, t2);
67
+ }, ne = () => {
68
+ const e3 = [], t2 = [];
68
69
  if (O.value.limit && Q.value.length > O.value.limit) {
69
70
  const e4 = Q.value.length - O.value.limit;
70
- for (let l3 = 0; l3 < e4; l3++) Q.value.shift();
71
+ for (let t3 = 0; t3 < e4; t3++) Q.value.shift();
71
72
  }
72
- for (let t2 = 0; t2 < Q.value.length; t2++) e3.push(Q.value[t2].showName), l2.push(Q.value[t2].serverPath);
73
- y(z.pageContext.entity, U, l2.join(",")), y(z.pageContext.entity, B, e3.join(",")), l2.length > 0 && (R.value = "");
74
- }, ne = l(null), ue = l(null);
73
+ for (let l2 = 0; l2 < Q.value.length; l2++) e3.push(Q.value[l2].showName), t2.push(Q.value[l2].serverPath);
74
+ y(z.pageContext.entity, U, t2.join(",")), y(z.pageContext.entity, B, e3.join(",")), t2.length > 0 && (R.value = "");
75
+ }, ue = t(null), re = t(null);
75
76
  return o(() => {
76
- S.$on(J.value + "-pickFileDone", (e3) => {
77
+ N.$on(J.value + "-pickFileDone", (e3) => {
77
78
  L.value.pickFileDone(e3);
78
- }), i(() => {
79
- const e3 = h(A, U), l2 = { showName: h(A, B), serverPath: e3 };
80
- C(l2, z.pageContext, z.configure, { formItemRef: ne.value, componentRef: L.value, titleRef: ue.value, value: l2, entity: z.pageContext.entity.data, pageData: z.pageContext.entity.page });
79
+ }), a(() => {
80
+ const e3 = (e4, t3, l3) => {
81
+ if (!t3) return;
82
+ const o2 = [t3, ...l3 || []];
83
+ for (const t4 of o2) try {
84
+ const l4 = T(z.pageContext, t4, "", false);
85
+ if (null != l4 && "" !== l4) {
86
+ y(z.pageContext.entity, e4, l4);
87
+ break;
88
+ }
89
+ } catch (e5) {
90
+ break;
91
+ }
92
+ };
93
+ null == A.data.ID && null == A.data.id && (e3(U, E.propDefaultValue, E.morePropDefaultValue), e3(B, E.propNameDefaultValue, E.morePropNameDefaultValue));
94
+ const t2 = h(A, U), l2 = { showName: h(A, B), serverPath: t2 };
95
+ C(l2, z.pageContext, z.configure, { formItemRef: ue.value, componentRef: L.value, titleRef: re.value, value: l2, entity: z.pageContext.entity.data, pageData: z.pageContext.entity.page });
81
96
  });
82
- }), a(() => {
83
- S.$off(J.value + "-pickFileDone");
97
+ }), i(() => {
98
+ N.$off(J.value + "-pickFileDone");
84
99
  }), _2({ addRequiredClass: function() {
85
- R.value = N();
86
- } }), (e3, l2) => {
87
- const t2 = n("el-form-item");
88
- return O.value.tittleShow ? (s(), u(t2, { key: 0, ref_key: "formItemRef", ref: ne, required: O.value.required, class: f(d(q) + (R.value ? " " + R.value : "")), "label-width": O.value.labelWidth, style: p(d(D)) }, m({ default: v(() => [M.value ? (s(), u(d(P), { key: 0, ref_key: "fileUploadRef", ref: L, style: { width: "100%" }, disabled: "disabled" === O.value.state, displayType: O.value.displayType, accept: O.value.accept, multiple: O.value.multiple, placeholder: O.value.placeholder, limit: O.value.limit, "limit-file-size": O.value.limitFileSize, "disabled-no-preview": O.value.disabledNoPreview, "disabled-no-download": O.value.disabledNoDownload, openCameraOrChoosePhoto: O.value.openCameraOrChoosePhoto, "sort-type": O.value.sortType, "file-info": V.value, "file-list": Q.value, "system-code": e3.pageContext.systemCode, componentId: J.value, watermark: d(G), "on-success": oe, "on-remove": ie, "before-upload": Z, "on-error": le, "before-remove": te, pageContext: e3.pageContext, "file-show-type": O.value.fileShowType }, null, 8, ["disabled", "displayType", "accept", "multiple", "placeholder", "limit", "limit-file-size", "disabled-no-preview", "disabled-no-download", "openCameraOrChoosePhoto", "sort-type", "file-info", "file-list", "system-code", "componentId", "watermark", "pageContext", "file-show-type"])) : r("", true)]), _: 2 }, [O.value.tittleShow ? { name: "label", fn: v(() => [c("div", { ref_key: "titleRef", ref: ue, style: p({ ...d(W), ...d($) }), class: "amb-form-item-label" }, g(d(j)(O.value.title)), 5)]), key: "0" } : void 0]), 1032, ["required", "class", "label-width", "style"])) : M.value ? (s(), u(d(P), { key: 1, ref_key: "fileUploadRef", ref: L, style: { width: "100%" }, disabled: "disabled" === O.value.state, displayType: O.value.displayType, accept: O.value.accept, multiple: O.value.multiple, placeholder: O.value.placeholder, limit: O.value.limit, "limit-file-size": O.value.limitFileSize, "disabled-no-preview": O.value.disabledNoPreview, "disabled-no-download": O.value.disabledNoDownload, openCameraOrChoosePhoto: O.value.openCameraOrChoosePhoto, "sort-type": O.value.sortType, "file-info": V.value, "file-list": Q.value, "system-code": e3.pageContext.systemCode, componentId: J.value, watermark: d(G), "on-success": oe, "on-remove": ie, "before-upload": Z, "on-error": le, "before-remove": te, pageContext: e3.pageContext, "file-show-type": O.value.fileShowType }, null, 8, ["disabled", "displayType", "accept", "multiple", "placeholder", "limit", "limit-file-size", "disabled-no-preview", "disabled-no-download", "openCameraOrChoosePhoto", "sort-type", "file-info", "file-list", "system-code", "componentId", "watermark", "pageContext", "file-show-type"])) : r("", true);
100
+ R.value = j();
101
+ } }), (e3, t2) => {
102
+ const l2 = n("el-form-item");
103
+ return O.value.tittleShow ? (p(), u(l2, { key: 0, ref_key: "formItemRef", ref: ue, required: O.value.required, class: f(d(W) + (R.value ? " " + R.value : "")), "label-width": O.value.labelWidth, style: s(d(q)) }, m({ default: c(() => [M.value ? (p(), u(d(P), { key: 0, ref_key: "fileUploadRef", ref: L, style: { width: "100%" }, disabled: "disabled" === O.value.state, displayType: O.value.displayType, accept: O.value.accept, multiple: O.value.multiple, placeholder: O.value.placeholder, limit: O.value.limit, "limit-file-size": O.value.limitFileSize, "disabled-no-preview": O.value.disabledNoPreview, "disabled-no-download": O.value.disabledNoDownload, openCameraOrChoosePhoto: O.value.openCameraOrChoosePhoto, "sort-type": O.value.sortType, "file-info": X.value, "file-list": Q.value, "system-code": e3.pageContext.systemCode, componentId: J.value, watermark: d(G), "on-success": ae, "on-remove": ie, "before-upload": ee, "on-error": le, "before-remove": oe, pageContext: e3.pageContext, "file-show-type": O.value.fileShowType }, null, 8, ["disabled", "displayType", "accept", "multiple", "placeholder", "limit", "limit-file-size", "disabled-no-preview", "disabled-no-download", "openCameraOrChoosePhoto", "sort-type", "file-info", "file-list", "system-code", "componentId", "watermark", "pageContext", "file-show-type"])) : r("", true)]), _: 2 }, [O.value.tittleShow ? { name: "label", fn: c(() => [v("div", { ref_key: "titleRef", ref: re, style: s({ ...d(V), ...d($) }), class: "amb-form-item-label" }, g(d(S)(O.value.title)), 5)]), key: "0" } : void 0]), 1032, ["required", "class", "label-width", "style"])) : M.value ? (p(), u(d(P), { key: 1, ref_key: "fileUploadRef", ref: L, style: { width: "100%" }, disabled: "disabled" === O.value.state, displayType: O.value.displayType, accept: O.value.accept, multiple: O.value.multiple, placeholder: O.value.placeholder, limit: O.value.limit, "limit-file-size": O.value.limitFileSize, "disabled-no-preview": O.value.disabledNoPreview, "disabled-no-download": O.value.disabledNoDownload, openCameraOrChoosePhoto: O.value.openCameraOrChoosePhoto, "sort-type": O.value.sortType, "file-info": X.value, "file-list": Q.value, "system-code": e3.pageContext.systemCode, componentId: J.value, watermark: d(G), "on-success": ae, "on-remove": ie, "before-upload": ee, "on-error": le, "before-remove": oe, pageContext: e3.pageContext, "file-show-type": O.value.fileShowType }, null, 8, ["disabled", "displayType", "accept", "multiple", "placeholder", "limit", "limit-file-size", "disabled-no-preview", "disabled-no-download", "openCameraOrChoosePhoto", "sort-type", "file-info", "file-list", "system-code", "componentId", "watermark", "pageContext", "file-show-type"])) : r("", true);
89
104
  };
90
105
  } });
91
106
  export {
@@ -1,6 +1,6 @@
1
- import { defineComponent as e, ref as t, onMounted as l, nextTick as o, onUnmounted as a, resolveComponent as i, createBlock as n, createCommentVNode as u, openBlock as r, normalizeStyle as p, normalizeClass as s, unref as f, createSlots as d, withCtx as c, createElementVNode as m, toDisplayString as v } from "vue";
2
- import { getVariableValue as g, setVariableValue as h } from "../../../../utils/page-helper-util.js";
3
- import { handleAfterInitEvent as y, fileUploadBeforeUpload as C, fileUploadBeforeDelete as x, fileUploadUploaded as w, fileUploadDeleted as b } from "../../../../utils/events/event-util.js";
1
+ import { defineComponent as e, ref as t, onMounted as l, nextTick as o, onUnmounted as a, resolveComponent as i, createBlock as n, createCommentVNode as u, openBlock as r, normalizeStyle as p, normalizeClass as s, unref as f, createSlots as d, withCtx as m, createElementVNode as c, toDisplayString as v } from "vue";
2
+ import { getVariableValue as g, setVariableValue as y } from "../../../../utils/page-helper-util.js";
3
+ import { handleAfterInitEvent as h, fileUploadBeforeUpload as C, fileUploadBeforeDelete as x, fileUploadUploaded as w, fileUploadDeleted as b } from "../../../../utils/events/event-util.js";
4
4
  import k from "agilebuilder-ui/src/utils/request";
5
5
  import { FsImageUpload as I } from "agilebuilder-ui";
6
6
  import j from "../../../../utils/eventBus.js";
@@ -9,7 +9,7 @@ import { addRequiredClassUtil as P } from "../../../../utils/common-util.js";
9
9
  import { getRelativeBaseUrl as T } from "agilebuilder-ui/src/utils/common-util";
10
10
  const _ = e({ __name: "imageupload-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: _2 }) {
11
11
  var _a, _b, _c, _d, _e, _f, _g;
12
- const N = e2, O = t(null), z = N.configure.runtime ? N.configure.runtime : {}, R = t(z.props ? z.props : {}), D = z.style, F = z.class, q = z.headerStyle, W = z.titleExceedStyle, $ = N.pageContext.entity ? N.pageContext.entity : {}, A = N.configure.props.base ? N.configure.props.base : {}, E = V(A.prop), U = V(A.propName);
12
+ const N = e2, O = t(null), z = N.configure.runtime ? N.configure.runtime : {}, D = t(z.props ? z.props : {}), R = z.style, F = z.class, q = z.headerStyle, W = z.titleExceedStyle, $ = N.pageContext.entity ? N.pageContext.entity : {}, A = N.configure.props.base ? N.configure.props.base : {}, E = V(A.prop), U = V(A.propName);
13
13
  let B = t({});
14
14
  B.value.isShowWatermark = void 0 === ((_b = (_a = N.configure.props) == null ? void 0 : _a.watermark) == null ? void 0 : _b.isShowWatermark) ? "true" : ((_c = N.configure.props) == null ? void 0 : _c.watermark.isShowWatermark) + "", B.value.content = ((_e = (_d = N.configure.props) == null ? void 0 : _d.watermark) == null ? void 0 : _e.content) ? (_g = (_f = N.configure.props) == null ? void 0 : _f.watermark) == null ? void 0 : _g.content : "";
15
15
  const G = N.pageContext.code, H = t(E ? G + "__" + E.join("__") : null), J = g($, E), K = t(null), L = t(false), M = t([]), Q = t({});
@@ -18,7 +18,7 @@ const _ = e({ __name: "imageupload-runtime", props: { pageContext: {}, configure
18
18
  }
19
19
  function X(e3) {
20
20
  N.pageContext.fileuploadInfo || (N.pageContext.fileuploadInfo = []);
21
- return -1 === N.pageContext.fileuploadInfo.findIndex((e4) => e4.uuid === N.configure.uuid) && N.pageContext.fileuploadInfo.push({ uuid: N.configure.uuid, label: S(R.value.title) }), e3.pageContext || (e3.pageContext = N.pageContext), e3.configure || (e3.configureObj = N.configure), C(e3);
21
+ return -1 === N.pageContext.fileuploadInfo.findIndex((e4) => e4.uuid === N.configure.uuid) && N.pageContext.fileuploadInfo.push({ uuid: N.configure.uuid, label: S(D.value.title) }), e3.pageContext || (e3.pageContext = N.pageContext), e3.configure || (e3.configureObj = N.configure), C(e3);
22
22
  }
23
23
  function Y() {
24
24
  if (N.pageContext.fileuploadInfo && N.configure.uuid) {
@@ -47,7 +47,7 @@ const _ = e({ __name: "imageupload-runtime", props: { pageContext: {}, configure
47
47
  const a2 = t2[e6];
48
48
  l2.push(o2[a2].fileName), M.value.push({ showName: o2[a2].fileName, serverPath: a2, fileSize: o2[a2].fileSize });
49
49
  }
50
- "input" === R.value.displayType && (Q.value.showName = l2.join(","), Q.value.serverPath = t2.join(","));
50
+ "input" === D.value.displayType && (Q.value.showName = l2.join(","), Q.value.serverPath = t2.join(","));
51
51
  }).finally(() => {
52
52
  L.value = true;
53
53
  });
@@ -62,19 +62,19 @@ const _ = e({ __name: "imageupload-runtime", props: { pageContext: {}, configure
62
62
  oe(), t2 = { file: e3 }, b(N.pageContext, N.configure, t2);
63
63
  }, oe = () => {
64
64
  const e3 = [], t2 = [];
65
- if (R.value.limit && M.value.length > R.value.limit) {
66
- const e4 = M.value.length - R.value.limit;
65
+ if (D.value.limit && M.value.length > D.value.limit) {
66
+ const e4 = M.value.length - D.value.limit;
67
67
  for (let t3 = 0; t3 < e4; t3++) M.value.shift();
68
68
  }
69
69
  for (let l2 = 0; l2 < M.value.length; l2++) e3.push(M.value[l2].showName), t2.push(M.value[l2].serverPath);
70
- h(N.pageContext.entity, E, t2.join(",")), h(N.pageContext.entity, U, e3.join(",")), t2.length > 0 && (O.value = "");
70
+ y(N.pageContext.entity, E, t2.join(",")), y(N.pageContext.entity, U, e3.join(",")), t2.length > 0 && (O.value = "");
71
71
  }, ae = t(null), ie = t(null);
72
72
  return l(() => {
73
73
  j.$on(H.value + "-pickFileDone", (e3) => {
74
74
  K.value.pickFileDone(e3);
75
75
  }), o(() => {
76
76
  const e3 = g($, E), t2 = { showName: g($, U), serverPath: e3 };
77
- y(t2, N.pageContext, N.configure, { formItemRef: ae.value, componentRef: K.value, titleRef: ie.value, value: t2, entity: N.pageContext.entity.data, pageData: N.pageContext.entity.page });
77
+ h(t2, N.pageContext, N.configure, { formItemRef: ae.value, componentRef: K.value, titleRef: ie.value, value: t2, entity: N.pageContext.entity.data, pageData: N.pageContext.entity.page });
78
78
  });
79
79
  }), a(() => {
80
80
  j.$off(H.value + "-pickFileDone");
@@ -82,7 +82,7 @@ const _ = e({ __name: "imageupload-runtime", props: { pageContext: {}, configure
82
82
  O.value = P();
83
83
  } }), (e3, t2) => {
84
84
  const l2 = i("el-form-item");
85
- return R.value.tittleShow ? (r(), n(l2, { key: 0, ref_key: "formItemRef", ref: ae, required: R.value.required, class: s(f(F) + (O.value ? " " + O.value : "")), "label-width": R.value.labelWidth, style: p(f(D)) }, d({ default: c(() => [L.value ? (r(), n(f(I), { key: 0, ref_key: "fileUploadRef", ref: K, style: { width: "100%" }, accept: R.value.accept && Object.keys(R.value.accept).length > 0 ? R.value.accept : "image/*", disabled: "disabled" === R.value.state, displayType: R.value.displayType, multiple: R.value.multiple, placeholder: R.value.placeholder, limit: R.value.limit, "limit-file-size": R.value.limitFileSize, "disabled-no-download": R.value.disabledNoDownload, openCameraOrChoosePhoto: R.value.openCameraOrChoosePhoto, "sort-type": R.value.sortType, "file-info": Q.value, "file-list": M.value, "system-code": e3.pageContext.systemCode, componentId: H.value, watermark: f(B), "on-success": te, "on-remove": le, "before-upload": X, "before-remove": ee, "on-error": Z, pageContext: e3.pageContext, "file-show-type": R.value.fileShowType }, null, 8, ["accept", "disabled", "displayType", "multiple", "placeholder", "limit", "limit-file-size", "disabled-no-download", "openCameraOrChoosePhoto", "sort-type", "file-info", "file-list", "system-code", "componentId", "watermark", "pageContext", "file-show-type"])) : u("", true)]), _: 2 }, [R.value.tittleShow ? { name: "label", fn: c(() => [m("div", { ref_key: "titleRef", ref: ie, style: p({ ...f(q), ...f(W) }), class: "amb-form-item-label" }, v(f(S)(R.value.title)), 5)]), key: "0" } : void 0]), 1032, ["required", "class", "label-width", "style"])) : L.value ? (r(), n(f(I), { key: 1, ref_key: "fileUploadRef", ref: K, style: { width: "100%" }, accept: R.value.accept, disabled: "disabled" === R.value.state, displayType: R.value.displayType, multiple: R.value.multiple, placeholder: R.value.placeholder, limit: R.value.limit, "limit-file-size": R.value.limitFileSize, "disabled-no-download": R.value.disabledNoDownload, openCameraOrChoosePhoto: R.value.openCameraOrChoosePhoto, "sort-type": R.value.sortType, "file-info": Q.value, "file-list": M.value, "system-code": e3.pageContext.systemCode, componentId: H.value, watermark: f(B), "on-success": te, "on-remove": le, "before-upload": X, "before-remove": ee, "on-error": Z, pageContext: e3.pageContext, "file-show-type": R.value.fileShowType }, null, 8, ["accept", "disabled", "displayType", "multiple", "placeholder", "limit", "limit-file-size", "disabled-no-download", "openCameraOrChoosePhoto", "sort-type", "file-info", "file-list", "system-code", "componentId", "watermark", "pageContext", "file-show-type"])) : u("", true);
85
+ return D.value.tittleShow ? (r(), n(l2, { key: 0, ref_key: "formItemRef", ref: ae, required: D.value.required, class: s(f(F) + (O.value ? " " + O.value : "")), "label-width": D.value.labelWidth, style: p(f(R)) }, d({ default: m(() => [L.value ? (r(), n(f(I), { key: 0, ref_key: "fileUploadRef", ref: K, style: { width: "100%" }, accept: D.value.accept && Object.keys(D.value.accept).length > 0 ? D.value.accept : "image/*", disabled: "disabled" === D.value.state, displayType: D.value.displayType, multiple: D.value.multiple, placeholder: D.value.placeholder, limit: D.value.limit, "limit-file-size": D.value.limitFileSize, "max-display-count": D.value.maxDisplayCount, "disabled-no-download": D.value.disabledNoDownload, openCameraOrChoosePhoto: D.value.openCameraOrChoosePhoto, "sort-type": D.value.sortType, "file-info": Q.value, "file-list": M.value, "system-code": e3.pageContext.systemCode, componentId: H.value, watermark: f(B), "on-success": te, "on-remove": le, "before-upload": X, "before-remove": ee, "on-error": Z, pageContext: e3.pageContext, "file-show-type": D.value.fileShowType }, null, 8, ["accept", "disabled", "displayType", "multiple", "placeholder", "limit", "limit-file-size", "max-display-count", "disabled-no-download", "openCameraOrChoosePhoto", "sort-type", "file-info", "file-list", "system-code", "componentId", "watermark", "pageContext", "file-show-type"])) : u("", true)]), _: 2 }, [D.value.tittleShow ? { name: "label", fn: m(() => [c("div", { ref_key: "titleRef", ref: ie, style: p({ ...f(q), ...f(W) }), class: "amb-form-item-label" }, v(f(S)(D.value.title)), 5)]), key: "0" } : void 0]), 1032, ["required", "class", "label-width", "style"])) : L.value ? (r(), n(f(I), { key: 1, ref_key: "fileUploadRef", ref: K, style: { width: "100%" }, accept: D.value.accept, disabled: "disabled" === D.value.state, displayType: D.value.displayType, multiple: D.value.multiple, placeholder: D.value.placeholder, limit: D.value.limit, "limit-file-size": D.value.limitFileSize, "max-display-count": D.value.maxDisplayCount, "disabled-no-download": D.value.disabledNoDownload, openCameraOrChoosePhoto: D.value.openCameraOrChoosePhoto, "sort-type": D.value.sortType, "file-info": Q.value, "file-list": M.value, "system-code": e3.pageContext.systemCode, componentId: H.value, watermark: f(B), "on-success": te, "on-remove": le, "before-upload": X, "before-remove": ee, "on-error": Z, pageContext: e3.pageContext, "file-show-type": D.value.fileShowType }, null, 8, ["accept", "disabled", "displayType", "multiple", "placeholder", "limit", "limit-file-size", "max-display-count", "disabled-no-download", "openCameraOrChoosePhoto", "sort-type", "file-info", "file-list", "system-code", "componentId", "watermark", "pageContext", "file-show-type"])) : u("", true);
86
86
  };
87
87
  } });
88
88
  export {
@@ -2,7 +2,7 @@ import t from "./richtext-runtime.vue2.js";
2
2
  /* empty css */
3
3
  /* empty css */
4
4
  import e from "../../../../../../_virtual/_plugin-vue_export-helper.js";
5
- const r = e(t, [["__scopeId", "data-v-faf97d0c"]]);
5
+ const r = e(t, [["__scopeId", "data-v-69991d69"]]);
6
6
  export {
7
7
  r as default
8
8
  };
@@ -1,31 +1,31 @@
1
- import { defineComponent as e, ref as t, watch as l, onMounted as n, nextTick as o, onBeforeUnmount as i, resolveComponent as a, createElementBlock as r, openBlock as u, Fragment as s, createVNode as c, createBlock as d, createCommentVNode as p, normalizeStyle as f, normalizeClass as m, unref as v, createSlots as g, withCtx as h, createElementVNode as b, toDisplayString as y } from "vue";
1
+ import { defineComponent as e, ref as t, watch as l, onMounted as n, nextTick as o, onBeforeUnmount as r, resolveComponent as i, createElementBlock as a, openBlock as u, Fragment as s, createVNode as c, createBlock as d, createCommentVNode as f, normalizeStyle as p, normalizeClass as m, unref as g, createSlots as v, withCtx as h, createElementVNode as b, toDisplayString as y } from "vue";
2
2
  import { getFormModelFields as x } from "../../../../utils/page-init-util.js";
3
- import { getSizeConfig as k, formatVariableValue as w, getVariableValue as C, setVariableValue as q } from "../../../../utils/page-helper-util.js";
4
- import { handleAfterInitEvent as T, handleFormEvent as S } from "../../../../utils/events/event-util.js";
3
+ import { getSizeConfig as k, formatVariableValue as q, getVariableValue as w, setVariableValue as C } from "../../../../utils/page-helper-util.js";
4
+ import { handleAfterInitEvent as S, handleFormEvent as A } from "../../../../utils/events/event-util.js";
5
5
  import E from "agilebuilder-ui/src/utils/request";
6
- import { $t as A } from "../../../../utils/i18n-util.js";
6
+ import { $t as T } from "../../../../utils/i18n-util.js";
7
7
  import { getBaseUrl as L, addRequiredClassUtil as H } from "../../../../utils/common-util.js";
8
8
  import M from "quill";
9
9
  import "quill/dist/quill.snow.css";
10
10
  import { ElMessage as N } from "element-plus";
11
- const R = { class: "toolbar-right-btns" }, _ = ["title"], j = { class: "richtext-statusbar" }, V = { class: "word-count" }, $ = { key: 0, class: "upload-loading" }, z = ["innerHTML"], B = e({ __name: "richtext-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: B2 }) {
12
- const F = ["12px", "14px", "16px", "18px", "20px", "24px", "28px", "32px", "36px", "48px"], U = M.import("attributors/style/size");
13
- U.whitelist = F, M.register(U, true);
14
- const D = [false, "Source Han Sans CN", "SimSun", "SimHei", "Microsoft YaHei", "KaiTi", "FangSong", "Arial", "Times New Roman", "Verdana", "Georgia", "Courier New"], W = M.import("attributors/style/font");
15
- W.whitelist = D, M.register(W, true);
16
- const P = e2, G = t(""), I = P.pageContext.entity ? P.pageContext.entity : {}, K = x(P.pageContext, P.configure), O = P.configure.runtime ? P.configure.runtime : {}, Y = O.style, J = O.class, Q = O.headerStyle, X = O.titleExceedStyle, Z = t(O.props ? O.props : {});
11
+ const R = { class: "toolbar-right-btns" }, _ = ["title"], j = { class: "richtext-statusbar" }, F = { class: "word-count" }, V = { key: 0, class: "upload-loading" }, W = ["innerHTML"], z = e({ __name: "richtext-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: z2 }) {
12
+ const B = ["12px", "14px", "16px", "18px", "20px", "24px", "28px", "32px", "36px", "48px"], D = M.import("attributors/style/size");
13
+ D.whitelist = B, M.register(D, true);
14
+ const U = [false, "Source Han Sans CN", "SimSun", "SimHei", "Microsoft YaHei", "KaiTi", "FangSong", "Arial", "Times New Roman", "Verdana", "Georgia", "Courier New"], $ = M.import("attributors/style/font");
15
+ $.whitelist = U, M.register($, true);
16
+ const P = e2, O = t(""), G = P.pageContext.entity ? P.pageContext.entity : {}, I = x(P.pageContext, P.configure), K = P.configure.runtime ? P.configure.runtime : {}, Y = K.style, J = K.class, Q = K.headerStyle, X = K.titleExceedStyle, Z = t(K.props ? K.props : {});
17
17
  let ee = k(P.pageContext, P.configure);
18
18
  ee && ee.fixHeight && (Y.height || (Y.height = ee.fixHeight + "px"));
19
19
  let te = Z.value.value;
20
- const le = w(P.pageContext, te), ne = t(null);
20
+ const le = q(P.pageContext, te), ne = t(null);
21
21
  let oe = null;
22
- const ie = t(false), ae = t(0), re = t(false), ue = t(false), se = t("");
22
+ const re = t(false), ie = t(0), ae = t(false), ue = t(false), se = t("");
23
23
  let ce = null, de = Z.value.state;
24
- function pe(e3) {
24
+ function fe(e3) {
25
25
  return "readonly" == e3 || "disabled" == e3;
26
26
  }
27
- const fe = pe(de), me = t({ modules: { toolbar: [["bold", "italic", "underline", "strike"], ["blockquote", "code-block"], [{ list: "ordered" }, { list: "bullet" }], [{ script: "sub" }, { script: "super" }], [{ indent: "-1" }, { indent: "+1" }], [{ direction: "rtl" }], [{ size: F }], [{ header: [1, 2, 3, 4, 5, 6, false] }], [{ color: [] }, { background: [] }], [{ font: D }], [{ align: [] }], ["clean"], ["link", "image"]] }, theme: "snow", placeholder: fe ? "" : Z.value.placeholder, readOnly: fe });
28
- function ve() {
27
+ const pe = fe(de), me = t({ modules: { toolbar: [["bold", "italic", "underline", "strike"], ["blockquote", "code-block"], [{ list: "ordered" }, { list: "bullet" }], [{ script: "sub" }, { script: "super" }], [{ indent: "-1" }, { indent: "+1" }], [{ direction: "rtl" }], [{ size: B }], [{ header: [1, 2, 3, 4, 5, 6, false] }], [{ color: [] }, { background: [] }], [{ font: U }], [{ align: [] }], ["clean"], ["link", "image"]] }, theme: "snow", placeholder: pe ? "" : Z.value.placeholder, readOnly: pe });
28
+ function ge() {
29
29
  if (!(oe == null ? void 0 : oe.container)) return;
30
30
  const e3 = oe.container.parentNode;
31
31
  if (!e3) return;
@@ -37,80 +37,99 @@ const R = { class: "toolbar-right-btns" }, _ = ["title"], j = { class: "richtext
37
37
  const e3 = Z.value.state;
38
38
  if (null != e3 && e3 !== de) {
39
39
  de = e3;
40
- const t2 = pe(de);
40
+ const t2 = fe(de);
41
41
  oe && (oe.enable(!t2), oe.root.dataset.placeholder = t2 ? "" : Z.value.placeholder);
42
42
  }
43
43
  });
44
- const ge = t([]), he = t(false), be = t(null), ye = t(null), xe = t(null);
44
+ const ve = t([]), he = t(false), be = t(null), ye = t(null), xe = t(null);
45
45
  let ke = null;
46
- function we(e3) {
46
+ function qe(e3) {
47
47
  const t2 = e3.match(/serverPath=([^&"]+)/);
48
48
  return t2 ? t2[1] : "";
49
49
  }
50
- function Ce(e3) {
50
+ function we(e3) {
51
51
  if (!oe) return;
52
52
  const t2 = function(e4) {
53
- let t3 = e4.replace(/<img data-uuid="(.*?)"/g, (e5, t4) => {
54
- const l3 = we(t4), n2 = P.pageContext.backendUrl;
55
- return `<img src="${L(n2, P.pageContext.isTest)}/common/fs-upload/download?serverPath=${l3}&isShowWatermark=false" data-uuid="${l3}"`;
53
+ if (!e4) return e4;
54
+ const t3 = new DOMParser().parseFromString(e4, "text/html"), l3 = P.pageContext.backendUrl, n2 = L(l3, P.pageContext.isTest);
55
+ t3.querySelectorAll("th").forEach((e5) => {
56
+ const l4 = t3.createElement("td");
57
+ for (const t4 of Array.from(e5.attributes)) l4.setAttribute(t4.name, t4.value);
58
+ l4.style.fontWeight = "bold", l4.innerHTML = e5.innerHTML, e5.replaceWith(l4);
59
+ }), t3.querySelectorAll("img[data-uuid]").forEach((e5) => {
60
+ const t4 = e5, l4 = t4.getAttribute("data-uuid");
61
+ l4 && t4.setAttribute("src", `${n2}/common/fs-upload/download?serverPath=${l4}&isShowWatermark=false`);
56
62
  });
57
- return t3 = t3.replace(/\t/g, "    "), t3 = t3.replace(/ {2}/g, "  "), t3;
63
+ let o2 = t3.body.innerHTML;
64
+ return o2 = o2.replace(/\t/g, "    "), o2 = o2.replace(/ {2}/g, "  "), o2;
58
65
  }(e3), l2 = oe.clipboard.convertHTML(t2);
59
66
  oe.setContents(l2.ops), o(() => {
60
67
  if (!oe) return;
61
68
  oe.root.querySelectorAll("img").forEach((e4) => {
62
69
  if (!e4.getAttribute("data-uuid")) {
63
- const t3 = we(e4.src);
64
- e4.setAttribute("data-uuid", t3);
70
+ const t3 = qe(e4.src);
71
+ t3 && e4.setAttribute("data-uuid", t3);
65
72
  }
73
+ }), oe && oe.root.querySelectorAll("table").forEach((e4) => {
74
+ const t3 = e4.querySelector("tr");
75
+ t3 && t3.querySelectorAll("td").forEach((e5) => {
76
+ e5.querySelector("strong, b") && (e5.style.backgroundColor = "#f5f7fa");
77
+ });
66
78
  });
67
79
  });
68
80
  }
69
- const qe = { bold: "加粗", italic: "斜体", underline: "下划线", strike: "删除线", blockquote: "引用", "code-block": "代码块", 'list[value="ordered"]': "有序列表", 'list[value="bullet"]': "无序列表", 'script[value="sub"]': "下标", 'script[value="super"]': "上标", 'indent[value="-1"]': "减少缩进", 'indent[value="+1"]': "增加缩进", 'direction[value="rtl"]': "文字方向", size: "字体大小", header: "标题", color: "字体颜色", background: "背景颜色", font: "字体", align: "对齐方式", clean: "清除格式", link: "链接", image: "图片" };
70
- function Te() {
71
- ie.value = !ie.value, o(() => {
72
- !ie.value && (oe == null ? void 0 : oe.container) && (oe.container.style.height = ""), ve();
81
+ const Ce = { bold: "加粗", italic: "斜体", underline: "下划线", strike: "删除线", blockquote: "引用", "code-block": "代码块", 'list[value="ordered"]': "有序列表", 'list[value="bullet"]': "无序列表", 'script[value="sub"]': "下标", 'script[value="super"]': "上标", 'indent[value="-1"]': "减少缩进", 'indent[value="+1"]': "增加缩进", 'direction[value="rtl"]': "文字方向", size: "字体大小", header: "标题", color: "字体颜色", background: "背景颜色", font: "字体", align: "对齐方式", clean: "清除格式", link: "链接", image: "图片" };
82
+ function Se() {
83
+ re.value = !re.value, o(() => {
84
+ !re.value && (oe == null ? void 0 : oe.container) && (oe.container.style.height = ""), ge();
73
85
  });
74
86
  }
75
- function Se() {
87
+ function Ae() {
76
88
  oe && (se.value = oe.root.innerHTML, ue.value = true);
77
89
  }
78
90
  function Ee() {
79
- if (!oe) return void (ae.value = 0);
91
+ if (!oe) return void (ie.value = 0);
80
92
  const e3 = oe.getText().trim();
81
- ae.value = e3.length;
93
+ ie.value = e3.length;
82
94
  }
83
- function Ae() {
95
+ function Te() {
96
+ if (!oe) return "";
97
+ const e3 = oe.root.cloneNode(true);
98
+ return e3.querySelectorAll("img[data-uuid]").forEach((e4) => {
99
+ e4.getAttribute("data-uuid") && e4.removeAttribute("src");
100
+ }), e3.innerHTML;
101
+ }
102
+ function Le() {
84
103
  N.error({ message: "图片上传失败,请重试", duration: 3e3 });
85
104
  }
86
- function Le(e3) {
87
- "Escape" === e3.key && ie.value && (ie.value = false, o(() => {
88
- (oe == null ? void 0 : oe.container) && (oe.container.style.height = ""), ve();
105
+ function He(e3) {
106
+ "Escape" === e3.key && re.value && (re.value = false, o(() => {
107
+ (oe == null ? void 0 : oe.container) && (oe.container.style.height = ""), ge();
89
108
  }));
90
109
  }
91
- function He(e3) {
110
+ function Me(e3) {
92
111
  var _a;
93
- oe && (null !== e3.relatedTarget && ((_a = ne.value) == null ? void 0 : _a.contains(e3.relatedTarget)) || S(oe.root.innerHTML, P.pageContext, P.configure, "change", { entity: I }));
112
+ oe && (null !== e3.relatedTarget && ((_a = ne.value) == null ? void 0 : _a.contains(e3.relatedTarget)) || A(Te(), P.pageContext, P.configure, "change", { entity: G }));
94
113
  }
95
- function Me(e3) {
114
+ function Ne(e3) {
96
115
  if ("img" === e3.target.localName) {
97
- ge.value = [];
116
+ ve.value = [];
98
117
  let t2 = e3.target.src;
99
- ge.value.push(t2), he.value = true;
118
+ ve.value.push(t2), he.value = true;
100
119
  }
101
120
  }
102
- function Ne(e3) {
121
+ function Re(e3) {
103
122
  const t2 = new FormData();
104
123
  t2.append("file", e3);
105
124
  const l2 = P.pageContext.backendUrl, n2 = L(l2, P.pageContext.isTest);
106
125
  return E.post(n2 + "/common/fs-upload/rich-editor-image", t2, { headers: { "Content-Type": "multipart/form-data" } });
107
126
  }
108
- function Re(e3, t2) {
109
- const l2 = e3.split(","), n2 = l2[0].match(/:(.*?);/), o2 = n2 ? n2[1] : "image/png", i2 = atob(l2[1]);
110
- let a2 = i2.length;
111
- const r2 = new Uint8Array(a2);
112
- for (; a2--; ) r2[a2] = i2.charCodeAt(a2);
113
- return new File([r2], t2, { type: o2 });
127
+ function _e(e3, t2) {
128
+ const l2 = e3.split(","), n2 = l2[0].match(/:(.*?);/), o2 = n2 ? n2[1] : "image/png", r2 = atob(l2[1]);
129
+ let i2 = r2.length;
130
+ const a2 = new Uint8Array(i2);
131
+ for (; i2--; ) a2[i2] = r2.charCodeAt(i2);
132
+ return new File([a2], t2, { type: o2 });
114
133
  }
115
134
  return n(() => {
116
135
  var _a;
@@ -122,15 +141,15 @@ const R = { class: "toolbar-right-btns" }, _ = ["title"], j = { class: "richtext
122
141
  const t2 = e4.className.match(/ql-([\w-]+)/);
123
142
  if (t2) {
124
143
  const l2 = t2[1], n2 = `${l2}[value="${e4.value}"]`;
125
- qe[n2] ? e4.setAttribute("data-tooltip", qe[n2]) : qe[l2] && e4.setAttribute("data-tooltip", qe[l2]);
144
+ Ce[n2] ? e4.setAttribute("data-tooltip", Ce[n2]) : Ce[l2] && e4.setAttribute("data-tooltip", Ce[l2]);
126
145
  }
127
146
  }), e3.querySelectorAll(".ql-picker").forEach((e4) => {
128
147
  const t2 = e4.className.match(/ql-(\w+)/);
129
148
  if (t2) {
130
149
  const l2 = t2[1];
131
- if (qe[l2]) {
150
+ if (Ce[l2]) {
132
151
  const t3 = e4.querySelector(".ql-picker-label");
133
- t3 && t3.setAttribute("data-tooltip", qe[l2]);
152
+ t3 && t3.setAttribute("data-tooltip", Ce[l2]);
134
153
  }
135
154
  }
136
155
  });
@@ -140,11 +159,11 @@ const R = { class: "toolbar-right-btns" }, _ = ["title"], j = { class: "richtext
140
159
  e3 && e3.addEventListener("mousedown", (e4) => {
141
160
  e4.preventDefault();
142
161
  });
143
- }(), Ce(le), (_a = ne.value) == null ? void 0 : _a.addEventListener("focusout", He), oe.on("text-change", async function(e3) {
162
+ }(), we(le), (_a = ne.value) == null ? void 0 : _a.addEventListener("focusout", Me), oe.on("text-change", async function(e3) {
144
163
  if (!oe) return;
145
164
  const t2 = oe.root.getElementsByTagName("img");
146
165
  for (const e4 of t2) if (!e4.getAttribute("data-uuid")) {
147
- const t3 = we(e4.src);
166
+ const t3 = qe(e4.src);
148
167
  e4.setAttribute("data-uuid", t3);
149
168
  }
150
169
  if (e3.ops && e3.ops.length > 0) for (const t3 of e3.ops) {
@@ -153,15 +172,15 @@ const R = { class: "toolbar-right-btns" }, _ = ["title"], j = { class: "richtext
153
172
  const t4 = e4.image;
154
173
  if (!t4.startsWith("data:image")) continue;
155
174
  try {
156
- re.value = true;
157
- const e5 = Re(t4, "image.png"), l2 = await Ne(e5);
175
+ ae.value = true;
176
+ const e5 = _e(t4, "image.png"), l2 = await Re(e5);
158
177
  if (!oe) return;
159
178
  const n2 = oe.root.getElementsByTagName("img");
160
179
  for (const e6 of n2) e6.src === t4 && (e6.width = 300, e6.src = l2.url, e6.setAttribute("data-uuid", l2.uuid));
161
180
  } catch (e5) {
162
- Ae();
181
+ Le();
163
182
  } finally {
164
- re.value = false;
183
+ ae.value = false;
165
184
  }
166
185
  }
167
186
  }
@@ -169,31 +188,31 @@ const R = { class: "toolbar-right-btns" }, _ = ["title"], j = { class: "richtext
169
188
  ce && clearTimeout(ce);
170
189
  ce = setTimeout(() => {
171
190
  if (!oe) return;
172
- const e4 = oe.root.innerHTML;
173
- q(I, K, e4), e4 && (G.value = "");
191
+ const e4 = Te();
192
+ C(G, I, e4), e4 && (O.value = "");
174
193
  }, 300);
175
194
  }(), Ee();
176
- }), Ee(), ke = oe.container, ke.addEventListener("click", Me), ve(), o(() => {
177
- const e3 = C(I, K);
178
- T(e3, P.pageContext, P.configure, { formItemRef: be.value, componentRef: ye.value, titleRef: xe.value, value: e3, entity: P.pageContext.entity.data, pageData: P.pageContext.entity.page });
195
+ }), Ee(), ke = oe.container, ke.addEventListener("click", Ne), ge(), o(() => {
196
+ const e3 = w(G, I);
197
+ S(e3, P.pageContext, P.configure, { formItemRef: be.value, componentRef: ye.value, titleRef: xe.value, value: e3, entity: P.pageContext.entity.data, pageData: P.pageContext.entity.page });
179
198
  }));
180
199
  }), n(() => {
181
- document.addEventListener("keydown", Le);
182
- }), i(() => {
183
- document.removeEventListener("keydown", Le), ce && clearTimeout(ce), ne.value && ne.value.removeEventListener("focusout", He), ke && ke.removeEventListener("click", Me);
184
- }), B2({ addRequiredClass: function() {
185
- G.value = H();
200
+ document.addEventListener("keydown", He);
201
+ }), r(() => {
202
+ document.removeEventListener("keydown", He), ce && clearTimeout(ce), ne.value && ne.value.removeEventListener("focusout", Me), ke && ke.removeEventListener("click", Ne);
203
+ }), z2({ addRequiredClass: function() {
204
+ O.value = H();
186
205
  }, setContent: function(e3) {
187
- Ce(e3), Ee();
206
+ we(e3), Ee();
188
207
  }, getContent: function() {
189
208
  return oe ? oe.root.innerHTML : "";
190
209
  } }), (e3, t2) => {
191
- const l2 = a("View"), n2 = a("el-icon"), o2 = a("FullScreen"), i2 = a("Close"), x2 = a("el-form-item"), k2 = a("el-image-viewer"), w2 = a("el-dialog");
192
- return u(), r(s, null, [c(x2, { required: Z.value.required, class: m(v(J) + (G.value ? " " + G.value : "")), "label-width": Z.value.labelWidth, style: f(v(Y)) }, g({ default: h(() => [b("div", { class: m(["richtext-wrapper", { "is-fullscreen": ie.value }]) }, [b("div", { ref_key: "quillEditorRef", ref: ne, style: { width: "100%" } }, null, 512), b("div", R, [b("button", { type: "button", class: "toolbar-btn", onClick: Se, title: "预览" }, [c(n2, null, { default: h(() => [c(l2)]), _: 1 })]), b("button", { type: "button", class: "toolbar-btn", onClick: Te, title: ie.value ? "退出全屏" : "全屏编辑" }, [ie.value ? (u(), d(n2, { key: 1 }, { default: h(() => [c(i2)]), _: 1 })) : (u(), d(n2, { key: 0 }, { default: h(() => [c(o2)]), _: 1 }))], 8, _)]), b("div", j, [b("span", V, "字数:" + y(ae.value), 1)]), re.value ? (u(), r("div", $, t2[2] || (t2[2] = [b("div", { class: "loading-spinner" }, null, -1), b("span", null, "图片上传中...", -1)]))) : p("", true)], 2)]), _: 2 }, [Z.value.tittleShow ? { name: "label", fn: h(() => [b("div", { style: f({ ...v(Q), ...v(X) }), class: "amb-form-item-label" }, y(v(A)(Z.value.title)), 5)]), key: "0" } : void 0]), 1032, ["required", "class", "label-width", "style"]), he.value ? (u(), d(k2, { key: 0, "hide-on-click-modal": "", onClose: t2[0] || (t2[0] = () => {
210
+ const l2 = i("View"), n2 = i("el-icon"), o2 = i("FullScreen"), r2 = i("Close"), x2 = i("el-form-item"), k2 = i("el-image-viewer"), q2 = i("el-dialog");
211
+ return u(), a(s, null, [c(x2, { required: Z.value.required, class: m(g(J) + (O.value ? " " + O.value : "")), "label-width": Z.value.labelWidth, style: p(g(Y)) }, v({ default: h(() => [b("div", { class: m(["richtext-wrapper", { "is-fullscreen": re.value }]) }, [b("div", { ref_key: "quillEditorRef", ref: ne, style: { width: "100%" } }, null, 512), b("div", R, [b("button", { type: "button", class: "toolbar-btn", onClick: Ae, title: "预览" }, [c(n2, null, { default: h(() => [c(l2)]), _: 1 })]), b("button", { type: "button", class: "toolbar-btn", onClick: Se, title: re.value ? "退出全屏" : "全屏编辑" }, [re.value ? (u(), d(n2, { key: 1 }, { default: h(() => [c(r2)]), _: 1 })) : (u(), d(n2, { key: 0 }, { default: h(() => [c(o2)]), _: 1 }))], 8, _)]), b("div", j, [b("span", F, "字数:" + y(ie.value), 1)]), ae.value ? (u(), a("div", V, t2[2] || (t2[2] = [b("div", { class: "loading-spinner" }, null, -1), b("span", null, "图片上传中...", -1)]))) : f("", true)], 2)]), _: 2 }, [Z.value.tittleShow ? { name: "label", fn: h(() => [b("div", { style: p({ ...g(Q), ...g(X) }), class: "amb-form-item-label" }, y(g(T)(Z.value.title)), 5)]), key: "0" } : void 0]), 1032, ["required", "class", "label-width", "style"]), he.value ? (u(), d(k2, { key: 0, "hide-on-click-modal": "", onClose: t2[0] || (t2[0] = () => {
193
212
  he.value = false;
194
- }), "url-list": ge.value }, null, 8, ["url-list"])) : p("", true), c(w2, { modelValue: ue.value, "onUpdate:modelValue": t2[1] || (t2[1] = (e4) => ue.value = e4), title: "内容预览", width: "80%", "close-on-click-modal": true, "append-to-body": true, class: "richtext-preview-dialog" }, { default: h(() => [b("div", { class: "richtext-preview-content ql-editor", innerHTML: se.value }, null, 8, z)]), _: 1 }, 8, ["modelValue"])], 64);
213
+ }), "url-list": ve.value }, null, 8, ["url-list"])) : f("", true), c(q2, { modelValue: ue.value, "onUpdate:modelValue": t2[1] || (t2[1] = (e4) => ue.value = e4), title: "内容预览", width: "80%", "close-on-click-modal": true, "append-to-body": true, class: "richtext-preview-dialog" }, { default: h(() => [b("div", { class: "richtext-preview-content ql-editor", innerHTML: se.value }, null, 8, W)]), _: 1 }, 8, ["modelValue"])], 64);
195
214
  };
196
215
  } });
197
216
  export {
198
- B as default
217
+ z as default
199
218
  };
@@ -1,7 +1,7 @@
1
1
  import e from "./super-page.vue2.js";
2
2
  /* empty css */
3
3
  import p from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const r = p(e, [["__scopeId", "data-v-76cf1d44"]]);
4
+ const r = p(e, [["__scopeId", "data-v-45a38e12"]]);
5
5
  export {
6
6
  r as default
7
7
  };