@kp-ui/lowcode 1.0.35 → 1.0.36
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/_virtual/virtual_svg-icons-register.js +2 -2
- package/package.json +27 -27
- package/render.js +4 -1
- package/src/api/useFilesystemApi/filesystem/index.js +2 -1
- package/src/components/CustomRender/components/AttachmentRender.vue.js +1 -1
- package/src/components/CustomRender/components/AttachmentRender.vue2.js +8 -5
- package/src/components/CustomRender/useCustomRender.js +12 -4
- package/src/components/code-editor/code-modal-editor.vue.js +2 -2
- package/src/components/form-designer/form-widget/container-widget/data-table-widget.vue.js +13 -63
- package/src/components/form-designer/form-widget/container-widget/data-table-widget.vue2.js +3 -1
- package/src/components/form-designer/setting-panel/form-setting.vue.js +19 -5
- package/src/components/form-designer/setting-panel/index.vue.js +4 -2
- package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-tableColumns-editor.vue.js +20 -26
- package/src/components/form-designer/setting-panel/property-editor/diy-compontent-editor.vue.js +6 -0
- package/src/components/form-designer/toolbar-panel/index.vue.js +73 -34
- package/src/components/form-designer/widget-panel/advanced/diy-compontent.js +0 -1
- package/src/components/form-designer/widget-panel/advancedFieldsEnums.js +1 -2
- package/src/components/form-render/container-item/data-table-item.vue.js +14 -56
- package/src/components/http-editor/index.vue2.js +2 -1
- package/src/lang/zh-CN.js +1 -0
- package/src/mixins/useDataTableMixin.js +149 -27
- package/src/utils/request/fmtHttpParams.js +9 -9
- package/src/utils/request/handleAxiosError.js +31 -0
- package/src/utils/request/http.js +81 -0
- package/styles/style.css +1 -1
- package/types/src/components/CustomRender/components/AttachmentRender.d.ts.map +1 -1
- package/types/src/components/CustomRender/useCustomRender.d.ts.map +1 -1
- package/types/src/components/form-designer/setting-panel/index.d.ts.map +1 -1
- package/types/src/components/form-designer/toolbar-panel/index.d.ts.map +1 -1
- package/types/src/components/form-designer/widget-panel/advanced/diy-compontent.d.ts.map +1 -1
- package/types/src/components/form-designer/widget-panel/advancedFieldsEnums.d.ts +0 -8
- package/types/src/components/form-designer/widget-panel/advancedFieldsEnums.d.ts.map +1 -1
- package/types/src/components/form-render/index.d.ts +1 -0
- package/types/src/components/form-render/index.d.ts.map +1 -1
- package/types/src/utils/request/http.d.ts +3 -1
- package/types/src/utils/request/http.d.ts.map +1 -1
- package/src/components/form-designer/widget-panel/advanced/slot.js +0 -22
- package/types/src/components/lowcodeCompontent/index.d.ts +0 -6
- package/types/src/components/lowcodeCompontent/index.d.ts.map +0 -1
|
@@ -374,7 +374,11 @@ const _sfc_main = {
|
|
|
374
374
|
async showData(_id) {
|
|
375
375
|
const formConfig = this.designer.formConfig;
|
|
376
376
|
const dsResult = await fmtHttpParams(formConfig.serveList.vformDetail, { _id });
|
|
377
|
-
const leaveDates = [
|
|
377
|
+
const leaveDates = [
|
|
378
|
+
{ date: "2024-10-28" },
|
|
379
|
+
{ date: "2024-10-29" },
|
|
380
|
+
{ date: "2024-10-20" }
|
|
381
|
+
];
|
|
378
382
|
this.$refs["preForm"].getWidgetRef("leaveDates").setValue(leaveDates);
|
|
379
383
|
this.$refs.preForm.setFormData({
|
|
380
384
|
...dsResult
|
|
@@ -413,7 +417,9 @@ const _sfc_main = {
|
|
|
413
417
|
this.$refs["preForm"].enableForm();
|
|
414
418
|
},
|
|
415
419
|
testLoadForm() {
|
|
416
|
-
axios.get(
|
|
420
|
+
axios.get(
|
|
421
|
+
"https://www.fastmock.site/mock/e9710039bb5f11262d1a0f2f0bbe08c8/vform3/getFS"
|
|
422
|
+
).then((res) => {
|
|
417
423
|
const newFormJson = res.data;
|
|
418
424
|
this.$refs.preForm.setFormJson(newFormJson);
|
|
419
425
|
this.$nextTick(() => {
|
|
@@ -511,6 +517,8 @@ const _hoisted_10 = { class: "dialog-footer" };
|
|
|
511
517
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
512
518
|
const _component_svg_icon = resolveComponent("svg-icon");
|
|
513
519
|
const _component_a_button = resolveComponent("a-button");
|
|
520
|
+
const _component_a_radio_button = resolveComponent("a-radio-button");
|
|
521
|
+
const _component_a_radio_group = resolveComponent("a-radio-group");
|
|
514
522
|
const _component_a_tree = resolveComponent("a-tree");
|
|
515
523
|
const _component_a_drawer = resolveComponent("a-drawer");
|
|
516
524
|
const _component_VFormRender = resolveComponent("VFormRender");
|
|
@@ -554,13 +562,51 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
554
562
|
createVNode(_component_svg_icon, { "icon-class": "redo" })
|
|
555
563
|
]),
|
|
556
564
|
_: 1
|
|
557
|
-
}, 8, ["disabled", "title", "onClick"])
|
|
565
|
+
}, 8, ["disabled", "title", "onClick"]),
|
|
566
|
+
createVNode(_component_a_radio_group, {
|
|
567
|
+
value: $options.layoutType,
|
|
568
|
+
"onUpdate:value": _cache[4] || (_cache[4] = ($event) => $options.layoutType = $event)
|
|
569
|
+
}, {
|
|
570
|
+
default: withCtx(() => [
|
|
571
|
+
createVNode(_component_a_radio_button, {
|
|
572
|
+
value: "PC",
|
|
573
|
+
type: $options.layoutType === "PC" ? "primary" : "",
|
|
574
|
+
onClick: _cache[1] || (_cache[1] = ($event) => $options.changeLayoutType("PC"))
|
|
575
|
+
}, {
|
|
576
|
+
default: withCtx(() => [
|
|
577
|
+
createTextVNode(toDisplayString(_ctx.i18nt("designer.toolbar.pcLayout")), 1)
|
|
578
|
+
]),
|
|
579
|
+
_: 1
|
|
580
|
+
}, 8, ["type"]),
|
|
581
|
+
createVNode(_component_a_radio_button, {
|
|
582
|
+
value: "Pad",
|
|
583
|
+
type: $options.layoutType === "Pad" ? "primary" : "",
|
|
584
|
+
onClick: _cache[2] || (_cache[2] = ($event) => $options.changeLayoutType("Pad"))
|
|
585
|
+
}, {
|
|
586
|
+
default: withCtx(() => [
|
|
587
|
+
createTextVNode(toDisplayString(_ctx.i18nt("designer.toolbar.padLayout")), 1)
|
|
588
|
+
]),
|
|
589
|
+
_: 1
|
|
590
|
+
}, 8, ["type"]),
|
|
591
|
+
createVNode(_component_a_radio_button, {
|
|
592
|
+
type: $options.layoutType === "H5" ? "primary" : "",
|
|
593
|
+
onClick: _cache[3] || (_cache[3] = ($event) => $options.changeLayoutType("H5")),
|
|
594
|
+
value: "H5"
|
|
595
|
+
}, {
|
|
596
|
+
default: withCtx(() => [
|
|
597
|
+
createTextVNode(toDisplayString(_ctx.i18nt("designer.toolbar.mobileLayout")), 1)
|
|
598
|
+
]),
|
|
599
|
+
_: 1
|
|
600
|
+
}, 8, ["type"])
|
|
601
|
+
]),
|
|
602
|
+
_: 1
|
|
603
|
+
}, 8, ["value"])
|
|
558
604
|
]),
|
|
559
605
|
createVNode(_component_a_drawer, {
|
|
560
606
|
title: _ctx.i18nt("designer.toolbar.nodeTreeTitle"),
|
|
561
607
|
direction: "ltr",
|
|
562
608
|
visible: $data.showNodeTreeDrawerFlag,
|
|
563
|
-
"onUpdate:visible": _cache[
|
|
609
|
+
"onUpdate:visible": _cache[5] || (_cache[5] = ($event) => $data.showNodeTreeDrawerFlag = $event),
|
|
564
610
|
width: 280,
|
|
565
611
|
"destroy-on-close": true,
|
|
566
612
|
class: "node-tree-drawer"
|
|
@@ -634,7 +680,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
634
680
|
}, 8, ["onClick"])) : createCommentVNode("", true),
|
|
635
681
|
createVNode(_component_a_button, {
|
|
636
682
|
type: "link",
|
|
637
|
-
onClick: _cache[
|
|
683
|
+
onClick: _cache[6] || (_cache[6] = ($event) => $props.changeRightWidth())
|
|
638
684
|
}, {
|
|
639
685
|
default: withCtx(() => [
|
|
640
686
|
createVNode(_component_svg_icon, {
|
|
@@ -652,7 +698,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
652
698
|
createVNode(_component_a_modal, {
|
|
653
699
|
title: _ctx.i18nt("designer.toolbar.preview"),
|
|
654
700
|
visible: $data.showPreviewDialogFlag,
|
|
655
|
-
"onUpdate:visible": _cache[
|
|
701
|
+
"onUpdate:visible": _cache[9] || (_cache[9] = ($event) => $data.showPreviewDialogFlag = $event),
|
|
656
702
|
"show-close": true,
|
|
657
703
|
"close-on-click-modal": false,
|
|
658
704
|
"close-on-press-escape": false,
|
|
@@ -666,7 +712,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
666
712
|
footer: withCtx(() => [
|
|
667
713
|
createElementVNode("div", _hoisted_5, [
|
|
668
714
|
createVNode(_component_a_button, {
|
|
669
|
-
onClick: _cache[
|
|
715
|
+
onClick: _cache[7] || (_cache[7] = ($event) => $options.showData(1))
|
|
670
716
|
}, {
|
|
671
717
|
default: withCtx(() => [
|
|
672
718
|
createTextVNode("数据回显 _id 1")
|
|
@@ -710,28 +756,21 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
710
756
|
_: 1
|
|
711
757
|
}, 8, ["onClick"]),
|
|
712
758
|
createVNode(_component_a_button, {
|
|
713
|
-
onClick: _cache[
|
|
759
|
+
onClick: _cache[8] || (_cache[8] = ($event) => $data.showPreviewDialogFlag = false)
|
|
714
760
|
}, {
|
|
715
761
|
default: withCtx(() => [
|
|
716
762
|
createTextVNode(toDisplayString(_ctx.i18nt("designer.hint.closePreview")), 1)
|
|
717
763
|
]),
|
|
718
764
|
_: 1
|
|
719
|
-
})
|
|
720
|
-
(openBlock(), createBlock(_component_a_button, {
|
|
721
|
-
key: 0,
|
|
722
|
-
onClick: $options.setReadMode
|
|
723
|
-
}, {
|
|
724
|
-
default: withCtx(() => [
|
|
725
|
-
createTextVNode("测试变只读")
|
|
726
|
-
]),
|
|
727
|
-
_: 1
|
|
728
|
-
}, 8, ["onClick"]))
|
|
765
|
+
})
|
|
729
766
|
])
|
|
730
767
|
]),
|
|
731
768
|
default: withCtx(() => [
|
|
732
769
|
createElementVNode("div", null, [
|
|
733
770
|
createElementVNode("div", {
|
|
734
|
-
class: normalizeClass(["form-render-wrapper", [
|
|
771
|
+
class: normalizeClass(["form-render-wrapper", [
|
|
772
|
+
$options.layoutType === "H5" ? "h5-layout" : $options.layoutType === "Pad" ? "pad-layout" : ""
|
|
773
|
+
]])
|
|
735
774
|
}, [
|
|
736
775
|
createVNode(_component_VFormRender, {
|
|
737
776
|
vfCtx: $data.vfCtx,
|
|
@@ -754,7 +793,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
754
793
|
createVNode(_component_a_modal, {
|
|
755
794
|
title: _ctx.i18nt("designer.toolbar.importJson"),
|
|
756
795
|
visible: $data.showImportJsonDialogFlag,
|
|
757
|
-
"onUpdate:visible": _cache[
|
|
796
|
+
"onUpdate:visible": _cache[12] || (_cache[12] = ($event) => $data.showImportJsonDialogFlag = $event),
|
|
758
797
|
"show-close": true,
|
|
759
798
|
class: "drag-dialog",
|
|
760
799
|
"append-to-body": true,
|
|
@@ -776,7 +815,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
776
815
|
_: 1
|
|
777
816
|
}, 8, ["onClick"]),
|
|
778
817
|
createVNode(_component_a_button, {
|
|
779
|
-
onClick: _cache[
|
|
818
|
+
onClick: _cache[11] || (_cache[11] = ($event) => $data.showImportJsonDialogFlag = false)
|
|
780
819
|
}, {
|
|
781
820
|
default: withCtx(() => [
|
|
782
821
|
createTextVNode(toDisplayString(_ctx.i18nt("designer.hint.cancel")), 1)
|
|
@@ -796,7 +835,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
796
835
|
mode: "json",
|
|
797
836
|
readonly: false,
|
|
798
837
|
modelValue: $data.importTemplate,
|
|
799
|
-
"onUpdate:modelValue": _cache[
|
|
838
|
+
"onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => $data.importTemplate = $event)
|
|
800
839
|
}, null, 8, ["modelValue"])
|
|
801
840
|
]),
|
|
802
841
|
_: 1
|
|
@@ -804,7 +843,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
804
843
|
createVNode(_component_a_modal, {
|
|
805
844
|
title: _ctx.i18nt("designer.toolbar.exportJson"),
|
|
806
845
|
visible: $data.showExportJsonDialogFlag,
|
|
807
|
-
"onUpdate:visible": _cache[
|
|
846
|
+
"onUpdate:visible": _cache[15] || (_cache[15] = ($event) => $data.showExportJsonDialogFlag = $event),
|
|
808
847
|
"show-close": true,
|
|
809
848
|
class: "drag-dialog",
|
|
810
849
|
center: "",
|
|
@@ -834,7 +873,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
834
873
|
_: 1
|
|
835
874
|
}, 8, ["onClick"]),
|
|
836
875
|
createVNode(_component_a_button, {
|
|
837
|
-
onClick: _cache[
|
|
876
|
+
onClick: _cache[14] || (_cache[14] = ($event) => $data.showExportJsonDialogFlag = false)
|
|
838
877
|
}, {
|
|
839
878
|
default: withCtx(() => [
|
|
840
879
|
createTextVNode(toDisplayString(_ctx.i18nt("designer.hint.closePreview")), 1)
|
|
@@ -848,7 +887,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
848
887
|
mode: "json",
|
|
849
888
|
readonly: true,
|
|
850
889
|
modelValue: $data.jsonContent,
|
|
851
|
-
"onUpdate:modelValue": _cache[
|
|
890
|
+
"onUpdate:modelValue": _cache[13] || (_cache[13] = ($event) => $data.jsonContent = $event)
|
|
852
891
|
}, null, 8, ["modelValue"])
|
|
853
892
|
]),
|
|
854
893
|
_: 1
|
|
@@ -856,7 +895,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
856
895
|
createVNode(_component_a_modal, {
|
|
857
896
|
title: _ctx.i18nt("designer.hint.exportFormData"),
|
|
858
897
|
visible: $data.showFormDataDialogFlag,
|
|
859
|
-
"onUpdate:visible": _cache[
|
|
898
|
+
"onUpdate:visible": _cache[18] || (_cache[18] = ($event) => $data.showFormDataDialogFlag = $event),
|
|
860
899
|
"show-close": true,
|
|
861
900
|
class: "nested-drag-dialog dialog-title-light-bg",
|
|
862
901
|
center: "",
|
|
@@ -885,7 +924,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
885
924
|
_: 1
|
|
886
925
|
}, 8, ["onClick"]),
|
|
887
926
|
createVNode(_component_a_button, {
|
|
888
|
-
onClick: _cache[
|
|
927
|
+
onClick: _cache[17] || (_cache[17] = ($event) => $data.showFormDataDialogFlag = false)
|
|
889
928
|
}, {
|
|
890
929
|
default: withCtx(() => [
|
|
891
930
|
createTextVNode(toDisplayString(_ctx.i18nt("designer.hint.closePreview")), 1)
|
|
@@ -900,7 +939,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
900
939
|
mode: "json",
|
|
901
940
|
readonly: true,
|
|
902
941
|
modelValue: $data.formDataJson,
|
|
903
|
-
"onUpdate:modelValue": _cache[
|
|
942
|
+
"onUpdate:modelValue": _cache[16] || (_cache[16] = ($event) => $data.formDataJson = $event)
|
|
904
943
|
}, null, 8, ["modelValue"])
|
|
905
944
|
])
|
|
906
945
|
]),
|
|
@@ -910,7 +949,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
910
949
|
key: 0,
|
|
911
950
|
title: _ctx.i18nt("designer.toolbar.generateSFC"),
|
|
912
951
|
visible: $data.showExportSFCDialogFlag,
|
|
913
|
-
"onUpdate:visible": _cache[
|
|
952
|
+
"onUpdate:visible": _cache[23] || (_cache[23] = ($event) => $data.showExportSFCDialogFlag = $event),
|
|
914
953
|
"append-to-body": "",
|
|
915
954
|
"show-close": true,
|
|
916
955
|
class: "drag-dialog",
|
|
@@ -957,7 +996,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
957
996
|
_: 1
|
|
958
997
|
}, 8, ["onClick"]),
|
|
959
998
|
createVNode(_component_a_button, {
|
|
960
|
-
onClick: _cache[
|
|
999
|
+
onClick: _cache[22] || (_cache[22] = ($event) => $data.showExportSFCDialogFlag = false)
|
|
961
1000
|
}, {
|
|
962
1001
|
default: withCtx(() => [
|
|
963
1002
|
createTextVNode(toDisplayString(_ctx.i18nt("designer.hint.closePreview")), 1)
|
|
@@ -971,7 +1010,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
971
1010
|
type: "border-card",
|
|
972
1011
|
class: "no-box-shadow no-padding",
|
|
973
1012
|
activeKey: $data.activeSFCTab,
|
|
974
|
-
"onUpdate:activeKey": _cache[
|
|
1013
|
+
"onUpdate:activeKey": _cache[21] || (_cache[21] = ($event) => $data.activeSFCTab = $event)
|
|
975
1014
|
}, {
|
|
976
1015
|
default: withCtx(() => [
|
|
977
1016
|
createVNode(_component_a_tab_pane, {
|
|
@@ -983,7 +1022,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
983
1022
|
mode: "html",
|
|
984
1023
|
readonly: true,
|
|
985
1024
|
modelValue: $data.sfcCode,
|
|
986
|
-
"onUpdate:modelValue": _cache[
|
|
1025
|
+
"onUpdate:modelValue": _cache[19] || (_cache[19] = ($event) => $data.sfcCode = $event),
|
|
987
1026
|
"user-worker": false
|
|
988
1027
|
}, null, 8, ["modelValue"])
|
|
989
1028
|
]),
|
|
@@ -998,7 +1037,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
998
1037
|
mode: "html",
|
|
999
1038
|
readonly: true,
|
|
1000
1039
|
modelValue: $data.sfcCodeV3,
|
|
1001
|
-
"onUpdate:modelValue": _cache[
|
|
1040
|
+
"onUpdate:modelValue": _cache[20] || (_cache[20] = ($event) => $data.sfcCodeV3 = $event),
|
|
1002
1041
|
"user-worker": false
|
|
1003
1042
|
}, null, 8, ["modelValue"])
|
|
1004
1043
|
]),
|
|
@@ -1012,7 +1051,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1012
1051
|
}, 8, ["title", "visible"])) : createCommentVNode("", true)
|
|
1013
1052
|
]);
|
|
1014
1053
|
}
|
|
1015
|
-
const ToolbarPanel = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
1054
|
+
const ToolbarPanel = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-44ac64d1"]]);
|
|
1016
1055
|
export {
|
|
1017
1056
|
ToolbarPanel as default
|
|
1018
1057
|
};
|
|
@@ -5,10 +5,9 @@ import { richEditor } from "./advanced/rich-editor.js";
|
|
|
5
5
|
import { fileUpload } from "./advanced/file-upload.js";
|
|
6
6
|
import { bpmnEditor } from "./advanced/bpmn-editor.js";
|
|
7
7
|
import { toolbar } from "./advanced/attachment-render.js";
|
|
8
|
-
import { slot } from "./advanced/slot.js";
|
|
9
8
|
import { diyCompontent } from "./advanced/diy-compontent.js";
|
|
10
9
|
const advancedFieldsEnums = {
|
|
11
|
-
slot,
|
|
10
|
+
// slot,
|
|
12
11
|
diyCompontent,
|
|
13
12
|
toolbar,
|
|
14
13
|
cascader,
|
|
@@ -1,20 +1,26 @@
|
|
|
1
1
|
import ContainerItemWrapper from "./container-item-wrapper.vue.js";
|
|
2
2
|
import emitter from "../../../utils/emitter.js";
|
|
3
|
+
import STable, { setLicenseKey } from "@surely-vue/table";
|
|
4
|
+
/* empty css */
|
|
3
5
|
import i18n from "../../../utils/i18n.js";
|
|
4
6
|
import comps from "../../form-designer/form-widget/field-widget/index.js";
|
|
5
7
|
import refMixin from "../refMixin.js";
|
|
6
8
|
import containerItemMixin from "./containerItemMixin.js";
|
|
7
9
|
import useDataTableMixin from "../../../mixins/useDataTableMixin.js";
|
|
8
|
-
import { resolveComponent, withDirectives, createBlock, openBlock, normalizeStyle, withCtx, createVNode, normalizeClass,
|
|
10
|
+
import { resolveComponent, withDirectives, createBlock, openBlock, normalizeStyle, withCtx, createVNode, normalizeClass, vShow } from "vue";
|
|
9
11
|
/* empty css */
|
|
10
12
|
/* empty css */
|
|
11
13
|
import _export_sfc from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
14
|
+
setLicenseKey(
|
|
15
|
+
"45beeffb8943e862ec9cbaa94614552cT1JERVI6MTAwMDc5LEVYUElSWT0xNzQ4MzA0MDAwMDAwLERPTUFJTj1zdXJlbHkuY29vbCxVTFRJTUFURT0xLEtFWVZFUlNJT049MQ=="
|
|
16
|
+
);
|
|
12
17
|
const _sfc_main = {
|
|
13
18
|
name: "DataTableItem",
|
|
14
19
|
componentName: "ContainerItem",
|
|
15
20
|
// 必须固定为ContainerItem,用于接收父级组件的broadcast事件
|
|
16
21
|
mixins: [emitter, i18n, refMixin, containerItemMixin, useDataTableMixin],
|
|
17
22
|
components: {
|
|
23
|
+
STable,
|
|
18
24
|
ContainerItemWrapper,
|
|
19
25
|
...comps
|
|
20
26
|
},
|
|
@@ -114,22 +120,21 @@ const _sfc_main = {
|
|
|
114
120
|
};
|
|
115
121
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
116
122
|
const _component_a_empty = resolveComponent("a-empty");
|
|
117
|
-
const
|
|
118
|
-
const _component_a_button = resolveComponent("a-button");
|
|
119
|
-
const _component_a_table = resolveComponent("a-table");
|
|
123
|
+
const _component_s_table = resolveComponent("s-table");
|
|
120
124
|
const _component_container_item_wrapper = resolveComponent("container-item-wrapper");
|
|
121
125
|
return withDirectives((openBlock(), createBlock(_component_container_item_wrapper, {
|
|
122
126
|
style: normalizeStyle({ display: "flex", height: parseFloat(_ctx.tableHeight || 0) + "px" }),
|
|
123
127
|
widget: $props.widget
|
|
124
128
|
}, {
|
|
125
129
|
default: withCtx(() => [
|
|
126
|
-
createVNode(
|
|
127
|
-
class: normalizeClass(["tpf-table", [_ctx.customClass]]),
|
|
130
|
+
createVNode(_component_s_table, {
|
|
131
|
+
class: normalizeClass(["tpf-surely-table", [_ctx.customClass]]),
|
|
128
132
|
ref: "dataTable2",
|
|
133
|
+
columns: _ctx.columns,
|
|
134
|
+
size: _ctx.widgetSize,
|
|
129
135
|
dataSource: $props.widget.options.dataSource,
|
|
130
136
|
rowKey: (record) => record[$props.widget.options.rowKey],
|
|
131
137
|
scroll: { y: parseFloat(_ctx.tableHeight || 0), x: 300 },
|
|
132
|
-
size: _ctx.widgetSize,
|
|
133
138
|
bordered: $props.widget.options.border,
|
|
134
139
|
style: normalizeStyle({ width: $props.widget.options.tableWidth }),
|
|
135
140
|
"row-class-name": _ctx.rowClassName,
|
|
@@ -144,62 +149,15 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
144
149
|
emptyText: withCtx(() => [
|
|
145
150
|
createVNode(_component_a_empty)
|
|
146
151
|
]),
|
|
147
|
-
default: withCtx(() => [
|
|
148
|
-
$props.widget.options.showIndex ? (openBlock(), createBlock(_component_a_table_column, {
|
|
149
|
-
key: 0,
|
|
150
|
-
title: "序号",
|
|
151
|
-
align: "left",
|
|
152
|
-
width: 80,
|
|
153
|
-
fixed: "left",
|
|
154
|
-
resizable: true,
|
|
155
|
-
customRender: _ctx.customRenderIndex
|
|
156
|
-
}, null, 8, ["customRender"])) : createCommentVNode("", true),
|
|
157
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList($props.widget.options.tableColumns, (item, index) => {
|
|
158
|
-
return openBlock(), createElementBlock(Fragment, null, [
|
|
159
|
-
item.show !== false ? (openBlock(), createBlock(_component_a_table_column, mergeProps({ key: index }, _ctx.handleColumnItem(item), { showSorterTooltip: false }), null, 16)) : createCommentVNode("", true)
|
|
160
|
-
], 64);
|
|
161
|
-
}), 256)),
|
|
162
|
-
!!$props.widget.options.showButtonsColumn ? (openBlock(), createBlock(_component_a_table_column, {
|
|
163
|
-
key: 1,
|
|
164
|
-
fixed: "right",
|
|
165
|
-
"class-name": "data-table-buttons-column",
|
|
166
|
-
align: "center",
|
|
167
|
-
title: $props.widget.options.buttonsColumnTitle,
|
|
168
|
-
width: $props.widget.options.buttonsColumnWidth,
|
|
169
|
-
resizable: true
|
|
170
|
-
}, {
|
|
171
|
-
default: withCtx((scope) => [
|
|
172
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList($props.widget.options.operationButtons, (ob, inx) => {
|
|
173
|
-
return withDirectives((openBlock(), createBlock(_component_a_button, {
|
|
174
|
-
key: inx,
|
|
175
|
-
type: ob.type,
|
|
176
|
-
size: ob.size,
|
|
177
|
-
shape: ob.shape,
|
|
178
|
-
disabled: _ctx.disableOperationButton(ob, scope.index, scope.record),
|
|
179
|
-
onClick: ($event) => _ctx.handleOperationButtonClick(ob.name, scope.index, scope.record, scope, ob),
|
|
180
|
-
class: normalizeClass(["data-table-" + ob.name + "-button"])
|
|
181
|
-
}, {
|
|
182
|
-
default: withCtx(() => [
|
|
183
|
-
createTextVNode(toDisplayString(_ctx.getOperationButtonLabel(ob, scope.index, scope.record)), 1)
|
|
184
|
-
]),
|
|
185
|
-
_: 2
|
|
186
|
-
}, 1032, ["type", "size", "shape", "disabled", "onClick", "class"])), [
|
|
187
|
-
[vShow, _ctx.showOperationButton(ob, scope.index, scope.record)]
|
|
188
|
-
]);
|
|
189
|
-
}), 128))
|
|
190
|
-
]),
|
|
191
|
-
_: 1
|
|
192
|
-
}, 8, ["title", "width"])) : createCommentVNode("", true)
|
|
193
|
-
]),
|
|
194
152
|
_: 1
|
|
195
|
-
}, 8, ["
|
|
153
|
+
}, 8, ["columns", "class", "size", "dataSource", "rowKey", "scroll", "bordered", "style", "row-class-name", "rowSelection", "pagination", "customRow", "rowClassName", "onChange", "onResizeColumn", "loading"])
|
|
196
154
|
]),
|
|
197
155
|
_: 1
|
|
198
156
|
}, 8, ["style", "widget"])), [
|
|
199
157
|
[vShow, !_ctx.handleHidden()]
|
|
200
158
|
]);
|
|
201
159
|
}
|
|
202
|
-
const dataTableItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
160
|
+
const dataTableItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-5eaec0db"]]);
|
|
203
161
|
export {
|
|
204
162
|
dataTableItem as default
|
|
205
163
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import i18n from "../../utils/i18n.js";
|
|
2
2
|
import CodeEditor from "../code-editor/index.vue.js";
|
|
3
3
|
import { isArray } from "lodash-es";
|
|
4
|
-
import
|
|
4
|
+
import "../../utils/request/http.js";
|
|
5
5
|
import CodeModalEditor from "../code-editor/code-modal-editor.vue.js";
|
|
6
|
+
import { getHttp, getLocat, replaceVars } from "@kp-ui/tool";
|
|
6
7
|
const _sfc_main = {
|
|
7
8
|
name: "http-editor",
|
|
8
9
|
inheritAttrs: false,
|