@kp-ui/lowcode 1.0.66 → 1.0.68
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 +3 -3
- package/render.js +3 -4
- package/src/components/form-designer/form-widget/container-widget/data-table-widget.vue.js +40 -37
- package/src/components/form-designer/form-widget/index.vue.js +1 -1
- package/src/components/form-designer/setting-panel/index.vue.js +15 -13
- package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-tableColumns-editor.vue.js +33 -36
- package/src/lang/zh-CN.js +1 -1
- package/src/mixins/useDataTableMixin.js +7 -1
- package/styles/style.css +1 -1
- package/stats.html +0 -4949
|
@@ -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__1749094506347__");
|
|
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__1749094506347__";
|
|
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,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kp-ui/lowcode",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.68",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
7
|
"main": "index.js",
|
|
8
8
|
"module": "index.js",
|
|
9
|
-
"types": "
|
|
9
|
+
"types": "main.d.ts",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@element-plus/icons-vue": "^0.2.4",
|
|
12
|
-
"@kp-ui/tool": "1.0.
|
|
12
|
+
"@kp-ui/tool": "1.0.24",
|
|
13
13
|
"@surely-vue/table": "^5.0.3",
|
|
14
14
|
"animate.css": "^4.1.1",
|
|
15
15
|
"ant-design-vue": "3.2.20",
|
package/render.js
CHANGED
|
@@ -935,9 +935,8 @@ const _sfc_main = {
|
|
|
935
935
|
*/
|
|
936
936
|
showDialog(dialogName, formData = {}, extraData = {}) {
|
|
937
937
|
const topFormRef = this.getTopFormRef();
|
|
938
|
-
|
|
939
|
-
const dialogCon = getContainerWidgetByName(topFormRef.widgetList, dialogName);
|
|
940
|
-
console.log({ dialogCon });
|
|
938
|
+
const formRef = this.getFormRef();
|
|
939
|
+
const dialogCon = getContainerWidgetByName(topFormRef.widgetList, dialogName) || getContainerWidgetByName(formRef.widgetList, dialogName);
|
|
941
940
|
if (!dialogName || dialogCon.type !== "vf-dialog") {
|
|
942
941
|
this.$message.error(this.i18nt("render.hint.refNotFound") + dialogName);
|
|
943
942
|
return;
|
|
@@ -1081,7 +1080,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1081
1080
|
_: 3
|
|
1082
1081
|
}, 8, ["component-size"]);
|
|
1083
1082
|
}
|
|
1084
|
-
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
1083
|
+
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-4e50e948"]]);
|
|
1085
1084
|
export {
|
|
1086
1085
|
index as default
|
|
1087
1086
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import _sfc_main from "./data-table-widget.vue2.js";
|
|
2
|
-
import { resolveComponent, createBlock, openBlock,
|
|
2
|
+
import { resolveComponent, createBlock, openBlock, withCtx, createElementBlock, withModifiers, normalizeClass, createElementVNode, createVNode, normalizeStyle, createCommentVNode } from "vue";
|
|
3
3
|
/* empty css */
|
|
4
4
|
import _export_sfc from "../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
+
const _hoisted_1 = { class: "talbe-wrapper" };
|
|
5
6
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
6
7
|
const _component_a_empty = resolveComponent("a-empty");
|
|
7
8
|
const _component_RenderBodyCell = resolveComponent("RenderBodyCell");
|
|
@@ -12,8 +13,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
12
13
|
widget: $props.widget,
|
|
13
14
|
"parent-widget": $props.parentWidget,
|
|
14
15
|
"parent-list": $props.parentList,
|
|
15
|
-
"index-of-parent-list": $props.indexOfParentList
|
|
16
|
-
style: normalizeStyle({ display: "flex", minWidth: 0, height: parseFloat(_ctx.tableHeight || 0) + "px" })
|
|
16
|
+
"index-of-parent-list": $props.indexOfParentList
|
|
17
17
|
}, {
|
|
18
18
|
default: withCtx(() => [
|
|
19
19
|
(openBlock(), createElementBlock("div", {
|
|
@@ -21,44 +21,47 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
21
21
|
class: normalizeClass(["collapse-container data-table-container", { selected: $options.selected }]),
|
|
22
22
|
onClick: _cache[0] || (_cache[0] = withModifiers(($event) => $options.selectWidget($props.widget), ["stop"]))
|
|
23
23
|
}, [
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
24
|
+
createElementVNode("div", _hoisted_1, [
|
|
25
|
+
createVNode(_component_s_table, {
|
|
26
|
+
ref: "dataTable2",
|
|
27
|
+
columns: _ctx.columns.columns,
|
|
28
|
+
scroll: { y: _ctx.tableHeight },
|
|
29
|
+
height: _ctx.tableHeight,
|
|
30
|
+
dataSource: $options.data,
|
|
31
|
+
class: normalizeClass([_ctx.customClass]),
|
|
32
|
+
size: _ctx.widgetSize,
|
|
33
|
+
rowKey: (record) => record[$props.widget.options.rowKey],
|
|
34
|
+
bordered: $props.widget.options.border,
|
|
35
|
+
style: normalizeStyle({ width: $props.widget.options.tableWidth }),
|
|
36
|
+
"row-class-name": _ctx.rowClassName,
|
|
37
|
+
rowSelection: _ctx.handleRowSelection(),
|
|
38
|
+
pagination: _ctx.fmtPagination,
|
|
39
|
+
customRow: _ctx.handleCustomRow,
|
|
40
|
+
rowClassName: _ctx.rowClassName,
|
|
41
|
+
onChange: _ctx.handleTablePageChange,
|
|
42
|
+
onResizeColumn: _ctx.handleResizeColumn,
|
|
43
|
+
loading: _ctx.loading,
|
|
44
|
+
"row-height": _ctx.lineHeight
|
|
45
|
+
}, {
|
|
46
|
+
emptyText: withCtx(() => [
|
|
47
|
+
createVNode(_component_a_empty)
|
|
48
|
+
]),
|
|
49
|
+
bodyCell: withCtx((scope) => [
|
|
50
|
+
_ctx.isShowBodyCell(scope.column.dataIndex) ? (openBlock(), createBlock(_component_RenderBodyCell, {
|
|
51
|
+
key: 0,
|
|
52
|
+
bodyCell: _ctx.columns.bodyCell,
|
|
53
|
+
scope
|
|
54
|
+
}, null, 8, ["bodyCell", "scope"])) : createCommentVNode("", true)
|
|
55
|
+
]),
|
|
56
|
+
_: 1
|
|
57
|
+
}, 8, ["columns", "scroll", "height", "dataSource", "class", "size", "rowKey", "bordered", "style", "row-class-name", "rowSelection", "pagination", "customRow", "rowClassName", "onChange", "onResizeColumn", "loading", "row-height"])
|
|
58
|
+
])
|
|
56
59
|
], 2))
|
|
57
60
|
]),
|
|
58
61
|
_: 1
|
|
59
|
-
}, 8, ["designer", "widget", "parent-widget", "parent-list", "index-of-parent-list"
|
|
62
|
+
}, 8, ["designer", "widget", "parent-widget", "parent-list", "index-of-parent-list"]);
|
|
60
63
|
}
|
|
61
|
-
const dataTableWidget = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
64
|
+
const dataTableWidget = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-4700fd96"]]);
|
|
62
65
|
export {
|
|
63
66
|
dataTableWidget as default
|
|
64
67
|
};
|
|
@@ -217,7 +217,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
217
217
|
_: 1
|
|
218
218
|
}, 8, ["component-size"]);
|
|
219
219
|
}
|
|
220
|
-
const VFormWidget = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
220
|
+
const VFormWidget = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-59a5bfe0"]]);
|
|
221
221
|
export {
|
|
222
222
|
VFormWidget as default
|
|
223
223
|
};
|
|
@@ -218,7 +218,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
218
218
|
default: withCtx(() => [
|
|
219
219
|
createVNode(_component_a_tabs, {
|
|
220
220
|
activeKey: $data.activeTab,
|
|
221
|
-
"onUpdate:activeKey": _cache[
|
|
221
|
+
"onUpdate:activeKey": _cache[6] || (_cache[6] = ($event) => $data.activeTab = $event),
|
|
222
222
|
style: { "height": "100%", "width": "100%", "overflow": "hidden" }
|
|
223
223
|
}, {
|
|
224
224
|
default: withCtx(() => [
|
|
@@ -237,13 +237,13 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
237
237
|
labelAlign: "left",
|
|
238
238
|
"label-width": "120px",
|
|
239
239
|
class: "setting-form tpf-form",
|
|
240
|
-
onSubmit: _cache[
|
|
240
|
+
onSubmit: _cache[2] || (_cache[2] = withModifiers(() => {
|
|
241
241
|
}, ["prevent"]))
|
|
242
242
|
}, {
|
|
243
243
|
default: withCtx(() => [
|
|
244
244
|
createVNode(_component_a_collapse, {
|
|
245
245
|
activeKey: $data.widgetActiveCollapseNames,
|
|
246
|
-
"onUpdate:activeKey": _cache[
|
|
246
|
+
"onUpdate:activeKey": _cache[1] || (_cache[1] = ($event) => $data.widgetActiveCollapseNames = $event),
|
|
247
247
|
class: "setting-collapse"
|
|
248
248
|
}, {
|
|
249
249
|
default: withCtx(() => [
|
|
@@ -258,8 +258,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
258
258
|
key: propName,
|
|
259
259
|
designer: $props.designer,
|
|
260
260
|
"selected-widget": $props.selectedWidget,
|
|
261
|
-
"option-model": $options.optionModel
|
|
262
|
-
|
|
261
|
+
"option-model": $options.optionModel,
|
|
262
|
+
"onUpdate:optionModel": _cache[0] || (_cache[0] = ($event) => $options.optionModel = $event)
|
|
263
|
+
}, null, 40, ["designer", "selected-widget", "option-model"])) : createCommentVNode("", true)
|
|
263
264
|
], 64);
|
|
264
265
|
}), 256))
|
|
265
266
|
]),
|
|
@@ -314,13 +315,13 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
314
315
|
labelAlign: "left",
|
|
315
316
|
"label-width": "120px",
|
|
316
317
|
class: "setting-form tpf-form",
|
|
317
|
-
onSubmit: _cache[
|
|
318
|
+
onSubmit: _cache[5] || (_cache[5] = withModifiers(() => {
|
|
318
319
|
}, ["prevent"]))
|
|
319
320
|
}, {
|
|
320
321
|
default: withCtx(() => [
|
|
321
322
|
createVNode(_component_a_collapse, {
|
|
322
323
|
activeKey: $data.widgetActiveCollapseNames,
|
|
323
|
-
"onUpdate:activeKey": _cache[
|
|
324
|
+
"onUpdate:activeKey": _cache[4] || (_cache[4] = ($event) => $data.widgetActiveCollapseNames = $event),
|
|
324
325
|
class: "setting-collapse"
|
|
325
326
|
}, {
|
|
326
327
|
default: withCtx(() => [
|
|
@@ -335,8 +336,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
335
336
|
key: propName,
|
|
336
337
|
designer: $props.designer,
|
|
337
338
|
"selected-widget": $props.selectedWidget,
|
|
338
|
-
"option-model": $options.optionModel
|
|
339
|
-
|
|
339
|
+
"option-model": $options.optionModel,
|
|
340
|
+
"onUpdate:optionModel": _cache[3] || (_cache[3] = ($event) => $options.optionModel = $event)
|
|
341
|
+
}, null, 40, ["designer", "selected-widget", "option-model"])) : createCommentVNode("", true)
|
|
340
342
|
], 64);
|
|
341
343
|
}), 256))
|
|
342
344
|
]),
|
|
@@ -433,7 +435,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
433
435
|
createVNode(_component_a_modal, {
|
|
434
436
|
title: _ctx.i18nt("designer.setting.editWidgetEventHandler"),
|
|
435
437
|
visible: $data.showWidgetEventDialogFlag,
|
|
436
|
-
"onUpdate:visible": _cache[
|
|
438
|
+
"onUpdate:visible": _cache[9] || (_cache[9] = ($event) => $data.showWidgetEventDialogFlag = $event),
|
|
437
439
|
"show-close": true,
|
|
438
440
|
"custom-class": "drag-dialog small-padding-dialog",
|
|
439
441
|
"append-to-body": "",
|
|
@@ -445,7 +447,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
445
447
|
footer: withCtx(() => [
|
|
446
448
|
createElementVNode("div", _hoisted_1, [
|
|
447
449
|
createVNode(_component_a_button, {
|
|
448
|
-
onClick: _cache[
|
|
450
|
+
onClick: _cache[8] || (_cache[8] = ($event) => $data.showWidgetEventDialogFlag = false)
|
|
449
451
|
}, {
|
|
450
452
|
default: withCtx(() => [
|
|
451
453
|
createTextVNode(toDisplayString(_ctx.i18nt("designer.hint.cancel")), 1)
|
|
@@ -473,7 +475,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
473
475
|
mode: "javascript",
|
|
474
476
|
readonly: false,
|
|
475
477
|
modelValue: $data.eventHandlerCode,
|
|
476
|
-
"onUpdate:modelValue": _cache[
|
|
478
|
+
"onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => $data.eventHandlerCode = $event),
|
|
477
479
|
ref: "ecEditor"
|
|
478
480
|
}, null, 8, ["modelValue"]),
|
|
479
481
|
createVNode(_component_a_alert, {
|
|
@@ -491,7 +493,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
491
493
|
_: 1
|
|
492
494
|
});
|
|
493
495
|
}
|
|
494
|
-
const SettingPanel = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
496
|
+
const SettingPanel = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-29aceee5"]]);
|
|
495
497
|
export {
|
|
496
498
|
SettingPanel as default
|
|
497
499
|
};
|
|
@@ -33,6 +33,7 @@ const _sfc_main = {
|
|
|
33
33
|
{
|
|
34
34
|
title: this.i18nt("designer.setting.columnLabel"),
|
|
35
35
|
dataIndex: "title",
|
|
36
|
+
align: "center",
|
|
36
37
|
resizable: true,
|
|
37
38
|
width: 100
|
|
38
39
|
},
|
|
@@ -40,13 +41,7 @@ const _sfc_main = {
|
|
|
40
41
|
title: this.i18nt("designer.setting.columnWidth"),
|
|
41
42
|
dataIndex: "width",
|
|
42
43
|
resizable: true,
|
|
43
|
-
width:
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
title: "最小宽度",
|
|
47
|
-
dataIndex: "minWidth",
|
|
48
|
-
resizable: true,
|
|
49
|
-
width: 100
|
|
44
|
+
width: 120
|
|
50
45
|
},
|
|
51
46
|
{
|
|
52
47
|
title: this.i18nt("designer.setting.visibleColumn"),
|
|
@@ -116,6 +111,7 @@ const _sfc_main = {
|
|
|
116
111
|
},
|
|
117
112
|
addCol() {
|
|
118
113
|
const newRow = {
|
|
114
|
+
isAutoWidth: false,
|
|
119
115
|
columnId: (/* @__PURE__ */ new Date()).getTime(),
|
|
120
116
|
show: true,
|
|
121
117
|
width: 150,
|
|
@@ -150,8 +146,12 @@ const _sfc_main = {
|
|
|
150
146
|
}
|
|
151
147
|
};
|
|
152
148
|
const _hoisted_1 = { class: "table-wrap" };
|
|
153
|
-
const _hoisted_2 = {
|
|
154
|
-
|
|
149
|
+
const _hoisted_2 = {
|
|
150
|
+
key: 2,
|
|
151
|
+
style: { "text-align": "center" }
|
|
152
|
+
};
|
|
153
|
+
const _hoisted_3 = { class: "add-btn" };
|
|
154
|
+
const _hoisted_4 = { class: "dialog-footer" };
|
|
155
155
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
156
156
|
const _component_a_button = resolveComponent("a-button");
|
|
157
157
|
const _component_a_form_item = resolveComponent("a-form-item");
|
|
@@ -194,7 +194,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
194
194
|
wrapClassName: "table-columns-modal"
|
|
195
195
|
}, {
|
|
196
196
|
footer: withCtx(() => [
|
|
197
|
-
createElementVNode("div",
|
|
197
|
+
createElementVNode("div", _hoisted_4, [
|
|
198
198
|
createVNode(_component_a_button, {
|
|
199
199
|
size: "default",
|
|
200
200
|
onClick: _cache[1] || (_cache[1] = ($event) => $data.dialogVisible = false)
|
|
@@ -219,10 +219,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
219
219
|
default: withCtx(() => [
|
|
220
220
|
createElementVNode("div", _hoisted_1, [
|
|
221
221
|
createVNode(_component_s_table, {
|
|
222
|
+
class: "tpf-surely-table",
|
|
222
223
|
"aria-hidden": "false",
|
|
223
224
|
dataSource: $props.optionModel.tableColumns,
|
|
224
225
|
style: { "width": "100%" },
|
|
225
|
-
class: "tpf-surely-table",
|
|
226
226
|
deepWatchDataSource: "",
|
|
227
227
|
"cell-style": { padding: "0" },
|
|
228
228
|
height: "600",
|
|
@@ -244,43 +244,40 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
244
244
|
value: $props.optionModel.tableColumns[recordIndexs[0]].title,
|
|
245
245
|
"onUpdate:value": ($event) => $props.optionModel.tableColumns[recordIndexs[0]].title = $event
|
|
246
246
|
}, null, 8, ["value", "onUpdate:value"])) : createCommentVNode("", true),
|
|
247
|
-
column.dataIndex === "width" ? (openBlock(),
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
value: $props.optionModel.tableColumns[recordIndexs[0]].minWidth,
|
|
260
|
-
"onUpdate:value": ($event) => $props.optionModel.tableColumns[recordIndexs[0]].minWidth = $event
|
|
261
|
-
}, null, 8, ["value", "onUpdate:value"])) : createCommentVNode("", true),
|
|
247
|
+
column.dataIndex === "width" ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
248
|
+
createVNode(_component_a_switch, {
|
|
249
|
+
"checked-children": "自动宽度",
|
|
250
|
+
checked: $props.optionModel.tableColumns[recordIndexs[0]].isAutoWidth,
|
|
251
|
+
"onUpdate:checked": ($event) => $props.optionModel.tableColumns[recordIndexs[0]].isAutoWidth = $event
|
|
252
|
+
}, null, 8, ["checked", "onUpdate:checked"]),
|
|
253
|
+
!record.isAutoWidth ? (openBlock(), createBlock(_component_a_input, {
|
|
254
|
+
key: 0,
|
|
255
|
+
value: $props.optionModel.tableColumns[recordIndexs[0]].width,
|
|
256
|
+
"onUpdate:value": ($event) => $props.optionModel.tableColumns[recordIndexs[0]].width = $event
|
|
257
|
+
}, null, 8, ["value", "onUpdate:value"])) : createCommentVNode("", true)
|
|
258
|
+
])) : createCommentVNode("", true),
|
|
262
259
|
column.dataIndex === "show" ? (openBlock(), createBlock(_component_a_switch, {
|
|
263
|
-
key:
|
|
260
|
+
key: 3,
|
|
264
261
|
checked: $props.optionModel.tableColumns[recordIndexs[0]].show,
|
|
265
262
|
"onUpdate:checked": ($event) => $props.optionModel.tableColumns[recordIndexs[0]].show = $event
|
|
266
263
|
}, null, 8, ["checked", "onUpdate:checked"])) : createCommentVNode("", true),
|
|
267
264
|
column.dataIndex === "sorter" ? (openBlock(), createBlock(_component_a_switch, {
|
|
268
|
-
key:
|
|
265
|
+
key: 4,
|
|
269
266
|
checked: $props.optionModel.tableColumns[recordIndexs[0]].sorter,
|
|
270
267
|
"onUpdate:checked": ($event) => $props.optionModel.tableColumns[recordIndexs[0]].sorter = $event
|
|
271
268
|
}, null, 8, ["checked", "onUpdate:checked"])) : createCommentVNode("", true),
|
|
272
269
|
column.dataIndex === "resizable" ? (openBlock(), createBlock(_component_a_switch, {
|
|
273
|
-
key:
|
|
270
|
+
key: 5,
|
|
274
271
|
checked: $props.optionModel.tableColumns[recordIndexs[0]].resizable,
|
|
275
272
|
"onUpdate:checked": ($event) => $props.optionModel.tableColumns[recordIndexs[0]].resizable = $event
|
|
276
273
|
}, null, 8, ["checked", "onUpdate:checked"])) : createCommentVNode("", true),
|
|
277
274
|
column.dataIndex === "ellipsis" ? (openBlock(), createBlock(_component_a_switch, {
|
|
278
|
-
key:
|
|
275
|
+
key: 6,
|
|
279
276
|
checked: $props.optionModel.tableColumns[recordIndexs[0]].ellipsis,
|
|
280
277
|
"onUpdate:checked": ($event) => $props.optionModel.tableColumns[recordIndexs[0]].ellipsis = $event
|
|
281
278
|
}, null, 8, ["checked", "onUpdate:checked"])) : createCommentVNode("", true),
|
|
282
279
|
column.dataIndex === "fixed" ? (openBlock(), createBlock(_component_a_select, {
|
|
283
|
-
key:
|
|
280
|
+
key: 7,
|
|
284
281
|
value: $props.optionModel.tableColumns[recordIndexs[0]].fixed,
|
|
285
282
|
"onUpdate:value": ($event) => $props.optionModel.tableColumns[recordIndexs[0]].fixed = $event,
|
|
286
283
|
allowClear: "",
|
|
@@ -303,14 +300,14 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
303
300
|
_: 2
|
|
304
301
|
}, 1032, ["value", "onUpdate:value"])) : createCommentVNode("", true),
|
|
305
302
|
column.dataIndex === "align" ? (openBlock(), createBlock(_component_a_select, {
|
|
306
|
-
key:
|
|
303
|
+
key: 8,
|
|
307
304
|
style: {},
|
|
308
305
|
value: $props.optionModel.tableColumns[recordIndexs[0]].align,
|
|
309
306
|
"onUpdate:value": ($event) => $props.optionModel.tableColumns[recordIndexs[0]].align = $event,
|
|
310
307
|
options: $data.alignOptions
|
|
311
308
|
}, null, 8, ["value", "onUpdate:value", "options"])) : createCommentVNode("", true),
|
|
312
309
|
column.dataIndex === "customRender" ? (openBlock(), createBlock(_component_a_button, {
|
|
313
|
-
key:
|
|
310
|
+
key: 9,
|
|
314
311
|
onClick: ($event) => $options.showRenderDialog(recordIndexs[0], record, _ctx.dataIndex),
|
|
315
312
|
class: normalizeClass([{ "button-text-highlight": !!record.customRender }]),
|
|
316
313
|
size: "small",
|
|
@@ -321,7 +318,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
321
318
|
])),
|
|
322
319
|
_: 2
|
|
323
320
|
}, 1032, ["onClick", "class"])) : createCommentVNode("", true),
|
|
324
|
-
column.dataIndex === "action" ? (openBlock(), createBlock(_component_a_space, { key:
|
|
321
|
+
column.dataIndex === "action" ? (openBlock(), createBlock(_component_a_space, { key: 10 }, {
|
|
325
322
|
default: withCtx(() => [
|
|
326
323
|
createVNode(_component_a_button, {
|
|
327
324
|
title: _ctx.i18nt("designer.setting.deleteTableColumn"),
|
|
@@ -340,7 +337,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
340
337
|
]),
|
|
341
338
|
_: 1
|
|
342
339
|
}, 8, ["dataSource", "row-key", "columns"]),
|
|
343
|
-
createElementVNode("div",
|
|
340
|
+
createElementVNode("div", _hoisted_3, [
|
|
344
341
|
createVNode(_component_a_button, {
|
|
345
342
|
title: _ctx.i18nt("designer.setting.addTableColumn"),
|
|
346
343
|
type: "primary",
|
|
@@ -365,7 +362,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
365
362
|
}, null, 8, ["onSave", "title"])
|
|
366
363
|
], 64);
|
|
367
364
|
}
|
|
368
|
-
const dataTableTableColumnsEditor = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
365
|
+
const dataTableTableColumnsEditor = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-00f5fe22"]]);
|
|
369
366
|
export {
|
|
370
367
|
dataTableTableColumnsEditor as default
|
|
371
368
|
};
|
package/src/lang/zh-CN.js
CHANGED
|
@@ -40,6 +40,9 @@ const useDataTableMixin = {
|
|
|
40
40
|
...item,
|
|
41
41
|
...this.handleColumnItem(item)
|
|
42
42
|
}));
|
|
43
|
+
console.log({
|
|
44
|
+
centerColumns
|
|
45
|
+
});
|
|
43
46
|
const rightFixedColumns = [];
|
|
44
47
|
if (optins.showButtonsColumn) {
|
|
45
48
|
const operationButtons = optins.operationButtons ?? [];
|
|
@@ -73,7 +76,7 @@ const useDataTableMixin = {
|
|
|
73
76
|
};
|
|
74
77
|
},
|
|
75
78
|
tableHeight() {
|
|
76
|
-
return this.widget.options.tableHeight ||
|
|
79
|
+
return parseFloat(this.widget.options.tableHeight || 0);
|
|
77
80
|
},
|
|
78
81
|
// rowClassName() {
|
|
79
82
|
// if (this.widget.options.stripe) {
|
|
@@ -283,6 +286,9 @@ const useDataTableMixin = {
|
|
|
283
286
|
handleColumnItem(item) {
|
|
284
287
|
const res = omit(item, ["customRender"]);
|
|
285
288
|
const customRenderFn = item.customRender;
|
|
289
|
+
item.minWidth = 50;
|
|
290
|
+
item.maxWidth = 500;
|
|
291
|
+
item.width = isNaN(Number(item.width)) ? item.width : Number(item.width);
|
|
286
292
|
if (!customRenderFn) return item;
|
|
287
293
|
return {
|
|
288
294
|
...res,
|