@kp-ui/lowcode 2.14.0-beta.18 → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kp-ui/lowcode",
3
- "version": "2.14.0-beta.18",
3
+ "version": "2.14.0-beta.19",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -1,190 +1,197 @@
1
- import c from "./ActionButtonListDialog.vue2.js";
2
- import { resolveComponent as k, createElementBlock as z, openBlock as s, Fragment as U, createVNode as i, createElementVNode as $, withCtx as n, createBlock as p, createCommentVNode as r, createTextVNode as a, normalizeClass as m, toDisplayString as g } from "vue";
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 w = { class: "add-btn" };
6
- function D(e, t, S, V, H, N) {
7
- const C = k("a-input"), u = k("a-select-option"), b = k("a-select"), y = k("TpfSelectIcon"), _ = k("a-switch"), f = k("a-button"), h = k("s-table"), B = k("CodeModalEditor");
8
- return s(), z(U, null, [
9
- i(h, {
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": (d) => d.name
15
+ "row-key": (i) => i.name
16
16
  }, {
17
- bodyCell: n(({ column: d, recordIndexs: l, index: L, record: v }) => [
18
- d.dataIndex === "label" ? (s(), p(C, {
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[l[0]].label,
21
- "onUpdate:value": (o) => e.buttonList[l[0]].label = o,
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"])) : r("", !0),
24
- d.dataIndex === "type" ? (s(), p(b, {
23
+ }, null, 8, ["value", "onUpdate:value", "placeholder"])) : p("", !0),
24
+ i.dataIndex === "type" ? (u(), s(m, {
25
25
  key: 1,
26
- value: e.buttonList[l[0]].type,
27
- "onUpdate:value": (o) => e.buttonList[l[0]].type = o,
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
- i(u, { value: "primary" }, {
32
+ d(r, { value: "primary" }, {
33
33
  default: n(() => t[0] || (t[0] = [
34
- a("primary")
34
+ o("primary")
35
35
  ])),
36
36
  _: 1,
37
37
  __: [0]
38
38
  }),
39
- i(u, { value: "ghost" }, {
39
+ d(r, { value: "ghost" }, {
40
40
  default: n(() => t[1] || (t[1] = [
41
- a("ghost")
41
+ o("ghost")
42
42
  ])),
43
43
  _: 1,
44
44
  __: [1]
45
45
  }),
46
- i(u, { value: "dashed" }, {
46
+ d(r, { value: "dashed" }, {
47
47
  default: n(() => t[2] || (t[2] = [
48
- a("dashed")
48
+ o("dashed")
49
49
  ])),
50
50
  _: 1,
51
51
  __: [2]
52
52
  }),
53
- i(u, { value: "text" }, {
53
+ d(r, { value: "text" }, {
54
54
  default: n(() => t[3] || (t[3] = [
55
- a("text")
55
+ o("text")
56
56
  ])),
57
57
  _: 1,
58
58
  __: [3]
59
59
  }),
60
- i(u, { value: "link" }, {
60
+ d(r, { value: "link" }, {
61
61
  default: n(() => t[4] || (t[4] = [
62
- a("link")
62
+ o("link")
63
63
  ])),
64
64
  _: 1,
65
65
  __: [4]
66
66
  }),
67
- i(u, { value: "default" }, {
67
+ d(r, { value: "default" }, {
68
68
  default: n(() => t[5] || (t[5] = [
69
- a("default")
69
+ o("default")
70
70
  ])),
71
71
  _: 1,
72
72
  __: [5]
73
73
  })
74
74
  ]),
75
75
  _: 2
76
- }, 1032, ["value", "onUpdate:value", "placeholder"])) : r("", !0),
77
- d.dataIndex === "size" ? (s(), p(b, {
76
+ }, 1032, ["value", "onUpdate:value", "placeholder"])) : p("", !0),
77
+ i.dataIndex === "size" ? (u(), s(m, {
78
78
  key: 2,
79
- value: e.buttonList[l[0]].size,
80
- "onUpdate:value": (o) => e.buttonList[l[0]].size = o,
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
- i(u, { value: "default" }, {
85
+ d(r, { value: "default" }, {
86
86
  default: n(() => t[6] || (t[6] = [
87
- a("default")
87
+ o("default")
88
88
  ])),
89
89
  _: 1,
90
90
  __: [6]
91
91
  }),
92
- i(u, { value: "small" }, {
92
+ d(r, { value: "small" }, {
93
93
  default: n(() => t[7] || (t[7] = [
94
- a("small")
94
+ o("small")
95
95
  ])),
96
96
  _: 1,
97
97
  __: [7]
98
98
  }),
99
- i(u, { value: "large" }, {
99
+ d(r, { value: "large" }, {
100
100
  default: n(() => t[8] || (t[8] = [
101
- a("large")
101
+ o("large")
102
102
  ])),
103
103
  _: 1,
104
104
  __: [8]
105
105
  })
106
106
  ]),
107
107
  _: 2
108
- }, 1032, ["value", "onUpdate:value", "placeholder"])) : r("", !0),
109
- d.dataIndex === "icon" ? (s(), p(y, {
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[l[0]].danger,
119
- "onUpdate:checked": (o) => e.buttonList[l[0]].danger = o
120
- }, null, 8, ["checked", "onUpdate:checked"])) : r("", !0),
121
- d.dataIndex === "onHidden" ? (s(), p(f, {
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
- class: m([{ "button-text-highlight": !!v.onHidden }]),
124
- onClick: (o) => e.editClickEvent("onHidden", v, l),
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
- a(g(e.i18nt("designer.setting.operationButtonHidden")), 1)
135
+ o(f(e.i18nt("designer.setting.operationButtonHidden")), 1)
129
136
  ]),
130
137
  _: 2
131
- }, 1032, ["class", "onClick"])) : r("", !0),
132
- d.dataIndex === "onDisabled" ? (s(), p(f, {
133
- key: 6,
134
- class: m([{ "button-text-highlight": !!v.onDisabled }]),
135
- onClick: (o) => e.editClickEvent("onDisabled", v, l),
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
- a(g(e.i18nt("designer.setting.operationButtonDisabled")), 1)
146
+ o(f(e.i18nt("designer.setting.operationButtonDisabled")), 1)
140
147
  ]),
141
148
  _: 2
142
- }, 1032, ["class", "onClick"])) : r("", !0),
143
- d.dataIndex === "onClick" ? (s(), p(f, {
144
- key: 7,
145
- class: m([{ "button-text-highlight": !!v.onClick }]),
146
- onClick: (o) => e.editClickEvent("onClick", v, l),
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
- a(g(e.i18nt("designer.setting.operationButtonClick")), 1)
157
+ o(f(e.i18nt("designer.setting.operationButtonClick")), 1)
151
158
  ]),
152
159
  _: 2
153
- }, 1032, ["class", "onClick"])) : r("", !0),
154
- d.dataIndex === "action" ? (s(), p(f, {
155
- key: 8,
160
+ }, 1032, ["class", "onClick"])) : p("", !0),
161
+ i.dataIndex === "action" ? (u(), s(g, {
162
+ key: 9,
156
163
  type: "link",
157
- onClick: (o) => e.deleteOperationButton(L),
164
+ onClick: (l) => e.deleteOperationButton(L),
158
165
  size: "small"
159
166
  }, {
160
167
  default: n(() => [
161
- a(g(e.i18nt("designer.setting.delete")), 1)
168
+ o(f(e.i18nt("designer.setting.delete")), 1)
162
169
  ]),
163
170
  _: 2
164
- }, 1032, ["onClick"])) : r("", !0)
171
+ }, 1032, ["onClick"])) : p("", !0)
165
172
  ]),
166
173
  _: 1
167
174
  }, 8, ["data-source", "columns", "row-key"]),
168
- $("div", w, [
169
- i(f, {
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
- a(g(e.i18nt("designer.setting.addOperationButton")), 1)
182
+ o(f(e.i18nt("designer.setting.addOperationButton")), 1)
176
183
  ]),
177
184
  _: 1
178
185
  }, 8, ["onClick"])
179
186
  ]),
180
- i(B, {
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(c, [["render", D], ["__scopeId", "data-v-0cd55ffd"]]);
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 v } from "vue";
2
- import f, { useI18n as I } from "../../utils/i18n.js";
3
- import h from "../code-editor/code-modal-editor.vue.js";
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: h, TpfSelectIcon: x },
19
- mixins: [f],
18
+ components: { CodeModalEditor: I, TpfSelectIcon: x },
19
+ mixins: [h],
20
20
  emits: ["update:data"],
21
21
  setup(r, { emit: u }) {
22
- const { i18nt: t } = I(), o = a(), d = a(), i = a(), c = [
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 v(
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: c,
99
+ columns: p,
94
100
  buttonList: n,
95
- editClickEvent: (e, s, p) => {
101
+ editClickEvent: (e, s, c) => {
96
102
  var l;
97
- i.value = p[0], o.value = e, console.log({ code: s[e] }), (l = d.value) == null || l.open(s[e]);
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,
@@ -1,45 +1,46 @@
1
1
  import d from "./ActionButtonListRender.vue2.js";
2
- import { resolveComponent as n, createElementBlock as s, openBlock as t, normalizeStyle as p, normalizeClass as u, createBlock as a, Teleport as b, createVNode as f, withCtx as l, Fragment as _, renderList as m, createCommentVNode as y, createTextVNode as k, toDisplayString as C } from "vue";
2
+ import { resolveComponent as n, createElementBlock as a, openBlock as t, normalizeStyle as p, normalizeClass as u, createBlock as s, Teleport as b, createVNode as f, withCtx as l, Fragment as _, renderList as g, createCommentVNode as m, createTextVNode as y, toDisplayString as k } from "vue";
3
3
  /* empty css */
4
- import g from "../../../_virtual/_plugin-vue_export-helper.js";
5
- function v(o, B, S, $, h, z) {
4
+ import C from "../../../_virtual/_plugin-vue_export-helper.js";
5
+ function h(o, v, B, S, $, z) {
6
6
  const r = n("SvgIcon"), c = n("a-button"), i = n("a-space");
7
- return t(), s("div", {
7
+ return t(), a("div", {
8
8
  ref: "fieldEditor",
9
9
  class: u(["button-list-container", ...o.customClass]),
10
10
  style: p(o.containerStyle)
11
11
  }, [
12
- (t(), a(b, {
12
+ (t(), s(b, {
13
13
  disabled: o.isDisabled,
14
14
  to: o.getContainer
15
15
  }, [
16
16
  f(i, { size: 8 }, {
17
17
  default: l(() => [
18
- (t(!0), s(_, null, m(o.visibleButtons, (e) => (t(), a(c, {
18
+ (t(!0), a(_, null, g(o.visibleButtons, (e) => (t(), s(c, {
19
19
  key: e.key,
20
20
  type: e.type,
21
21
  danger: e.danger,
22
+ ghost: e.ghost,
22
23
  class: "tpf-button",
23
24
  disabled: o.handleDisabled(e),
24
25
  onClick: (D) => o.handleClick(e)
25
26
  }, {
26
27
  default: l(() => [
27
- e.icon ? (t(), a(r, {
28
+ e.icon ? (t(), s(r, {
28
29
  key: 0,
29
30
  "icon-class": e.icon,
30
31
  class: "button-icon"
31
- }, null, 8, ["icon-class"])) : y("", !0),
32
- k(" " + C(e.label), 1)
32
+ }, null, 8, ["icon-class"])) : m("", !0),
33
+ y(" " + k(e.label), 1)
33
34
  ]),
34
35
  _: 2
35
- }, 1032, ["type", "danger", "disabled", "onClick"]))), 128))
36
+ }, 1032, ["type", "danger", "ghost", "disabled", "onClick"]))), 128))
36
37
  ]),
37
38
  _: 1
38
39
  })
39
40
  ], 8, ["disabled", "to"]))
40
41
  ], 6);
41
42
  }
42
- const L = /* @__PURE__ */ g(d, [["render", v], ["__scopeId", "data-v-a5c375c2"]]);
43
+ const L = /* @__PURE__ */ C(d, [["render", h], ["__scopeId", "data-v-698b66f2"]]);
43
44
  export {
44
45
  L as default
45
46
  };
package/src/lang/en-US.js CHANGED
@@ -441,6 +441,7 @@ const e = {
441
441
  operationButtonLabel: "Text",
442
442
  operationButtonType: "Type",
443
443
  operationButtonSize: "Size",
444
+ operationButtonGhost: "Ghost",
444
445
  operationButtonRound: "Round",
445
446
  operationButtonHidden: "Hidden",
446
447
  operationButtonDisabled: "Disabled",
package/src/lang/zh-CN.js CHANGED
@@ -439,6 +439,7 @@ const e = {
439
439
  operationButtonLabel: "文字",
440
440
  operationButtonType: "类型",
441
441
  operationButtonSize: "大小",
442
+ operationButtonGhost: "幽灵按钮",
442
443
  operationButtonRound: "圆角",
443
444
  operationButtonHidden: "隐藏",
444
445
  operationButtonDisabled: "禁用",