@kp-ui/lowcode 2.14.0-beta.1 → 2.14.0-beta.2
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/install.js +26 -25
- package/package.json +2 -2
- package/src/components/form-designer/form-widget/field-widget/diy-compontent-widget.vue.js +1 -1
- package/src/components/form-designer/index.vue.js +55 -54
- package/src/components/form-designer/setting-panel/form-crud-setting.vue.js +62 -23
- package/src/components/form-designer/setting-panel/index.vue.js +4 -323
- package/src/components/form-designer/setting-panel/index.vue2.js +273 -0
- package/src/components/form-designer/setting-panel/property-editor/button-list-editor.vue2.js +5 -4
- package/src/components/form-designer/setting-panel/property-editor/container-data-table/customRowEvent/data-table-customRow-editor.vue.js +1 -0
- package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-dsEnabled-editor.vue.js +5 -4
- package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-pagination-editor.vue.js +1 -0
- package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-selections-editor.vue2.js +19 -18
- package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-showButtonsColumn-editor.vue.js +9 -8
- package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-tableColumns-editor.vue.js +1 -1
- package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-tableColumns-editor.vue2.js +7 -6
- package/src/components/form-designer/setting-panel/property-editor/container-vf-dialog/bodyStyle-editor.vue2.js +7 -6
- package/src/components/form-designer/setting-panel/property-editor/customRender-editor.vue.js +2 -40
- package/src/components/form-designer/setting-panel/property-editor/customRender-editor.vue2.js +41 -0
- package/src/components/form-designer/setting-panel/property-editor/event-handler/onClickIcon-editor.vue.js +2 -47
- package/src/components/form-designer/setting-panel/property-editor/event-handler/onClickIcon-editor.vue2.js +44 -0
- package/src/components/form-designer/setting-panel/property-editor/event-handler/onCreated-editor.vue.js +2 -47
- package/src/components/form-designer/setting-panel/property-editor/event-handler/onCreated-editor.vue2.js +43 -0
- package/src/components/form-designer/setting-panel/property-editor/event-handler/onOkButtonClick-editor.vue.js +2 -46
- package/src/components/form-designer/setting-panel/property-editor/event-handler/onOkButtonClick-editor.vue2.js +43 -0
- package/src/components/form-designer/setting-panel/property-editor/event-handler/onValidate-editor.vue.js +2 -47
- package/src/components/form-designer/setting-panel/property-editor/event-handler/onValidate-editor.vue2.js +44 -0
- package/src/components/form-designer/setting-panel/property-editor/field-dropdown/dropdown-menuList-editor.vue.js +2 -66
- package/src/components/form-designer/setting-panel/property-editor/field-dropdown/dropdown-menuList-editor.vue2.js +42 -0
- package/src/components/form-designer/setting-panel/property-editor/field-html-text/htmlContent-editor.vue.js +5 -4
- package/src/components/form-designer/setting-panel/property-editor/hidden-editor.vue.js +6 -5
- package/src/components/form-designer/setting-panel/property-editor/index.js +98 -99
- package/src/components/form-designer/setting-panel/property-editor/labelIconClass-editor.vue.js +8 -7
- package/src/components/form-designer/setting-panel/property-editor/optionItems-editor.vue.js +38 -35
- package/src/components/form-render/container-item/data-table-item.vue.js +149 -0
- package/src/components/form-render/container-item/grid-col-item.vue.js +149 -0
- package/src/components/form-render/container-item/grid-item.vue.js +92 -0
- package/src/components/form-render/container-item/grid-sub-form-item.vue.js +319 -0
- package/src/components/form-render/container-item/index.js +24 -0
- package/src/components/form-render/container-item/sub-form-item.vue.js +429 -0
- package/src/components/form-render/container-item/tab-item.vue.js +160 -0
- package/src/components/form-render/container-item/table-cell-item.vue.js +95 -0
- package/src/components/form-render/container-item/table-item.vue.js +96 -0
- package/src/components/form-render/container-item/vf-collapse-item.vue.js +252 -0
- package/src/components/form-render/container-item/vf-dialog-item.vue.js +12 -0
- package/src/components/form-render/container-item/vf-drawer-item.vue.js +12 -0
- package/src/components/form-render/index.vue.js +2 -1
- package/src/components/http-editor/index.vue.js +10 -10
- package/src/components/public/ActionButtonListRender.vue.js +19 -24
- package/src/lang/en-US.js +1 -3
- package/src/lang/zh-CN.js +0 -3
- package/src/utils/useEmitter.js +57 -0
- package/src/utils/util.js +50 -49
- package/stats.html +1 -1
- package/styles/style.css +1 -1
- package/src/components/form-designer/setting-panel/property-editor/event-handler/onVformAdd-editor.vue.js +0 -49
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import _ from "../../../utils/emitter.js";
|
|
2
|
+
import x from "../../../utils/i18n.js";
|
|
3
|
+
import I from "../refMixin.js";
|
|
4
|
+
import C from "./container-item-wrapper.vue.js";
|
|
5
|
+
import y from "./table-cell-item.vue.js";
|
|
6
|
+
import h from "./containerItemMixin.js";
|
|
7
|
+
import { resolveComponent as s, createBlock as c, openBlock as t, withCtx as u, withDirectives as F, createElementBlock as r, createElementVNode as f, normalizeClass as k, Fragment as n, renderList as i, createCommentVNode as R, createSlots as v, renderSlot as L, mergeProps as N, vShow as S } from "vue";
|
|
8
|
+
/* empty css */
|
|
9
|
+
import j from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
10
|
+
const B = {
|
|
11
|
+
name: "table-item",
|
|
12
|
+
componentName: "ContainerItem",
|
|
13
|
+
mixins: [_, x, I, h],
|
|
14
|
+
components: {
|
|
15
|
+
ContainerItemWrapper: C,
|
|
16
|
+
TableCellItem: y
|
|
17
|
+
},
|
|
18
|
+
props: {
|
|
19
|
+
widget: Object,
|
|
20
|
+
subFormRowIndex: {
|
|
21
|
+
/* 子表单组件行索引,从0开始计数 */
|
|
22
|
+
type: Number,
|
|
23
|
+
default: -1
|
|
24
|
+
},
|
|
25
|
+
subFormColIndex: {
|
|
26
|
+
/* 子表单组件列索引,从0开始计数 */
|
|
27
|
+
type: Number,
|
|
28
|
+
default: -1
|
|
29
|
+
},
|
|
30
|
+
subFormRowId: {
|
|
31
|
+
/* 子表单组件行Id,唯一id且不可变 */
|
|
32
|
+
type: String,
|
|
33
|
+
default: ""
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
inject: ["refList", "sfRefList", "globalModel"],
|
|
37
|
+
created() {
|
|
38
|
+
this.initRefList();
|
|
39
|
+
},
|
|
40
|
+
mounted() {
|
|
41
|
+
},
|
|
42
|
+
beforeUnmount() {
|
|
43
|
+
this.unregisterFromRefList();
|
|
44
|
+
},
|
|
45
|
+
methods: {}
|
|
46
|
+
};
|
|
47
|
+
function M(o, E, e, O, V, z) {
|
|
48
|
+
const w = s("table-cell-item"), b = s("container-item-wrapper");
|
|
49
|
+
return t(), c(b, { widget: e.widget }, {
|
|
50
|
+
default: u(() => [
|
|
51
|
+
F((t(), r("div", {
|
|
52
|
+
key: e.widget.id,
|
|
53
|
+
class: "table-container"
|
|
54
|
+
}, [
|
|
55
|
+
f("table", {
|
|
56
|
+
ref: e.widget.id,
|
|
57
|
+
class: k(["table-layout", [o.customClass]])
|
|
58
|
+
}, [
|
|
59
|
+
f("tbody", null, [
|
|
60
|
+
(t(!0), r(n, null, i(e.widget.rows, (m, g) => (t(), r("tr", {
|
|
61
|
+
key: m.id
|
|
62
|
+
}, [
|
|
63
|
+
(t(!0), r(n, null, i(m.cols, (d, l) => (t(), r(n, null, [
|
|
64
|
+
d.merged ? R("", !0) : (t(), c(w, {
|
|
65
|
+
widget: d,
|
|
66
|
+
key: l,
|
|
67
|
+
"parent-list": e.widget.cols,
|
|
68
|
+
"row-index": g,
|
|
69
|
+
"col-index": l,
|
|
70
|
+
"parent-widget": e.widget,
|
|
71
|
+
"sub-form-row-id": e.subFormRowId,
|
|
72
|
+
"sub-form-row-index": e.subFormRowIndex,
|
|
73
|
+
"sub-form-col-index": e.subFormColIndex
|
|
74
|
+
}, v({ _: 2 }, [
|
|
75
|
+
i(Object.keys(o.$slots), (a) => ({
|
|
76
|
+
name: a,
|
|
77
|
+
fn: u((p) => [
|
|
78
|
+
L(o.$slots, a, N({ ref_for: !0 }, p), void 0, !0)
|
|
79
|
+
])
|
|
80
|
+
}))
|
|
81
|
+
]), 1032, ["widget", "parent-list", "row-index", "col-index", "parent-widget", "sub-form-row-id", "sub-form-row-index", "sub-form-col-index"]))
|
|
82
|
+
], 64))), 256))
|
|
83
|
+
]))), 128))
|
|
84
|
+
])
|
|
85
|
+
], 2)
|
|
86
|
+
])), [
|
|
87
|
+
[S, !e.widget.options.hidden]
|
|
88
|
+
])
|
|
89
|
+
]),
|
|
90
|
+
_: 3
|
|
91
|
+
}, 8, ["widget"]);
|
|
92
|
+
}
|
|
93
|
+
const K = /* @__PURE__ */ j(B, [["render", M], ["__scopeId", "data-v-48955c34"]]);
|
|
94
|
+
export {
|
|
95
|
+
K as default
|
|
96
|
+
};
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
import L from "./container-item-wrapper.vue.js";
|
|
2
|
+
import I from "../../../utils/emitter.js";
|
|
3
|
+
import { defineAsyncComponent as j, resolveComponent as f, withDirectives as F, createBlock as s, openBlock as i, withCtx as d, createElementVNode as C, createVNode as c, createElementBlock as m, createCommentVNode as y, normalizeClass as S, Fragment as u, renderList as l, resolveDynamicComponent as g, createSlots as p, renderSlot as w, mergeProps as h, Transition as D, normalizeStyle as N, vShow as O } from "vue";
|
|
4
|
+
import M from "../../../utils/i18n.js";
|
|
5
|
+
import T from "../../form-designer/form-widget/field-widget/index.js";
|
|
6
|
+
import B from "../refMixin.js";
|
|
7
|
+
import V from "./containerItemMixin.js";
|
|
8
|
+
import { TpfCollapseTitle as z } from "tmgc2-share";
|
|
9
|
+
import J from "../../svg-icon/index.vue.js";
|
|
10
|
+
/* empty css */
|
|
11
|
+
/* empty css */
|
|
12
|
+
/* empty css */
|
|
13
|
+
import A from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
14
|
+
const E = {
|
|
15
|
+
name: "VfCollapseItem",
|
|
16
|
+
componentName: "ContainerItem",
|
|
17
|
+
// 必须固定为ContainerItem,用于接收父级组件的broadcast事件
|
|
18
|
+
mixins: [I, M, B, V],
|
|
19
|
+
components: {
|
|
20
|
+
ContainerItemWrapper: L,
|
|
21
|
+
TpfCollapseTitle: z,
|
|
22
|
+
SvgIcon: J,
|
|
23
|
+
...T,
|
|
24
|
+
VFormRender: j(() => import("../index.vue.js"))
|
|
25
|
+
},
|
|
26
|
+
props: {
|
|
27
|
+
widget: Object,
|
|
28
|
+
parentWidget: Object,
|
|
29
|
+
parentList: Array,
|
|
30
|
+
indexOfParentList: Number,
|
|
31
|
+
model: {
|
|
32
|
+
type: Object,
|
|
33
|
+
default: () => ({})
|
|
34
|
+
},
|
|
35
|
+
subFormRowIndex: {
|
|
36
|
+
/* 子表单组件行索引,从0开始计数 */
|
|
37
|
+
type: Number,
|
|
38
|
+
default: -1
|
|
39
|
+
},
|
|
40
|
+
subFormColIndex: {
|
|
41
|
+
/* 子表单组件列索引,从0开始计数 */
|
|
42
|
+
type: Number,
|
|
43
|
+
default: -1
|
|
44
|
+
},
|
|
45
|
+
subFormRowId: {
|
|
46
|
+
/* 子表单组件行Id,唯一id且不可变 */
|
|
47
|
+
type: String,
|
|
48
|
+
default: ""
|
|
49
|
+
},
|
|
50
|
+
formJson: {
|
|
51
|
+
type: Object
|
|
52
|
+
},
|
|
53
|
+
formData: {
|
|
54
|
+
type: Object,
|
|
55
|
+
default: () => ({})
|
|
56
|
+
},
|
|
57
|
+
optionData: {
|
|
58
|
+
//prop传入的选项数据
|
|
59
|
+
type: Object,
|
|
60
|
+
default: () => ({})
|
|
61
|
+
},
|
|
62
|
+
globalDsv: {
|
|
63
|
+
// 全局数据源变量
|
|
64
|
+
type: Object,
|
|
65
|
+
default: () => ({})
|
|
66
|
+
},
|
|
67
|
+
parentFormRef: {
|
|
68
|
+
type: Object,
|
|
69
|
+
default: null
|
|
70
|
+
},
|
|
71
|
+
extraData: {
|
|
72
|
+
type: Object,
|
|
73
|
+
default: () => ({})
|
|
74
|
+
},
|
|
75
|
+
wrapperId: {
|
|
76
|
+
type: String,
|
|
77
|
+
default: null
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
inject: ["refList", "sfRefList", "globalModel", "getFormConfig", "getGlobalDsv"],
|
|
81
|
+
data() {
|
|
82
|
+
return {};
|
|
83
|
+
},
|
|
84
|
+
computed: {
|
|
85
|
+
rightSlotCss() {
|
|
86
|
+
return this.widget.options.rightSlotCss || "";
|
|
87
|
+
},
|
|
88
|
+
formConfig() {
|
|
89
|
+
return this.getFormConfig();
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
created() {
|
|
93
|
+
this.initRefList(), this.handleOnCreated();
|
|
94
|
+
},
|
|
95
|
+
mounted() {
|
|
96
|
+
this.loadFormCode(this.widget.options.formCode), this.$nextTick(() => {
|
|
97
|
+
this.handleOnMounted();
|
|
98
|
+
});
|
|
99
|
+
},
|
|
100
|
+
beforeUnmount() {
|
|
101
|
+
this.unregisterFromRefList();
|
|
102
|
+
},
|
|
103
|
+
methods: {
|
|
104
|
+
toggleCollapse() {
|
|
105
|
+
this.widget.options.isCollapse = !this.widget.options.isCollapse;
|
|
106
|
+
},
|
|
107
|
+
async loadFormCode(t) {
|
|
108
|
+
if (t) {
|
|
109
|
+
const _ = await this.$http.get("/api/tmgc2-query/dataQuery/detail/FormDefinitionManagement", {
|
|
110
|
+
params: { code: t }
|
|
111
|
+
}).then((e) => e.data.object.frontendDefinition || "{}");
|
|
112
|
+
this.$refs.dFormRef.setFormJson(JSON.parse(_));
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
handleOnCreated() {
|
|
116
|
+
this.widget.options.onCreated && new Function(this.widget.options.onCreated).call(this);
|
|
117
|
+
},
|
|
118
|
+
handleOnMounted() {
|
|
119
|
+
this.widget.options.onMounted && new Function(this.widget.options.onMounted).call(this);
|
|
120
|
+
},
|
|
121
|
+
getFormRef() {
|
|
122
|
+
return this.$refs.dFormRef;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}, P = { class: "tpf-collapse" }, q = { class: "tpf-collapse-header" };
|
|
126
|
+
function G(t, _, e, Q, U, b) {
|
|
127
|
+
const R = f("TpfCollapseTitle"), v = f("SvgIcon"), k = f("a-space"), x = f("container-item-wrapper");
|
|
128
|
+
return F((i(), s(x, { widget: e.widget }, {
|
|
129
|
+
default: d(() => [
|
|
130
|
+
C("div", P, [
|
|
131
|
+
C("div", q, [
|
|
132
|
+
c(k, { size: 5 }, {
|
|
133
|
+
default: d(() => [
|
|
134
|
+
c(R, {
|
|
135
|
+
title: e.widget.options.title
|
|
136
|
+
}, null, 8, ["title"]),
|
|
137
|
+
c(v, {
|
|
138
|
+
"icon-class": e.widget.options.isCollapse ? e.widget.options.collapseIcon : e.widget.options.unCollapseIcon,
|
|
139
|
+
size: "24px",
|
|
140
|
+
shadow: "",
|
|
141
|
+
cursor: "",
|
|
142
|
+
onClick: b.toggleCollapse
|
|
143
|
+
}, null, 8, ["icon-class", "onClick"])
|
|
144
|
+
]),
|
|
145
|
+
_: 1
|
|
146
|
+
}),
|
|
147
|
+
e.widget.options.isCollapse ? y("", !0) : (i(), m("div", {
|
|
148
|
+
key: 0,
|
|
149
|
+
class: S(["header-right", b.rightSlotCss])
|
|
150
|
+
}, [
|
|
151
|
+
e.widget.headerRightSlotList && e.widget.headerRightSlotList.length > 0 ? (i(!0), m(u, { key: 0 }, l(e.widget.headerRightSlotList, (n, a) => (i(), m(u, null, [
|
|
152
|
+
n.category === "container" ? (i(), s(g(t.getComponentByContainer(n)), {
|
|
153
|
+
widget: n,
|
|
154
|
+
key: a,
|
|
155
|
+
"parent-list": e.widget.headerRightSlotList,
|
|
156
|
+
"index-of-parent-list": a,
|
|
157
|
+
"parent-widget": e.widget,
|
|
158
|
+
"sub-form-row-id": e.subFormRowId,
|
|
159
|
+
"sub-form-row-index": e.subFormRowIndex,
|
|
160
|
+
"sub-form-col-index": e.subFormColIndex,
|
|
161
|
+
data: e.model[e.widget.options.name]
|
|
162
|
+
}, p({ _: 2 }, [
|
|
163
|
+
l(Object.keys(t.$slots), (o) => ({
|
|
164
|
+
name: o,
|
|
165
|
+
fn: d((r) => [
|
|
166
|
+
w(t.$slots, o, h({ ref_for: !0 }, r), void 0, !0)
|
|
167
|
+
])
|
|
168
|
+
}))
|
|
169
|
+
]), 1032, ["widget", "parent-list", "index-of-parent-list", "parent-widget", "sub-form-row-id", "sub-form-row-index", "sub-form-col-index", "data"])) : (i(), s(g(n.type + "-widget"), {
|
|
170
|
+
field: n,
|
|
171
|
+
designer: null,
|
|
172
|
+
key: a,
|
|
173
|
+
"parent-list": e.widget.headerRightSlotList,
|
|
174
|
+
"index-of-parent-list": a,
|
|
175
|
+
"parent-widget": e.widget
|
|
176
|
+
}, p({ _: 2 }, [
|
|
177
|
+
l(Object.keys(t.$slots), (o) => ({
|
|
178
|
+
name: o,
|
|
179
|
+
fn: d((r) => [
|
|
180
|
+
w(t.$slots, o, h({ ref_for: !0 }, r), void 0, !0)
|
|
181
|
+
])
|
|
182
|
+
}))
|
|
183
|
+
]), 1032, ["field", "parent-list", "index-of-parent-list", "parent-widget"]))
|
|
184
|
+
], 64))), 256)) : y("", !0)
|
|
185
|
+
], 2))
|
|
186
|
+
]),
|
|
187
|
+
c(D, {
|
|
188
|
+
mode: "out-in",
|
|
189
|
+
appear: "",
|
|
190
|
+
"enter-active-class": "animate__animated animate__fadeIn animate__faster",
|
|
191
|
+
"leave-active-class": "animate__animated animate__fadeOut animate__faster"
|
|
192
|
+
}, {
|
|
193
|
+
default: d(() => [
|
|
194
|
+
F(C("div", {
|
|
195
|
+
class: S(["tpf-collapse-content"]),
|
|
196
|
+
style: N({
|
|
197
|
+
height: e.widget.options.height || "unset",
|
|
198
|
+
...JSON.parse(e.widget.options.bodyStyle || "{}")
|
|
199
|
+
})
|
|
200
|
+
}, [
|
|
201
|
+
e.widget.defaultSlotsList && e.widget.defaultSlotsList.length > 0 ? (i(!0), m(u, { key: 0 }, l(e.widget.defaultSlotsList, (n, a) => (i(), m(u, null, [
|
|
202
|
+
n.category === "container" ? (i(), s(g(t.getComponentByContainer(n)), {
|
|
203
|
+
widget: n,
|
|
204
|
+
key: a,
|
|
205
|
+
"parent-list": e.widget.defaultSlotsList,
|
|
206
|
+
"index-of-parent-list": a,
|
|
207
|
+
"parent-widget": e.widget,
|
|
208
|
+
"sub-form-row-id": e.subFormRowId,
|
|
209
|
+
"sub-form-row-index": e.subFormRowIndex,
|
|
210
|
+
"sub-form-col-index": e.subFormColIndex,
|
|
211
|
+
data: e.model[n.options.name],
|
|
212
|
+
model: e.model
|
|
213
|
+
}, p({ _: 2 }, [
|
|
214
|
+
l(Object.keys(t.$slots), (o) => ({
|
|
215
|
+
name: o,
|
|
216
|
+
fn: d((r) => [
|
|
217
|
+
w(t.$slots, o, h({ ref_for: !0 }, r), void 0, !0)
|
|
218
|
+
])
|
|
219
|
+
}))
|
|
220
|
+
]), 1032, ["widget", "parent-list", "index-of-parent-list", "parent-widget", "sub-form-row-id", "sub-form-row-index", "sub-form-col-index", "data", "model"])) : (i(), s(g(n.type + "-widget"), {
|
|
221
|
+
field: n,
|
|
222
|
+
designer: null,
|
|
223
|
+
key: a,
|
|
224
|
+
"parent-list": e.widget.defaultSlotsList,
|
|
225
|
+
"index-of-parent-list": a,
|
|
226
|
+
"parent-widget": e.widget
|
|
227
|
+
}, p({ _: 2 }, [
|
|
228
|
+
l(Object.keys(t.$slots), (o) => ({
|
|
229
|
+
name: o,
|
|
230
|
+
fn: d((r) => [
|
|
231
|
+
w(t.$slots, o, h({ ref_for: !0 }, r), void 0, !0)
|
|
232
|
+
])
|
|
233
|
+
}))
|
|
234
|
+
]), 1032, ["field", "parent-list", "index-of-parent-list", "parent-widget"]))
|
|
235
|
+
], 64))), 256)) : y("", !0)
|
|
236
|
+
], 4), [
|
|
237
|
+
[O, !e.widget.options.isCollapse]
|
|
238
|
+
])
|
|
239
|
+
]),
|
|
240
|
+
_: 3
|
|
241
|
+
})
|
|
242
|
+
])
|
|
243
|
+
]),
|
|
244
|
+
_: 3
|
|
245
|
+
}, 8, ["widget"])), [
|
|
246
|
+
[O, !e.widget.options.hidden]
|
|
247
|
+
]);
|
|
248
|
+
}
|
|
249
|
+
const re = /* @__PURE__ */ A(E, [["render", G], ["__scopeId", "data-v-dd25bb5f"]]);
|
|
250
|
+
export {
|
|
251
|
+
re as default
|
|
252
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createCommentVNode as e } from "vue";
|
|
2
|
+
import t from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
+
const o = {
|
|
4
|
+
name: "vf-dialog-item"
|
|
5
|
+
};
|
|
6
|
+
function r(n, a, c, m, f, s) {
|
|
7
|
+
return e("", !0);
|
|
8
|
+
}
|
|
9
|
+
const _ = /* @__PURE__ */ t(o, [["render", r]]);
|
|
10
|
+
export {
|
|
11
|
+
_ as default
|
|
12
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createCommentVNode as e } from "vue";
|
|
2
|
+
import r from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
+
const t = {
|
|
4
|
+
name: "vf-drawer-item"
|
|
5
|
+
};
|
|
6
|
+
function o(n, a, c, m, f, s) {
|
|
7
|
+
return e("", !0);
|
|
8
|
+
}
|
|
9
|
+
const d = /* @__PURE__ */ r(t, [["render", o]]);
|
|
10
|
+
export {
|
|
11
|
+
d as default
|
|
12
|
+
};
|
|
@@ -13,6 +13,7 @@ import tt from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
|
13
13
|
const et = {
|
|
14
14
|
name: "VFormRender",
|
|
15
15
|
componentName: "VFormRender",
|
|
16
|
+
inheritAttrs: !1,
|
|
16
17
|
mixins: [P, X],
|
|
17
18
|
components: {
|
|
18
19
|
DynamicDialog: Z,
|
|
@@ -824,7 +825,7 @@ function it(t, e, i, o, s, r) {
|
|
|
824
825
|
u(d, y(s.dialogProps, { ref: "dynamicDialgRef" }), null, 16)
|
|
825
826
|
], 64);
|
|
826
827
|
}
|
|
827
|
-
const ut = /* @__PURE__ */ tt(et, [["render", it], ["__scopeId", "data-v-
|
|
828
|
+
const ut = /* @__PURE__ */ tt(et, [["render", it], ["__scopeId", "data-v-01a89db4"]]);
|
|
828
829
|
export {
|
|
829
830
|
ut as default
|
|
830
831
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as p, mergeModels as s, useModel as f, ref as b, resolveComponent as i, createElementBlock as c, openBlock as g, Fragment as v, createVNode as a, withCtx as d, normalizeClass as M, createTextVNode as w, toDisplayString as x, unref as C } from "vue";
|
|
2
2
|
import { HttpEditor as h } from "tmgc2-share";
|
|
3
3
|
import "../../utils/i18n.js";
|
|
4
|
-
const
|
|
4
|
+
const k = /* @__PURE__ */ p({
|
|
5
5
|
__name: "index",
|
|
6
6
|
props: /* @__PURE__ */ s({
|
|
7
7
|
drawerTitle: {
|
|
@@ -35,25 +35,25 @@ const N = /* @__PURE__ */ m({
|
|
|
35
35
|
}),
|
|
36
36
|
emits: ["update:optionModel"],
|
|
37
37
|
setup(e) {
|
|
38
|
-
const n = f(e, "optionModel"), o = b(!1),
|
|
38
|
+
const n = f(e, "optionModel"), o = b(!1), r = () => {
|
|
39
39
|
o.value = !0;
|
|
40
40
|
};
|
|
41
41
|
return (S, t) => {
|
|
42
|
-
const u = i("a-button"),
|
|
42
|
+
const u = i("a-button"), m = i("a-form-item");
|
|
43
43
|
return g(), c(v, null, [
|
|
44
|
-
a(
|
|
44
|
+
a(m, {
|
|
45
45
|
label: e.label,
|
|
46
46
|
labelAlign: "left",
|
|
47
47
|
"label-width": "150px"
|
|
48
48
|
}, {
|
|
49
|
-
default:
|
|
49
|
+
default: d(() => [
|
|
50
50
|
a(u, {
|
|
51
51
|
shape: "round",
|
|
52
|
-
onClick:
|
|
52
|
+
onClick: r,
|
|
53
53
|
class: M(["button-text-highlight"])
|
|
54
54
|
}, {
|
|
55
|
-
default:
|
|
56
|
-
w(x(e.buttonName), 1)
|
|
55
|
+
default: d(() => [
|
|
56
|
+
w(x(e.buttonName || e.label), 1)
|
|
57
57
|
]),
|
|
58
58
|
_: 1
|
|
59
59
|
})
|
|
@@ -72,5 +72,5 @@ const N = /* @__PURE__ */ m({
|
|
|
72
72
|
}
|
|
73
73
|
});
|
|
74
74
|
export {
|
|
75
|
-
|
|
75
|
+
k as default
|
|
76
76
|
};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { resolveComponent as
|
|
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";
|
|
3
3
|
/* empty css */
|
|
4
|
-
import
|
|
5
|
-
function
|
|
6
|
-
const
|
|
7
|
-
return
|
|
4
|
+
import g from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
+
function v(o, B, S, $, h, z) {
|
|
6
|
+
const r = n("SvgIcon"), c = n("a-button"), i = n("a-space");
|
|
7
|
+
return t(), s("div", {
|
|
8
8
|
ref: "fieldEditor",
|
|
9
|
-
class:
|
|
10
|
-
style:
|
|
9
|
+
class: u(["button-list-container", ...o.customClass]),
|
|
10
|
+
style: p(o.containerStyle)
|
|
11
11
|
}, [
|
|
12
|
-
(
|
|
12
|
+
(t(), a(b, {
|
|
13
13
|
disabled: o.isDisabled,
|
|
14
14
|
to: o.getContainer
|
|
15
15
|
}, [
|
|
16
|
-
|
|
16
|
+
f(i, { size: 8 }, {
|
|
17
17
|
default: l(() => [
|
|
18
|
-
(
|
|
18
|
+
(t(!0), s(_, null, m(o.visibleButtons, (e) => (t(), a(c, {
|
|
19
19
|
key: e.key,
|
|
20
20
|
type: e.type,
|
|
21
21
|
danger: e.danger,
|
|
@@ -24,17 +24,12 @@ function S(o, B, I, $, h, z) {
|
|
|
24
24
|
onClick: (D) => o.handleClick(e)
|
|
25
25
|
}, {
|
|
26
26
|
default: l(() => [
|
|
27
|
-
e.icon ? (
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
"icon-class": e.icon,
|
|
34
|
-
class: "button-icon"
|
|
35
|
-
}, null, 8, ["icon-class"])
|
|
36
|
-
], 64)) : y("", !0),
|
|
37
|
-
k(" " + v(e.label), 1)
|
|
27
|
+
e.icon ? (t(), a(r, {
|
|
28
|
+
key: 0,
|
|
29
|
+
"icon-class": e.icon,
|
|
30
|
+
class: "button-icon"
|
|
31
|
+
}, null, 8, ["icon-class"])) : y("", !0),
|
|
32
|
+
k(" " + C(e.label), 1)
|
|
38
33
|
]),
|
|
39
34
|
_: 2
|
|
40
35
|
}, 1032, ["type", "danger", "disabled", "onClick"]))), 128))
|
|
@@ -44,7 +39,7 @@ function S(o, B, I, $, h, z) {
|
|
|
44
39
|
], 8, ["disabled", "to"]))
|
|
45
40
|
], 6);
|
|
46
41
|
}
|
|
47
|
-
const
|
|
42
|
+
const L = /* @__PURE__ */ g(d, [["render", v], ["__scopeId", "data-v-a5c375c2"]]);
|
|
48
43
|
export {
|
|
49
|
-
|
|
44
|
+
L as default
|
|
50
45
|
};
|
package/src/lang/en-US.js
CHANGED
|
@@ -322,7 +322,6 @@ const e = {
|
|
|
322
322
|
appendButtonDisabled: "Button Disabled",
|
|
323
323
|
appendButtonIcon: "Append Button Icon",
|
|
324
324
|
buttonIcon: "Button Icon",
|
|
325
|
-
danger: "Danger Button",
|
|
326
325
|
switchWidth: "Width of Switch(px)",
|
|
327
326
|
checkedValue: "Active Text",
|
|
328
327
|
unCheckedValue: "Inactive Text",
|
|
@@ -357,10 +356,8 @@ const e = {
|
|
|
357
356
|
buttonConfig: "Button Config",
|
|
358
357
|
placement: "Placement",
|
|
359
358
|
bottomLeft: "Bottom Left",
|
|
360
|
-
bottom: "Bottom Center",
|
|
361
359
|
bottomRight: "Bottom Right",
|
|
362
360
|
topLeft: "Top Left",
|
|
363
|
-
top: "Top Center",
|
|
364
361
|
topRight: "Top Right",
|
|
365
362
|
menuList: "Menu Options",
|
|
366
363
|
widgetName: "Unique Name",
|
|
@@ -414,6 +411,7 @@ const e = {
|
|
|
414
411
|
showSummary: "Show Summary",
|
|
415
412
|
rowSpacing: "Row Spacing(px)",
|
|
416
413
|
editAction: "Edit...",
|
|
414
|
+
dsEnabled: "Use Datasource",
|
|
417
415
|
columnName: "Name",
|
|
418
416
|
columnLabel: "Label",
|
|
419
417
|
columnWidth: "Width(px/%)",
|
package/src/lang/zh-CN.js
CHANGED
|
@@ -187,10 +187,8 @@ const e = {
|
|
|
187
187
|
buttonConfig: "按钮配置",
|
|
188
188
|
placement: "菜单弹出位置",
|
|
189
189
|
bottomLeft: "下左",
|
|
190
|
-
bottom: "下中",
|
|
191
190
|
bottomRight: "下右",
|
|
192
191
|
topLeft: "上左",
|
|
193
|
-
top: "上中",
|
|
194
192
|
topRight: "上右",
|
|
195
193
|
menuList: "下拉菜单选项设置",
|
|
196
194
|
pagination: "分页配置",
|
|
@@ -288,7 +286,6 @@ const e = {
|
|
|
288
286
|
uploadType: "上传类型",
|
|
289
287
|
fileTypesHelp: "支持添加其他文件类型",
|
|
290
288
|
headers: "上传请求头",
|
|
291
|
-
danger: "危险按钮",
|
|
292
289
|
cellWidth: "宽度",
|
|
293
290
|
cellHeight: "高度",
|
|
294
291
|
gridColHeight: "栅格列统一高度(px)",
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { ref as m, getCurrentInstance as h } from "vue";
|
|
2
|
+
function w() {
|
|
3
|
+
const r = m({}), s = h(), E = (e, n) => {
|
|
4
|
+
r.value[e] && r.value[e].forEach((i) => {
|
|
5
|
+
i(n);
|
|
6
|
+
});
|
|
7
|
+
}, g = (e, n) => {
|
|
8
|
+
r.value[e] = r.value[e] || [], r.value[e].push(n);
|
|
9
|
+
}, $ = (e, n) => {
|
|
10
|
+
if (r.value[e]) {
|
|
11
|
+
if (n == null) {
|
|
12
|
+
r.value[e].length = 0;
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
for (let i = 0; i < r.value[e].length; i++)
|
|
16
|
+
if (r.value[e][i] === n) {
|
|
17
|
+
r.value[e].splice(i, 1);
|
|
18
|
+
break;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}, a = (e, n, i) => {
|
|
22
|
+
var o, f, l, d, u, p;
|
|
23
|
+
if (!s) return;
|
|
24
|
+
let t = s.parent, c = (o = t == null ? void 0 : t.type) == null ? void 0 : o.componentName;
|
|
25
|
+
for (; t && (!c || c !== e); )
|
|
26
|
+
t = t.parent, t && (c = (f = t.type) == null ? void 0 : f.componentName);
|
|
27
|
+
t && ((l = t.exposed) != null && l.emit$ || (d = t.ctx) != null && d.emit$) && ((((u = t.exposed) == null ? void 0 : u.emit$) || ((p = t.ctx) == null ? void 0 : p.emit$)).call(t.proxy, n, i), e === "VFormRender" && t.emit(n, ...Array.isArray(i) ? i : [i]));
|
|
28
|
+
};
|
|
29
|
+
return {
|
|
30
|
+
vfEvents: r,
|
|
31
|
+
editEventHandler: (e, n, i) => {
|
|
32
|
+
console.log("editEventHandler", e, n, i), a("SettingPanel", "editEventHandler", [e, [...n], i]);
|
|
33
|
+
},
|
|
34
|
+
onChangeEditEventHandler: (e) => {
|
|
35
|
+
a("SettingPanel", "onChangeEventHandler", e);
|
|
36
|
+
},
|
|
37
|
+
emit$: E,
|
|
38
|
+
on$: g,
|
|
39
|
+
off$: $,
|
|
40
|
+
dispatch: a,
|
|
41
|
+
broadcast: (e, n, i) => {
|
|
42
|
+
const t = s == null ? void 0 : s.proxy;
|
|
43
|
+
t != null && t.widgetRefList && Object.keys(t.widgetRefList).forEach((c) => {
|
|
44
|
+
var l;
|
|
45
|
+
const o = t.widgetRefList[c];
|
|
46
|
+
((l = o.$options) == null ? void 0 : l.componentName) === e && o.emit$ && o.emit$.call(o, n, i);
|
|
47
|
+
}), t != null && t.refList && Object.keys(t.refList).forEach((c) => {
|
|
48
|
+
var l;
|
|
49
|
+
const o = t.refList[c];
|
|
50
|
+
((l = o.$options) == null ? void 0 : l.componentName) === e && o.emit$ && o.emit$.call(o, n, i);
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
export {
|
|
56
|
+
w as useEmitter
|
|
57
|
+
};
|