@kp-ui/lowcode 1.0.77 → 1.0.79
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 +12 -6
- package/src/components/form-designer/form-widget/container-widget/vf-collapse-widget.vue.js +1 -1
- package/src/components/form-designer/setting-panel/property-editor/button-list-editor.vue.js +2 -123
- package/src/components/form-designer/setting-panel/property-editor/button-list-editor.vue2.js +95 -0
- package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-selections-editor.vue.js +1 -0
- package/src/components/form-designer/toolbar-panel/index.vue.js +1 -1
- package/src/components/form-designer/toolbar-panel/index.vue2.js +2 -2
- package/src/components/form-designer/widget-panel/basicFields/buttonList.js +22 -1
- package/src/components/form-designer/widget-panel/containers/data-table.js +6 -1
- package/src/components/form-render/container-item/data-table-item.vue.js +3 -2
- package/src/components/form-render/container-item/vf-collapse-item.vue.js +1 -1
- package/src/components/form-render/index.vue.js +4 -1
- package/src/components/http-editor/index.vue.js +3 -3
- package/src/components/public/ActionButtonListDialog.vue.js +1 -1
- package/src/components/public/ActionButtonListDialog.vue2.js +1 -1
- package/src/mixins/useDataTableMixin.js +14 -1
- package/stats.html +1 -1
- package/styles/style.css +1 -1
- package/types/install.d.ts +3 -0
- package/types/install.d.ts.map +1 -1
- package/types/src/components/form-designer/widget-panel/basicFields/buttonList.d.ts.map +1 -1
- package/types/src/components/form-designer/widget-panel/containers/data-table.d.ts.map +1 -1
- package/types/src/env.d.ts +6 -7
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
if (typeof window !== "undefined") {
|
|
2
2
|
let loadSvg = function() {
|
|
3
3
|
var body = document.body;
|
|
4
|
-
var svgDom = document.getElementById("
|
|
4
|
+
var svgDom = document.getElementById("__svg__icons__dom__1750214007800__");
|
|
5
5
|
if (!svgDom) {
|
|
6
6
|
svgDom = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
7
7
|
svgDom.style.position = "absolute";
|
|
8
8
|
svgDom.style.width = "0";
|
|
9
9
|
svgDom.style.height = "0";
|
|
10
|
-
svgDom.id = "
|
|
10
|
+
svgDom.id = "__svg__icons__dom__1750214007800__";
|
|
11
11
|
svgDom.setAttribute("xmlns", "http://www.w3.org/2000/svg");
|
|
12
12
|
svgDom.setAttribute("xmlns:link", "http://www.w3.org/1999/xlink");
|
|
13
13
|
}
|
package/package.json
CHANGED
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kp-ui/lowcode",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.79",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"main": "index.js",
|
|
8
7
|
"module": "index.js",
|
|
9
|
-
"sideEffects": [
|
|
10
|
-
"./_virtual"
|
|
11
|
-
],
|
|
12
|
-
"types": "types/install.d.d.ts",
|
|
13
8
|
"dependencies": {
|
|
14
9
|
"@element-plus/icons-vue": "^0.2.4",
|
|
15
10
|
"@kp-ui/tool": "1.0.27",
|
|
@@ -29,5 +24,16 @@
|
|
|
29
24
|
"quill": "^2.0.3",
|
|
30
25
|
"sortablejs": "1.14.0",
|
|
31
26
|
"vue": "3.5.11"
|
|
27
|
+
},
|
|
28
|
+
"main": "index.js",
|
|
29
|
+
"types": "types/install.d.d.ts",
|
|
30
|
+
"exports": {
|
|
31
|
+
".": {
|
|
32
|
+
"import": "./index.js",
|
|
33
|
+
"types": "./types/index.d.ts"
|
|
34
|
+
},
|
|
35
|
+
"./style": "./styles/style.css",
|
|
36
|
+
"./styles/*": "./styles/*",
|
|
37
|
+
"./src/*": "./src/*"
|
|
32
38
|
}
|
|
33
39
|
}
|
|
@@ -137,7 +137,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
137
137
|
_: 1
|
|
138
138
|
}, 8, ["designer", "widget", "parent-widget", "parent-list", "index-of-parent-list"]);
|
|
139
139
|
}
|
|
140
|
-
const vfCollapseWidget = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
140
|
+
const vfCollapseWidget = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-91b64900"]]);
|
|
141
141
|
export {
|
|
142
142
|
vfCollapseWidget as default
|
|
143
143
|
};
|
package/src/components/form-designer/setting-panel/property-editor/button-list-editor.vue.js
CHANGED
|
@@ -1,125 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import _sfc_main$1 from "../../../code-editor/code-modal-editor.vue.js";
|
|
3
|
-
import { generateId } from "../../../../utils/util.js";
|
|
4
|
-
import { cloneDeep } from "lodash-es";
|
|
5
|
-
import ActionButtonListDialog from "../../../public/ActionButtonListDialog.vue.js";
|
|
6
|
-
import { resolveComponent, createElementBlock, openBlock, Fragment, createVNode, withCtx, createTextVNode, createElementVNode, toDisplayString } from "vue";
|
|
7
|
-
/* empty css */
|
|
8
|
-
import _export_sfc from "../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
9
|
-
const _sfc_main = {
|
|
10
|
-
name: "button-list-editor",
|
|
11
|
-
mixins: [i18n],
|
|
12
|
-
props: {
|
|
13
|
-
designer: Object,
|
|
14
|
-
selectedWidget: Object,
|
|
15
|
-
optionModel: Object
|
|
16
|
-
},
|
|
17
|
-
components: {
|
|
18
|
-
ActionButtonListDialog,
|
|
19
|
-
CodeModalEditor: _sfc_main$1
|
|
20
|
-
},
|
|
21
|
-
data() {
|
|
22
|
-
return {
|
|
23
|
-
buttonList: [],
|
|
24
|
-
currentEditEventName: "",
|
|
25
|
-
currentEditBtn: {},
|
|
26
|
-
btnListConfigDialogVisible: false
|
|
27
|
-
};
|
|
28
|
-
},
|
|
29
|
-
watch: {
|
|
30
|
-
buttonList() {
|
|
31
|
-
this.optionModel.buttonList = this.buttonList;
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
methods: {
|
|
35
|
-
addOperationButton() {
|
|
36
|
-
this.buttonList.splice(0, 0, {
|
|
37
|
-
key: generateId(),
|
|
38
|
-
label: "new btn",
|
|
39
|
-
type: "primary",
|
|
40
|
-
danger: false,
|
|
41
|
-
icon: "",
|
|
42
|
-
onHidden: "",
|
|
43
|
-
onDisabled: "",
|
|
44
|
-
onClick: ""
|
|
45
|
-
});
|
|
46
|
-
},
|
|
47
|
-
editEvent(type, row) {
|
|
48
|
-
this.currentEditBtn = row;
|
|
49
|
-
this.currentEditEventName = type;
|
|
50
|
-
this.$refs.CodeModalEditorRef.open(row[type]);
|
|
51
|
-
},
|
|
52
|
-
handleConfigBtn() {
|
|
53
|
-
this.buttonList = cloneDeep(this.optionModel.buttonList);
|
|
54
|
-
this.btnListConfigDialogVisible = true;
|
|
55
|
-
},
|
|
56
|
-
handleCloseDialog() {
|
|
57
|
-
this.btnListConfigDialogVisible = false;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
62
|
-
const _component_a_button = resolveComponent("a-button");
|
|
63
|
-
const _component_a_form_item = resolveComponent("a-form-item");
|
|
64
|
-
const _component_ActionButtonListDialog = resolveComponent("ActionButtonListDialog");
|
|
65
|
-
const _component_a_modal = resolveComponent("a-modal");
|
|
66
|
-
const _component_CodeModalEditor = resolveComponent("CodeModalEditor");
|
|
67
|
-
return openBlock(), createElementBlock(Fragment, null, [
|
|
68
|
-
createVNode(_component_a_form_item, {
|
|
69
|
-
label: _ctx.i18nt("designer.setting.buttonList")
|
|
70
|
-
}, {
|
|
71
|
-
default: withCtx(() => [
|
|
72
|
-
createVNode(_component_a_button, { onClick: $options.handleConfigBtn }, {
|
|
73
|
-
default: withCtx(() => [
|
|
74
|
-
createTextVNode("按钮配置")
|
|
75
|
-
]),
|
|
76
|
-
_: 1
|
|
77
|
-
}, 8, ["onClick"])
|
|
78
|
-
]),
|
|
79
|
-
_: 1
|
|
80
|
-
}, 8, ["label"]),
|
|
81
|
-
createVNode(_component_a_modal, {
|
|
82
|
-
title: _ctx.i18nt("designer.setting.buttonsColumnEdit"),
|
|
83
|
-
visible: $data.btnListConfigDialogVisible,
|
|
84
|
-
"onUpdate:visible": _cache[1] || (_cache[1] = ($event) => $data.btnListConfigDialogVisible = $event),
|
|
85
|
-
"show-close": true,
|
|
86
|
-
dialogClass: "drag-dialog",
|
|
87
|
-
"append-to-body": "",
|
|
88
|
-
"close-on-click-modal": false,
|
|
89
|
-
"close-on-press-escape": false,
|
|
90
|
-
"destroy-on-close": true,
|
|
91
|
-
width: "1250px"
|
|
92
|
-
}, {
|
|
93
|
-
footer: withCtx(() => [
|
|
94
|
-
createElementVNode("div", { class: "dialog-footer" }, [
|
|
95
|
-
createVNode(_component_a_button, {
|
|
96
|
-
size: "default",
|
|
97
|
-
onClick: $options.handleCloseDialog
|
|
98
|
-
}, {
|
|
99
|
-
default: withCtx(() => [
|
|
100
|
-
createTextVNode(toDisplayString(_ctx.i18nt("designer.hint.closePreview")), 1)
|
|
101
|
-
]),
|
|
102
|
-
_: 1
|
|
103
|
-
}, 8, ["onClick"])
|
|
104
|
-
])
|
|
105
|
-
]),
|
|
106
|
-
default: withCtx(() => [
|
|
107
|
-
createVNode(_component_ActionButtonListDialog, {
|
|
108
|
-
data: $data.buttonList,
|
|
109
|
-
"onUpdate:data": _cache[0] || (_cache[0] = ($event) => $data.buttonList = $event)
|
|
110
|
-
}, null, 8, ["data"])
|
|
111
|
-
]),
|
|
112
|
-
_: 1
|
|
113
|
-
}, 8, ["title", "visible"]),
|
|
114
|
-
createVNode(_component_CodeModalEditor, {
|
|
115
|
-
modelValue: $data.currentEditBtn[$data.currentEditEventName],
|
|
116
|
-
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $data.currentEditBtn[$data.currentEditEventName] = $event),
|
|
117
|
-
ref: "CodeModalEditorRef",
|
|
118
|
-
"event-header": `${$data.currentEditBtn.label}.${$data.currentEditEventName}(){`
|
|
119
|
-
}, null, 8, ["modelValue", "event-header"])
|
|
120
|
-
], 64);
|
|
121
|
-
}
|
|
122
|
-
const buttonListEditor = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-0b9979c4"]]);
|
|
1
|
+
import _sfc_main from "./button-list-editor.vue2.js";
|
|
123
2
|
export {
|
|
124
|
-
|
|
3
|
+
_sfc_main as default
|
|
125
4
|
};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { defineComponent, ref, watch, resolveComponent, createElementBlock, openBlock, Fragment, createVNode, unref, withCtx, createTextVNode, toDisplayString } from "vue";
|
|
2
|
+
import { useI18n } from "../../../../utils/i18n.js";
|
|
3
|
+
import _sfc_main$1 from "../../../code-editor/code-modal-editor.vue.js";
|
|
4
|
+
import { cloneDeep } from "lodash-es";
|
|
5
|
+
import ActionButtonListDialog from "../../../public/ActionButtonListDialog.vue.js";
|
|
6
|
+
import { TpfModal } from "tmgc2-share";
|
|
7
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
8
|
+
...{
|
|
9
|
+
name: "button-list-editor"
|
|
10
|
+
},
|
|
11
|
+
__name: "button-list-editor",
|
|
12
|
+
props: {
|
|
13
|
+
designer: {},
|
|
14
|
+
selectedWidget: {},
|
|
15
|
+
optionModel: {}
|
|
16
|
+
},
|
|
17
|
+
setup(__props) {
|
|
18
|
+
const { i18nt } = useI18n();
|
|
19
|
+
const props = __props;
|
|
20
|
+
const CodeModalEditorRef = ref(null);
|
|
21
|
+
const buttonList = ref([]);
|
|
22
|
+
const currentEditEventName = ref("");
|
|
23
|
+
const currentEditBtn = ref({});
|
|
24
|
+
const btnListConfigDialogVisible = ref(false);
|
|
25
|
+
watch(buttonList, () => {
|
|
26
|
+
props.optionModel.buttonList = buttonList.value;
|
|
27
|
+
});
|
|
28
|
+
const handleConfigBtn = () => {
|
|
29
|
+
buttonList.value = cloneDeep(props.optionModel.buttonList);
|
|
30
|
+
btnListConfigDialogVisible.value = true;
|
|
31
|
+
};
|
|
32
|
+
const handleCloseDialog = () => {
|
|
33
|
+
btnListConfigDialogVisible.value = false;
|
|
34
|
+
};
|
|
35
|
+
return (_ctx, _cache) => {
|
|
36
|
+
const _component_a_button = resolveComponent("a-button");
|
|
37
|
+
const _component_a_form_item = resolveComponent("a-form-item");
|
|
38
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
39
|
+
createVNode(_component_a_form_item, {
|
|
40
|
+
label: unref(i18nt)("designer.setting.buttonList")
|
|
41
|
+
}, {
|
|
42
|
+
default: withCtx(() => [
|
|
43
|
+
createVNode(_component_a_button, { onClick: handleConfigBtn }, {
|
|
44
|
+
default: withCtx(() => [
|
|
45
|
+
createTextVNode("按钮配置")
|
|
46
|
+
]),
|
|
47
|
+
_: 1
|
|
48
|
+
})
|
|
49
|
+
]),
|
|
50
|
+
_: 1
|
|
51
|
+
}, 8, ["label"]),
|
|
52
|
+
createVNode(unref(TpfModal), {
|
|
53
|
+
title: unref(i18nt)("designer.setting.buttonsColumnEdit"),
|
|
54
|
+
visible: btnListConfigDialogVisible.value,
|
|
55
|
+
"onUpdate:visible": _cache[1] || (_cache[1] = ($event) => btnListConfigDialogVisible.value = $event),
|
|
56
|
+
"show-close": true,
|
|
57
|
+
dialogClass: "drag-dialog",
|
|
58
|
+
"append-to-body": "",
|
|
59
|
+
"close-on-click-modal": false,
|
|
60
|
+
"close-on-press-escape": false,
|
|
61
|
+
width: "1250px"
|
|
62
|
+
}, {
|
|
63
|
+
footerRight: withCtx(() => [
|
|
64
|
+
createVNode(_component_a_button, {
|
|
65
|
+
size: "default",
|
|
66
|
+
onClick: handleCloseDialog
|
|
67
|
+
}, {
|
|
68
|
+
default: withCtx(() => [
|
|
69
|
+
createTextVNode(toDisplayString(unref(i18nt)("designer.hint.closePreview")), 1)
|
|
70
|
+
]),
|
|
71
|
+
_: 1
|
|
72
|
+
})
|
|
73
|
+
]),
|
|
74
|
+
default: withCtx(() => [
|
|
75
|
+
createVNode(ActionButtonListDialog, {
|
|
76
|
+
data: buttonList.value,
|
|
77
|
+
"onUpdate:data": _cache[0] || (_cache[0] = ($event) => buttonList.value = $event)
|
|
78
|
+
}, null, 8, ["data"])
|
|
79
|
+
]),
|
|
80
|
+
_: 1
|
|
81
|
+
}, 8, ["title", "visible"]),
|
|
82
|
+
createVNode(_sfc_main$1, {
|
|
83
|
+
modelValue: currentEditBtn.value[currentEditEventName.value],
|
|
84
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => currentEditBtn.value[currentEditEventName.value] = $event),
|
|
85
|
+
ref_key: "CodeModalEditorRef",
|
|
86
|
+
ref: CodeModalEditorRef,
|
|
87
|
+
"event-header": `${currentEditBtn.value.label}.${currentEditEventName.value}(){`
|
|
88
|
+
}, null, 8, ["modelValue", "event-header"])
|
|
89
|
+
], 64);
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
export {
|
|
94
|
+
_sfc_main as default
|
|
95
|
+
};
|
|
@@ -144,6 +144,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
144
144
|
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $props.optionModel.rowSelection.onChange = $event),
|
|
145
145
|
ref: "CodeModalEditorRef",
|
|
146
146
|
title: `onChange事件`,
|
|
147
|
+
isShowEventHeader: true,
|
|
147
148
|
"event-header": `function onChange(selectedRowKeys, selectedRows) {`
|
|
148
149
|
}, null, 8, ["modelValue"])
|
|
149
150
|
], 64);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./index.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const ToolbarPanel = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const ToolbarPanel = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f98210b8"]]);
|
|
5
5
|
export {
|
|
6
6
|
ToolbarPanel as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, defineAsyncComponent, inject, ref, computed, watch, onMounted, resolveComponent, createElementBlock, openBlock, createElementVNode, createVNode, createBlock, createCommentVNode, withCtx, unref, normalizeStyle, createTextVNode, toDisplayString, Fragment, renderList, renderSlot, normalizeClass, nextTick } from "vue";
|
|
1
|
+
import { defineComponent, defineAsyncComponent, getCurrentInstance, inject, ref, computed, watch, onMounted, resolveComponent, createElementBlock, openBlock, createElementVNode, createVNode, createBlock, createCommentVNode, withCtx, unref, normalizeStyle, createTextVNode, toDisplayString, Fragment, renderList, renderSlot, normalizeClass, nextTick } from "vue";
|
|
2
2
|
import { addWindowResizeHandler, getQueryParam, copyToClipboard, traverseAllWidgets } from "../../../utils/util.js";
|
|
3
3
|
import { useI18n } from "../../../utils/i18n.js";
|
|
4
4
|
import { generateCode } from "../../../utils/code-generator.js";
|
|
@@ -23,6 +23,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
23
23
|
},
|
|
24
24
|
setup(__props, { expose: __expose }) {
|
|
25
25
|
const VFormRender = defineAsyncComponent(() => import("../../form-render/index.vue.js"));
|
|
26
|
+
getCurrentInstance();
|
|
26
27
|
const props = __props;
|
|
27
28
|
const getDesignerConfig = inject("getDesignerConfig");
|
|
28
29
|
const nodeTree = ref(null);
|
|
@@ -704,7 +705,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
704
705
|
"close-on-click-modal": false,
|
|
705
706
|
"close-on-press-escape": false,
|
|
706
707
|
center: "",
|
|
707
|
-
"append-to-body": true,
|
|
708
708
|
class: "drag-dialog",
|
|
709
709
|
width: "75%",
|
|
710
710
|
fullscreen: layoutType.value === "H5" || layoutType.value === "Pad"
|
|
@@ -9,7 +9,28 @@ const buttonList = (ops = {}) => {
|
|
|
9
9
|
options: {
|
|
10
10
|
name: "",
|
|
11
11
|
flex: "flex-start",
|
|
12
|
-
buttonList: [
|
|
12
|
+
buttonList: [
|
|
13
|
+
{
|
|
14
|
+
name: "btn23966",
|
|
15
|
+
label: "new btn",
|
|
16
|
+
type: "primary",
|
|
17
|
+
size: "default",
|
|
18
|
+
shape: "default",
|
|
19
|
+
hidden: false,
|
|
20
|
+
disabled: false,
|
|
21
|
+
onClick: ""
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
name: "btn92762",
|
|
25
|
+
label: "new btn",
|
|
26
|
+
type: "primary",
|
|
27
|
+
size: "default",
|
|
28
|
+
shape: "default",
|
|
29
|
+
hidden: false,
|
|
30
|
+
disabled: false,
|
|
31
|
+
onClick: ""
|
|
32
|
+
}
|
|
33
|
+
],
|
|
13
34
|
customClass: [],
|
|
14
35
|
buttonPosition: 0,
|
|
15
36
|
getContainer: ".addInfoLayout-footer .footerRight",
|
|
@@ -95,7 +95,12 @@ const dataTable = (ops = {}) => {
|
|
|
95
95
|
preserveSelectedRowKeys: false,
|
|
96
96
|
fixed: true,
|
|
97
97
|
onChange: "console.log(122222,selectedRowKeys, selectedRows)",
|
|
98
|
-
columnWidth: 100
|
|
98
|
+
columnWidth: 100,
|
|
99
|
+
getCheckboxProps: (record) => ({
|
|
100
|
+
disabled: record.name === "Disabled User",
|
|
101
|
+
// Column configuration not to be checked
|
|
102
|
+
name: record.name
|
|
103
|
+
})
|
|
99
104
|
},
|
|
100
105
|
...ops
|
|
101
106
|
}
|
|
@@ -5,7 +5,7 @@ import comps from "../../form-designer/form-widget/field-widget/index.js";
|
|
|
5
5
|
import refMixin from "../refMixin.js";
|
|
6
6
|
import containerItemMixin from "./containerItemMixin.js";
|
|
7
7
|
import useDataTableMixin from "../../../mixins/useDataTableMixin.js";
|
|
8
|
-
import { resolveComponent, withDirectives, createBlock, openBlock, normalizeStyle, withCtx, createVNode, normalizeClass, createCommentVNode, vShow } from "vue";
|
|
8
|
+
import { resolveComponent, withDirectives, createBlock, openBlock, normalizeStyle, withCtx, createTextVNode, createVNode, toDisplayString, normalizeClass, createCommentVNode, vShow } from "vue";
|
|
9
9
|
/* empty css */
|
|
10
10
|
/* empty css */
|
|
11
11
|
import _export_sfc from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
@@ -116,6 +116,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
116
116
|
widget: $props.widget
|
|
117
117
|
}, {
|
|
118
118
|
default: withCtx(() => [
|
|
119
|
+
createTextVNode(toDisplayString(_ctx.selectedRowInfo) + " ", 1),
|
|
119
120
|
createVNode(_component_s_table, {
|
|
120
121
|
class: normalizeClass(["tpf-surely-table", [_ctx.customClass]]),
|
|
121
122
|
ref: "dataTable2",
|
|
@@ -153,7 +154,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
153
154
|
[vShow, !_ctx.handleHidden()]
|
|
154
155
|
]);
|
|
155
156
|
}
|
|
156
|
-
const dataTableItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
157
|
+
const dataTableItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-a11bc5b3"]]);
|
|
157
158
|
export {
|
|
158
159
|
dataTableItem as default
|
|
159
160
|
};
|
|
@@ -269,7 +269,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
269
269
|
[vShow, !$props.widget.options.hidden]
|
|
270
270
|
]);
|
|
271
271
|
}
|
|
272
|
-
const vfCollapseItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
272
|
+
const vfCollapseItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-9b616a7e"]]);
|
|
273
273
|
export {
|
|
274
274
|
vfCollapseItem as default
|
|
275
275
|
};
|
|
@@ -1002,6 +1002,9 @@ const _sfc_main = {
|
|
|
1002
1002
|
*/
|
|
1003
1003
|
isPreviewState() {
|
|
1004
1004
|
return this.previewState;
|
|
1005
|
+
},
|
|
1006
|
+
getFormModel() {
|
|
1007
|
+
return this.formDataModel;
|
|
1005
1008
|
}
|
|
1006
1009
|
//--------------------- 以上为组件支持外部调用的API方法 end ------------------//
|
|
1007
1010
|
}
|
|
@@ -1072,7 +1075,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1072
1075
|
_: 3
|
|
1073
1076
|
}, 8, ["spinning"]);
|
|
1074
1077
|
}
|
|
1075
|
-
const VFormRender = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
1078
|
+
const VFormRender = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-a73d5b0d"]]);
|
|
1076
1079
|
export {
|
|
1077
1080
|
VFormRender as default
|
|
1078
1081
|
};
|
|
@@ -437,7 +437,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
437
437
|
}, 8, ["title", "visible"]),
|
|
438
438
|
createVNode(_component_CodeModalEditor, {
|
|
439
439
|
ref: "CodeReqModalEditorRef",
|
|
440
|
-
|
|
440
|
+
fnParams: "data",
|
|
441
441
|
modelValue: $props.optionModel.dataReqHandlerCode,
|
|
442
442
|
"onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => $props.optionModel.dataReqHandlerCode = $event)
|
|
443
443
|
}, null, 8, ["modelValue"]),
|
|
@@ -445,11 +445,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
445
445
|
modelValue: $props.optionModel.dataHandlerCode,
|
|
446
446
|
"onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => $props.optionModel.dataHandlerCode = $event),
|
|
447
447
|
ref: "CodeModalEditorRef",
|
|
448
|
-
|
|
448
|
+
fnParams: "data"
|
|
449
449
|
}, null, 8, ["modelValue"])
|
|
450
450
|
], 64);
|
|
451
451
|
}
|
|
452
|
-
const HttpEditor = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
452
|
+
const HttpEditor = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-0f8456da"]]);
|
|
453
453
|
export {
|
|
454
454
|
HttpEditor as default
|
|
455
455
|
};
|
|
@@ -181,7 +181,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
181
181
|
}, null, 8, ["onSave", "event-header"])
|
|
182
182
|
], 64);
|
|
183
183
|
}
|
|
184
|
-
const ActionButtonListDialog = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
184
|
+
const ActionButtonListDialog = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-3f544c19"]]);
|
|
185
185
|
export {
|
|
186
186
|
ActionButtonListDialog as default
|
|
187
187
|
};
|
|
@@ -138,7 +138,7 @@ const useDataTableMixin = {
|
|
|
138
138
|
colorRow
|
|
139
139
|
} = this.widget.options;
|
|
140
140
|
if (!colorRow) return "";
|
|
141
|
-
return this.selectRow[rowKey] === record[rowKey] ? "colorRowClassName" : "";
|
|
141
|
+
return this.selectRow[rowKey] === record[rowKey] ? "colorRowClassName surely-table-row-selected" : "";
|
|
142
142
|
},
|
|
143
143
|
handleResizeColumn(w, col) {
|
|
144
144
|
const {
|
|
@@ -263,6 +263,9 @@ const useDataTableMixin = {
|
|
|
263
263
|
if (colorRow) {
|
|
264
264
|
this.selectRow = record;
|
|
265
265
|
}
|
|
266
|
+
if (hasRowSelection) {
|
|
267
|
+
this.selectTableRow(record);
|
|
268
|
+
}
|
|
266
269
|
const customFn = new Function("record", "event", customRow.onClick);
|
|
267
270
|
customFn.call(this, record, event);
|
|
268
271
|
},
|
|
@@ -280,6 +283,16 @@ const useDataTableMixin = {
|
|
|
280
283
|
}
|
|
281
284
|
};
|
|
282
285
|
},
|
|
286
|
+
selectTableRow(record) {
|
|
287
|
+
const rowKey = this.widget.options.rowKey;
|
|
288
|
+
const rowKeys = this.selectedRowInfo.selectedRowKeys;
|
|
289
|
+
console.log(this.selectedRowInfo.selectedRowKeys);
|
|
290
|
+
if (rowKeys.includes(record[rowKey])) {
|
|
291
|
+
this.selectedRowInfo.selectedRowKeys.splice(rowKeys.indexOf(record[rowKey]), 1);
|
|
292
|
+
} else {
|
|
293
|
+
this.selectedRowInfo.selectedRowKeys.push(record[rowKey]);
|
|
294
|
+
}
|
|
295
|
+
},
|
|
283
296
|
// 处理列配置
|
|
284
297
|
handleColumnItem(item) {
|
|
285
298
|
const res = omit(item, ["customRender"]);
|