@kp-ui/lowcode 2.14.0-alpha.2 → 2.14.0-alpha.4
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/field-widget/diy-compontent-widget.vue.js +3 -2
- package/src/components/form-designer/form-widget/field-widget/input-widget.vue.js +29 -38
- package/src/components/form-designer/form-widget/field-widget/select-widget.vue.js +13 -11
- package/src/components/form-designer/widget-panel/basicFields/input.js +6 -4
- package/src/lang/zh-CN.js +1 -0
- package/stats.html +1 -1
- package/styles/style.css +1 -1
package/package.json
CHANGED
|
@@ -61,12 +61,13 @@ const x = {
|
|
|
61
61
|
return f({
|
|
62
62
|
functionBody: this.field.options.customRender,
|
|
63
63
|
context: this,
|
|
64
|
-
scope: { data: this.fieldModel }
|
|
64
|
+
scope: { data: this.fieldModel },
|
|
65
|
+
keys: ["data"]
|
|
65
66
|
});
|
|
66
67
|
}
|
|
67
68
|
}
|
|
68
69
|
}, g = { class: "slot-wrapper-render" };
|
|
69
|
-
function w(o, _, e, h,
|
|
70
|
+
function w(o, _, e, h, y, r) {
|
|
70
71
|
const i = l("form-item-wrapper");
|
|
71
72
|
return n(), t(i, {
|
|
72
73
|
designer: e.designer,
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import g from "./form-item-wrapper.vue.js";
|
|
2
2
|
import w from "../../../svg-icon/index.vue.js";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { resolveComponent as
|
|
3
|
+
import b from "../../../../utils/emitter.js";
|
|
4
|
+
import C from "../../../../utils/i18n.js";
|
|
5
|
+
import y from "./fieldMixin.js";
|
|
6
|
+
import { resolveComponent as n, createBlock as s, createCommentVNode as r, openBlock as a, withCtx as i, withDirectives as _, createVNode as u, createSlots as v, vShow as F, createElementVNode as x, toDisplayString as I } from "vue";
|
|
7
7
|
/* empty css */
|
|
8
8
|
import M from "../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
9
9
|
const z = {
|
|
10
10
|
name: "input-widget",
|
|
11
11
|
componentName: "FieldWidget",
|
|
12
12
|
//必须固定为FieldWidget,用于接收父级组件的broadcast事件
|
|
13
|
-
mixins: [
|
|
13
|
+
mixins: [b, y, C],
|
|
14
14
|
props: {
|
|
15
15
|
field: Object,
|
|
16
16
|
parentWidget: Object,
|
|
@@ -70,13 +70,13 @@ const z = {
|
|
|
70
70
|
},
|
|
71
71
|
methods: {}
|
|
72
72
|
}, R = { class: "readonly-mode-field" };
|
|
73
|
-
function k(t,
|
|
74
|
-
const f =
|
|
75
|
-
return t.handleHidden() ?
|
|
73
|
+
function k(t, d, e, L, o, l) {
|
|
74
|
+
const f = n("svg-icon"), m = n("a-input"), p = n("a-tooltip"), h = n("form-item-wrapper");
|
|
75
|
+
return t.handleHidden() ? r("", !0) : (a(), s(h, {
|
|
76
76
|
key: 0,
|
|
77
77
|
designer: e.designer,
|
|
78
78
|
field: e.field,
|
|
79
|
-
rules:
|
|
79
|
+
rules: o.rules,
|
|
80
80
|
"design-state": e.designState,
|
|
81
81
|
"parent-widget": e.parentWidget,
|
|
82
82
|
"parent-list": e.parentList,
|
|
@@ -86,63 +86,54 @@ function k(t, l, e, L, n, s) {
|
|
|
86
86
|
"sub-form-row-id": e.subFormRowId
|
|
87
87
|
}, {
|
|
88
88
|
default: i(() => [
|
|
89
|
-
|
|
89
|
+
_(u(m, {
|
|
90
90
|
ref: "fieldEditor",
|
|
91
|
-
value:
|
|
92
|
-
"onUpdate:value":
|
|
91
|
+
value: o.fieldModel,
|
|
92
|
+
"onUpdate:value": d[0] || (d[0] = (c) => o.fieldModel = c),
|
|
93
93
|
disabled: t.handleDisabled(),
|
|
94
94
|
readonly: e.field.options.readonly,
|
|
95
|
-
size:
|
|
95
|
+
size: l.size,
|
|
96
96
|
class: "hide-spin-button",
|
|
97
|
-
type:
|
|
97
|
+
type: l.inputType,
|
|
98
98
|
"show-password": e.field.options.showPassword,
|
|
99
99
|
placeholder: e.field.options.placeholder,
|
|
100
100
|
allowClear: e.field.options.allowClear,
|
|
101
101
|
maxlength: e.field.options.maxLength,
|
|
102
102
|
showCount: e.field.options.showCount,
|
|
103
|
-
addonBefore: e.field.options.addonBefore,
|
|
104
|
-
addonAfter: e.field.options.addonAfter,
|
|
105
103
|
onFocus: t.handleFocusCustomEvent,
|
|
106
104
|
onBlur: t.handleBlurCustomEvent,
|
|
107
105
|
onInput: t.handleInputCustomEvent,
|
|
108
106
|
onChange: t.handleChangeEvent
|
|
109
|
-
},
|
|
110
|
-
e.field.options.
|
|
111
|
-
name: "
|
|
107
|
+
}, v({ _: 2 }, [
|
|
108
|
+
e.field.options.useModal ? {
|
|
109
|
+
name: "addonAfter",
|
|
112
110
|
fn: i(() => [
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
onClick: t.
|
|
116
|
-
},
|
|
117
|
-
default: i(() => [
|
|
118
|
-
d(f, {
|
|
119
|
-
"icon-class": e.field.options.buttonIcon
|
|
120
|
-
}, null, 8, ["icon-class"])
|
|
121
|
-
]),
|
|
122
|
-
_: 1
|
|
123
|
-
}, 8, ["disabled", "onClick"])
|
|
111
|
+
u(f, {
|
|
112
|
+
"icon-class": "sousuo",
|
|
113
|
+
onClick: t.handleClickIcon
|
|
114
|
+
}, null, 8, ["onClick"])
|
|
124
115
|
]),
|
|
125
116
|
key: "0"
|
|
126
117
|
} : void 0
|
|
127
|
-
]), 1032, ["value", "disabled", "readonly", "size", "type", "show-password", "placeholder", "allowClear", "maxlength", "showCount", "
|
|
128
|
-
[
|
|
118
|
+
]), 1032, ["value", "disabled", "readonly", "size", "type", "show-password", "placeholder", "allowClear", "maxlength", "showCount", "onFocus", "onBlur", "onInput", "onChange"]), [
|
|
119
|
+
[F, !t.isReadMode]
|
|
129
120
|
]),
|
|
130
|
-
t.isReadMode ? (
|
|
121
|
+
t.isReadMode ? (a(), s(p, {
|
|
131
122
|
key: 0,
|
|
132
123
|
placement: "topLeft",
|
|
133
|
-
title:
|
|
124
|
+
title: o.fieldModel,
|
|
134
125
|
overlayStyle: { zIndex: 1e3 }
|
|
135
126
|
}, {
|
|
136
127
|
default: i(() => [
|
|
137
|
-
x("span", R,
|
|
128
|
+
x("span", R, I(o.fieldModel), 1)
|
|
138
129
|
]),
|
|
139
130
|
_: 1
|
|
140
|
-
}, 8, ["title"])) :
|
|
131
|
+
}, 8, ["title"])) : r("", !0)
|
|
141
132
|
]),
|
|
142
133
|
_: 1
|
|
143
134
|
}, 8, ["designer", "field", "rules", "design-state", "parent-widget", "parent-list", "index-of-parent-list", "sub-form-row-index", "sub-form-col-index", "sub-form-row-id"]));
|
|
144
135
|
}
|
|
145
|
-
const
|
|
136
|
+
const D = /* @__PURE__ */ M(z, [["render", k], ["__scopeId", "data-v-8bc02c92"]]);
|
|
146
137
|
export {
|
|
147
|
-
|
|
138
|
+
D as default
|
|
148
139
|
};
|
|
@@ -4,10 +4,10 @@ import F from "../../../../utils/i18n.js";
|
|
|
4
4
|
import I from "./fieldMixin.js";
|
|
5
5
|
import M from "../../../svg-icon/index.vue.js";
|
|
6
6
|
import y from "../../../../mixins/useSelectMixin.js";
|
|
7
|
-
import { resolveComponent as o, createBlock as r, createCommentVNode as d, openBlock as s, withCtx as a, withDirectives as m, createElementVNode as f,
|
|
7
|
+
import { resolveComponent as o, createBlock as r, createCommentVNode as d, openBlock as s, withCtx as a, withDirectives as m, createElementVNode as f, normalizeClass as O, createElementBlock as L, createVNode as u, mergeProps as x, vShow as c, toDisplayString as z } from "vue";
|
|
8
8
|
/* empty css */
|
|
9
|
-
import
|
|
10
|
-
const
|
|
9
|
+
import R from "../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
10
|
+
const S = {
|
|
11
11
|
name: "select-widget",
|
|
12
12
|
componentName: "FieldWidget",
|
|
13
13
|
//必须固定为FieldWidget,用于接收父级组件的broadcast事件
|
|
@@ -100,8 +100,8 @@ const R = {
|
|
|
100
100
|
// }
|
|
101
101
|
// }
|
|
102
102
|
}
|
|
103
|
-
},
|
|
104
|
-
function
|
|
103
|
+
}, k = { class: "readonly-mode-field" };
|
|
104
|
+
function E(e, i, t, _, n, p) {
|
|
105
105
|
const h = o("a-select"), g = o("svg-icon"), b = o("a-tooltip"), w = o("form-item-wrapper");
|
|
106
106
|
return e.handleHidden() ? d("", !0) : (s(), r(w, {
|
|
107
107
|
key: 0,
|
|
@@ -117,8 +117,10 @@ function z(e, i, t, E, n, p) {
|
|
|
117
117
|
"sub-form-row-id": t.subFormRowId
|
|
118
118
|
}, {
|
|
119
119
|
default: a(() => [
|
|
120
|
-
m(f("div",
|
|
121
|
-
|
|
120
|
+
m(f("div", {
|
|
121
|
+
class: O(["design-select-box", { useModal: t.field.options.useModal }])
|
|
122
|
+
}, [
|
|
123
|
+
m(u(h, x({
|
|
122
124
|
ref: "fieldEditor",
|
|
123
125
|
value: n.fieldModel,
|
|
124
126
|
"onUpdate:value": i[0] || (i[0] = (l) => n.fieldModel = l),
|
|
@@ -138,14 +140,14 @@ function z(e, i, t, E, n, p) {
|
|
|
138
140
|
}, e.selectOps), null, 16, ["value", "size", "disabled", "allowClear", "mode", "maxTagCount", "placeholder", "onFocus", "onBlur", "onChange", "options"]), [
|
|
139
141
|
[c, !e.isReadMode]
|
|
140
142
|
]),
|
|
141
|
-
t.field.options.useModal ? (s(),
|
|
143
|
+
t.field.options.useModal ? (s(), L("div", {
|
|
142
144
|
key: 0,
|
|
143
145
|
class: "useModal-svg",
|
|
144
146
|
onClick: i[1] || (i[1] = (...l) => e.handleClickIcon && e.handleClickIcon(...l))
|
|
145
147
|
}, [
|
|
146
148
|
u(g, { "icon-class": "sousuo" })
|
|
147
149
|
])) : d("", !0)
|
|
148
|
-
],
|
|
150
|
+
], 2), [
|
|
149
151
|
[c, !e.isReadMode]
|
|
150
152
|
]),
|
|
151
153
|
e.isReadMode ? (s(), r(b, {
|
|
@@ -155,7 +157,7 @@ function z(e, i, t, E, n, p) {
|
|
|
155
157
|
overlayStyle: { zIndex: 1e3 }
|
|
156
158
|
}, {
|
|
157
159
|
default: a(() => [
|
|
158
|
-
f("span", k,
|
|
160
|
+
f("span", k, z(e.optionLabel), 1)
|
|
159
161
|
]),
|
|
160
162
|
_: 1
|
|
161
163
|
}, 8, ["title"])) : d("", !0)
|
|
@@ -163,7 +165,7 @@ function z(e, i, t, E, n, p) {
|
|
|
163
165
|
_: 1
|
|
164
166
|
}, 8, ["designer", "field", "rules", "design-state", "parent-widget", "parent-list", "index-of-parent-list", "sub-form-row-index", "sub-form-col-index", "sub-form-row-id"]));
|
|
165
167
|
}
|
|
166
|
-
const H = /* @__PURE__ */
|
|
168
|
+
const H = /* @__PURE__ */ R(S, [["render", E], ["__scopeId", "data-v-9fdc9138"]]);
|
|
167
169
|
export {
|
|
168
170
|
H as default
|
|
169
171
|
};
|
|
@@ -25,16 +25,18 @@ const a = (e = {}) => ({
|
|
|
25
25
|
requiredHint: "",
|
|
26
26
|
validation: "",
|
|
27
27
|
validationHint: "",
|
|
28
|
+
useModal: !1,
|
|
29
|
+
onClickIcon: "",
|
|
28
30
|
//-------------------
|
|
29
31
|
customClass: [],
|
|
30
32
|
//自定义css类名
|
|
31
|
-
labelIconClass: null,
|
|
32
|
-
labelIconPosition:
|
|
33
|
+
// labelIconClass: null,
|
|
34
|
+
// labelIconPosition: 'rear',
|
|
33
35
|
labelTooltip: null,
|
|
34
36
|
maxLength: null,
|
|
35
37
|
showCount: !1,
|
|
36
|
-
addonBefore:
|
|
37
|
-
addonAfter:
|
|
38
|
+
// addonBefore: '',
|
|
39
|
+
// addonAfter: '',
|
|
38
40
|
//-------------------
|
|
39
41
|
onCreated: "",
|
|
40
42
|
onMounted: "",
|