@kp-ui/lowcode 2.14.0-beta.17 → 2.14.0-beta.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/components/form-designer/form-widget/container-widget/vf-dialog-widget.vue.js +5 -5
- package/src/components/form-designer/widget-panel/containers/vf-dialog.js +3 -2
- package/src/components/form-render/dynamic-dialog.vue.js +72 -65
- package/src/components/public/ActionButtonListDialog.vue.js +82 -75
- package/src/components/public/ActionButtonListDialog.vue2.js +16 -10
- package/src/components/public/ActionButtonListRender.vue.js +12 -11
- package/src/components/public/CustomerModal/CustomerModal.vue2.js +50 -44
- package/src/lang/en-US.js +1 -0
- package/src/lang/zh-CN.js +1 -0
- package/stats.html +1 -1
- package/styles/style.css +1 -1
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@ import h from "./container-wrapper.vue.js";
|
|
|
5
5
|
import { resolveComponent as m, createBlock as f, openBlock as d, withCtx as p, createElementBlock as w, withModifiers as L, normalizeClass as x, createElementVNode as a, toDisplayString as C } from "vue";
|
|
6
6
|
/* empty css */
|
|
7
7
|
import W from "../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
8
|
-
const
|
|
8
|
+
const u = {
|
|
9
9
|
name: "vf-dialog-widget",
|
|
10
10
|
componentName: "VfDialogWidget",
|
|
11
11
|
mixins: [l, g],
|
|
@@ -75,7 +75,7 @@ const v = {
|
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
|
-
},
|
|
78
|
+
}, v = { class: "dialog-title" };
|
|
79
79
|
function k(e, i, t, n, D, s) {
|
|
80
80
|
const o = m("container-wrapper");
|
|
81
81
|
return d(), f(o, {
|
|
@@ -91,8 +91,8 @@ function k(e, i, t, n, D, s) {
|
|
|
91
91
|
key: t.widget.id,
|
|
92
92
|
onClick: i[1] || (i[1] = L((r) => s.selectWidget(t.widget), ["stop"]))
|
|
93
93
|
}, [
|
|
94
|
-
a("div",
|
|
95
|
-
a("
|
|
94
|
+
a("div", v, [
|
|
95
|
+
a("span", {
|
|
96
96
|
class: "tpf-link",
|
|
97
97
|
onClick: i[0] || (i[0] = (...r) => s.handleClickTitle && s.handleClickTitle(...r))
|
|
98
98
|
}, C(t.widget.options.title), 1)
|
|
@@ -102,7 +102,7 @@ function k(e, i, t, n, D, s) {
|
|
|
102
102
|
_: 1
|
|
103
103
|
}, 8, ["designer", "widget", "parent-widget", "parent-list", "index-of-parent-list"]);
|
|
104
104
|
}
|
|
105
|
-
const j = /* @__PURE__ */ W(
|
|
105
|
+
const j = /* @__PURE__ */ W(u, [["render", k], ["__scopeId", "data-v-3833bfd1"]]);
|
|
106
106
|
export {
|
|
107
107
|
j as default
|
|
108
108
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getUuidKey as o } from "@kp-ui/tool";
|
|
2
|
-
const
|
|
2
|
+
const t = (e = {}) => ({
|
|
3
3
|
key: o(),
|
|
4
4
|
type: "vf-dialog",
|
|
5
5
|
category: "container",
|
|
@@ -17,6 +17,7 @@ const l = (e = {}) => ({
|
|
|
17
17
|
closeOnPressEscape: !1,
|
|
18
18
|
readMode: !1,
|
|
19
19
|
disabledMode: !1,
|
|
20
|
+
disabled: !1,
|
|
20
21
|
okButtonLabel: "",
|
|
21
22
|
okButtonHidden: !1,
|
|
22
23
|
cancelButtonLabel: "",
|
|
@@ -29,5 +30,5 @@ const l = (e = {}) => ({
|
|
|
29
30
|
}
|
|
30
31
|
});
|
|
31
32
|
export {
|
|
32
|
-
|
|
33
|
+
t as vfDialog
|
|
33
34
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as M, defineAsyncComponent as S, computed as c, ref as u, getCurrentInstance as I, onBeforeUnmount as L, resolveDirective as N, createBlock as V, openBlock as b, unref as i, mergeProps as H, withCtx as C, withDirectives as J, createElementBlock as P, createVNode as y, nextTick as U } from "vue";
|
|
2
2
|
import { TpfModal as W } from "tmgc2-share";
|
|
3
3
|
import A from "./SubmitButtonRender.vue.js";
|
|
4
|
-
import { useLowcode as
|
|
5
|
-
const
|
|
4
|
+
import { useLowcode as $ } from "../../hooks/useLowcode.js";
|
|
5
|
+
const q = { class: "dialog-content" }, ne = /* @__PURE__ */ M({
|
|
6
6
|
name: "dynamic-dialog",
|
|
7
7
|
__name: "dynamic-dialog",
|
|
8
8
|
props: {
|
|
@@ -45,65 +45,68 @@ const $ = { class: "dialog-content" }, oe = /* @__PURE__ */ E({
|
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
setup(n, { expose: R }) {
|
|
48
|
-
const F =
|
|
49
|
-
formCode:
|
|
50
|
-
...
|
|
51
|
-
}),
|
|
52
|
-
...
|
|
53
|
-
parentDom:
|
|
54
|
-
getParentFormRef:
|
|
55
|
-
})),
|
|
48
|
+
const F = S(() => import("./index.vue.js")), t = n, x = c(() => t.options.height || "500px"), D = u(null), p = u(!1), l = u(!1), r = I(), { vfdRef: a, formConfig: z, getComponentJson: h, goBack: G } = $({
|
|
49
|
+
formCode: t.options.formCode,
|
|
50
|
+
...t.vfCtx
|
|
51
|
+
}), O = c(() => ({
|
|
52
|
+
...t.parentFormRef,
|
|
53
|
+
parentDom: r,
|
|
54
|
+
getParentFormRef: v
|
|
55
|
+
})), w = c(() => t.options.cancelButtonHidden && t.options.okButtonHidden ? { footer: null } : {});
|
|
56
56
|
L(() => {
|
|
57
|
-
var
|
|
58
|
-
console.log(
|
|
57
|
+
var e, o;
|
|
58
|
+
console.log(t.parentFormRef), (o = (e = t.parentFormRef) == null ? void 0 : e.setChildFormRef) == null || o.call(e, null);
|
|
59
59
|
});
|
|
60
|
-
const
|
|
61
|
-
console.log("setLoading",
|
|
62
|
-
},
|
|
63
|
-
|
|
64
|
-
},
|
|
65
|
-
|
|
60
|
+
const k = (e) => {
|
|
61
|
+
console.log("setLoading", e), p.value = e;
|
|
62
|
+
}, B = (e) => {
|
|
63
|
+
t.options.title = e;
|
|
64
|
+
}, T = () => {
|
|
65
|
+
l.value = !0;
|
|
66
66
|
}, j = async () => {
|
|
67
|
-
|
|
68
|
-
var
|
|
69
|
-
|
|
67
|
+
l.value = !0, U(async () => {
|
|
68
|
+
var e, o;
|
|
69
|
+
t.options.readMode && ((e = a.value) == null || e.setReadMode(!0)), await h([], t.options.formCode), (o = a.value) == null || o.setDialogOrDrawerRef(r), t.parentFormRef && t.parentFormRef.setChildFormRef(a.value), g();
|
|
70
70
|
});
|
|
71
|
-
},
|
|
72
|
-
|
|
73
|
-
},
|
|
74
|
-
if (
|
|
75
|
-
const
|
|
76
|
-
return console.log(
|
|
71
|
+
}, E = () => {
|
|
72
|
+
t.options.onDialogBeforeClose && new Function("done", t.options.onDialogBeforeClose).call(r) === !1 || (l.value = !1);
|
|
73
|
+
}, d = () => {
|
|
74
|
+
if (t.options.onDialogBeforeClose) {
|
|
75
|
+
const e = new Function(t.options.onDialogBeforeClose);
|
|
76
|
+
return console.log(e), e.call(r);
|
|
77
77
|
}
|
|
78
78
|
return !0;
|
|
79
|
-
}, p = () => {
|
|
80
|
-
r() && (a.value = !1);
|
|
81
79
|
}, m = () => {
|
|
82
|
-
|
|
83
|
-
}, g = () =>
|
|
80
|
+
d() && (l.value = !1);
|
|
81
|
+
}, g = () => {
|
|
82
|
+
t.options.onDialogOpened && new Function(t.options.onDialogOpened).call(r);
|
|
83
|
+
}, v = () => t.parentFormRef;
|
|
84
84
|
return R({
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
85
|
+
setleftText: (e) => {
|
|
86
|
+
D.value = e;
|
|
87
|
+
},
|
|
88
|
+
setLoading: k,
|
|
89
|
+
setTitle: B,
|
|
90
|
+
beforeOpen: T,
|
|
88
91
|
show: j,
|
|
89
|
-
close:
|
|
90
|
-
handleBeforeClose:
|
|
91
|
-
handleCloseEvent:
|
|
92
|
-
handleOpenedEvent:
|
|
93
|
-
getParentFormRef:
|
|
94
|
-
getFormRef: () => (console.log("getFormRef"),
|
|
95
|
-
getWidgetRef: (
|
|
92
|
+
close: E,
|
|
93
|
+
handleBeforeClose: d,
|
|
94
|
+
handleCloseEvent: m,
|
|
95
|
+
handleOpenedEvent: g,
|
|
96
|
+
getParentFormRef: v,
|
|
97
|
+
getFormRef: () => (console.log("getFormRef"), a.value),
|
|
98
|
+
getWidgetRef: (e, o = !1) => {
|
|
96
99
|
var s;
|
|
97
|
-
return (s =
|
|
100
|
+
return (s = a.value) == null ? void 0 : s.getWidgetRef(e, o);
|
|
98
101
|
},
|
|
99
102
|
updateTable: () => {
|
|
100
|
-
var
|
|
101
|
-
(s = (
|
|
103
|
+
var e, o, s;
|
|
104
|
+
(s = (o = (e = t.vfCtx) == null ? void 0 : e.parent) == null ? void 0 : o.exposed) != null && s.updateTable && t.vfCtx.parent.exposed.updateTable();
|
|
102
105
|
},
|
|
103
|
-
getExtraData: () =>
|
|
104
|
-
}), (
|
|
105
|
-
const s =
|
|
106
|
-
return b(),
|
|
106
|
+
getExtraData: () => t.extraData
|
|
107
|
+
}), (e, o) => {
|
|
108
|
+
const s = N("loading");
|
|
109
|
+
return b(), V(i(W), H({
|
|
107
110
|
class: "tpf-model design-model",
|
|
108
111
|
destroyOnClose: !0,
|
|
109
112
|
title: n.options.title,
|
|
@@ -113,42 +116,46 @@ const $ = { class: "dialog-content" }, oe = /* @__PURE__ */ E({
|
|
|
113
116
|
...JSON.parse(n.options.bodyStyle || "{}")
|
|
114
117
|
},
|
|
115
118
|
centered: !0,
|
|
116
|
-
visible:
|
|
117
|
-
"onUpdate:visible":
|
|
119
|
+
visible: l.value,
|
|
120
|
+
"onUpdate:visible": o[1] || (o[1] = (f) => l.value = f),
|
|
118
121
|
width: n.options.width,
|
|
119
122
|
mask: n.options.showModal,
|
|
120
123
|
maskClosable: n.options.closeOnClickModal,
|
|
121
124
|
keyboard: n.options.closeOnPressEscape,
|
|
122
|
-
onCancel:
|
|
123
|
-
|
|
125
|
+
onCancel: m,
|
|
126
|
+
"left-num": e.leftNumber
|
|
127
|
+
}, w.value), {
|
|
124
128
|
footerRight: C(() => [
|
|
125
129
|
y(A, {
|
|
126
|
-
"dialog-visible":
|
|
127
|
-
"onUpdate:dialogVisible":
|
|
128
|
-
handleBeforeClose:
|
|
130
|
+
"dialog-visible": l.value,
|
|
131
|
+
"onUpdate:dialogVisible": o[0] || (o[0] = (f) => l.value = f),
|
|
132
|
+
handleBeforeClose: d,
|
|
129
133
|
options: n.options,
|
|
130
|
-
ctx:
|
|
134
|
+
ctx: i(a)
|
|
131
135
|
}, null, 8, ["dialog-visible", "options", "ctx"])
|
|
132
136
|
]),
|
|
133
137
|
default: C(() => [
|
|
134
|
-
J((b(), P("div",
|
|
135
|
-
y(
|
|
138
|
+
J((b(), P("div", q, [
|
|
139
|
+
y(i(F), {
|
|
136
140
|
ref_key: "vfdRef",
|
|
137
|
-
ref:
|
|
138
|
-
vfCtx:
|
|
139
|
-
|
|
141
|
+
ref: a,
|
|
142
|
+
vfCtx: {
|
|
143
|
+
...n.vfCtx,
|
|
144
|
+
currentInstance: i(r)
|
|
145
|
+
},
|
|
146
|
+
"parent-form": O.value,
|
|
140
147
|
"disabled-mode": n.options.disabledMode,
|
|
141
148
|
"dynamic-creation": !0
|
|
142
149
|
}, null, 8, ["vfCtx", "parent-form", "disabled-mode"])
|
|
143
150
|
])), [
|
|
144
|
-
[s,
|
|
151
|
+
[s, p.value]
|
|
145
152
|
])
|
|
146
153
|
]),
|
|
147
154
|
_: 1
|
|
148
|
-
}, 16, ["title", "bodyStyle", "visible", "width", "mask", "maskClosable", "keyboard"]);
|
|
155
|
+
}, 16, ["title", "bodyStyle", "visible", "width", "mask", "maskClosable", "keyboard", "left-num"]);
|
|
149
156
|
};
|
|
150
157
|
}
|
|
151
158
|
});
|
|
152
159
|
export {
|
|
153
|
-
|
|
160
|
+
ne as default
|
|
154
161
|
};
|
|
@@ -1,190 +1,197 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { resolveComponent as k, createElementBlock as
|
|
1
|
+
import B from "./ActionButtonListDialog.vue2.js";
|
|
2
|
+
import { resolveComponent as k, createElementBlock as U, openBlock as u, Fragment as z, createVNode as d, createElementVNode as $, withCtx as n, createBlock as s, createCommentVNode as p, createTextVNode as o, normalizeClass as b, toDisplayString as f } from "vue";
|
|
3
3
|
/* empty css */
|
|
4
4
|
import E from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
-
const
|
|
6
|
-
function
|
|
7
|
-
const
|
|
8
|
-
return
|
|
9
|
-
|
|
5
|
+
const V = { class: "add-btn" };
|
|
6
|
+
function w(e, t, D, S, H, N) {
|
|
7
|
+
const h = k("a-input"), r = k("a-select-option"), m = k("a-select"), C = k("a-switch"), y = k("TpfSelectIcon"), g = k("a-button"), _ = k("s-table"), c = k("CodeModalEditor");
|
|
8
|
+
return u(), U(z, null, [
|
|
9
|
+
d(_, {
|
|
10
10
|
deepWatchDataSource: "",
|
|
11
11
|
"data-source": e.buttonList,
|
|
12
12
|
pagination: !1,
|
|
13
13
|
resizable: !0,
|
|
14
14
|
columns: e.columns,
|
|
15
|
-
"row-key": (
|
|
15
|
+
"row-key": (i) => i.name
|
|
16
16
|
}, {
|
|
17
|
-
bodyCell: n(({ column:
|
|
18
|
-
|
|
17
|
+
bodyCell: n(({ column: i, recordIndexs: a, index: L, record: v }) => [
|
|
18
|
+
i.dataIndex === "label" ? (u(), s(h, {
|
|
19
19
|
key: 0,
|
|
20
|
-
value: e.buttonList[
|
|
21
|
-
"onUpdate:value": (
|
|
20
|
+
value: e.buttonList[a[0]].label,
|
|
21
|
+
"onUpdate:value": (l) => e.buttonList[a[0]].label = l,
|
|
22
22
|
placeholder: e.i18nt("designer.setting.operationButtonLabel")
|
|
23
|
-
}, null, 8, ["value", "onUpdate:value", "placeholder"])) :
|
|
24
|
-
|
|
23
|
+
}, null, 8, ["value", "onUpdate:value", "placeholder"])) : p("", !0),
|
|
24
|
+
i.dataIndex === "type" ? (u(), s(m, {
|
|
25
25
|
key: 1,
|
|
26
|
-
value: e.buttonList[
|
|
27
|
-
"onUpdate:value": (
|
|
26
|
+
value: e.buttonList[a[0]].type,
|
|
27
|
+
"onUpdate:value": (l) => e.buttonList[a[0]].type = l,
|
|
28
28
|
placeholder: e.i18nt("designer.setting.operationButtonType"),
|
|
29
29
|
style: { width: "100%" }
|
|
30
30
|
}, {
|
|
31
31
|
default: n(() => [
|
|
32
|
-
|
|
32
|
+
d(r, { value: "primary" }, {
|
|
33
33
|
default: n(() => t[0] || (t[0] = [
|
|
34
|
-
|
|
34
|
+
o("primary")
|
|
35
35
|
])),
|
|
36
36
|
_: 1,
|
|
37
37
|
__: [0]
|
|
38
38
|
}),
|
|
39
|
-
|
|
39
|
+
d(r, { value: "ghost" }, {
|
|
40
40
|
default: n(() => t[1] || (t[1] = [
|
|
41
|
-
|
|
41
|
+
o("ghost")
|
|
42
42
|
])),
|
|
43
43
|
_: 1,
|
|
44
44
|
__: [1]
|
|
45
45
|
}),
|
|
46
|
-
|
|
46
|
+
d(r, { value: "dashed" }, {
|
|
47
47
|
default: n(() => t[2] || (t[2] = [
|
|
48
|
-
|
|
48
|
+
o("dashed")
|
|
49
49
|
])),
|
|
50
50
|
_: 1,
|
|
51
51
|
__: [2]
|
|
52
52
|
}),
|
|
53
|
-
|
|
53
|
+
d(r, { value: "text" }, {
|
|
54
54
|
default: n(() => t[3] || (t[3] = [
|
|
55
|
-
|
|
55
|
+
o("text")
|
|
56
56
|
])),
|
|
57
57
|
_: 1,
|
|
58
58
|
__: [3]
|
|
59
59
|
}),
|
|
60
|
-
|
|
60
|
+
d(r, { value: "link" }, {
|
|
61
61
|
default: n(() => t[4] || (t[4] = [
|
|
62
|
-
|
|
62
|
+
o("link")
|
|
63
63
|
])),
|
|
64
64
|
_: 1,
|
|
65
65
|
__: [4]
|
|
66
66
|
}),
|
|
67
|
-
|
|
67
|
+
d(r, { value: "default" }, {
|
|
68
68
|
default: n(() => t[5] || (t[5] = [
|
|
69
|
-
|
|
69
|
+
o("default")
|
|
70
70
|
])),
|
|
71
71
|
_: 1,
|
|
72
72
|
__: [5]
|
|
73
73
|
})
|
|
74
74
|
]),
|
|
75
75
|
_: 2
|
|
76
|
-
}, 1032, ["value", "onUpdate:value", "placeholder"])) :
|
|
77
|
-
|
|
76
|
+
}, 1032, ["value", "onUpdate:value", "placeholder"])) : p("", !0),
|
|
77
|
+
i.dataIndex === "size" ? (u(), s(m, {
|
|
78
78
|
key: 2,
|
|
79
|
-
value: e.buttonList[
|
|
80
|
-
"onUpdate:value": (
|
|
79
|
+
value: e.buttonList[a[0]].size,
|
|
80
|
+
"onUpdate:value": (l) => e.buttonList[a[0]].size = l,
|
|
81
81
|
placeholder: e.i18nt("designer.setting.size"),
|
|
82
82
|
style: { width: "100%" }
|
|
83
83
|
}, {
|
|
84
84
|
default: n(() => [
|
|
85
|
-
|
|
85
|
+
d(r, { value: "default" }, {
|
|
86
86
|
default: n(() => t[6] || (t[6] = [
|
|
87
|
-
|
|
87
|
+
o("default")
|
|
88
88
|
])),
|
|
89
89
|
_: 1,
|
|
90
90
|
__: [6]
|
|
91
91
|
}),
|
|
92
|
-
|
|
92
|
+
d(r, { value: "small" }, {
|
|
93
93
|
default: n(() => t[7] || (t[7] = [
|
|
94
|
-
|
|
94
|
+
o("small")
|
|
95
95
|
])),
|
|
96
96
|
_: 1,
|
|
97
97
|
__: [7]
|
|
98
98
|
}),
|
|
99
|
-
|
|
99
|
+
d(r, { value: "large" }, {
|
|
100
100
|
default: n(() => t[8] || (t[8] = [
|
|
101
|
-
|
|
101
|
+
o("large")
|
|
102
102
|
])),
|
|
103
103
|
_: 1,
|
|
104
104
|
__: [8]
|
|
105
105
|
})
|
|
106
106
|
]),
|
|
107
107
|
_: 2
|
|
108
|
-
}, 1032, ["value", "onUpdate:value", "placeholder"])) :
|
|
109
|
-
|
|
108
|
+
}, 1032, ["value", "onUpdate:value", "placeholder"])) : p("", !0),
|
|
109
|
+
i.dataIndex === "ghost" ? (u(), s(C, {
|
|
110
110
|
key: 3,
|
|
111
|
-
value: e.buttonList[l[0]].icon,
|
|
112
|
-
"onUpdate:value": (o) => e.buttonList[l[0]].icon = o
|
|
113
|
-
}, null, 8, ["value", "onUpdate:value"])) : r("", !0),
|
|
114
|
-
d.dataIndex === "danger" ? (s(), p(_, {
|
|
115
|
-
key: 4,
|
|
116
111
|
checkedValue: 1,
|
|
117
112
|
unCheckedValue: 0,
|
|
118
|
-
checked: e.buttonList[
|
|
119
|
-
"onUpdate:checked": (
|
|
120
|
-
}, null, 8, ["checked", "onUpdate:checked"])) :
|
|
121
|
-
|
|
113
|
+
checked: e.buttonList[a[0]].ghost,
|
|
114
|
+
"onUpdate:checked": (l) => e.buttonList[a[0]].ghost = l
|
|
115
|
+
}, null, 8, ["checked", "onUpdate:checked"])) : p("", !0),
|
|
116
|
+
i.dataIndex === "icon" ? (u(), s(y, {
|
|
117
|
+
key: 4,
|
|
118
|
+
value: e.buttonList[a[0]].icon,
|
|
119
|
+
"onUpdate:value": (l) => e.buttonList[a[0]].icon = l
|
|
120
|
+
}, null, 8, ["value", "onUpdate:value"])) : p("", !0),
|
|
121
|
+
i.dataIndex === "danger" ? (u(), s(C, {
|
|
122
122
|
key: 5,
|
|
123
|
-
|
|
124
|
-
|
|
123
|
+
checkedValue: 1,
|
|
124
|
+
unCheckedValue: 0,
|
|
125
|
+
checked: e.buttonList[a[0]].danger,
|
|
126
|
+
"onUpdate:checked": (l) => e.buttonList[a[0]].danger = l
|
|
127
|
+
}, null, 8, ["checked", "onUpdate:checked"])) : p("", !0),
|
|
128
|
+
i.dataIndex === "onHidden" ? (u(), s(g, {
|
|
129
|
+
key: 6,
|
|
130
|
+
class: b([{ "button-text-highlight": !!v.onHidden }]),
|
|
131
|
+
onClick: (l) => e.editClickEvent("onHidden", v, a),
|
|
125
132
|
size: "small"
|
|
126
133
|
}, {
|
|
127
134
|
default: n(() => [
|
|
128
|
-
|
|
135
|
+
o(f(e.i18nt("designer.setting.operationButtonHidden")), 1)
|
|
129
136
|
]),
|
|
130
137
|
_: 2
|
|
131
|
-
}, 1032, ["class", "onClick"])) :
|
|
132
|
-
|
|
133
|
-
key:
|
|
134
|
-
class:
|
|
135
|
-
onClick: (
|
|
138
|
+
}, 1032, ["class", "onClick"])) : p("", !0),
|
|
139
|
+
i.dataIndex === "onDisabled" ? (u(), s(g, {
|
|
140
|
+
key: 7,
|
|
141
|
+
class: b([{ "button-text-highlight": !!v.onDisabled }]),
|
|
142
|
+
onClick: (l) => e.editClickEvent("onDisabled", v, a),
|
|
136
143
|
size: "small"
|
|
137
144
|
}, {
|
|
138
145
|
default: n(() => [
|
|
139
|
-
|
|
146
|
+
o(f(e.i18nt("designer.setting.operationButtonDisabled")), 1)
|
|
140
147
|
]),
|
|
141
148
|
_: 2
|
|
142
|
-
}, 1032, ["class", "onClick"])) :
|
|
143
|
-
|
|
144
|
-
key:
|
|
145
|
-
class:
|
|
146
|
-
onClick: (
|
|
149
|
+
}, 1032, ["class", "onClick"])) : p("", !0),
|
|
150
|
+
i.dataIndex === "onClick" ? (u(), s(g, {
|
|
151
|
+
key: 8,
|
|
152
|
+
class: b([{ "button-text-highlight": !!v.onClick }]),
|
|
153
|
+
onClick: (l) => e.editClickEvent("onClick", v, a),
|
|
147
154
|
size: "small"
|
|
148
155
|
}, {
|
|
149
156
|
default: n(() => [
|
|
150
|
-
|
|
157
|
+
o(f(e.i18nt("designer.setting.operationButtonClick")), 1)
|
|
151
158
|
]),
|
|
152
159
|
_: 2
|
|
153
|
-
}, 1032, ["class", "onClick"])) :
|
|
154
|
-
|
|
155
|
-
key:
|
|
160
|
+
}, 1032, ["class", "onClick"])) : p("", !0),
|
|
161
|
+
i.dataIndex === "action" ? (u(), s(g, {
|
|
162
|
+
key: 9,
|
|
156
163
|
type: "link",
|
|
157
|
-
onClick: (
|
|
164
|
+
onClick: (l) => e.deleteOperationButton(L),
|
|
158
165
|
size: "small"
|
|
159
166
|
}, {
|
|
160
167
|
default: n(() => [
|
|
161
|
-
|
|
168
|
+
o(f(e.i18nt("designer.setting.delete")), 1)
|
|
162
169
|
]),
|
|
163
170
|
_: 2
|
|
164
|
-
}, 1032, ["onClick"])) :
|
|
171
|
+
}, 1032, ["onClick"])) : p("", !0)
|
|
165
172
|
]),
|
|
166
173
|
_: 1
|
|
167
174
|
}, 8, ["data-source", "columns", "row-key"]),
|
|
168
|
-
$("div",
|
|
169
|
-
|
|
175
|
+
$("div", V, [
|
|
176
|
+
d(g, {
|
|
170
177
|
type: "primary",
|
|
171
178
|
size: "default",
|
|
172
179
|
onClick: e.addOperationButton
|
|
173
180
|
}, {
|
|
174
181
|
default: n(() => [
|
|
175
|
-
|
|
182
|
+
o(f(e.i18nt("designer.setting.addOperationButton")), 1)
|
|
176
183
|
]),
|
|
177
184
|
_: 1
|
|
178
185
|
}, 8, ["onClick"])
|
|
179
186
|
]),
|
|
180
|
-
|
|
187
|
+
d(c, {
|
|
181
188
|
ref: "codeModalEditorRef",
|
|
182
189
|
onSave: e.saveColumnRender,
|
|
183
190
|
"event-header": `${e.currentEditBtn}(${e.parmas}){`
|
|
184
191
|
}, null, 8, ["onSave", "event-header"])
|
|
185
192
|
], 64);
|
|
186
193
|
}
|
|
187
|
-
const A = /* @__PURE__ */ E(
|
|
194
|
+
const A = /* @__PURE__ */ E(B, [["render", w], ["__scopeId", "data-v-739c411e"]]);
|
|
188
195
|
export {
|
|
189
196
|
A as default
|
|
190
197
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as g, ref as a, computed as m, watch as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { defineComponent as g, ref as a, computed as m, watch as f } from "vue";
|
|
2
|
+
import h, { useI18n as v } from "../../utils/i18n.js";
|
|
3
|
+
import I from "../code-editor/code-modal-editor.vue.js";
|
|
4
4
|
import { generateId as B } from "../../utils/util.js";
|
|
5
5
|
import { TpfSelectIcon as x } from "tmgc2-share";
|
|
6
6
|
const z = g({
|
|
@@ -15,11 +15,11 @@ const z = g({
|
|
|
15
15
|
required: !0
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
|
-
components: { CodeModalEditor:
|
|
19
|
-
mixins: [
|
|
18
|
+
components: { CodeModalEditor: I, TpfSelectIcon: x },
|
|
19
|
+
mixins: [h],
|
|
20
20
|
emits: ["update:data"],
|
|
21
21
|
setup(r, { emit: u }) {
|
|
22
|
-
const { i18nt: t } =
|
|
22
|
+
const { i18nt: t } = v(), o = a(), d = a(), i = a(), p = [
|
|
23
23
|
{
|
|
24
24
|
dataIndex: "label",
|
|
25
25
|
title: t("designer.setting.operationButtonLabel"),
|
|
@@ -35,6 +35,11 @@ const z = g({
|
|
|
35
35
|
title: t("designer.setting.operationButtonSize"),
|
|
36
36
|
width: 80
|
|
37
37
|
},
|
|
38
|
+
{
|
|
39
|
+
dataIndex: "ghost",
|
|
40
|
+
title: t("designer.setting.operationButtonGhost"),
|
|
41
|
+
width: 80
|
|
42
|
+
},
|
|
38
43
|
{
|
|
39
44
|
dataIndex: "danger",
|
|
40
45
|
title: t("designer.setting.danger"),
|
|
@@ -66,7 +71,7 @@ const z = g({
|
|
|
66
71
|
width: 80
|
|
67
72
|
}
|
|
68
73
|
], n = m(() => r.data);
|
|
69
|
-
return
|
|
74
|
+
return f(
|
|
70
75
|
() => n.value,
|
|
71
76
|
() => {
|
|
72
77
|
u("update:data", n.value);
|
|
@@ -81,6 +86,7 @@ const z = g({
|
|
|
81
86
|
label: "new btn",
|
|
82
87
|
type: "primary",
|
|
83
88
|
size: "small",
|
|
89
|
+
ghost: !1,
|
|
84
90
|
shape: "default",
|
|
85
91
|
hidden: !1,
|
|
86
92
|
disabled: !1,
|
|
@@ -90,11 +96,11 @@ const z = g({
|
|
|
90
96
|
saveColumnRender: (e) => {
|
|
91
97
|
console.log(n.value, i.value, o.value), n.value[i.value][o.value] = e;
|
|
92
98
|
},
|
|
93
|
-
columns:
|
|
99
|
+
columns: p,
|
|
94
100
|
buttonList: n,
|
|
95
|
-
editClickEvent: (e, s,
|
|
101
|
+
editClickEvent: (e, s, c) => {
|
|
96
102
|
var l;
|
|
97
|
-
i.value =
|
|
103
|
+
i.value = c[0], o.value = e, console.log({ code: s[e] }), (l = d.value) == null || l.open(s[e]);
|
|
98
104
|
},
|
|
99
105
|
codeModalEditorRef: d,
|
|
100
106
|
currentEditBtn: o,
|