cloud-web-corejs 1.0.314 → 1.0.316
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/package.json +1 -1
- package/src/app-bootstrap.js +8 -1
- package/src/app-bootstrap.sync.js +8 -1
- package/src/boot-assets.legacy.js +6 -0
- package/src/components/hiprint/view/json-view.vue +4 -4
- package/src/components/mobile/wf/content.vue +2 -2
- package/src/components/table/plugins/cell-area/index.js +1062 -0
- package/src/components/table/plugins/cell-area/index.scss +77 -0
- package/src/components/table/plugins/cell-area/util.js +224 -0
- package/src/components/xform/form-designer/designer.js +1 -0
- package/src/components/xform/form-designer/form-widget/dialog/formDialog.vue +30 -4
- package/src/components/xform/form-designer/form-widget/dialog/searchFormDialog.vue +27 -4
- package/src/components/xform/form-designer/setting-panel/form-setting.vue +60 -39
- package/src/components/xform/form-designer/setting-panel/property-editor/container-tab/tab-lazyRender-editor.vue +27 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/onTabChange-editor.vue +28 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/onTabClick-editor.vue +28 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/project-tag-editor.vue +2 -4
- package/src/components/xform/form-designer/setting-panel/propertyRegister.js +8 -3
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +9 -0
- package/src/components/xform/form-render/container-item/containerItemMixin.js +489 -404
- package/src/components/xform/form-render/container-item/panel-item.vue +1 -1
- package/src/components/xform/form-render/container-item/tab-item.vue +48 -0
- package/src/components/xform/form-render/indexMixin.js +17 -2
- package/src/components/xform/form-render/pageDialogScope.js +54 -0
- package/src/components/xform/icon-picker/index.vue +1 -1
- package/src/components/xform/lang/en-US.js +3 -0
- package/src/components/xform/lang/zh-CN.js +3 -0
- package/src/components/xform/styles/h5-designer.scss +13 -13
- package/src/components/xform/styles/h5-runtime.scss +520 -0
- package/src/components/xform/styles/h5.scss +5 -2
- package/src/components/xform/utils/util.js +1 -0
- package/src/directive/el-drag-dialog/drag.js +32 -2
- package/src/router/index.js +41 -32
- package/src/styles/btn.scss +214 -3
- package/src/styles/dialog.scss +1710 -0
- package/src/styles/element-ui.scss +957 -36
- package/src/styles/index.scss +45 -0
- package/src/styles/layout-skins.scss +840 -0
- package/src/styles/legacy-base.scss +19 -0
- package/src/styles/mixin.scss +8 -0
- package/src/styles/page-shell.scss +723 -0
- package/src/styles/sidebar.scss +15 -0
- package/src/styles/utilities.scss +234 -118
- package/src/styles/variables.scss +28 -0
- package/src/views/user/form/view/list.vue +24 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<container-item-wrapper :widget="widget">
|
|
3
3
|
<div :key="widget.id" class="table-container" v-show="!widget.options.hidden" :style="heightStyle">
|
|
4
|
-
<template v-if="!!widget.widgetList && widget.widgetList.length > 0"
|
|
4
|
+
<template v-if="!!widget.widgetList && widget.widgetList.length > 0">
|
|
5
5
|
<template v-for="(subWidget, swIdx) in widget.widgetList">
|
|
6
6
|
<template v-if="'container' === subWidget.category">
|
|
7
7
|
<component
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
:style="{
|
|
15
15
|
height: widget.options.isFullscreen ? '' : widget.options.height,
|
|
16
16
|
}"
|
|
17
|
+
@tab-click="handleTabClick"
|
|
17
18
|
>
|
|
18
19
|
<el-tab-pane
|
|
19
20
|
v-for="tab in visibleTabs"
|
|
@@ -21,6 +22,7 @@
|
|
|
21
22
|
:label="getI18nLabel(tab.options.label)"
|
|
22
23
|
:disabled="tab.options.disabled"
|
|
23
24
|
:name="tab.options.name"
|
|
25
|
+
:lazy="lazyRender"
|
|
24
26
|
>
|
|
25
27
|
<template v-for="(subWidget, swIdx) in tab.widgetList">
|
|
26
28
|
<template v-if="'container' === subWidget.category">
|
|
@@ -95,12 +97,46 @@ export default {
|
|
|
95
97
|
return !tp.options.hidden;
|
|
96
98
|
});
|
|
97
99
|
},
|
|
100
|
+
/* 懒渲染(P0-1,内存优化):开启后每个页签内容首次激活才挂载、激活后保留(element 的
|
|
101
|
+
el-tab-pane lazy 语义,即"保守版"),未激活页签不建组件、不发数据请求。
|
|
102
|
+
默认关闭——校验(el-form 只认已挂载的 form-item)和跨页签 getWidgetRef 在未激活页签
|
|
103
|
+
上都会失效,必须逐模板审计后由设计器显式开启(见 docs/2026-09 低配电脑渲染进程崩溃内存优化方案.md)。 */
|
|
104
|
+
lazyRender() {
|
|
105
|
+
return this.widget.options.lazyRender === true;
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
watch: {
|
|
109
|
+
visibleTabs(tabs) {
|
|
110
|
+
const formRef = this.getFormRef();
|
|
111
|
+
if (
|
|
112
|
+
formRef
|
|
113
|
+
&& formRef.isFieldControlEnabled()
|
|
114
|
+
&& !tabs.some(tab => tab.options.name === this.activeTabName)
|
|
115
|
+
) {
|
|
116
|
+
this.activeTabName = tabs.length ? tabs[0].options.name : "";
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
/* onTabChange:任何激活页签变化(用户点击 + 脚本 activeTab()/隐藏重置等程序化切换)。
|
|
120
|
+
initActiveTab 在 mounted 的首次赋值不算切换(oldName 为空),避免打开详情即触发联动。 */
|
|
121
|
+
activeTabName(name, oldName) {
|
|
122
|
+
if (!oldName) return;
|
|
123
|
+
if (this.widget.options.onTabChange) {
|
|
124
|
+
new Function("name", "oldName", this.widget.options.onTabChange).call(
|
|
125
|
+
this,
|
|
126
|
+
name,
|
|
127
|
+
oldName
|
|
128
|
+
);
|
|
129
|
+
}
|
|
130
|
+
},
|
|
98
131
|
},
|
|
99
132
|
created() {
|
|
100
133
|
this.initRefList();
|
|
134
|
+
this.handleOnCreated();
|
|
101
135
|
},
|
|
102
136
|
mounted() {
|
|
137
|
+
// 先定初始激活页签再跑 onMounted:懒渲染下脚本里读 activeTabName 时已是最终值
|
|
103
138
|
this.initActiveTab();
|
|
139
|
+
this.handleOnMounted();
|
|
104
140
|
},
|
|
105
141
|
beforeDestroy() {
|
|
106
142
|
this.unregisterFromRefList();
|
|
@@ -118,6 +154,18 @@ export default {
|
|
|
118
154
|
}
|
|
119
155
|
}
|
|
120
156
|
},
|
|
157
|
+
/* onTabClick:仅用户点击页签头(element 原生事件,disabled 页签不会触发)。
|
|
158
|
+
实参对齐编辑器声明;此刻新页签内容(懒渲染)尚未挂载,取新页签内部组件 ref 会拿不到。 */
|
|
159
|
+
handleTabClick(tab) {
|
|
160
|
+
if (this.widget.options.onTabClick) {
|
|
161
|
+
new Function("name", "index", "label", this.widget.options.onTabClick).call(
|
|
162
|
+
this,
|
|
163
|
+
tab.name,
|
|
164
|
+
tab.index != null ? Number(tab.index) : null,
|
|
165
|
+
tab.label
|
|
166
|
+
);
|
|
167
|
+
}
|
|
168
|
+
},
|
|
121
169
|
},
|
|
122
170
|
};
|
|
123
171
|
</script>
|
|
@@ -53,6 +53,7 @@ import html2Canvas from "html2canvas";
|
|
|
53
53
|
import JsPDF from "jspdf";
|
|
54
54
|
import formulaDialog from "@base/components/xform/form-designer/form-widget/dialog/formulaDialog.vue";
|
|
55
55
|
import baseFormulaDialog from "@base/components/xform/form-designer/form-widget/dialog/baseFormulaDialog.vue";
|
|
56
|
+
import { resolveDialogOption } from "@base/components/xform/form-render/pageDialogScope";
|
|
56
57
|
import QRCode from "qrcode";
|
|
57
58
|
import { openLuckysheetDialog } from "@base/components/luckysheet";
|
|
58
59
|
import {
|
|
@@ -164,6 +165,10 @@ modules = {
|
|
|
164
165
|
type: Boolean,
|
|
165
166
|
default: false,
|
|
166
167
|
},
|
|
168
|
+
dialogScope: {
|
|
169
|
+
type: String,
|
|
170
|
+
default: null,
|
|
171
|
+
},
|
|
167
172
|
},
|
|
168
173
|
provide() {
|
|
169
174
|
let e = this;
|
|
@@ -4954,14 +4959,24 @@ modules = {
|
|
|
4954
4959
|
}
|
|
4955
4960
|
},*/
|
|
4956
4961
|
openSearchDialog(option) {
|
|
4957
|
-
this.searchDialogOption =
|
|
4962
|
+
this.searchDialogOption = resolveDialogOption(
|
|
4963
|
+
option,
|
|
4964
|
+
this.formJsonObj?.formConfig,
|
|
4965
|
+
this.dialogScope,
|
|
4966
|
+
this.$el
|
|
4967
|
+
);
|
|
4958
4968
|
this.showSearchDialog = true;
|
|
4959
4969
|
},
|
|
4960
4970
|
confirmSearchDialog(rows) {
|
|
4961
4971
|
this.searchDialogOption.confirm && this.searchDialogOption.confirm(rows);
|
|
4962
4972
|
},
|
|
4963
4973
|
openFormDialog(option) {
|
|
4964
|
-
this.formDialogOption =
|
|
4974
|
+
this.formDialogOption = resolveDialogOption(
|
|
4975
|
+
option,
|
|
4976
|
+
this.formJsonObj?.formConfig,
|
|
4977
|
+
this.dialogScope,
|
|
4978
|
+
this.$el
|
|
4979
|
+
);
|
|
4965
4980
|
this.showFormDialog = true;
|
|
4966
4981
|
},
|
|
4967
4982
|
closeFormDialog() {
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export const PAGE_DIALOG_SCOPE = "page";
|
|
2
|
+
|
|
3
|
+
// 模板里的 top: "25vh" 是按整个窗口居中。当前页面弹框改由页面内容区 flex 居中,
|
|
4
|
+
// 再套视口 vh 会从内容区顶部再下移一截,弹框就偏下。px 等显式偏移仍保留。
|
|
5
|
+
export function pageDialogTop(top) {
|
|
6
|
+
const value = top == null ? "" : String(top).trim();
|
|
7
|
+
if (!value || /vh$/i.test(value)) return "0";
|
|
8
|
+
return value;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const PAGE_HOST_SELECTOR = "[data-xform-page-dialog-host]";
|
|
12
|
+
|
|
13
|
+
export function resolveDialogOption(option, formConfig, inheritedScope, element) {
|
|
14
|
+
const source = option || {};
|
|
15
|
+
const scope = source.dialogScope ?? formConfig?.dialogScope ?? inheritedScope;
|
|
16
|
+
if (scope !== PAGE_DIALOG_SCOPE) return source;
|
|
17
|
+
|
|
18
|
+
const host = element?.closest?.(PAGE_HOST_SELECTOR);
|
|
19
|
+
if (!host) {
|
|
20
|
+
console.warn("xform page dialog host not found; using global dialog");
|
|
21
|
+
return { ...source, dialogScope: "global" };
|
|
22
|
+
}
|
|
23
|
+
return { ...source, dialogScope: PAGE_DIALOG_SCOPE, pageDialogHost: host };
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export const pageScopedDialogMixin = {
|
|
27
|
+
computed: {
|
|
28
|
+
isPageScope() {
|
|
29
|
+
return (
|
|
30
|
+
this.option?.dialogScope === PAGE_DIALOG_SCOPE
|
|
31
|
+
&& !!this.option.pageDialogHost
|
|
32
|
+
);
|
|
33
|
+
},
|
|
34
|
+
pageDialogHasTop() {
|
|
35
|
+
return this.isPageScope && pageDialogTop(this.option.dialogConfig?.top) !== "0";
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
mounted() {
|
|
39
|
+
if (!this.isPageScope) return;
|
|
40
|
+
const dialog = this.$refs.pageDialog;
|
|
41
|
+
const wrapper = dialog?.$el;
|
|
42
|
+
const host = this.option.pageDialogHost;
|
|
43
|
+
if (!wrapper || !host) return;
|
|
44
|
+
host.appendChild(wrapper);
|
|
45
|
+
this.pageDialogWrapper = wrapper;
|
|
46
|
+
// The surrounding menu and route tabs remain interactive.
|
|
47
|
+
dialog.$refs.dialog?.setAttribute("aria-modal", "false");
|
|
48
|
+
},
|
|
49
|
+
beforeDestroy() {
|
|
50
|
+
const wrapper = this.pageDialogWrapper;
|
|
51
|
+
if (wrapper?.parentNode) wrapper.parentNode.removeChild(wrapper);
|
|
52
|
+
this.pageDialogWrapper = null;
|
|
53
|
+
},
|
|
54
|
+
};
|
|
@@ -281,6 +281,9 @@ export default {
|
|
|
281
281
|
tabPaneSetting: "Tab Panes",
|
|
282
282
|
addTabPane: "Add Tab Pane",
|
|
283
283
|
paneActive: "Active",
|
|
284
|
+
lazyRender: "Lazy Render",
|
|
285
|
+
lazyRenderHint:
|
|
286
|
+
"Pane content mounts on first activation and stays mounted; inactive panes render nothing and request no data. Ensure there are no cross-pane getWidgetRef scripts and that fields on unvisited panes need no submit validation. Intended for view/detail templates.",
|
|
284
287
|
customLabelIcon: "Custom Label",
|
|
285
288
|
labelIconClass: "Label Icon Class",
|
|
286
289
|
labelIconPosition: "Label Icon Position",
|
|
@@ -441,6 +441,9 @@ export default {
|
|
|
441
441
|
tabPaneSetting: "选项卡设置",
|
|
442
442
|
addTabPane: "增加选项卡页",
|
|
443
443
|
tabClass: "选项卡样式",
|
|
444
|
+
lazyRender: "懒渲染",
|
|
445
|
+
lazyRenderHint:
|
|
446
|
+
"开启后页签内容首次激活才挂载(激活后保留),未激活页签不渲染、不请求数据。开启前请确认:无跨页签 getWidgetRef 脚本;未访问页签的字段不参与提交校验。适用于详情展示类模板。",
|
|
444
447
|
paneActive: "激活",
|
|
445
448
|
customLabelIcon: "定制字段标签",
|
|
446
449
|
labelIconClass: "标签Icon样式",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
// Core H5 designer-preview styles. Runtime
|
|
2
|
-
@import "~@base/styles/variables.scss";
|
|
3
|
-
|
|
1
|
+
// Core H5 designer-preview styles. Runtime 裸类名基线在 h5-runtime.scss;.xform-h5 覆盖仍在 h5.scss。
|
|
2
|
+
@import "~@base/styles/variables.scss";
|
|
3
|
+
|
|
4
4
|
.form-render-wrapper.h5-layout,
|
|
5
5
|
.el-form.H5-layout,
|
|
6
6
|
.designer-view.h5-layout {
|
|
@@ -88,15 +88,15 @@
|
|
|
88
88
|
float: right;
|
|
89
89
|
-webkit-appearance: none;
|
|
90
90
|
position: relative;
|
|
91
|
-
background: none;
|
|
92
|
-
&:after {
|
|
93
|
-
content: "";
|
|
94
|
-
position: absolute;
|
|
95
|
-
right: 0;
|
|
96
|
-
top: 50%;
|
|
97
|
-
margin-top: -4px;
|
|
98
|
-
border: 4px solid transparent;
|
|
99
|
-
border-left: 5px solid #999;
|
|
91
|
+
background: none;
|
|
92
|
+
&:after {
|
|
93
|
+
content: "";
|
|
94
|
+
position: absolute;
|
|
95
|
+
right: 0;
|
|
96
|
+
top: 50%;
|
|
97
|
+
margin-top: -4px;
|
|
98
|
+
border: 4px solid transparent;
|
|
99
|
+
border-left: 5px solid #999;
|
|
100
100
|
}
|
|
101
101
|
height: 29px;
|
|
102
102
|
padding-right: 12px;
|
|
@@ -188,4 +188,4 @@
|
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
|
-
}
|
|
191
|
+
}
|