super-page-runtime 2.1.933 → 2.2.1
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/es/_virtual/_plugin-vue_export-helper.js +5 -7
- package/dist/es/assets/chart-themes/theme1.js +2 -6
- package/dist/es/assets/chart-themes/theme2.js +2 -6
- package/dist/es/assets/chart-themes/theme3.js +2 -6
- package/dist/es/components/runtime/index.d.ts +2 -1
- package/dist/es/components/runtime/utils/api/api-util.js +4 -7
- package/dist/es/components/runtime/utils/api/page-expose-util.js +137 -435
- package/dist/es/components/runtime/utils/assemblys-config.js +11 -367
- package/dist/es/components/runtime/utils/barcode-util.js +9 -33
- package/dist/es/components/runtime/utils/charts/chart-columnline-util.js +122 -306
- package/dist/es/components/runtime/utils/charts/chart-gauge-util.js +29 -68
- package/dist/es/components/runtime/utils/charts/chart-pie-util.js +68 -152
- package/dist/es/components/runtime/utils/charts/chart-radar-util.js +46 -124
- package/dist/es/components/runtime/utils/charts/chart-scatter-util.js +36 -99
- package/dist/es/components/runtime/utils/charts/chart-util.d.ts +1 -0
- package/dist/es/components/runtime/utils/charts/chart-util.js +226 -485
- package/dist/es/components/runtime/utils/common-util.js +76 -153
- package/dist/es/components/runtime/utils/eventBus.js +3 -9
- package/dist/es/components/runtime/utils/events/event-util.js +343 -727
- package/dist/es/components/runtime/utils/events/print-label.js +72 -140
- package/dist/es/components/runtime/utils/events/standard-event.d.ts +2 -2
- package/dist/es/components/runtime/utils/events/standard-event.js +810 -2299
- package/dist/es/components/runtime/utils/events/validator-util.js +222 -552
- package/dist/es/components/runtime/utils/form/date-shortcuts.js +28 -88
- package/dist/es/components/runtime/utils/form/scan-util.js +61 -162
- package/dist/es/components/runtime/utils/global-refs.js +53 -84
- package/dist/es/components/runtime/utils/i18n-util.js +11 -20
- package/dist/es/components/runtime/utils/interfaces/page-design-types.d.ts +2 -0
- package/dist/es/components/runtime/utils/interfaces/page-design-types.js +2 -7
- package/dist/es/components/runtime/utils/page-helper-util.js +278 -658
- package/dist/es/components/runtime/utils/page-init-util.d.ts +6 -1
- package/dist/es/components/runtime/utils/page-init-util.js +132 -370
- package/dist/es/components/runtime/utils/page-permission-util.js +22 -531
- package/dist/es/components/runtime/utils/page-store.d.ts +2 -2
- package/dist/es/components/runtime/utils/page-store.js +8 -12
- package/dist/es/components/runtime/utils/store-util.js +9 -13
- package/dist/es/components/runtime/utils/store.js +2 -2
- package/dist/es/components/runtime/utils/table-utils.js +45 -84
- package/dist/es/components/runtime/utils/tree-utils.js +17 -37
- package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +19 -75
- package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue2.js +14 -46
- package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +36 -132
- package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue2.js +4 -18
- package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue2.js +17 -107
- package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +50 -198
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue.js +12 -42
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +7 -60
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +52 -169
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue.js +44 -0
- package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue2.js +4 -0
- package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +32 -107
- package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +43 -164
- package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +32 -115
- package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +32 -116
- package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.d.ts +34 -1
- package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +253 -449
- package/dist/es/components/runtime/views/assemblys/chart/table/group-column-item.vue.js +4 -42
- package/dist/es/components/runtime/views/assemblys/chart/table/group-column-item.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/group-column.vue.js +8 -62
- package/dist/es/components/runtime/views/assemblys/chart/table/group-column.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue.js +37 -231
- package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/table-pageination.vue.js +13 -62
- package/dist/es/components/runtime/views/assemblys/chart/table/table-pageination.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +197 -510
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.d.ts +4 -4
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +29 -139
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue.d.ts +6 -6
- package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue.js +21 -125
- package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue.d.ts +6 -6
- package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue.js +16 -102
- package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue2.js +18 -81
- package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue2.js +17 -82
- package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue2.js +14 -86
- package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +21 -79
- package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue2.js +16 -61
- package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue2.js +10 -37
- package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +38 -127
- package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue2.js +28 -76
- package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +61 -178
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +302 -803
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +249 -594
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +40 -115
- package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +56 -215
- package/dist/es/components/runtime/views/assemblys/error-render.vue.d.ts +4 -4
- package/dist/es/components/runtime/views/assemblys/error-render.vue.js +3 -21
- package/dist/es/components/runtime/views/assemblys/error-render.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +42 -154
- package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue.js +34 -98
- package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +52 -200
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +66 -239
- package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +31 -104
- package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +21 -59
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +51 -173
- package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +22 -103
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +57 -249
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +32 -174
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +28 -107
- package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue.js +4 -4
- package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue2.js +13 -50
- package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +61 -189
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +87 -244
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +77 -261
- package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue2.js +13 -57
- package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +30 -155
- package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +40 -129
- package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +22 -107
- package/dist/es/components/runtime/views/assemblys/home-chart-render.vue.d.ts +17 -0
- package/dist/es/components/runtime/views/assemblys/home-chart-render.vue.js +97 -0
- package/dist/es/components/runtime/views/assemblys/home-chart-render.vue2.js +4 -0
- package/dist/es/components/runtime/views/assemblys/object-render.vue.d.ts +1 -1
- package/dist/es/components/runtime/views/assemblys/object-render.vue.js +125 -254
- package/dist/es/components/runtime/views/assemblys/object-render.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/workflow/picture-flow/pictureflow-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/workflow/picture-flow/pictureflow-runtime.vue2.js +18 -46
- package/dist/es/components/runtime/views/assemblys/workflow/text-history/textflow-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/workflow/text-history/textflow-runtime.vue2.js +21 -49
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +20 -58
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-node/workflownode-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-node/workflownode-runtime.vue2.js +16 -53
- package/dist/es/components/runtime/views/home-chart.vue.d.ts +23 -0
- package/dist/es/components/runtime/views/home-chart.vue.js +36 -0
- package/dist/es/components/runtime/views/home-chart.vue2.js +4 -0
- package/dist/es/components/runtime/views/super-page-dialog.vue.d.ts +3 -3
- package/dist/es/components/runtime/views/super-page-dialog.vue.js +20 -134
- package/dist/es/components/runtime/views/super-page-dialog.vue2.js +2 -2
- package/dist/es/components/runtime/views/super-page.vue.d.ts +15 -6
- package/dist/es/components/runtime/views/super-page.vue.js +222 -708
- package/dist/es/components/runtime/views/super-page.vue2.js +2 -2
- package/dist/es/i18n/langs/cn.js +2 -55
- package/dist/es/i18n/langs/en.js +2 -55
- package/dist/es/index.d.ts +2 -2
- package/dist/es/index.js +6 -4
- package/package.json +3 -2
|
@@ -1,254 +1,97 @@
|
|
|
1
|
-
import { defineComponent, ref, watch, onMounted, nextTick, onBeforeUnmount, resolveComponent
|
|
2
|
-
import { getFormModelFields } from "../../../../utils/page-init-util.js";
|
|
3
|
-
import { formatVariableValue, setVariableValue, getVariableValue } from "../../../../utils/page-helper-util.js";
|
|
4
|
-
import
|
|
1
|
+
import { defineComponent as e, ref as t, watch as l, onMounted as n, nextTick as i, onBeforeUnmount as o, resolveComponent as r, createElementBlock as a, openBlock as u, Fragment as s, createBlock as c, createCommentVNode as p, normalizeStyle as d, normalizeClass as g, unref as m, withCtx as f, createElementVNode as v, toDisplayString as h } from "vue";
|
|
2
|
+
import { getFormModelFields as x } from "../../../../utils/page-init-util.js";
|
|
3
|
+
import { formatVariableValue as y, setVariableValue as b, getVariableValue as C } from "../../../../utils/page-helper-util.js";
|
|
4
|
+
import w from "quill";
|
|
5
5
|
import "quill/dist/quill.snow.css";
|
|
6
|
-
import { handleAfterInitEvent, handleFormEvent } from "../../../../utils/events/event-util.js";
|
|
7
|
-
import
|
|
8
|
-
import { $t } from "../../../../utils/i18n-util.js";
|
|
9
|
-
import { getToken } from "agilebuilder-ui/src/utils/auth";
|
|
10
|
-
import { getBaseUrl } from "../../../../utils/common-util.js";
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
let contentVariable = designProperty.value.value;
|
|
29
|
-
const initValue = formatVariableValue(props.pageContext, contentVariable);
|
|
30
|
-
const quillEditorRef = ref(null);
|
|
31
|
-
let quill = null;
|
|
32
|
-
ref(null);
|
|
33
|
-
const fontSize = [
|
|
34
|
-
"12px",
|
|
35
|
-
"13px",
|
|
36
|
-
"14px",
|
|
37
|
-
"15px",
|
|
38
|
-
"16px",
|
|
39
|
-
"18px",
|
|
40
|
-
"20px",
|
|
41
|
-
"24px",
|
|
42
|
-
"28px",
|
|
43
|
-
"32px",
|
|
44
|
-
"36px"
|
|
45
|
-
];
|
|
46
|
-
let hisState = designProperty.value.state;
|
|
47
|
-
function checkReadonly(state) {
|
|
48
|
-
return state == "readonly" || state == "disabled";
|
|
49
|
-
}
|
|
50
|
-
const initReadonly = checkReadonly(hisState);
|
|
51
|
-
const option = ref({
|
|
52
|
-
modules: {
|
|
53
|
-
toolbar: [
|
|
54
|
-
["bold", "italic", "underline", "strike"],
|
|
55
|
-
// 加粗 斜体 下划线 删除线
|
|
56
|
-
["blockquote", "code-block"],
|
|
57
|
-
// 引用
|
|
58
|
-
[{ list: "ordered" }, { list: "bullet" }],
|
|
59
|
-
// 有序、无序列表
|
|
60
|
-
[{ script: "sub" }, { script: "super" }],
|
|
61
|
-
// 上标/下标
|
|
62
|
-
[{ indent: "-1" }, { indent: "+1" }],
|
|
63
|
-
// 缩进
|
|
64
|
-
[{ direction: "rtl" }],
|
|
65
|
-
// 文本方向
|
|
66
|
-
[{ size: fontSize }],
|
|
67
|
-
// 字体大小
|
|
68
|
-
[{ header: [1, 2, 3, 4, 5, 6, false] }],
|
|
69
|
-
// 标题
|
|
70
|
-
[{ color: [] }, { background: [] }],
|
|
71
|
-
// 字体颜色、字体背景颜色
|
|
72
|
-
[{ font: [] }],
|
|
73
|
-
// 字体种类
|
|
74
|
-
[{ align: [] }],
|
|
75
|
-
// 对齐方式
|
|
76
|
-
["clean"],
|
|
77
|
-
// 清除文本格式
|
|
78
|
-
["link", "image"]
|
|
79
|
-
// 链接、图片、视频
|
|
80
|
-
]
|
|
81
|
-
},
|
|
82
|
-
theme: "snow",
|
|
83
|
-
placeholder: initReadonly ? "" : designProperty.value.placeholder,
|
|
84
|
-
readOnly: initReadonly
|
|
85
|
-
});
|
|
86
|
-
watch(designProperty.value, () => {
|
|
87
|
-
const newState = designProperty.value.state;
|
|
88
|
-
if (newState != void 0 && newState !== hisState) {
|
|
89
|
-
hisState = newState;
|
|
90
|
-
const isReadonly = checkReadonly(hisState);
|
|
91
|
-
if (quill) {
|
|
92
|
-
quill.enable(!isReadonly);
|
|
93
|
-
quill.root.dataset.placeholder = isReadonly ? "" : designProperty.value.placeholder;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
function updateEditorHeight() {
|
|
98
|
-
if (quill && quill.container) {
|
|
99
|
-
const parentNode = quill.container.parentNode;
|
|
100
|
-
const parentRect = parentNode.getBoundingClientRect();
|
|
101
|
-
const thisRect = quill.container.getBoundingClientRect();
|
|
102
|
-
let newHeight = parentRect.height - (thisRect.top - parentRect.top);
|
|
103
|
-
if (newHeight < 100) {
|
|
104
|
-
newHeight = 100;
|
|
105
|
-
}
|
|
106
|
-
quill.container.style.height = newHeight + "px";
|
|
107
|
-
}
|
|
6
|
+
import { handleAfterInitEvent as k, handleFormEvent as q } from "../../../../utils/events/event-util.js";
|
|
7
|
+
import T from "agilebuilder-ui/src/utils/request";
|
|
8
|
+
import { $t as j } from "../../../../utils/i18n-util.js";
|
|
9
|
+
import { getToken as E } from "agilebuilder-ui/src/utils/auth";
|
|
10
|
+
import { getBaseUrl as L } from "../../../../utils/common-util.js";
|
|
11
|
+
const R = { style: { width: "100%", height: "100%" } }, S = e({ __name: "richtext-runtime", props: { pageContext: {}, configure: {} }, setup(e2) {
|
|
12
|
+
const S2 = e2, _ = S2.pageContext.entity ? S2.pageContext.entity : {}, B = x(S2.pageContext, S2.configure), H = S2.configure.runtime ? S2.configure.runtime : {}, M = H.style, N = H.class, A = H.headerStyle, D = H.titleExceedStyle, F = t(H.props ? H.props : {});
|
|
13
|
+
let U = F.value.value;
|
|
14
|
+
const W = y(S2.pageContext, U), z = t(null);
|
|
15
|
+
let I = null;
|
|
16
|
+
t(null);
|
|
17
|
+
let O = F.value.state;
|
|
18
|
+
function G(e3) {
|
|
19
|
+
return "readonly" == e3 || "disabled" == e3;
|
|
20
|
+
}
|
|
21
|
+
const J = G(O), K = 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: ["12px", "13px", "14px", "15px", "16px", "18px", "20px", "24px", "28px", "32px", "36px"] }], [{ header: [1, 2, 3, 4, 5, 6, false] }], [{ color: [] }, { background: [] }], [{ font: [] }], [{ align: [] }], ["clean"], ["link", "image"]] }, theme: "snow", placeholder: J ? "" : F.value.placeholder, readOnly: J });
|
|
22
|
+
l(F.value, () => {
|
|
23
|
+
const e3 = F.value.state;
|
|
24
|
+
if (null != e3 && e3 !== O) {
|
|
25
|
+
O = e3;
|
|
26
|
+
const t2 = G(O);
|
|
27
|
+
I && (I.enable(!t2), I.root.dataset.placeholder = t2 ? "" : F.value.placeholder);
|
|
108
28
|
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
}).catch((err) => {
|
|
144
|
-
console.error(err, "上传图片失败");
|
|
145
|
-
});
|
|
29
|
+
});
|
|
30
|
+
const P = t([]), Q = t(false), V = t(null), X = t(null), Y = t(null);
|
|
31
|
+
function Z(e3) {
|
|
32
|
+
var _a;
|
|
33
|
+
null !== e3.relatedTarget && ((_a = z.value) == null ? void 0 : _a.contains(e3.relatedTarget)) || q(I.root.innerHTML, S2.pageContext, S2.configure, "change", { entity: _ });
|
|
34
|
+
}
|
|
35
|
+
function $(e3) {
|
|
36
|
+
const t2 = new FormData();
|
|
37
|
+
t2.append("file", e3);
|
|
38
|
+
const l2 = S2.pageContext.backendUrl, n2 = L(l2, S2.pageContext.isTest);
|
|
39
|
+
return T.post(n2 + "/common/fs-upload/rich-editor-image", t2, { headers: { "Content-Type": "multipart/form-data" } });
|
|
40
|
+
}
|
|
41
|
+
function ee(e3, t2) {
|
|
42
|
+
let l2 = e3.split(","), n2 = l2[0].match(/:(.*?);/)[1], i2 = atob(l2[1]), o2 = i2.length, r2 = new Uint8Array(o2);
|
|
43
|
+
for (; o2--; ) r2[o2] = i2.charCodeAt(o2);
|
|
44
|
+
return new File([r2], t2, { type: n2 });
|
|
45
|
+
}
|
|
46
|
+
return n(() => {
|
|
47
|
+
var _a;
|
|
48
|
+
I = new w(z.value, K.value);
|
|
49
|
+
const e3 = I.clipboard.convertHTML(W);
|
|
50
|
+
I.setContents(e3.ops), (_a = z.value) == null ? void 0 : _a.addEventListener("focusout", Z), I.on("text-change", async function(e4, t2, l2) {
|
|
51
|
+
if (e4.ops && e4.ops.length > 0) for (let t3 = 0; t3 < e4.ops.length; t3++) {
|
|
52
|
+
const l3 = e4.ops[t3];
|
|
53
|
+
if (l3.insert && l3.insert.image) {
|
|
54
|
+
const e5 = l3.insert.image;
|
|
55
|
+
if (!e5.startsWith("data:image")) return;
|
|
56
|
+
const t4 = ee(e5, "image.png");
|
|
57
|
+
await $(t4).then((t5) => {
|
|
58
|
+
if (!I) return;
|
|
59
|
+
const l4 = I.root.getElementsByTagName("img");
|
|
60
|
+
if (l4 && l4.length > 0) for (let n2 = 0; n2 < l4.length; n2++) {
|
|
61
|
+
const i2 = l4[n2];
|
|
62
|
+
i2.src === e5 && (i2.src = t5.url + "&jwt=" + E());
|
|
146
63
|
}
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
setVariableValue(entity, dynamicFields, quill.root.innerHTML);
|
|
150
|
-
});
|
|
151
|
-
const editorContainer = quill.container;
|
|
152
|
-
editorContainer.addEventListener("click", function(event) {
|
|
153
|
-
if (event.target.localName === "img") {
|
|
154
|
-
previewList.value = [];
|
|
155
|
-
let imgSrc = event.target.src;
|
|
156
|
-
previewList.value.push(imgSrc);
|
|
157
|
-
showViewer.value = true;
|
|
64
|
+
}).catch((e6) => {
|
|
65
|
+
});
|
|
158
66
|
}
|
|
159
|
-
});
|
|
160
|
-
updateEditorHeight();
|
|
161
|
-
nextTick(() => {
|
|
162
|
-
const value = getVariableValue(entity, dynamicFields);
|
|
163
|
-
handleAfterInitEvent(
|
|
164
|
-
value,
|
|
165
|
-
props.pageContext,
|
|
166
|
-
props.configure,
|
|
167
|
-
{
|
|
168
|
-
formItemRef: formItemRef.value,
|
|
169
|
-
componentRef: componentRef.value,
|
|
170
|
-
titleRef: titleRef.value,
|
|
171
|
-
value,
|
|
172
|
-
entity: props.pageContext.entity.data,
|
|
173
|
-
pageData: props.pageContext.entity.page
|
|
174
|
-
}
|
|
175
|
-
);
|
|
176
|
-
});
|
|
177
|
-
});
|
|
178
|
-
onBeforeUnmount(() => {
|
|
179
|
-
if (quillEditorRef.value) {
|
|
180
|
-
quillEditorRef.value.removeEventListener("focusout", handleFocusOut);
|
|
181
67
|
}
|
|
68
|
+
b(_, B, I.root.innerHTML);
|
|
182
69
|
});
|
|
183
|
-
function
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
});
|
|
70
|
+
I.container.addEventListener("click", function(e4) {
|
|
71
|
+
if ("img" === e4.target.localName) {
|
|
72
|
+
P.value = [];
|
|
73
|
+
let t2 = e4.target.src;
|
|
74
|
+
P.value.push(t2), Q.value = true;
|
|
189
75
|
}
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
headers: {
|
|
196
|
-
"Content-Type": "multipart/form-data"
|
|
197
|
-
}
|
|
198
|
-
};
|
|
199
|
-
const backendUrl = props.pageContext.backendUrl;
|
|
200
|
-
const baseUrl = getBaseUrl(backendUrl, props.pageContext.isTest);
|
|
201
|
-
return http.post(baseUrl + "/common/fs-upload/rich-editor-image", params, config);
|
|
202
|
-
}
|
|
203
|
-
function dataURLtoFile(dataurl, filename) {
|
|
204
|
-
let arr = dataurl.split(",");
|
|
205
|
-
let mime = arr[0].match(/:(.*?);/)[1];
|
|
206
|
-
let bstr = atob(arr[1]), n = bstr.length, u8arr = new Uint8Array(n);
|
|
207
|
-
while (n--) {
|
|
208
|
-
u8arr[n] = bstr.charCodeAt(n);
|
|
76
|
+
}), function() {
|
|
77
|
+
if (I && I.container) {
|
|
78
|
+
const e4 = I.container.parentNode.getBoundingClientRect(), t2 = I.container.getBoundingClientRect();
|
|
79
|
+
let l2 = e4.height - (t2.top - e4.top);
|
|
80
|
+
l2 < 100 && (l2 = 100), I.container.style.height = l2 + "px";
|
|
209
81
|
}
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
label: withCtx(() => [
|
|
224
|
-
designProperty.value.tittleShow ? (openBlock(), createElementBlock("div", {
|
|
225
|
-
key: 0,
|
|
226
|
-
style: normalizeStyle({ ...unref(headerStyle), ...unref(titleExceedStyle) })
|
|
227
|
-
}, toDisplayString(unref($t)(designProperty.value.title)), 5)) : createCommentVNode("", true)
|
|
228
|
-
]),
|
|
229
|
-
default: withCtx(() => [
|
|
230
|
-
createElementVNode("div", _hoisted_1, [
|
|
231
|
-
createElementVNode("div", {
|
|
232
|
-
ref_key: "quillEditorRef",
|
|
233
|
-
ref: quillEditorRef,
|
|
234
|
-
style: { "width": "100%" }
|
|
235
|
-
}, null, 512)
|
|
236
|
-
])
|
|
237
|
-
]),
|
|
238
|
-
_: 1
|
|
239
|
-
}, 8, ["required", "class", "label-width", "style"])) : createCommentVNode("", true),
|
|
240
|
-
showViewer.value ? (openBlock(), createBlock(_component_el_image_viewer, {
|
|
241
|
-
key: 1,
|
|
242
|
-
"hide-on-click-modal": "",
|
|
243
|
-
onClose: _cache[0] || (_cache[0] = () => {
|
|
244
|
-
showViewer.value = false;
|
|
245
|
-
}),
|
|
246
|
-
"url-list": previewList.value
|
|
247
|
-
}, null, 8, ["url-list"])) : createCommentVNode("", true)
|
|
248
|
-
], 64);
|
|
249
|
-
};
|
|
250
|
-
}
|
|
251
|
-
});
|
|
82
|
+
}(), i(() => {
|
|
83
|
+
const e4 = C(_, B);
|
|
84
|
+
k(e4, S2.pageContext, S2.configure, { formItemRef: V.value, componentRef: X.value, titleRef: Y.value, value: e4, entity: S2.pageContext.entity.data, pageData: S2.pageContext.entity.page });
|
|
85
|
+
});
|
|
86
|
+
}), o(() => {
|
|
87
|
+
z.value && z.value.removeEventListener("focusout", Z);
|
|
88
|
+
}), (e3, t2) => {
|
|
89
|
+
const l2 = r("el-form-item"), n2 = r("el-image-viewer");
|
|
90
|
+
return u(), a(s, null, [F.value.tittleShow ? (u(), c(l2, { key: 0, required: F.value.required, class: g(m(N)), "label-width": F.value.labelWidth, style: d(m(M)) }, { label: f(() => [F.value.tittleShow ? (u(), a("div", { key: 0, style: d({ ...m(A), ...m(D) }) }, h(m(j)(F.value.title)), 5)) : p("", true)]), default: f(() => [v("div", R, [v("div", { ref_key: "quillEditorRef", ref: z, style: { width: "100%" } }, null, 512)])]), _: 1 }, 8, ["required", "class", "label-width", "style"])) : p("", true), Q.value ? (u(), c(n2, { key: 1, "hide-on-click-modal": "", onClose: t2[0] || (t2[0] = () => {
|
|
91
|
+
Q.value = false;
|
|
92
|
+
}), "url-list": P.value }, null, 8, ["url-list"])) : p("", true)], 64);
|
|
93
|
+
};
|
|
94
|
+
} });
|
|
252
95
|
export {
|
|
253
|
-
|
|
96
|
+
S as default
|
|
254
97
|
};
|