super-page-runtime 2.0.80 → 2.0.85
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/components/runtime/utils/api/api-util.js +6 -0
- package/dist/es/components/runtime/utils/common-util.d.ts +8 -0
- package/dist/es/components/runtime/utils/common-util.js +20 -0
- package/dist/es/components/runtime/utils/events/event-util.js +4 -0
- package/dist/es/components/runtime/utils/events/standard-event.js +5 -3
- package/dist/es/components/runtime/utils/interfaces/page-design-types.d.ts +1 -0
- package/dist/es/components/runtime/utils/page-helper-util.js +3 -4
- package/dist/es/components/runtime/utils/page-init-util.js +14 -4
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +3 -1
- package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +8 -1
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +5 -1
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +5 -1
- package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +20 -10
- package/dist/es/components/runtime/views/assemblys/object-render.vue.js +24 -10
- package/dist/es/components/runtime/views/super-page.vue.js +2 -1
- package/package.json +2 -2
|
@@ -75,6 +75,9 @@ function getCommonFormData(pageContext, id) {
|
|
|
75
75
|
});
|
|
76
76
|
param["listCodes"] = listCodes;
|
|
77
77
|
}
|
|
78
|
+
if (pageContext.refercePropMap) {
|
|
79
|
+
param["refercePropMap"] = pageContext.refercePropMap;
|
|
80
|
+
}
|
|
78
81
|
const urlForView = backendUrl + "/dsc/commons/gets";
|
|
79
82
|
http.post(urlForView, param).then((commonEntity) => {
|
|
80
83
|
if (commonEntity) {
|
|
@@ -155,6 +158,9 @@ function getWorkflowFormData(pageContext, id) {
|
|
|
155
158
|
if (pageContext.beanName) {
|
|
156
159
|
param["beanName"] = pageContext.beanName;
|
|
157
160
|
}
|
|
161
|
+
if (pageContext.refercePropMap) {
|
|
162
|
+
param["refercePropMap"] = pageContext.refercePropMap;
|
|
163
|
+
}
|
|
158
164
|
const baseUrl = getBaseUrl(pageContext.backendUrl, pageContext.isTest);
|
|
159
165
|
const urlForView = baseUrl + "/dsc/workflow-commons/gets";
|
|
160
166
|
http.post(urlForView, param).then((commonEntity) => {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { Component } from './interfaces/page-design-types';
|
|
2
|
+
|
|
1
3
|
export declare function isArrayFn(value: any): boolean;
|
|
2
4
|
export declare function getBaseUrl(backendUrl: any, isTest?: boolean): any;
|
|
3
5
|
export declare function getRealRestApiPath(orgRestApiPath: any, systemCode: any, backendUrl: any, isTest?: boolean): any;
|
|
@@ -15,3 +17,9 @@ export declare function getListCode(pageCode: any, pageVersion: any, tableUuid:
|
|
|
15
17
|
*/
|
|
16
18
|
export declare function deepCopy(srcObj: any): any;
|
|
17
19
|
export declare function getWorkflowId(pageContext: any): any;
|
|
20
|
+
/**
|
|
21
|
+
* 获得当前属性名,封装到class中,操作dom时可能会使用
|
|
22
|
+
* @param configure
|
|
23
|
+
* @returns
|
|
24
|
+
*/
|
|
25
|
+
export declare function getPropClassName(configure: Component): any;
|
|
@@ -96,10 +96,30 @@ function getWorkflowId(pageContext) {
|
|
|
96
96
|
}
|
|
97
97
|
return workflowId;
|
|
98
98
|
}
|
|
99
|
+
function getPropClassName(configure) {
|
|
100
|
+
var _a, _b, _c, _d;
|
|
101
|
+
let propClassName;
|
|
102
|
+
if (configure && ((_b = (_a = configure.props) == null ? void 0 : _a.base) == null ? void 0 : _b.prop)) {
|
|
103
|
+
let prop = (_d = (_c = configure.props) == null ? void 0 : _c.base) == null ? void 0 : _d.prop;
|
|
104
|
+
if (prop.indexOf("${") >= 0) {
|
|
105
|
+
prop = prop.substring(2, prop.lastIndexOf("}"));
|
|
106
|
+
}
|
|
107
|
+
const props = prop.split(".");
|
|
108
|
+
if (props.length === 2) {
|
|
109
|
+
propClassName = props[1];
|
|
110
|
+
} else if (props.length === 3) {
|
|
111
|
+
propClassName = props[1] + "__" + props[2];
|
|
112
|
+
}
|
|
113
|
+
} else if (configure.code) {
|
|
114
|
+
propClassName = configure.code;
|
|
115
|
+
}
|
|
116
|
+
return propClassName;
|
|
117
|
+
}
|
|
99
118
|
export {
|
|
100
119
|
deepCopy,
|
|
101
120
|
getBaseUrl,
|
|
102
121
|
getListCode,
|
|
122
|
+
getPropClassName,
|
|
103
123
|
getRealRestApiPath,
|
|
104
124
|
getWorkflowId,
|
|
105
125
|
isArrayFn,
|
|
@@ -208,6 +208,10 @@ function buttonClickEvent(pageContext, configure, eventParams) {
|
|
|
208
208
|
function doValidateForm(pageContext, configure, eventParams) {
|
|
209
209
|
const events = configure.runtime && configure.runtime.events ? configure.runtime.events : [];
|
|
210
210
|
let isEnableRequired = true;
|
|
211
|
+
console.log("doValidateForm---eventParams=", eventParams);
|
|
212
|
+
if (eventParams == null ? void 0 : eventParams.skipValidate) {
|
|
213
|
+
isEnableRequired = false;
|
|
214
|
+
}
|
|
211
215
|
const clickEventFunObj = getClickEventFuncByType(pageContext, events, "click");
|
|
212
216
|
if (clickEventFunObj) {
|
|
213
217
|
const isStandardEvent = clickEventFunObj.isStandard;
|
|
@@ -251,7 +251,7 @@ function exportFormReport(pageContext, configureObj, templateFile, isPdf) {
|
|
|
251
251
|
const isWorkflowForm = pageContext.workflowCode ? true : false;
|
|
252
252
|
const beanName = pageContext.beanName;
|
|
253
253
|
const button = configureObj.props.base;
|
|
254
|
-
const tableName = configureObj.tableName;
|
|
254
|
+
const tableName = configureObj.tableName ? configureObj.tableName : pageContext.tableName;
|
|
255
255
|
const backendUrl = pageContext.backendUrl;
|
|
256
256
|
const viewModels = pageContext.entity.data;
|
|
257
257
|
const isPermission = button.isPermission === void 0 || button.isPermission === "true" || button.isPermission;
|
|
@@ -765,6 +765,7 @@ function deleteFunc(params) {
|
|
|
765
765
|
type: "warning",
|
|
766
766
|
message: getI18n().t("superPageRuntimeMessage.pleaseSelectRecord")
|
|
767
767
|
});
|
|
768
|
+
resolve(true);
|
|
768
769
|
return;
|
|
769
770
|
}
|
|
770
771
|
ElMessageBox.confirm(
|
|
@@ -782,7 +783,7 @@ function deleteFunc(params) {
|
|
|
782
783
|
const configureBase = configureObj.props.base;
|
|
783
784
|
const systemCode = pageContext.systemCode;
|
|
784
785
|
const backendUrl = pageContext.backendUrl;
|
|
785
|
-
const tableUuid = configureObj.props.base.tableUuid;
|
|
786
|
+
const tableUuid = configureObj.props.base.tableUuid ? configureObj.props.base.tableUuid : params.tableUuid;
|
|
786
787
|
const tableName = getTableNameByTableUuid(pageContext, tableUuid);
|
|
787
788
|
const baseUrl = getBaseUrl(backendUrl, pageContext.isTest);
|
|
788
789
|
let path = baseUrl + "/dsc/commons/" + tableName;
|
|
@@ -913,8 +914,9 @@ function doImportFinally(params, fileObj) {
|
|
|
913
914
|
const pageContext = params.pageContext;
|
|
914
915
|
const buttonConfigureObj = params.configureObj;
|
|
915
916
|
const tableConfigure = params.tableConfigure;
|
|
916
|
-
const tableName = pageContext.tableName;
|
|
917
917
|
const buttonConfigureBase = buttonConfigureObj.props.base;
|
|
918
|
+
const tableUuid = buttonConfigureObj.props.base.tableUuid ? buttonConfigureObj.props.base.tableUuid : params.tableUuid;
|
|
919
|
+
const tableName = getTableNameByTableUuid(pageContext, tableUuid);
|
|
918
920
|
const param = new FormData();
|
|
919
921
|
param.append("multipartFile", fileObj);
|
|
920
922
|
if (tableName) {
|
|
@@ -306,14 +306,13 @@ function setVariableValue(entity, fields, newValue) {
|
|
|
306
306
|
let tempObj = entity;
|
|
307
307
|
for (let i = 0; i < fields.length; i++) {
|
|
308
308
|
const fieldName = fields[i];
|
|
309
|
-
if (i + 1
|
|
309
|
+
if (i + 1 === fields.length) {
|
|
310
310
|
tempObj[fieldName] = newValue;
|
|
311
311
|
} else {
|
|
312
|
-
|
|
313
|
-
if (tempObj == void 0) {
|
|
312
|
+
if (tempObj[fieldName] === void 0) {
|
|
314
313
|
tempObj[fieldName] = {};
|
|
315
|
-
tempObj = tempObj[fieldName];
|
|
316
314
|
}
|
|
315
|
+
tempObj = tempObj[fieldName];
|
|
317
316
|
}
|
|
318
317
|
}
|
|
319
318
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import http from "agilebuilder-ui/src/utils/request";
|
|
2
|
-
import "vue-router";
|
|
3
2
|
import { getAdditionalParamMap } from "./events/standard-event.js";
|
|
4
3
|
import { PageDimensions } from "./interfaces/page-design-types.js";
|
|
5
4
|
import { setVariableValue, formatVariableValue, getFormPropName } from "./page-helper-util.js";
|
|
@@ -12,6 +11,7 @@ function queryPageDesignByCode(pageCode) {
|
|
|
12
11
|
);
|
|
13
12
|
}
|
|
14
13
|
function convertToPageContext(pageDesign, pageRequest) {
|
|
14
|
+
var _a;
|
|
15
15
|
if (pageDesign == null) {
|
|
16
16
|
return null;
|
|
17
17
|
}
|
|
@@ -46,6 +46,8 @@ function convertToPageContext(pageDesign, pageRequest) {
|
|
|
46
46
|
// 列表分页信息,格式是:{列表编码: 每页显示多少条记录},表单页面中校验有分页的子表时提示使用,提示信息格式:第 {pageNum} 页第 {row} 行记录
|
|
47
47
|
workflowCode: pageDesign.workflowCode,
|
|
48
48
|
workflowVersion: pageDesign.workflowVersion,
|
|
49
|
+
refercePropMap: (_a = pageDesign.runtime) == null ? void 0 : _a.refercePropMap,
|
|
50
|
+
//当前表单页面中引用字段信息集合,get请求时需要使用,格式为{tableName:[字段名,.. ... ], tableName:[字段名,.. ... ]}
|
|
49
51
|
entity: {
|
|
50
52
|
data: {},
|
|
51
53
|
task: {},
|
|
@@ -185,7 +187,7 @@ function getFormModelFields(pageContext, formItemConfigure, prop) {
|
|
|
185
187
|
multiple = propsBase.multiple;
|
|
186
188
|
}
|
|
187
189
|
const defaultValueSet = propsBase ? propsBase.defaultValue : null;
|
|
188
|
-
|
|
190
|
+
const defaultValue = getDefaultValue(pageContext, defaultValueSet, componentType, multiple);
|
|
189
191
|
if (defaultValue !== void 0 && defaultValue !== null) {
|
|
190
192
|
setVariableValue(entity, fields, defaultValue);
|
|
191
193
|
}
|
|
@@ -309,12 +311,20 @@ function packageFormRules(pageContext, configure) {
|
|
|
309
311
|
}
|
|
310
312
|
function controlObjectRenderState(pageContext, propName) {
|
|
311
313
|
if (pageContext.initInfo) {
|
|
312
|
-
const types = [
|
|
314
|
+
const types = [
|
|
315
|
+
"dynamicControlFormEdit",
|
|
316
|
+
"disableElement",
|
|
317
|
+
"enableElement",
|
|
318
|
+
"hideElement",
|
|
319
|
+
"showElement"
|
|
320
|
+
];
|
|
313
321
|
types.forEach((type) => {
|
|
314
322
|
const infos = pageContext.initInfo[type];
|
|
315
323
|
if (infos) {
|
|
316
324
|
if (type === "dynamicControlFormEdit") {
|
|
317
|
-
let settings = infos.filter(
|
|
325
|
+
let settings = infos.filter(
|
|
326
|
+
(item) => item.name === "_all_fields" || item.name === propName
|
|
327
|
+
);
|
|
318
328
|
if (settings && settings.length > 0) {
|
|
319
329
|
settings = settings.filter((item) => item.name === "_all_fields");
|
|
320
330
|
if (settings && settings.length > 0) {
|
|
@@ -543,7 +543,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
543
543
|
}
|
|
544
544
|
function recieveMessage(event) {
|
|
545
545
|
if (event.data === "close_open_win") {
|
|
546
|
-
gridRef.value
|
|
546
|
+
if (gridRef.value) {
|
|
547
|
+
gridRef.value.refresh();
|
|
548
|
+
}
|
|
547
549
|
}
|
|
548
550
|
}
|
|
549
551
|
function select(selection, row) {
|
|
@@ -14,9 +14,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
14
14
|
let dynamicFields = getFormModelFields(props.pageContext, props.configure);
|
|
15
15
|
const dynamicModelMethod = computed({
|
|
16
16
|
get() {
|
|
17
|
-
|
|
17
|
+
let val = getVariableValue(entity, dynamicFields);
|
|
18
|
+
if (val) {
|
|
19
|
+
val = val.split(",");
|
|
20
|
+
}
|
|
21
|
+
return val;
|
|
18
22
|
},
|
|
19
23
|
set(value) {
|
|
24
|
+
if (value && value.length > 0) {
|
|
25
|
+
value = value.join(",");
|
|
26
|
+
}
|
|
20
27
|
setVariableValue(entity, dynamicFields, value);
|
|
21
28
|
}
|
|
22
29
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, ref, computed, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode, createVNode, createTextVNode } from "vue";
|
|
2
2
|
import { getFormModelFields } from "../../../../utils/page-init-util.js";
|
|
3
3
|
import { getVariableValue } from "../../../../utils/page-helper-util.js";
|
|
4
|
-
import {
|
|
4
|
+
import { handleEvent } from "../../../../utils/events/event-util.js";
|
|
5
5
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
6
|
__name: "link-runtime",
|
|
7
7
|
props: {
|
|
@@ -61,7 +61,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
61
61
|
disabled: designProperty.value.state === "disabled",
|
|
62
62
|
type: designProperty.value.type,
|
|
63
63
|
underline: designProperty.value.underline,
|
|
64
|
-
onClick: _cache[0] || (_cache[0] = ($event) => unref(
|
|
64
|
+
onClick: _cache[0] || (_cache[0] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "click", { skipValidate: true }))
|
|
65
65
|
}, {
|
|
66
66
|
default: withCtx(() => [
|
|
67
67
|
createTextVNode(toDisplayString(dynamicValue.value), 1)
|
|
@@ -14,7 +14,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
14
14
|
let dynamicFields = getFormModelFields(props.pageContext, props.configure);
|
|
15
15
|
const dynamicModelMethod = computed({
|
|
16
16
|
get() {
|
|
17
|
-
|
|
17
|
+
let val = getVariableValue(entity, dynamicFields);
|
|
18
|
+
if (val !== void 0 && val !== null) {
|
|
19
|
+
val = val + "";
|
|
20
|
+
}
|
|
21
|
+
return val;
|
|
18
22
|
},
|
|
19
23
|
set(value) {
|
|
20
24
|
setVariableValue(entity, dynamicFields, value);
|
|
@@ -17,7 +17,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
17
17
|
let dynamicFields = getFormModelFields(props.pageContext, props.configure);
|
|
18
18
|
const dynamicModelMethod = computed({
|
|
19
19
|
get() {
|
|
20
|
-
|
|
20
|
+
let val = getVariableValue(entity, dynamicFields);
|
|
21
|
+
if (val !== void 0 && val !== null) {
|
|
22
|
+
val = val + "";
|
|
23
|
+
}
|
|
24
|
+
return val;
|
|
21
25
|
},
|
|
22
26
|
set(value) {
|
|
23
27
|
setVariableValue(entity, dynamicFields, value);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent,
|
|
1
|
+
import { defineComponent, ref, computed, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode, createVNode } from "vue";
|
|
2
2
|
import { getFormModelFields } from "../../../../utils/page-init-util.js";
|
|
3
3
|
import { getVariableValue, setVariableValue } from "../../../../utils/page-helper-util.js";
|
|
4
4
|
import { handleFormEvent } from "../../../../utils/events/event-util.js";
|
|
@@ -12,20 +12,30 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
12
12
|
const props = __props;
|
|
13
13
|
const entity = props.pageContext.entity ? props.pageContext.entity : {};
|
|
14
14
|
let dynamicFields = getFormModelFields(props.pageContext, props.configure);
|
|
15
|
+
const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
|
|
16
|
+
const runtimeStyle = runtimeInfo.style;
|
|
17
|
+
const runtimeClass = runtimeInfo.class;
|
|
18
|
+
const headerStyle = runtimeInfo.headerStyle;
|
|
19
|
+
const designProperty = ref(runtimeInfo.props ? runtimeInfo.props : {});
|
|
20
|
+
if (designProperty.value.activeValue === void 0 || designProperty.value.activeValue === null) {
|
|
21
|
+
designProperty.value.activeValue = "1";
|
|
22
|
+
}
|
|
23
|
+
if (designProperty.value.inactiveValue === void 0 || designProperty.value.inactiveValue === null) {
|
|
24
|
+
designProperty.value.activeValue = "0";
|
|
25
|
+
}
|
|
26
|
+
const switchStyle = runtimeInfo.switchStyle;
|
|
15
27
|
const dynamicModelMethod = computed({
|
|
16
28
|
get() {
|
|
17
|
-
|
|
29
|
+
let val = getVariableValue(entity, dynamicFields);
|
|
30
|
+
if (val !== void 0 && val !== null) {
|
|
31
|
+
val = val = "";
|
|
32
|
+
}
|
|
33
|
+
return val;
|
|
18
34
|
},
|
|
19
35
|
set(value) {
|
|
20
36
|
setVariableValue(entity, dynamicFields, value);
|
|
21
37
|
}
|
|
22
38
|
});
|
|
23
|
-
const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
|
|
24
|
-
const runtimeStyle = runtimeInfo.style;
|
|
25
|
-
const runtimeClass = runtimeInfo.class;
|
|
26
|
-
const headerStyle = runtimeInfo.headerStyle;
|
|
27
|
-
const designProperty = ref(runtimeInfo.props ? runtimeInfo.props : {});
|
|
28
|
-
const switchStyle = runtimeInfo.switchStyle;
|
|
29
39
|
return (_ctx, _cache) => {
|
|
30
40
|
const _component_el_switch = resolveComponent("el-switch");
|
|
31
41
|
const _component_el_form_item = resolveComponent("el-form-item");
|
|
@@ -44,7 +54,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
44
54
|
default: withCtx(() => [
|
|
45
55
|
createVNode(_component_el_switch, {
|
|
46
56
|
disabled: designProperty.value.state === "disabled",
|
|
47
|
-
"active-value
|
|
57
|
+
"active-value": designProperty.value.activeValue,
|
|
48
58
|
"active-text": designProperty.value.activeText,
|
|
49
59
|
"inactive-value": designProperty.value.inactiveValue,
|
|
50
60
|
"inactive-text": designProperty.value.inactiveText,
|
|
@@ -54,7 +64,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
54
64
|
modelValue: dynamicModelMethod.value,
|
|
55
65
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => dynamicModelMethod.value = $event),
|
|
56
66
|
onChange: _cache[1] || (_cache[1] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "change"))
|
|
57
|
-
}, null, 8, ["disabled", "active-value
|
|
67
|
+
}, null, 8, ["disabled", "active-value", "active-text", "inactive-value", "inactive-text", "width", "size", "style", "modelValue"])
|
|
58
68
|
]),
|
|
59
69
|
_: 1
|
|
60
70
|
}, 8, ["required", "class", "label-width", "style"]);
|
|
@@ -5,6 +5,7 @@ import { PageDimensions } from "../../utils/interfaces/page-design-types.js";
|
|
|
5
5
|
import { addComponentRef, addComponentRefByCode } from "../../utils/global-refs.js";
|
|
6
6
|
import { getPermissionCodes, packageFormRules, controlObjectRenderState } from "../../utils/page-init-util.js";
|
|
7
7
|
import { caculateShowCondition, getFormPropName } from "../../utils/page-helper-util.js";
|
|
8
|
+
import { getPropClassName } from "../../utils/common-util.js";
|
|
8
9
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
9
10
|
__name: "object-render",
|
|
10
11
|
props: {
|
|
@@ -12,6 +13,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
12
13
|
configure: {}
|
|
13
14
|
},
|
|
14
15
|
setup(__props) {
|
|
16
|
+
var _a;
|
|
15
17
|
const props = __props;
|
|
16
18
|
if (props.configure.style == void 0) {
|
|
17
19
|
props.configure.style = {};
|
|
@@ -24,17 +26,25 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
24
26
|
let handleShowFlag = ref(true);
|
|
25
27
|
let showFlag = ref(true);
|
|
26
28
|
if (props.configure && props.configure.props) {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
if (showConditions
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
return caculateShowCondition(props.pageContext, props.configure, showConditions);
|
|
35
|
-
});
|
|
29
|
+
let showConditions = [];
|
|
30
|
+
if ((_a = props.configure.props.base) == null ? void 0 : _a.showConditions) {
|
|
31
|
+
if (typeof props.configure.props.base.showConditions === "string") {
|
|
32
|
+
showConditions = JSON.parse(props.configure.props.base.showConditions);
|
|
33
|
+
} else {
|
|
34
|
+
showConditions = props.configure.props.base.showConditions;
|
|
36
35
|
}
|
|
37
36
|
}
|
|
37
|
+
showFlag = computed(() => {
|
|
38
|
+
var _a2;
|
|
39
|
+
if (!handleShowFlag.value) {
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
const state = (_a2 = props.configure.props.base) == null ? void 0 : _a2.state;
|
|
43
|
+
if (state && state === "hidden") {
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
46
|
+
return caculateShowCondition(props.pageContext, props.configure, showConditions);
|
|
47
|
+
});
|
|
38
48
|
if (props.configure.props.editConditions) {
|
|
39
49
|
const editConditions = props.configure.props.editConditions;
|
|
40
50
|
if (editConditions.length > 0) {
|
|
@@ -58,9 +68,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
58
68
|
const thisRef = ref(null);
|
|
59
69
|
const runtimeStyle = ref({});
|
|
60
70
|
const runtimeClass = ref("");
|
|
71
|
+
const propClassName = getPropClassName(props.configure);
|
|
72
|
+
if (propClassName) {
|
|
73
|
+
runtimeClass.value = propClassName;
|
|
74
|
+
}
|
|
61
75
|
const commonRuntime = props.configure.runtime && props.configure.runtime.common ? props.configure.runtime.common : {};
|
|
62
76
|
if (commonRuntime.class) {
|
|
63
|
-
runtimeClass.value
|
|
77
|
+
runtimeClass.value += " " + commonRuntime.class;
|
|
64
78
|
}
|
|
65
79
|
if (commonRuntime.style) {
|
|
66
80
|
Object.assign(runtimeStyle.value, commonRuntime.style);
|
|
@@ -19,6 +19,7 @@ import { useRoute, useRouter } from "vue-router";
|
|
|
19
19
|
import { jumpToPage } from "agilebuilder-ui/src/utils/jump-page-utils";
|
|
20
20
|
import { setSessionCache } from "agilebuilder-ui/src/utils/auth";
|
|
21
21
|
import { deepCopy } from "../utils/common-util.js";
|
|
22
|
+
const _hoisted_1 = { class: "app-container" };
|
|
22
23
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
23
24
|
__name: "super-page",
|
|
24
25
|
props: {
|
|
@@ -480,7 +481,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
480
481
|
isShowDialog.value = false;
|
|
481
482
|
}
|
|
482
483
|
return (_ctx, _cache) => {
|
|
483
|
-
return openBlock(), createElementBlock("div",
|
|
484
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
484
485
|
isShowPage.value ? (openBlock(), createElementBlock("div", {
|
|
485
486
|
key: 0,
|
|
486
487
|
ref_key: "thisRef",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "super-page-runtime",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.85",
|
|
4
4
|
"description": "AgileBuilder super page runtime",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"main": "dist/es/index.js",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@vitejs/plugin-vue-jsx": "^3.1.0",
|
|
49
49
|
"@vue/eslint-config-prettier": "^8.0.0",
|
|
50
50
|
"@vue/test-utils": "^2.4.4",
|
|
51
|
-
"agilebuilder-ui": "1.0.
|
|
51
|
+
"agilebuilder-ui": "1.0.58",
|
|
52
52
|
"axios": "^1.6.8",
|
|
53
53
|
"cypress": "^13.6.6",
|
|
54
54
|
"element-plus": "^2.6.1",
|