@kp-ui/lowcode-pc-v2 0.0.13 → 0.0.16
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/assets/styles/style.css +36 -36
- package/core/src/components/common/render/Debugger.js +1 -1
- package/core/src/components/common/render/Debugger.vue_vue_type_script_setup_true_lang.js +18 -12
- package/package.json +1 -1
- package/src/hooks/useTableWidget.js +17 -5
- package/src/widgets/base/html/index.js +1 -1
- package/src/widgets/base/html/index.vue_vue_type_script_setup_true_lang.js +6 -2
- package/src/widgets/containers/collapse/index-render.js +1 -1
- package/src/widgets/containers/flex/schema.js +0 -1
- package/src/widgets/template/SecondaryPage/index-render.js +1 -1
- package/src/widgets/template/SecondaryPage/index-render.vue_vue_type_script_setup_true_lang.js +31 -9
- package/src/widgets/template/SecondaryPage/schema.js +1 -0
- package/stats.html +1 -1
package/assets/styles/style.css
CHANGED
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
@tailwind components;
|
|
35
35
|
@tailwind utilities;
|
|
36
36
|
/* 调试面板样式 */
|
|
37
|
-
.debug-panel[data-v-
|
|
37
|
+
.debug-panel[data-v-2ffcff6c] {
|
|
38
38
|
position: absolute;
|
|
39
39
|
top: 0;
|
|
40
40
|
right: 0;
|
|
@@ -49,18 +49,18 @@
|
|
|
49
49
|
border-top-left-radius: 8px;
|
|
50
50
|
border-bottom-left-radius: 8px;
|
|
51
51
|
}
|
|
52
|
-
.debug-panel[data-v-
|
|
52
|
+
.debug-panel[data-v-2ffcff6c] .jv-container .jv-code {
|
|
53
53
|
padding: 0;
|
|
54
54
|
}
|
|
55
|
-
.debug-panel.collapsed[data-v-
|
|
55
|
+
.debug-panel.collapsed[data-v-2ffcff6c] {
|
|
56
56
|
transform: translateX(400px);
|
|
57
57
|
}
|
|
58
|
-
.debug-panel.collapsed .debug-toggle[data-v-
|
|
58
|
+
.debug-panel.collapsed .debug-toggle[data-v-2ffcff6c] {
|
|
59
59
|
left: -40px;
|
|
60
60
|
border-radius: 8px 0 0 8px;
|
|
61
61
|
width: 40px;
|
|
62
62
|
}
|
|
63
|
-
.debug-panel .debug-toggle[data-v-
|
|
63
|
+
.debug-panel .debug-toggle[data-v-2ffcff6c] {
|
|
64
64
|
position: absolute;
|
|
65
65
|
left: -40px;
|
|
66
66
|
top: 20px;
|
|
@@ -79,20 +79,20 @@
|
|
|
79
79
|
padding: 8px 0;
|
|
80
80
|
user-select: none;
|
|
81
81
|
}
|
|
82
|
-
.debug-panel .debug-content[data-v-
|
|
82
|
+
.debug-panel .debug-content[data-v-2ffcff6c] {
|
|
83
83
|
flex: 1;
|
|
84
84
|
overflow: auto;
|
|
85
85
|
padding: 16px;
|
|
86
86
|
background-color: #f5f7fa;
|
|
87
87
|
}
|
|
88
|
-
.debug-panel .debug-content .debug-section[data-v-
|
|
88
|
+
.debug-panel .debug-content .debug-section[data-v-2ffcff6c] {
|
|
89
89
|
margin-bottom: 24px;
|
|
90
90
|
background-color: #fff;
|
|
91
91
|
border-radius: 8px;
|
|
92
92
|
padding: 16px;
|
|
93
93
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
|
|
94
94
|
}
|
|
95
|
-
.debug-panel .debug-content .debug-section h3[data-v-
|
|
95
|
+
.debug-panel .debug-content .debug-section h3[data-v-2ffcff6c] {
|
|
96
96
|
margin: 0 0 12px 0;
|
|
97
97
|
font-size: 14px;
|
|
98
98
|
font-weight: 600;
|
|
@@ -100,18 +100,18 @@
|
|
|
100
100
|
border-bottom: 1px solid #e8e8e8;
|
|
101
101
|
padding-bottom: 8px;
|
|
102
102
|
}
|
|
103
|
-
.debug-panel .debug-content .debug-section .empty-state[data-v-
|
|
103
|
+
.debug-panel .debug-content .debug-section .empty-state[data-v-2ffcff6c] {
|
|
104
104
|
color: #999;
|
|
105
105
|
font-size: 12px;
|
|
106
106
|
text-align: center;
|
|
107
107
|
padding: 20px;
|
|
108
108
|
}
|
|
109
|
-
.debug-panel .debug-content .debug-section .widget-list[data-v-
|
|
109
|
+
.debug-panel .debug-content .debug-section .widget-list[data-v-2ffcff6c] {
|
|
110
110
|
display: flex;
|
|
111
111
|
flex-direction: column;
|
|
112
112
|
gap: 2px;
|
|
113
113
|
}
|
|
114
|
-
.debug-panel .debug-content .debug-section .widget-list .widget-item[data-v-
|
|
114
|
+
.debug-panel .debug-content .debug-section .widget-list .widget-item[data-v-2ffcff6c] {
|
|
115
115
|
border: 1px solid #e8e8e8;
|
|
116
116
|
border-radius: 4px;
|
|
117
117
|
padding: 2px 4px;
|
|
@@ -119,12 +119,12 @@
|
|
|
119
119
|
background-color: #fafafa;
|
|
120
120
|
cursor: pointer;
|
|
121
121
|
}
|
|
122
|
-
.debug-panel .debug-content .debug-section .widget-list .widget-item .widget-key[data-v-
|
|
122
|
+
.debug-panel .debug-content .debug-section .widget-list .widget-item .widget-key[data-v-2ffcff6c] {
|
|
123
123
|
font-weight: 600;
|
|
124
124
|
color: var(--ant-primary-color);
|
|
125
125
|
font-size: 12px;
|
|
126
126
|
}
|
|
127
|
-
.debug-panel .debug-content pre[data-v-
|
|
127
|
+
.debug-panel .debug-content pre[data-v-2ffcff6c] {
|
|
128
128
|
margin: 0;
|
|
129
129
|
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
|
|
130
130
|
font-size: 12px;
|
|
@@ -208,7 +208,7 @@
|
|
|
208
208
|
}
|
|
209
209
|
.ant-form-item .custom-label[data-v-254940bd] .svg-icon {
|
|
210
210
|
flex: 0 0 auto;
|
|
211
|
-
}.html-text-widget[data-v-
|
|
211
|
+
}.html-text-widget--empty[data-v-c062aa8a] {
|
|
212
212
|
padding: 8px 0;
|
|
213
213
|
}.button-list-container[data-v-37429548] {
|
|
214
214
|
flex: 1;
|
|
@@ -472,61 +472,60 @@
|
|
|
472
472
|
}
|
|
473
473
|
.vf-box-widget .vf-box-content[data-v-d52cfec5] {
|
|
474
474
|
min-height: 60px;
|
|
475
|
-
}.collapse-container[data-v-
|
|
475
|
+
}.collapse-container[data-v-92bfc73d] {
|
|
476
476
|
display: flex;
|
|
477
477
|
margin: 2px;
|
|
478
478
|
width: 100%;
|
|
479
479
|
flex-direction: column;
|
|
480
480
|
}
|
|
481
|
-
.collapse-container .form-widget-list[data-v-
|
|
481
|
+
.collapse-container .form-widget-list[data-v-92bfc73d] {
|
|
482
482
|
min-height: 28px;
|
|
483
483
|
}
|
|
484
|
-
.collapse-container[data-v-
|
|
484
|
+
.collapse-container[data-v-92bfc73d] .header-right .form-widget-list {
|
|
485
485
|
min-width: 200px;
|
|
486
486
|
}
|
|
487
|
-
.tpf-like-collapse[data-v-
|
|
487
|
+
.tpf-like-collapse[data-v-92bfc73d] {
|
|
488
488
|
width: 100%;
|
|
489
489
|
background: transparent;
|
|
490
490
|
border: 0;
|
|
491
491
|
padding: 5px;
|
|
492
492
|
box-sizing: border-box;
|
|
493
493
|
}
|
|
494
|
-
.tpf-like-collapse[data-v-
|
|
494
|
+
.tpf-like-collapse[data-v-92bfc73d] .ant-collapse-item {
|
|
495
495
|
border: 0;
|
|
496
496
|
background: transparent;
|
|
497
497
|
padding: 5px;
|
|
498
498
|
}
|
|
499
|
-
.tpf-like-collapse[data-v-
|
|
499
|
+
.tpf-like-collapse[data-v-92bfc73d] .ant-collapse-header {
|
|
500
500
|
padding: 10px 10px 10px 0 !important;
|
|
501
501
|
box-sizing: border-box;
|
|
502
502
|
background: #f7f8fa;
|
|
503
503
|
align-items: center !important;
|
|
504
504
|
}
|
|
505
|
-
.tpf-like-collapse[data-v-
|
|
505
|
+
.tpf-like-collapse[data-v-92bfc73d] .ant-collapse-header-text {
|
|
506
506
|
min-width: 0;
|
|
507
507
|
}
|
|
508
|
-
.tpf-like-collapse[data-v-
|
|
508
|
+
.tpf-like-collapse[data-v-92bfc73d] .ant-collapse-extra {
|
|
509
509
|
min-height: 30px;
|
|
510
510
|
}
|
|
511
|
-
.tpf-like-collapse[data-v-
|
|
511
|
+
.tpf-like-collapse[data-v-92bfc73d] .ant-collapse-content {
|
|
512
512
|
border: 0;
|
|
513
513
|
background: transparent;
|
|
514
|
-
padding: 16px;
|
|
515
514
|
}
|
|
516
|
-
.tpf-like-collapse[data-v-
|
|
517
|
-
padding:
|
|
515
|
+
.tpf-like-collapse[data-v-92bfc73d] .ant-collapse-content .ant-collapse-content-box {
|
|
516
|
+
padding: 16px;
|
|
518
517
|
border-radius: 6px;
|
|
519
518
|
overflow: hidden;
|
|
520
519
|
background-color: #fff;
|
|
521
520
|
}
|
|
522
|
-
.tpf-like-collapse .tpf-like-collapse-header-content[data-v-
|
|
521
|
+
.tpf-like-collapse .tpf-like-collapse-header-content[data-v-92bfc73d] {
|
|
523
522
|
display: inline-flex;
|
|
524
523
|
align-items: center;
|
|
525
524
|
gap: 5px;
|
|
526
525
|
min-width: 0;
|
|
527
526
|
padding-left: 10px;
|
|
528
527
|
}
|
|
529
|
-
.tpf-like-collapse .tpf-like-collapse-header-content[data-v-
|
|
528
|
+
.tpf-like-collapse .tpf-like-collapse-header-content[data-v-92bfc73d]::before {
|
|
530
529
|
content: '';
|
|
531
530
|
background-color: var(--ant-primary-color);
|
|
532
531
|
width: 4px;
|
|
@@ -536,22 +535,22 @@
|
|
|
536
535
|
left: 0;
|
|
537
536
|
transform: translateY(-50%);
|
|
538
537
|
}
|
|
539
|
-
.tpf-like-collapse .tpf-like-collapse-title[data-v-
|
|
538
|
+
.tpf-like-collapse .tpf-like-collapse-title[data-v-92bfc73d] {
|
|
540
539
|
font-weight: 500;
|
|
541
540
|
color: #1f2329;
|
|
542
541
|
line-height: 24px;
|
|
543
542
|
font-size: 16px;
|
|
544
543
|
}
|
|
545
|
-
.tpf-like-collapse .collapse-right[data-v-
|
|
544
|
+
.tpf-like-collapse .collapse-right[data-v-92bfc73d] {
|
|
546
545
|
min-width: 200px;
|
|
547
546
|
min-height: 30px;
|
|
548
547
|
display: flex;
|
|
549
548
|
justify-content: end;
|
|
550
549
|
}
|
|
551
|
-
.tpf-like-collapse .collapse-right[data-v-
|
|
550
|
+
.tpf-like-collapse .collapse-right[data-v-92bfc73d] .ant-form-item {
|
|
552
551
|
margin-bottom: 0;
|
|
553
552
|
}
|
|
554
|
-
.tpf-like-collapse[data-v-
|
|
553
|
+
.tpf-like-collapse[data-v-92bfc73d] .tpf-collapse-content-wrapper {
|
|
555
554
|
overflow: hidden;
|
|
556
555
|
background-color: #fff;
|
|
557
556
|
}
|
|
@@ -597,13 +596,14 @@
|
|
|
597
596
|
border: 1px dashed #d9d9d9;
|
|
598
597
|
border-radius: 4px;
|
|
599
598
|
background: #fafafa;
|
|
600
|
-
}.page-template-widget[data-v-
|
|
599
|
+
}.page-template-widget[data-v-61732f19] {
|
|
601
600
|
min-height: 100%;
|
|
602
601
|
}
|
|
603
|
-
.page-template-widget[data-v-
|
|
604
|
-
|
|
602
|
+
.page-template-widget[data-v-61732f19] .addInfoLayout-content {
|
|
603
|
+
border: 10px solid #ebebeb;
|
|
604
|
+
background: var(--0c16b4be);
|
|
605
605
|
}
|
|
606
|
-
.page-template-widget[data-v-
|
|
606
|
+
.page-template-widget[data-v-61732f19] .addInfoLayout-footer .ant-form-item {
|
|
607
607
|
margin-bottom: 0;
|
|
608
608
|
}
|
|
609
609
|
/*$vite$:1*/
|
|
@@ -2,6 +2,6 @@ import _plugin_vue_export_helper_default from "../../../../../_virtual/_plugin-v
|
|
|
2
2
|
import Debugger_vue_vue_type_script_setup_true_lang_default from "./Debugger.vue_vue_type_script_setup_true_lang.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
//#region ../core/src/components/common/render/Debugger.vue
|
|
5
|
-
var Debugger_default = /* @__PURE__ */ _plugin_vue_export_helper_default(Debugger_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-
|
|
5
|
+
var Debugger_default = /* @__PURE__ */ _plugin_vue_export_helper_default(Debugger_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-2ffcff6c"]]);
|
|
6
6
|
//#endregion
|
|
7
7
|
export { Debugger_default as default };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { Fragment, createElementBlock, createElementVNode,
|
|
2
|
-
import JsonViewer from "vue-json-viewer";
|
|
1
|
+
import { Fragment, computed, createElementBlock, createElementVNode, defineComponent, inject, normalizeClass, openBlock, ref, renderList, toDisplayString, unref, useModel } from "vue";
|
|
3
2
|
//#region ../core/src/components/common/render/Debugger.vue?vue&type=script&setup=true&lang.ts
|
|
4
3
|
var _hoisted_1 = { class: "debug-content" };
|
|
5
4
|
var _hoisted_2 = { class: "debug-section" };
|
|
6
|
-
var _hoisted_3 = { class: "
|
|
7
|
-
var _hoisted_4 = { class: "
|
|
8
|
-
var _hoisted_5 =
|
|
9
|
-
var _hoisted_6 =
|
|
5
|
+
var _hoisted_3 = { class: "json-viewer" };
|
|
6
|
+
var _hoisted_4 = { class: "debug-section" };
|
|
7
|
+
var _hoisted_5 = { class: "widget-list" };
|
|
8
|
+
var _hoisted_6 = ["onClick"];
|
|
9
|
+
var _hoisted_7 = { class: "widget-key" };
|
|
10
10
|
var Debugger_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
11
11
|
__name: "Debugger",
|
|
12
12
|
props: {
|
|
@@ -19,22 +19,28 @@ var Debugger_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defin
|
|
|
19
19
|
emits: ["update:visible"],
|
|
20
20
|
setup(__props) {
|
|
21
21
|
const debugVisible = useModel(__props, "visible");
|
|
22
|
-
const
|
|
22
|
+
const injectedFormDataModel = inject("formData", ref({}));
|
|
23
|
+
const formDataModel = computed(() => {
|
|
24
|
+
const data = unref(injectedFormDataModel) || {};
|
|
25
|
+
try {
|
|
26
|
+
return JSON.parse(JSON.stringify(data));
|
|
27
|
+
} catch (_unused) {
|
|
28
|
+
return data;
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
const formDataJson = computed(() => JSON.stringify(formDataModel.value, null, 2));
|
|
23
32
|
const widgetRefList = inject("refList", ref(/* @__PURE__ */ new Map()));
|
|
24
33
|
inject("formConfig", ref({}));
|
|
25
34
|
return (_ctx, _cache) => {
|
|
26
35
|
return openBlock(), createElementBlock("div", { class: normalizeClass(["debug-panel", { collapsed: !debugVisible.value }]) }, [createElementVNode("div", {
|
|
27
36
|
class: "debug-toggle",
|
|
28
37
|
onClick: _cache[0] || (_cache[0] = ($event) => debugVisible.value = !debugVisible.value)
|
|
29
|
-
}, toDisplayString(debugVisible.value ? "收起" : "调试"), 1), createElementVNode("div", _hoisted_1, [createElementVNode("div", _hoisted_2, [_cache[1] || (_cache[1] = createElementVNode("h3", null, "Form Data Model", -1)),
|
|
30
|
-
value: unref(formDataModel),
|
|
31
|
-
"expand-depth": 5
|
|
32
|
-
}, null, 8, ["value"])]), createElementVNode("div", _hoisted_3, [createElementVNode("h3", null, "Widget Ref List (" + toDisplayString(unref(widgetRefList).size) + " widgets)", 1), createElementVNode("div", _hoisted_4, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(widgetRefList), ([key, value]) => {
|
|
38
|
+
}, toDisplayString(debugVisible.value ? "收起" : "调试"), 1), createElementVNode("div", _hoisted_1, [createElementVNode("div", _hoisted_2, [_cache[1] || (_cache[1] = createElementVNode("h3", null, "Form Data Model", -1)), createElementVNode("pre", _hoisted_3, toDisplayString(formDataJson.value), 1)]), createElementVNode("div", _hoisted_4, [createElementVNode("h3", null, "Widget Ref List (" + toDisplayString(unref(widgetRefList).size) + " widgets)", 1), createElementVNode("div", _hoisted_5, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(widgetRefList), ([key, value]) => {
|
|
33
39
|
return openBlock(), createElementBlock("div", {
|
|
34
40
|
onClick: ($event) => console.log(value),
|
|
35
41
|
key,
|
|
36
42
|
class: "widget-item"
|
|
37
|
-
}, [createElementVNode("div",
|
|
43
|
+
}, [createElementVNode("div", _hoisted_7, toDisplayString(key), 1)], 8, _hoisted_6);
|
|
38
44
|
}), 128))])])])], 2);
|
|
39
45
|
};
|
|
40
46
|
}
|
package/package.json
CHANGED
|
@@ -191,6 +191,17 @@ function useTableWidget({ widget, fieldModel, designState = false }) {
|
|
|
191
191
|
};
|
|
192
192
|
const rowKey = computed(() => widget.props.rowKey);
|
|
193
193
|
const tableData = computed(() => localData.value);
|
|
194
|
+
const rowSelection = computed(() => {
|
|
195
|
+
var _current$preserveSele;
|
|
196
|
+
const current = widget.props.rowSelection || {};
|
|
197
|
+
const legacy = widget.rowSelection || {};
|
|
198
|
+
return {
|
|
199
|
+
...current,
|
|
200
|
+
preserveSelectedRowKeys: (_current$preserveSele = current.preserveSelectedRowKeys) !== null && _current$preserveSele !== void 0 ? _current$preserveSele : legacy.preserveSelectedRowKeys,
|
|
201
|
+
checkMethod: current.checkMethod || legacy.checkMethod,
|
|
202
|
+
onChange: current.onChange || legacy.onChange
|
|
203
|
+
};
|
|
204
|
+
});
|
|
194
205
|
const syncTableValue = (value) => {
|
|
195
206
|
var _tableRef$value;
|
|
196
207
|
const tableValue = normalizeTableData(value);
|
|
@@ -199,7 +210,7 @@ function useTableWidget({ widget, fieldModel, designState = false }) {
|
|
|
199
210
|
(_tableRef$value = tableRef.value) === null || _tableRef$value === void 0 || _tableRef$value.loadData(tableValue);
|
|
200
211
|
};
|
|
201
212
|
const tableProps = computed(() => {
|
|
202
|
-
var
|
|
213
|
+
var _rowSelection$value;
|
|
203
214
|
const { border = false, lineHeight = 50, colorRow = false, showPagination = true, treeConfig } = widget.props;
|
|
204
215
|
let _treeConfig = {};
|
|
205
216
|
if (treeConfig === null || treeConfig === void 0 ? void 0 : treeConfig.enabled) _treeConfig = {
|
|
@@ -223,12 +234,12 @@ function useTableWidget({ widget, fieldModel, designState = false }) {
|
|
|
223
234
|
},
|
|
224
235
|
customConfig: { storage: !designState },
|
|
225
236
|
checkboxConfig: {
|
|
226
|
-
reserve: (
|
|
237
|
+
reserve: (_rowSelection$value = rowSelection.value) === null || _rowSelection$value === void 0 ? void 0 : _rowSelection$value.preserveSelectedRowKeys,
|
|
227
238
|
isShiftKey: (treeConfig === null || treeConfig === void 0 ? void 0 : treeConfig.enabled) ? true : false,
|
|
228
239
|
checkMethod: (_data) => {
|
|
229
|
-
var
|
|
240
|
+
var _rowSelection$value2;
|
|
230
241
|
return executeFunction({
|
|
231
|
-
functionBody: (
|
|
242
|
+
functionBody: (_rowSelection$value2 = rowSelection.value) === null || _rowSelection$value2 === void 0 ? void 0 : _rowSelection$value2.checkMethod,
|
|
232
243
|
params: _data,
|
|
233
244
|
keys: ["row"]
|
|
234
245
|
});
|
|
@@ -274,8 +285,9 @@ function useTableWidget({ widget, fieldModel, designState = false }) {
|
|
|
274
285
|
});
|
|
275
286
|
};
|
|
276
287
|
const onCheckboxChange = (selectedRowInfo) => {
|
|
288
|
+
var _rowSelection$value3;
|
|
277
289
|
executeFunction({
|
|
278
|
-
functionBody:
|
|
290
|
+
functionBody: (_rowSelection$value3 = rowSelection.value) === null || _rowSelection$value3 === void 0 ? void 0 : _rowSelection$value3.onChange,
|
|
279
291
|
keys: ["selectedRowKeys", "selectedRows"],
|
|
280
292
|
params: selectedRowInfo
|
|
281
293
|
});
|
|
@@ -2,6 +2,6 @@ import _plugin_vue_export_helper_default from "../../../../_virtual/_plugin-vue_
|
|
|
2
2
|
import index_vue_vue_type_script_setup_true_lang_default from "./index.vue_vue_type_script_setup_true_lang.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
//#region src/widgets/base/html/index.vue
|
|
5
|
-
var html_default = /* @__PURE__ */ _plugin_vue_export_helper_default(index_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-
|
|
5
|
+
var html_default = /* @__PURE__ */ _plugin_vue_export_helper_default(index_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-c062aa8a"]]);
|
|
6
6
|
//#endregion
|
|
7
7
|
export { html_default as default };
|
|
@@ -2,7 +2,7 @@ import { ComponentNameEnum } from "../../../../core/src/constants/WidgetTypeEnum
|
|
|
2
2
|
import { useField } from "../../../../core/src/hooks/useField.js";
|
|
3
3
|
import { WidgetType, getWidgetName } from "../../widgetTypes.js";
|
|
4
4
|
import form_item_wrapper_default from "../../wrapper/form-item-wrapper.js";
|
|
5
|
-
import { createBlock, createElementVNode, defineComponent, normalizeClass, openBlock, withCtx } from "vue";
|
|
5
|
+
import { computed, createBlock, createElementVNode, defineComponent, normalizeClass, openBlock, withCtx } from "vue";
|
|
6
6
|
//#region src/widgets/base/html/index.vue?vue&type=script&setup=true&lang.ts
|
|
7
7
|
var _hoisted_1 = ["innerHTML"];
|
|
8
8
|
var index_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
@@ -13,12 +13,16 @@ var index_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
13
13
|
props: { widget: {} },
|
|
14
14
|
setup(__props) {
|
|
15
15
|
useField(__props.widget);
|
|
16
|
+
const isEmpty = computed(() => {
|
|
17
|
+
var _props$widget$props;
|
|
18
|
+
return !(((_props$widget$props = __props.widget.props) === null || _props$widget$props === void 0 ? void 0 : _props$widget$props.htmlContent) || "").replace(/<[^>]*>/g, "").replace(/ /g, "").trim();
|
|
19
|
+
});
|
|
16
20
|
return (_ctx, _cache) => {
|
|
17
21
|
return openBlock(), createBlock(form_item_wrapper_default, { widget: _ctx.widget }, {
|
|
18
22
|
default: withCtx(() => {
|
|
19
23
|
var _ctx$widget$props, _ctx$widget$props2;
|
|
20
24
|
return [createElementVNode("div", {
|
|
21
|
-
class: normalizeClass(["html-text-widget", (_ctx$widget$props = _ctx.widget.props) === null || _ctx$widget$props === void 0 ? void 0 : _ctx$widget$props.customClass]),
|
|
25
|
+
class: normalizeClass(["html-text-widget", [(_ctx$widget$props = _ctx.widget.props) === null || _ctx$widget$props === void 0 ? void 0 : _ctx$widget$props.customClass, { "html-text-widget--empty": isEmpty.value }]]),
|
|
22
26
|
innerHTML: (_ctx$widget$props2 = _ctx.widget.props) === null || _ctx$widget$props2 === void 0 ? void 0 : _ctx$widget$props2.htmlContent
|
|
23
27
|
}, null, 10, _hoisted_1)];
|
|
24
28
|
}),
|
|
@@ -3,6 +3,6 @@ import index_render_vue_vue_type_script_setup_true_lang_default from "./index-re
|
|
|
3
3
|
/* empty css */
|
|
4
4
|
/* empty css */
|
|
5
5
|
//#region src/widgets/containers/collapse/index-render.vue
|
|
6
|
-
var index_render_default = /* @__PURE__ */ _plugin_vue_export_helper_default(index_render_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-
|
|
6
|
+
var index_render_default = /* @__PURE__ */ _plugin_vue_export_helper_default(index_render_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-92bfc73d"]]);
|
|
7
7
|
//#endregion
|
|
8
8
|
export { index_render_default as default };
|
|
@@ -2,6 +2,6 @@ import _plugin_vue_export_helper_default from "../../../../_virtual/_plugin-vue_
|
|
|
2
2
|
import index_render_vue_vue_type_script_setup_true_lang_default from "./index-render.vue_vue_type_script_setup_true_lang.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
//#region src/widgets/template/SecondaryPage/index-render.vue
|
|
5
|
-
var index_render_default = /* @__PURE__ */ _plugin_vue_export_helper_default(index_render_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-
|
|
5
|
+
var index_render_default = /* @__PURE__ */ _plugin_vue_export_helper_default(index_render_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-61732f19"]]);
|
|
6
6
|
//#endregion
|
|
7
7
|
export { index_render_default as default };
|
package/src/widgets/template/SecondaryPage/index-render.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -2,7 +2,7 @@ import RenderWidgetList_default from "../../../../core/src/components/common/ren
|
|
|
2
2
|
import { ComponentNameEnum } from "../../../../core/src/constants/WidgetTypeEnum.js";
|
|
3
3
|
import { useField } from "../../../../core/src/hooks/useField.js";
|
|
4
4
|
import { TOP_LEVEL_WIDGETS, WidgetType, getWidgetName } from "../../widgetTypes.js";
|
|
5
|
-
import { createBlock, createVNode, defineComponent, openBlock, unref, withCtx } from "vue";
|
|
5
|
+
import { computed, createBlock, createSlots, createVNode, defineComponent, openBlock, unref, useCssVars, withCtx } from "vue";
|
|
6
6
|
import { TpfAddInfoLayout } from "tmgc2-share";
|
|
7
7
|
//#region src/widgets/template/SecondaryPage/index-render.vue?vue&type=script&setup=true&lang.ts
|
|
8
8
|
var index_render_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
@@ -12,19 +12,28 @@ var index_render_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ d
|
|
|
12
12
|
__name: "index-render",
|
|
13
13
|
props: { widget: {} },
|
|
14
14
|
setup(__props, { expose: __expose }) {
|
|
15
|
+
useCssVars((_ctx) => ({ "0c16b4be": contentBackground.value }));
|
|
15
16
|
const { defineExposed, getVfCtx } = useField(__props.widget);
|
|
17
|
+
const title = computed(() => {
|
|
18
|
+
var _props$widget$props;
|
|
19
|
+
return (_props$widget$props = __props.widget.props) === null || _props$widget$props === void 0 ? void 0 : _props$widget$props.title;
|
|
20
|
+
});
|
|
21
|
+
const contentBackground = computed(() => {
|
|
22
|
+
var _props$widget$props2;
|
|
23
|
+
return ((_props$widget$props2 = __props.widget.props) === null || _props$widget$props2 === void 0 ? void 0 : _props$widget$props2.color) || "#fafafa";
|
|
24
|
+
});
|
|
16
25
|
__expose({ ...defineExposed });
|
|
17
26
|
return (_ctx, _cache) => {
|
|
18
|
-
var _unref2;
|
|
27
|
+
var _unref2, _ctx$widget$titleChil;
|
|
19
28
|
return openBlock(), createBlock(unref(TpfAddInfoLayout), {
|
|
20
29
|
class: "page-template-widget",
|
|
21
|
-
title:
|
|
30
|
+
title: title.value,
|
|
22
31
|
type: (_unref2 = unref(getVfCtx)()) === null || _unref2 === void 0 ? void 0 : _unref2.type
|
|
23
|
-
}, {
|
|
32
|
+
}, createSlots({
|
|
24
33
|
footerLeft: withCtx(() => [createVNode(unref(RenderWidgetList_default), {
|
|
25
34
|
"not-allow-types": unref(TOP_LEVEL_WIDGETS),
|
|
26
35
|
list: _ctx.widget.footerLeftChildren,
|
|
27
|
-
"onUpdate:list": _cache[
|
|
36
|
+
"onUpdate:list": _cache[2] || (_cache[2] = ($event) => _ctx.widget.footerLeftChildren = $event),
|
|
28
37
|
parentWidget: _ctx.widget
|
|
29
38
|
}, null, 8, [
|
|
30
39
|
"not-allow-types",
|
|
@@ -34,7 +43,7 @@ var index_render_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ d
|
|
|
34
43
|
footerRight: withCtx(() => [createVNode(unref(RenderWidgetList_default), {
|
|
35
44
|
"not-allow-types": unref(TOP_LEVEL_WIDGETS),
|
|
36
45
|
list: _ctx.widget.footerRightChildren,
|
|
37
|
-
"onUpdate:list": _cache[
|
|
46
|
+
"onUpdate:list": _cache[3] || (_cache[3] = ($event) => _ctx.widget.footerRightChildren = $event),
|
|
38
47
|
parentWidget: _ctx.widget
|
|
39
48
|
}, null, 8, [
|
|
40
49
|
"not-allow-types",
|
|
@@ -45,15 +54,28 @@ var index_render_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ d
|
|
|
45
54
|
class: "page-template-content",
|
|
46
55
|
"not-allow-types": unref(TOP_LEVEL_WIDGETS),
|
|
47
56
|
list: _ctx.widget.children,
|
|
48
|
-
"onUpdate:list": _cache[
|
|
57
|
+
"onUpdate:list": _cache[1] || (_cache[1] = ($event) => _ctx.widget.children = $event),
|
|
49
58
|
parentWidget: _ctx.widget
|
|
50
59
|
}, null, 8, [
|
|
51
60
|
"not-allow-types",
|
|
52
61
|
"list",
|
|
53
62
|
"parentWidget"
|
|
54
63
|
])]),
|
|
55
|
-
_:
|
|
56
|
-
},
|
|
64
|
+
_: 2
|
|
65
|
+
}, [((_ctx$widget$titleChil = _ctx.widget.titleChildren) === null || _ctx$widget$titleChil === void 0 ? void 0 : _ctx$widget$titleChil.length) ? {
|
|
66
|
+
name: "title",
|
|
67
|
+
fn: withCtx(() => [createVNode(unref(RenderWidgetList_default), {
|
|
68
|
+
"not-allow-types": unref(TOP_LEVEL_WIDGETS),
|
|
69
|
+
list: _ctx.widget.titleChildren,
|
|
70
|
+
"onUpdate:list": _cache[0] || (_cache[0] = ($event) => _ctx.widget.titleChildren = $event),
|
|
71
|
+
parentWidget: _ctx.widget
|
|
72
|
+
}, null, 8, [
|
|
73
|
+
"not-allow-types",
|
|
74
|
+
"list",
|
|
75
|
+
"parentWidget"
|
|
76
|
+
])]),
|
|
77
|
+
key: "0"
|
|
78
|
+
} : void 0]), 1032, ["title", "type"]);
|
|
57
79
|
};
|
|
58
80
|
}
|
|
59
81
|
});
|