@gct-paas/design 0.1.4-dev.17 → 0.1.4-dev.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.min.css +1 -1
- package/dist/loader.esm.min.js +1 -1
- package/es/components/design-view-layout/design-view-layout.css +11 -11
- package/es/components/design-view-layout/design-view-layout.mjs +1 -1
- package/es/components/field-transfer/components/Transfer/AdvancedTransfer.mjs +6 -1
- package/es/components/field-transfer/components/Transfer/TransferTree.mjs +6 -1
- package/es/hooks/design-view/design-state.d.ts +14 -0
- package/es/hooks/design-view/designer/useDesignModal.d.ts +17 -0
- package/es/hooks/design-view/designer/useDesignPreview.mjs +40 -55
- package/es/hooks/design-view/global/useGlobal.d.ts +8 -0
- package/es/hooks/design-view/layout/useToolkit.d.ts +2 -0
- package/es/hooks/design-view/useDesigner.d.ts +24 -1
- package/es/hooks/design-view/useDesigner.mjs +6 -1
- package/es/hooks/design-view/widget/useWidget.mjs +3 -1
- package/es/index.mjs +6 -5
- package/es/register/designer-register/designer-register.mjs +4 -0
- package/es/{utils → schema}/begin-drag/begin-drag.mjs +8 -6
- package/es/schema/common-config/button-editor-config.mjs +4 -2
- package/es/schema/common-config/common-field-editor-config.mjs +2 -0
- package/es/schema/field/data-table-column.mjs +52 -4
- package/es/schema/field/index.mjs +1 -1
- package/es/schema/index.d.ts +3 -1
- package/es/schema/index.mjs +4 -2
- package/es/schema/utils.d.ts +8 -0
- package/es/schema/utils.mjs +76 -0
- package/es/utils/design-plugin-pkg-util/design-plugin-pkg-util.d.ts +1 -1
- package/es/utils/design-plugin-pkg-util/design-plugin-pkg-util.mjs +1 -29
- package/es/utils/index.d.ts +0 -1
- package/es/utils/index.mjs +2 -2
- package/es/utils/transform-js/index.mjs +1 -0
- package/es/utils/transform-js/transform-js.d.ts +7 -6
- package/es/utils/transform-js/transform-js.mjs +62 -68
- package/package.json +9 -7
- package/dist/assets/transform-js.worker-jL3ThXZ5.js +0 -172438
- package/es/assets/transform-js.worker-CI2jwZbi.js +0 -230912
- package/es/utils/transform-js/transform-js.worker.d.ts +0 -1
- /package/es/{utils → schema}/begin-drag/begin-drag.d.ts +0 -0
|
@@ -68,21 +68,21 @@
|
|
|
68
68
|
*/
|
|
69
69
|
.gct-design-view-layout {
|
|
70
70
|
position: relative;
|
|
71
|
-
height: 100%;
|
|
72
71
|
width: 100%;
|
|
72
|
+
height: 100%;
|
|
73
73
|
overflow: hidden;
|
|
74
74
|
}
|
|
75
|
-
.gct-design-view-layout
|
|
75
|
+
.gct-design-view-layout .gct-modal-name-editor__input .ant-input.ant-input-sm {
|
|
76
76
|
color: rgb(26, 29, 35);
|
|
77
77
|
}
|
|
78
78
|
.gct-design-view-layout__header {
|
|
79
|
-
width: 100%;
|
|
80
|
-
height: 69px;
|
|
81
79
|
display: flex;
|
|
82
80
|
align-items: center;
|
|
83
81
|
justify-content: space-between;
|
|
84
|
-
|
|
82
|
+
width: 100%;
|
|
83
|
+
height: 69px;
|
|
85
84
|
padding: 0 24px;
|
|
85
|
+
background-color: #fff;
|
|
86
86
|
border-bottom: 1px solid #E0E3EB;
|
|
87
87
|
}
|
|
88
88
|
|
|
@@ -90,10 +90,10 @@
|
|
|
90
90
|
display: inline-flex;
|
|
91
91
|
align-items: center;
|
|
92
92
|
justify-content: center;
|
|
93
|
-
cursor: pointer;
|
|
94
93
|
width: 20px;
|
|
95
94
|
height: 20px;
|
|
96
95
|
font-size: 20px;
|
|
96
|
+
cursor: pointer;
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
.gct-design-view-layout__header-info {
|
|
@@ -131,8 +131,8 @@
|
|
|
131
131
|
|
|
132
132
|
.gct-design-view-layout__header-actions {
|
|
133
133
|
display: flex;
|
|
134
|
-
align-items: center;
|
|
135
134
|
gap: 12px;
|
|
135
|
+
align-items: center;
|
|
136
136
|
height: 100%;
|
|
137
137
|
}
|
|
138
138
|
|
|
@@ -141,14 +141,14 @@
|
|
|
141
141
|
align-items: center;
|
|
142
142
|
}
|
|
143
143
|
.gct-design-view-layout__header-action-btn:focus {
|
|
144
|
-
border-color: #E0E3EB;
|
|
145
144
|
color: rgba(0, 0, 0, 0.85);
|
|
145
|
+
border-color: #E0E3EB;
|
|
146
146
|
}
|
|
147
|
-
.gct-design-view-layout__header-action-btn
|
|
148
|
-
font-size: 14px;
|
|
147
|
+
.gct-design-view-layout__header-action-btn .gct-iconfont {
|
|
149
148
|
margin-right: 6px;
|
|
149
|
+
font-size: 14px;
|
|
150
150
|
}
|
|
151
|
-
.gct-design-view-layout__header-action-btn
|
|
151
|
+
.gct-design-view-layout__header-action-btn span {
|
|
152
152
|
height: 22px;
|
|
153
153
|
}
|
|
154
154
|
|
|
@@ -102,7 +102,7 @@ var DesignViewLayout = /* @__PURE__ */ defineComponent({
|
|
|
102
102
|
createVNode("div", { "class": ns.e("header-left") }, [isBack.value ? createVNode("div", {
|
|
103
103
|
"class": ns.e("header-back"),
|
|
104
104
|
"onClick": onBack
|
|
105
|
-
}, [createVNode(resolveComponent("assets-svg-icon"), { "src": "/assets/card-design/arrow_back.svg" }, null)]) : null, props.editName ? createVNode("div", { "class": ns.e("header-info") }, [createVNode("div", { "class": ns.e("header-sub-title") }, [subTitle.value]), createVNode("div", { "class": ns.e("header-title") }, [createVNode(ModalNameEditor, {
|
|
105
|
+
}, [createVNode(resolveComponent("assets-svg-icon"), { "src": "/extras-assets/card-design/arrow_back.svg" }, null)]) : null, props.editName ? createVNode("div", { "class": ns.e("header-info") }, [createVNode("div", { "class": ns.e("header-sub-title") }, [subTitle.value]), createVNode("div", { "class": ns.e("header-title") }, [createVNode(ModalNameEditor, {
|
|
106
106
|
"value": val.value,
|
|
107
107
|
"onUpdate:value": ($event) => val.value = $event,
|
|
108
108
|
"defaultName": props.defaultName
|
|
@@ -4,6 +4,8 @@ import { FieldIconMap, t } from "@gct-paas/core";
|
|
|
4
4
|
import { computed, createVNode, defineComponent, ref, toRefs, watch } from "vue";
|
|
5
5
|
import { Empty, Transfer } from "ant-design-vue";
|
|
6
6
|
//#region src/components/field-transfer/components/Transfer/AdvancedTransfer.tsx
|
|
7
|
+
var noData = "/extras-assets/design-view/pic_nodata.svg";
|
|
8
|
+
var noSearchData = "/extras-assets/design-view/pic_noresult.svg";
|
|
7
9
|
var AdvancedTransfer_default = /* @__PURE__ */ defineComponent({
|
|
8
10
|
name: "AdvancedTransfer",
|
|
9
11
|
props: {
|
|
@@ -88,7 +90,10 @@ var AdvancedTransfer_default = /* @__PURE__ */ defineComponent({
|
|
|
88
90
|
"checkedKeys": targetCheckedKeys.value,
|
|
89
91
|
"onCheckedKeysChange": setTargetCheckedKeys
|
|
90
92
|
}, null);
|
|
91
|
-
if (direction === "left" && (!leftOption.value.length || !filteredLeftOption.value.length)) return createVNode("div", { "class": "empty-container" }, [createVNode(Empty, {
|
|
93
|
+
if (direction === "left" && (!leftOption.value.length || !filteredLeftOption.value.length)) return createVNode("div", { "class": "empty-container" }, [createVNode(Empty, {
|
|
94
|
+
"image": leftOption.value.length ? noSearchData : noData,
|
|
95
|
+
"description": leftOption.value.length ? t("sys.component.fieldTransfer.noSearchData") : t("sys.component.fieldTransfer.noData")
|
|
96
|
+
}, null)]);
|
|
92
97
|
} };
|
|
93
98
|
return () => {
|
|
94
99
|
return createVNode("div", { "class": "advanced-transfer-container" }, [createVNode(Transfer, {
|
|
@@ -5,6 +5,8 @@ import { FieldIconMap, t } from "@gct-paas/core";
|
|
|
5
5
|
import { computed, createVNode, defineComponent, ref, toRefs } from "vue";
|
|
6
6
|
import { Empty, Input, Tree } from "ant-design-vue";
|
|
7
7
|
//#region src/components/field-transfer/components/Transfer/TransferTree.tsx
|
|
8
|
+
var noData = "/extras-assets/design-view/pic_nodata.svg";
|
|
9
|
+
var noSearchData = "/extras-assets/design-view/pic_noresult.svg";
|
|
8
10
|
var TransferTree_default = /* @__PURE__ */ defineComponent({
|
|
9
11
|
name: "TransferTree",
|
|
10
12
|
props: {
|
|
@@ -52,7 +54,10 @@ var TransferTree_default = /* @__PURE__ */ defineComponent({
|
|
|
52
54
|
}, null)]), createVNode("div", {
|
|
53
55
|
"class": "tree-wrapper",
|
|
54
56
|
"style": { overflow: "auto" }
|
|
55
|
-
}, [filteredTreeData.value.length === 0 ? createVNode("div", { "class": "empty-container" }, [createVNode(Empty, {
|
|
57
|
+
}, [filteredTreeData.value.length === 0 ? createVNode("div", { "class": "empty-container" }, [createVNode(Empty, {
|
|
58
|
+
"image": keyword.value ? noSearchData : noData,
|
|
59
|
+
"description": keyword.value ? t("sys.component.fieldTransfer.noSearchData") : t("sys.component.fieldTransfer.noData")
|
|
60
|
+
}, null)]) : createVNode(Tree, {
|
|
56
61
|
"showIcon": true,
|
|
57
62
|
"showLine": { showLeafIcon: false },
|
|
58
63
|
"blockNode": true,
|
|
@@ -183,6 +183,7 @@ export declare const pageJson: {
|
|
|
183
183
|
tableheight?: number | undefined;
|
|
184
184
|
tableheightConfigure?: import('@gct-paas/core').tableColumnWidthEnum | undefined;
|
|
185
185
|
enableHeaderBGColor?: boolean | undefined;
|
|
186
|
+
enableBGColor?: boolean | undefined;
|
|
186
187
|
};
|
|
187
188
|
props: {
|
|
188
189
|
[x: string]: any;
|
|
@@ -386,6 +387,7 @@ export declare const pageJson: {
|
|
|
386
387
|
tableheight?: number | undefined;
|
|
387
388
|
tableheightConfigure?: import('@gct-paas/core').tableColumnWidthEnum | undefined;
|
|
388
389
|
enableHeaderBGColor?: boolean | undefined;
|
|
390
|
+
enableBGColor?: boolean | undefined;
|
|
389
391
|
};
|
|
390
392
|
props: {
|
|
391
393
|
[x: string]: any;
|
|
@@ -576,6 +578,7 @@ export declare const pageJson: {
|
|
|
576
578
|
tableheight?: number | undefined;
|
|
577
579
|
tableheightConfigure?: import('@gct-paas/core').tableColumnWidthEnum | undefined;
|
|
578
580
|
enableHeaderBGColor?: boolean | undefined;
|
|
581
|
+
enableBGColor?: boolean | undefined;
|
|
579
582
|
};
|
|
580
583
|
props: {
|
|
581
584
|
[x: string]: any;
|
|
@@ -766,6 +769,7 @@ export declare const pageJson: {
|
|
|
766
769
|
tableheight?: number | undefined;
|
|
767
770
|
tableheightConfigure?: import('@gct-paas/core').tableColumnWidthEnum | undefined;
|
|
768
771
|
enableHeaderBGColor?: boolean | undefined;
|
|
772
|
+
enableBGColor?: boolean | undefined;
|
|
769
773
|
};
|
|
770
774
|
props: {
|
|
771
775
|
[x: string]: any;
|
|
@@ -954,6 +958,7 @@ export declare const pageJson: {
|
|
|
954
958
|
tableheight?: number | undefined;
|
|
955
959
|
tableheightConfigure?: import('@gct-paas/core').tableColumnWidthEnum | undefined;
|
|
956
960
|
enableHeaderBGColor?: boolean | undefined;
|
|
961
|
+
enableBGColor?: boolean | undefined;
|
|
957
962
|
};
|
|
958
963
|
runJs?: string | undefined;
|
|
959
964
|
los?: Record<string, IData> | undefined;
|
|
@@ -1067,6 +1072,7 @@ export declare const pageJson: {
|
|
|
1067
1072
|
tableheight?: number | undefined;
|
|
1068
1073
|
tableheightConfigure?: import('@gct-paas/core').tableColumnWidthEnum | undefined;
|
|
1069
1074
|
enableHeaderBGColor?: boolean | undefined;
|
|
1075
|
+
enableBGColor?: boolean | undefined;
|
|
1070
1076
|
};
|
|
1071
1077
|
pageConfig: {
|
|
1072
1078
|
title?: string | undefined;
|
|
@@ -1236,6 +1242,7 @@ export declare const modalInfo: import('vue').Ref<{
|
|
|
1236
1242
|
tableheight?: number | undefined;
|
|
1237
1243
|
tableheightConfigure?: import('@gct-paas/core').tableColumnWidthEnum | undefined;
|
|
1238
1244
|
enableHeaderBGColor?: boolean | undefined;
|
|
1245
|
+
enableBGColor?: boolean | undefined;
|
|
1239
1246
|
};
|
|
1240
1247
|
props: {
|
|
1241
1248
|
[x: string]: any;
|
|
@@ -1426,6 +1433,7 @@ export declare const modalInfo: import('vue').Ref<{
|
|
|
1426
1433
|
tableheight?: number | undefined;
|
|
1427
1434
|
tableheightConfigure?: import('@gct-paas/core').tableColumnWidthEnum | undefined;
|
|
1428
1435
|
enableHeaderBGColor?: boolean | undefined;
|
|
1436
|
+
enableBGColor?: boolean | undefined;
|
|
1429
1437
|
};
|
|
1430
1438
|
props: {
|
|
1431
1439
|
[x: string]: any;
|
|
@@ -1616,6 +1624,7 @@ export declare const modalInfo: import('vue').Ref<{
|
|
|
1616
1624
|
tableheight?: number | undefined;
|
|
1617
1625
|
tableheightConfigure?: import('@gct-paas/core').tableColumnWidthEnum | undefined;
|
|
1618
1626
|
enableHeaderBGColor?: boolean | undefined;
|
|
1627
|
+
enableBGColor?: boolean | undefined;
|
|
1619
1628
|
};
|
|
1620
1629
|
props: {
|
|
1621
1630
|
[x: string]: any;
|
|
@@ -1804,6 +1813,7 @@ export declare const modalInfo: import('vue').Ref<{
|
|
|
1804
1813
|
tableheight?: number | undefined;
|
|
1805
1814
|
tableheightConfigure?: import('@gct-paas/core').tableColumnWidthEnum | undefined;
|
|
1806
1815
|
enableHeaderBGColor?: boolean | undefined;
|
|
1816
|
+
enableBGColor?: boolean | undefined;
|
|
1807
1817
|
};
|
|
1808
1818
|
runJs?: string | undefined;
|
|
1809
1819
|
los?: Record<string, IData> | undefined;
|
|
@@ -1938,6 +1948,7 @@ export declare const modalInfo: import('vue').Ref<{
|
|
|
1938
1948
|
tableheight?: number | undefined;
|
|
1939
1949
|
tableheightConfigure?: import('@gct-paas/core').tableColumnWidthEnum | undefined;
|
|
1940
1950
|
enableHeaderBGColor?: boolean | undefined;
|
|
1951
|
+
enableBGColor?: boolean | undefined;
|
|
1941
1952
|
};
|
|
1942
1953
|
props: {
|
|
1943
1954
|
[x: string]: any;
|
|
@@ -2128,6 +2139,7 @@ export declare const modalInfo: import('vue').Ref<{
|
|
|
2128
2139
|
tableheight?: number | undefined;
|
|
2129
2140
|
tableheightConfigure?: import('@gct-paas/core').tableColumnWidthEnum | undefined;
|
|
2130
2141
|
enableHeaderBGColor?: boolean | undefined;
|
|
2142
|
+
enableBGColor?: boolean | undefined;
|
|
2131
2143
|
};
|
|
2132
2144
|
props: {
|
|
2133
2145
|
[x: string]: any;
|
|
@@ -2318,6 +2330,7 @@ export declare const modalInfo: import('vue').Ref<{
|
|
|
2318
2330
|
tableheight?: number | undefined;
|
|
2319
2331
|
tableheightConfigure?: import('@gct-paas/core').tableColumnWidthEnum | undefined;
|
|
2320
2332
|
enableHeaderBGColor?: boolean | undefined;
|
|
2333
|
+
enableBGColor?: boolean | undefined;
|
|
2321
2334
|
};
|
|
2322
2335
|
props: {
|
|
2323
2336
|
[x: string]: any;
|
|
@@ -2506,6 +2519,7 @@ export declare const modalInfo: import('vue').Ref<{
|
|
|
2506
2519
|
tableheight?: number | undefined;
|
|
2507
2520
|
tableheightConfigure?: import('@gct-paas/core').tableColumnWidthEnum | undefined;
|
|
2508
2521
|
enableHeaderBGColor?: boolean | undefined;
|
|
2522
|
+
enableBGColor?: boolean | undefined;
|
|
2509
2523
|
};
|
|
2510
2524
|
runJs?: string | undefined;
|
|
2511
2525
|
los?: Record<string, IData> | undefined;
|
|
@@ -130,6 +130,7 @@ export declare function useDesignModal(): {
|
|
|
130
130
|
tableheight?: number | undefined;
|
|
131
131
|
tableheightConfigure?: import('@gct-paas/core').tableColumnWidthEnum | undefined;
|
|
132
132
|
enableHeaderBGColor?: boolean | undefined;
|
|
133
|
+
enableBGColor?: boolean | undefined;
|
|
133
134
|
};
|
|
134
135
|
props: {
|
|
135
136
|
[x: string]: any;
|
|
@@ -320,6 +321,7 @@ export declare function useDesignModal(): {
|
|
|
320
321
|
tableheight?: number | undefined;
|
|
321
322
|
tableheightConfigure?: import('@gct-paas/core').tableColumnWidthEnum | undefined;
|
|
322
323
|
enableHeaderBGColor?: boolean | undefined;
|
|
324
|
+
enableBGColor?: boolean | undefined;
|
|
323
325
|
};
|
|
324
326
|
props: {
|
|
325
327
|
[x: string]: any;
|
|
@@ -510,6 +512,7 @@ export declare function useDesignModal(): {
|
|
|
510
512
|
tableheight?: number | undefined;
|
|
511
513
|
tableheightConfigure?: import('@gct-paas/core').tableColumnWidthEnum | undefined;
|
|
512
514
|
enableHeaderBGColor?: boolean | undefined;
|
|
515
|
+
enableBGColor?: boolean | undefined;
|
|
513
516
|
};
|
|
514
517
|
props: {
|
|
515
518
|
[x: string]: any;
|
|
@@ -698,6 +701,7 @@ export declare function useDesignModal(): {
|
|
|
698
701
|
tableheight?: number | undefined;
|
|
699
702
|
tableheightConfigure?: import('@gct-paas/core').tableColumnWidthEnum | undefined;
|
|
700
703
|
enableHeaderBGColor?: boolean | undefined;
|
|
704
|
+
enableBGColor?: boolean | undefined;
|
|
701
705
|
};
|
|
702
706
|
runJs?: string | undefined;
|
|
703
707
|
los?: Record<string, IData> | undefined;
|
|
@@ -832,6 +836,7 @@ export declare function useDesignModal(): {
|
|
|
832
836
|
tableheight?: number | undefined;
|
|
833
837
|
tableheightConfigure?: import('@gct-paas/core').tableColumnWidthEnum | undefined;
|
|
834
838
|
enableHeaderBGColor?: boolean | undefined;
|
|
839
|
+
enableBGColor?: boolean | undefined;
|
|
835
840
|
};
|
|
836
841
|
props: {
|
|
837
842
|
[x: string]: any;
|
|
@@ -1022,6 +1027,7 @@ export declare function useDesignModal(): {
|
|
|
1022
1027
|
tableheight?: number | undefined;
|
|
1023
1028
|
tableheightConfigure?: import('@gct-paas/core').tableColumnWidthEnum | undefined;
|
|
1024
1029
|
enableHeaderBGColor?: boolean | undefined;
|
|
1030
|
+
enableBGColor?: boolean | undefined;
|
|
1025
1031
|
};
|
|
1026
1032
|
props: {
|
|
1027
1033
|
[x: string]: any;
|
|
@@ -1212,6 +1218,7 @@ export declare function useDesignModal(): {
|
|
|
1212
1218
|
tableheight?: number | undefined;
|
|
1213
1219
|
tableheightConfigure?: import('@gct-paas/core').tableColumnWidthEnum | undefined;
|
|
1214
1220
|
enableHeaderBGColor?: boolean | undefined;
|
|
1221
|
+
enableBGColor?: boolean | undefined;
|
|
1215
1222
|
};
|
|
1216
1223
|
props: {
|
|
1217
1224
|
[x: string]: any;
|
|
@@ -1400,6 +1407,7 @@ export declare function useDesignModal(): {
|
|
|
1400
1407
|
tableheight?: number | undefined;
|
|
1401
1408
|
tableheightConfigure?: import('@gct-paas/core').tableColumnWidthEnum | undefined;
|
|
1402
1409
|
enableHeaderBGColor?: boolean | undefined;
|
|
1410
|
+
enableBGColor?: boolean | undefined;
|
|
1403
1411
|
};
|
|
1404
1412
|
runJs?: string | undefined;
|
|
1405
1413
|
los?: Record<string, IData> | undefined;
|
|
@@ -1526,6 +1534,7 @@ export declare function useDesignModal(): {
|
|
|
1526
1534
|
tableheight?: number | undefined;
|
|
1527
1535
|
tableheightConfigure?: import('@gct-paas/core').tableColumnWidthEnum | undefined;
|
|
1528
1536
|
enableHeaderBGColor?: boolean | undefined;
|
|
1537
|
+
enableBGColor?: boolean | undefined;
|
|
1529
1538
|
};
|
|
1530
1539
|
props: {
|
|
1531
1540
|
[x: string]: any;
|
|
@@ -1716,6 +1725,7 @@ export declare function useDesignModal(): {
|
|
|
1716
1725
|
tableheight?: number | undefined;
|
|
1717
1726
|
tableheightConfigure?: import('@gct-paas/core').tableColumnWidthEnum | undefined;
|
|
1718
1727
|
enableHeaderBGColor?: boolean | undefined;
|
|
1728
|
+
enableBGColor?: boolean | undefined;
|
|
1719
1729
|
};
|
|
1720
1730
|
props: {
|
|
1721
1731
|
[x: string]: any;
|
|
@@ -1906,6 +1916,7 @@ export declare function useDesignModal(): {
|
|
|
1906
1916
|
tableheight?: number | undefined;
|
|
1907
1917
|
tableheightConfigure?: import('@gct-paas/core').tableColumnWidthEnum | undefined;
|
|
1908
1918
|
enableHeaderBGColor?: boolean | undefined;
|
|
1919
|
+
enableBGColor?: boolean | undefined;
|
|
1909
1920
|
};
|
|
1910
1921
|
props: {
|
|
1911
1922
|
[x: string]: any;
|
|
@@ -2097,6 +2108,7 @@ export declare function useDesignModal(): {
|
|
|
2097
2108
|
tableheight?: number | undefined;
|
|
2098
2109
|
tableheightConfigure?: import('@gct-paas/core').tableColumnWidthEnum | undefined;
|
|
2099
2110
|
enableHeaderBGColor?: boolean | undefined;
|
|
2111
|
+
enableBGColor?: boolean | undefined;
|
|
2100
2112
|
};
|
|
2101
2113
|
props: {
|
|
2102
2114
|
[x: string]: any;
|
|
@@ -2287,6 +2299,7 @@ export declare function useDesignModal(): {
|
|
|
2287
2299
|
tableheight?: number | undefined;
|
|
2288
2300
|
tableheightConfigure?: import('@gct-paas/core').tableColumnWidthEnum | undefined;
|
|
2289
2301
|
enableHeaderBGColor?: boolean | undefined;
|
|
2302
|
+
enableBGColor?: boolean | undefined;
|
|
2290
2303
|
};
|
|
2291
2304
|
props: {
|
|
2292
2305
|
[x: string]: any;
|
|
@@ -2477,6 +2490,7 @@ export declare function useDesignModal(): {
|
|
|
2477
2490
|
tableheight?: number | undefined;
|
|
2478
2491
|
tableheightConfigure?: import('@gct-paas/core').tableColumnWidthEnum | undefined;
|
|
2479
2492
|
enableHeaderBGColor?: boolean | undefined;
|
|
2493
|
+
enableBGColor?: boolean | undefined;
|
|
2480
2494
|
};
|
|
2481
2495
|
props: {
|
|
2482
2496
|
[x: string]: any;
|
|
@@ -2668,6 +2682,7 @@ export declare function useDesignModal(): {
|
|
|
2668
2682
|
tableheight?: number | undefined;
|
|
2669
2683
|
tableheightConfigure?: import('@gct-paas/core').tableColumnWidthEnum | undefined;
|
|
2670
2684
|
enableHeaderBGColor?: boolean | undefined;
|
|
2685
|
+
enableBGColor?: boolean | undefined;
|
|
2671
2686
|
};
|
|
2672
2687
|
props: {
|
|
2673
2688
|
[x: string]: any;
|
|
@@ -2858,6 +2873,7 @@ export declare function useDesignModal(): {
|
|
|
2858
2873
|
tableheight?: number | undefined;
|
|
2859
2874
|
tableheightConfigure?: import('@gct-paas/core').tableColumnWidthEnum | undefined;
|
|
2860
2875
|
enableHeaderBGColor?: boolean | undefined;
|
|
2876
|
+
enableBGColor?: boolean | undefined;
|
|
2861
2877
|
};
|
|
2862
2878
|
props: {
|
|
2863
2879
|
[x: string]: any;
|
|
@@ -3048,6 +3064,7 @@ export declare function useDesignModal(): {
|
|
|
3048
3064
|
tableheight?: number | undefined;
|
|
3049
3065
|
tableheightConfigure?: import('@gct-paas/core').tableColumnWidthEnum | undefined;
|
|
3050
3066
|
enableHeaderBGColor?: boolean | undefined;
|
|
3067
|
+
enableBGColor?: boolean | undefined;
|
|
3051
3068
|
};
|
|
3052
3069
|
props: {
|
|
3053
3070
|
[x: string]: any;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { platform } from "../../../utils/design-view/index.mjs";
|
|
2
2
|
import "../design-state.mjs";
|
|
3
|
-
import { Platform,
|
|
3
|
+
import { Platform, openWindow, stringifyMatrixParams } from "@gct-paas/core";
|
|
4
4
|
import { ref } from "vue";
|
|
5
5
|
import { useDebounceFn } from "@vueuse/core";
|
|
6
6
|
//#region src/hooks/design-view/designer/useDesignPreview.ts
|
|
@@ -10,40 +10,38 @@ import { useDebounceFn } from "@vueuse/core";
|
|
|
10
10
|
* 管理设计器的页面预览、沙箱预览、历史预览等预览相关功能。
|
|
11
11
|
*/
|
|
12
12
|
function useDesignPreview() {
|
|
13
|
+
/**
|
|
14
|
+
* 构建预览 URL
|
|
15
|
+
* 组合基础 URL、矩阵参数和时间戳
|
|
16
|
+
*
|
|
17
|
+
* @param {string} baseUrl 基础 URL(如 /web-render/)
|
|
18
|
+
* @param {Record<string, unknown>} matrixParams 矩阵参数对象
|
|
19
|
+
* @returns {string} 完整的预览 URL
|
|
20
|
+
*/
|
|
21
|
+
function buildPreviewUrl(baseUrl, matrixParams) {
|
|
22
|
+
const matrixParamStr = stringifyMatrixParams(matrixParams);
|
|
23
|
+
const timestamp = `?_t=${Date.now()}`;
|
|
24
|
+
return `${location.origin}${baseUrl}${matrixParamStr}${timestamp}`;
|
|
25
|
+
}
|
|
13
26
|
/**
|
|
14
27
|
* 基础预览方法,根据平台类型打开对应预览窗口
|
|
15
28
|
*
|
|
16
29
|
* @param {IObject} params 预览参数
|
|
17
30
|
*/
|
|
18
31
|
function basicPreview({ pid, webUrl, mobileUrl, padUrl }) {
|
|
19
|
-
|
|
20
|
-
const { hostname, origin } = location;
|
|
21
|
-
openWindow(genUrl(`${origin}${mobileUrl}?_t=${Date.now()}`, {
|
|
22
|
-
aid: _gct.store.context.aid,
|
|
23
|
-
pid,
|
|
24
|
-
bid: _gct.store.context.bid,
|
|
25
|
-
token: getToken(),
|
|
26
|
-
"tenant-id": getTenant()
|
|
27
|
-
}), {
|
|
28
|
-
noopener: false,
|
|
29
|
-
noreferrer: false,
|
|
30
|
-
target: "_blank",
|
|
31
|
-
optionStr: `width=414,height=896,top=200,left=${(window.screen.availWidth - 360) / 2}`
|
|
32
|
-
})?.resizeTo(414, 896);
|
|
33
|
-
} else if (platform.value === Platform.PAD) {
|
|
34
|
-
const { hostname, origin } = location;
|
|
35
|
-
openWindow(genUrl(`${origin}${padUrl}?_t=${Date.now()}`, {
|
|
36
|
-
aid: _gct.store.context.aid,
|
|
37
|
-
pid,
|
|
38
|
-
bid: _gct.store.context.bid,
|
|
39
|
-
token: getToken(),
|
|
40
|
-
"tenant-id": getTenant()
|
|
41
|
-
}), { target: "_blank" });
|
|
42
|
-
} else openWindow(genUrl(`${location.origin}${webUrl}?_t=${Date.now()}`, {
|
|
32
|
+
const matrixParams = {
|
|
43
33
|
aid: _gct.store.context.aid,
|
|
44
34
|
pid,
|
|
45
35
|
bid: _gct.store.context.bid
|
|
46
|
-
}
|
|
36
|
+
};
|
|
37
|
+
if (platform.value === Platform.MOBILE) openWindow(buildPreviewUrl(mobileUrl, matrixParams), {
|
|
38
|
+
noopener: false,
|
|
39
|
+
noreferrer: false,
|
|
40
|
+
target: "_blank",
|
|
41
|
+
optionStr: `width=414,height=896,top=200,left=${(window.screen.availWidth - 360) / 2}`
|
|
42
|
+
})?.resizeTo(414, 896);
|
|
43
|
+
else if (platform.value === Platform.PAD) openWindow(buildPreviewUrl(padUrl, matrixParams), { target: "_blank" });
|
|
44
|
+
else openWindow(buildPreviewUrl(webUrl, matrixParams), { target: "_blank" });
|
|
47
45
|
}
|
|
48
46
|
/**
|
|
49
47
|
* 预览(防抖)
|
|
@@ -53,9 +51,9 @@ function useDesignPreview() {
|
|
|
53
51
|
const _doPreview = () => {
|
|
54
52
|
basicPreview({
|
|
55
53
|
pid: _gct.store.context.pid,
|
|
56
|
-
webUrl:
|
|
57
|
-
mobileUrl:
|
|
58
|
-
padUrl:
|
|
54
|
+
webUrl: "/web-render/",
|
|
55
|
+
mobileUrl: "/mobile-render/",
|
|
56
|
+
padUrl: "/pad-render/"
|
|
59
57
|
});
|
|
60
58
|
};
|
|
61
59
|
const preview = useDebounceFn(_doPreview, 400);
|
|
@@ -80,9 +78,9 @@ function useDesignPreview() {
|
|
|
80
78
|
const _doPreviewSandbox = () => {
|
|
81
79
|
basicPreview({
|
|
82
80
|
pid: _gct.store.context.pid,
|
|
83
|
-
webUrl:
|
|
84
|
-
mobileUrl:
|
|
85
|
-
padUrl:
|
|
81
|
+
webUrl: "/web-sandbox/",
|
|
82
|
+
mobileUrl: "/mobile-sandbox/",
|
|
83
|
+
padUrl: "/pad-sandbox/"
|
|
86
84
|
});
|
|
87
85
|
};
|
|
88
86
|
const previewSandbox = useDebounceFn(_doPreviewSandbox, 400);
|
|
@@ -93,30 +91,17 @@ function useDesignPreview() {
|
|
|
93
91
|
* @returns {{ url: string; platform: Platform }} 预览URL和平台类型
|
|
94
92
|
*/
|
|
95
93
|
function historyPreview(hid) {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
bid: _gct.store.context.bid,
|
|
101
|
-
token: getToken()
|
|
102
|
-
}),
|
|
103
|
-
platform: platform.value
|
|
104
|
-
};
|
|
105
|
-
else if (platform.value === Platform.PAD) return {
|
|
106
|
-
url: genUrl(`http://${location.hostname}undefined?_t=${Date.now()}`, {
|
|
107
|
-
aid: _gct.store.context.aid,
|
|
108
|
-
pid: hid,
|
|
109
|
-
bid: _gct.store.context.bid,
|
|
110
|
-
token: getToken()
|
|
111
|
-
}),
|
|
112
|
-
platform: platform.value
|
|
94
|
+
const matrixParams = {
|
|
95
|
+
aid: _gct.store.context.aid,
|
|
96
|
+
pid: hid,
|
|
97
|
+
bid: _gct.store.context.bid
|
|
113
98
|
};
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
99
|
+
let url;
|
|
100
|
+
if (platform.value === Platform.MOBILE) url = buildPreviewUrl("/mobile-render/", matrixParams);
|
|
101
|
+
else if (platform.value === Platform.PAD) url = buildPreviewUrl("/pad-render/", matrixParams);
|
|
102
|
+
else url = buildPreviewUrl("/web-render/", matrixParams);
|
|
103
|
+
return {
|
|
104
|
+
url,
|
|
120
105
|
platform: platform.value
|
|
121
106
|
};
|
|
122
107
|
}
|
|
@@ -167,6 +167,7 @@ export declare function useGlobal(): {
|
|
|
167
167
|
tableheight?: number | undefined;
|
|
168
168
|
tableheightConfigure?: import('@gct-paas/core').tableColumnWidthEnum | undefined;
|
|
169
169
|
enableHeaderBGColor?: boolean | undefined;
|
|
170
|
+
enableBGColor?: boolean | undefined;
|
|
170
171
|
};
|
|
171
172
|
props: {
|
|
172
173
|
[x: string]: any;
|
|
@@ -357,6 +358,7 @@ export declare function useGlobal(): {
|
|
|
357
358
|
tableheight?: number | undefined;
|
|
358
359
|
tableheightConfigure?: import('@gct-paas/core').tableColumnWidthEnum | undefined;
|
|
359
360
|
enableHeaderBGColor?: boolean | undefined;
|
|
361
|
+
enableBGColor?: boolean | undefined;
|
|
360
362
|
};
|
|
361
363
|
props: {
|
|
362
364
|
[x: string]: any;
|
|
@@ -547,6 +549,7 @@ export declare function useGlobal(): {
|
|
|
547
549
|
tableheight?: number | undefined;
|
|
548
550
|
tableheightConfigure?: import('@gct-paas/core').tableColumnWidthEnum | undefined;
|
|
549
551
|
enableHeaderBGColor?: boolean | undefined;
|
|
552
|
+
enableBGColor?: boolean | undefined;
|
|
550
553
|
};
|
|
551
554
|
props: {
|
|
552
555
|
[x: string]: any;
|
|
@@ -735,6 +738,7 @@ export declare function useGlobal(): {
|
|
|
735
738
|
tableheight?: number | undefined;
|
|
736
739
|
tableheightConfigure?: import('@gct-paas/core').tableColumnWidthEnum | undefined;
|
|
737
740
|
enableHeaderBGColor?: boolean | undefined;
|
|
741
|
+
enableBGColor?: boolean | undefined;
|
|
738
742
|
};
|
|
739
743
|
runJs?: string | undefined;
|
|
740
744
|
los?: Record<string, IData> | undefined;
|
|
@@ -879,6 +883,7 @@ export declare function useGlobal(): {
|
|
|
879
883
|
tableheight?: number | undefined;
|
|
880
884
|
tableheightConfigure?: import('@gct-paas/core').tableColumnWidthEnum | undefined;
|
|
881
885
|
enableHeaderBGColor?: boolean | undefined;
|
|
886
|
+
enableBGColor?: boolean | undefined;
|
|
882
887
|
};
|
|
883
888
|
props: {
|
|
884
889
|
[x: string]: any;
|
|
@@ -1069,6 +1074,7 @@ export declare function useGlobal(): {
|
|
|
1069
1074
|
tableheight?: number | undefined;
|
|
1070
1075
|
tableheightConfigure?: import('@gct-paas/core').tableColumnWidthEnum | undefined;
|
|
1071
1076
|
enableHeaderBGColor?: boolean | undefined;
|
|
1077
|
+
enableBGColor?: boolean | undefined;
|
|
1072
1078
|
};
|
|
1073
1079
|
props: {
|
|
1074
1080
|
[x: string]: any;
|
|
@@ -1259,6 +1265,7 @@ export declare function useGlobal(): {
|
|
|
1259
1265
|
tableheight?: number | undefined;
|
|
1260
1266
|
tableheightConfigure?: import('@gct-paas/core').tableColumnWidthEnum | undefined;
|
|
1261
1267
|
enableHeaderBGColor?: boolean | undefined;
|
|
1268
|
+
enableBGColor?: boolean | undefined;
|
|
1262
1269
|
};
|
|
1263
1270
|
props: {
|
|
1264
1271
|
[x: string]: any;
|
|
@@ -1447,6 +1454,7 @@ export declare function useGlobal(): {
|
|
|
1447
1454
|
tableheight?: number | undefined;
|
|
1448
1455
|
tableheightConfigure?: import('@gct-paas/core').tableColumnWidthEnum | undefined;
|
|
1449
1456
|
enableHeaderBGColor?: boolean | undefined;
|
|
1457
|
+
enableBGColor?: boolean | undefined;
|
|
1450
1458
|
};
|
|
1451
1459
|
runJs?: string | undefined;
|
|
1452
1460
|
los?: Record<string, IData> | undefined;
|
|
@@ -126,6 +126,7 @@ export declare function useToolkit(): {
|
|
|
126
126
|
tableheight?: number | undefined;
|
|
127
127
|
tableheightConfigure?: import('@gct-paas/core').tableColumnWidthEnum | undefined;
|
|
128
128
|
enableHeaderBGColor?: boolean | undefined;
|
|
129
|
+
enableBGColor?: boolean | undefined;
|
|
129
130
|
};
|
|
130
131
|
props: {
|
|
131
132
|
[x: string]: any;
|
|
@@ -316,6 +317,7 @@ export declare function useToolkit(): {
|
|
|
316
317
|
tableheight?: number | undefined;
|
|
317
318
|
tableheightConfigure?: import('@gct-paas/core').tableColumnWidthEnum | undefined;
|
|
318
319
|
enableHeaderBGColor?: boolean | undefined;
|
|
320
|
+
enableBGColor?: boolean | undefined;
|
|
319
321
|
};
|
|
320
322
|
props: {
|
|
321
323
|
[x: string]: any;
|