@aplus-frontend/ui 7.4.1 → 7.4.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/es/index.mjs +183 -181
- package/es/src/ag-grid/index.vue.mjs +207 -187
- package/es/src/ap-field/text/index.vue2.mjs +27 -23
- package/es/src/ap-field/text/password.vue.mjs +31 -27
- package/es/src/ap-pro-card/style/title.mjs +10 -10
- package/es/src/business/ap-value-select-card/style/index.mjs +2 -2
- package/es/src/index.d.ts +1 -0
- package/es/src/index.mjs +302 -299
- package/es/src/render/index.d.ts +2 -0
- package/es/src/render/index.mjs +4 -0
- package/es/src/render/render.d.ts +15 -0
- package/es/src/render/render.mjs +17 -0
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/index.js +1 -1
- package/lib/src/ag-grid/index.vue.js +1 -1
- package/lib/src/ap-field/text/index.vue2.js +1 -1
- package/lib/src/ap-field/text/password.vue.js +1 -1
- package/lib/src/ap-pro-card/style/title.js +1 -1
- package/lib/src/business/ap-value-select-card/style/index.js +1 -1
- package/lib/src/index.d.ts +1 -0
- package/lib/src/index.js +1 -1
- package/lib/src/render/index.d.ts +2 -0
- package/lib/src/render/index.js +1 -0
- package/lib/src/render/render.d.ts +15 -0
- package/lib/src/render/render.js +1 -0
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +1 -1
- package/es/src/portal/style/css.d.ts +0 -1
- package/es/src/portal/style/index.d.ts +0 -1
- package/lib/src/portal/style/css.d.ts +0 -1
- package/lib/src/portal/style/index.d.ts +0 -1
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import { isVNode as g, defineComponent as C, ref as S, useSlots as _, createVNode as i, mergeProps as
|
|
2
|
-
import { Input as
|
|
1
|
+
import { isVNode as g, defineComponent as C, ref as S, useSlots as _, createVNode as i, mergeProps as R, unref as r, computed as V, createBlock as w, openBlock as T } from "vue";
|
|
2
|
+
import { Input as j } from "@aplus-frontend/antdv";
|
|
3
3
|
import "../../hooks/index.mjs";
|
|
4
|
-
import { omit as
|
|
5
|
-
import { useDefaultPlaceholder as
|
|
6
|
-
import
|
|
4
|
+
import { omit as U } from "lodash-unified";
|
|
5
|
+
import { useDefaultPlaceholder as z } from "../hooks/use-default-placeholder.mjs";
|
|
6
|
+
import "../../render/index.mjs";
|
|
7
|
+
import { useControllableValue as F } from "../../hooks/useControllableValue.mjs";
|
|
8
|
+
import M from "../../render/render.mjs";
|
|
7
9
|
function N(n) {
|
|
8
10
|
return typeof n == "function" || Object.prototype.toString.call(n) === "[object Object]" && !g(n);
|
|
9
11
|
}
|
|
10
|
-
const
|
|
12
|
+
const $ = /* @__PURE__ */ C({
|
|
11
13
|
name: "ApFieldText",
|
|
12
14
|
__name: "index",
|
|
13
15
|
props: {
|
|
@@ -95,43 +97,45 @@ const K = /* @__PURE__ */ C({
|
|
|
95
97
|
emits: ["update:value"],
|
|
96
98
|
setup(n, {
|
|
97
99
|
expose: d,
|
|
98
|
-
emit:
|
|
100
|
+
emit: f
|
|
99
101
|
}) {
|
|
100
|
-
const t = S(),
|
|
102
|
+
const t = S(), u = _(), c = (o) => {
|
|
101
103
|
t.value?.focus(o);
|
|
102
104
|
}, m = () => {
|
|
103
105
|
t.value?.blur();
|
|
104
|
-
}, y = (o,
|
|
105
|
-
t.value?.setSelectionRange(o,
|
|
106
|
-
},
|
|
106
|
+
}, y = (o, l, a) => {
|
|
107
|
+
t.value?.setSelectionRange(o, l, a);
|
|
108
|
+
}, x = () => {
|
|
107
109
|
t.value?.select();
|
|
108
|
-
},
|
|
110
|
+
}, v = f, e = n, {
|
|
109
111
|
value: p,
|
|
110
112
|
updateValue: B
|
|
111
|
-
} =
|
|
113
|
+
} = F(e, v), b = z("Text", e);
|
|
112
114
|
function h(o) {
|
|
113
|
-
const
|
|
115
|
+
const l = o.target.value || "", a = e.beforeInput ? e.beforeInput?.(l) : l, s = t.value?.$el?.querySelector("input");
|
|
114
116
|
s && (s.value = a), B(a);
|
|
115
117
|
}
|
|
116
118
|
function I() {
|
|
117
|
-
return e.mode === "edit" ? i(
|
|
119
|
+
return e.mode === "edit" ? i(j, R(U(e, ["mode", "emptyText", "value", "onUpdate:value", "beforeInput"]), {
|
|
118
120
|
placeholder: r(b),
|
|
119
121
|
value: r(p),
|
|
120
122
|
onInput: h,
|
|
121
123
|
ref: t
|
|
122
|
-
}), N(
|
|
123
|
-
default: () => [
|
|
124
|
-
}) : i("span", null, [e.prefix ||
|
|
124
|
+
}), N(u) ? u : {
|
|
125
|
+
default: () => [u]
|
|
126
|
+
}) : i("span", null, [e.prefix || u?.prefix?.(), r(p) || e.emptyText, e.suffix || u?.suffix?.()]);
|
|
125
127
|
}
|
|
126
128
|
return d({
|
|
127
|
-
focus:
|
|
129
|
+
focus: c,
|
|
128
130
|
blur: m,
|
|
129
131
|
setSelectionRange: y,
|
|
130
|
-
select:
|
|
131
|
-
input:
|
|
132
|
-
}), (o,
|
|
132
|
+
select: x,
|
|
133
|
+
input: V(() => t.value?.input)
|
|
134
|
+
}), (o, l) => (T(), w(r(M), {
|
|
135
|
+
renderer: I
|
|
136
|
+
}));
|
|
133
137
|
}
|
|
134
138
|
});
|
|
135
139
|
export {
|
|
136
|
-
|
|
140
|
+
$ as default
|
|
137
141
|
};
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import { isVNode as x, defineComponent as h, useSlots as
|
|
2
|
-
import { Input as
|
|
1
|
+
import { isVNode as x, defineComponent as h, useSlots as g, ref as C, unref as a, createVNode as e, mergeProps as w, Fragment as P, createBlock as U, openBlock as V } from "vue";
|
|
2
|
+
import { Input as _, Space as S } from "@aplus-frontend/antdv";
|
|
3
3
|
import "../../hooks/index.mjs";
|
|
4
|
-
import { omit as
|
|
5
|
-
import { EyeOutlined as
|
|
6
|
-
import { useDefaultPlaceholder as
|
|
7
|
-
import
|
|
4
|
+
import { omit as T } from "lodash-unified";
|
|
5
|
+
import { EyeOutlined as I, EyeInvisibleOutlined as O } from "@ant-design/icons-vue";
|
|
6
|
+
import { useDefaultPlaceholder as j } from "../hooks/use-default-placeholder.mjs";
|
|
7
|
+
import "../../render/index.mjs";
|
|
8
|
+
import { useControllableValue as p } from "../../hooks/useControllableValue.mjs";
|
|
9
|
+
import k from "../../render/render.mjs";
|
|
8
10
|
function E(t) {
|
|
9
11
|
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !x(t);
|
|
10
12
|
}
|
|
11
|
-
const
|
|
13
|
+
const J = /* @__PURE__ */ h({
|
|
12
14
|
name: "ApFieldTextPassword",
|
|
13
15
|
__name: "password",
|
|
14
16
|
props: {
|
|
@@ -110,48 +112,50 @@ const G = /* @__PURE__ */ h({
|
|
|
110
112
|
expose: c,
|
|
111
113
|
emit: f
|
|
112
114
|
}) {
|
|
113
|
-
const
|
|
115
|
+
const r = f, o = t, u = g(), i = C(), {
|
|
114
116
|
value: m,
|
|
115
117
|
updateValue: v
|
|
116
|
-
} =
|
|
118
|
+
} = p(o, r), y = j("TextPassword", o), {
|
|
117
119
|
value: b,
|
|
118
|
-
updateValue:
|
|
119
|
-
} =
|
|
120
|
+
updateValue: s
|
|
121
|
+
} = p(o, r, {
|
|
120
122
|
valuePropName: "visible"
|
|
121
123
|
});
|
|
122
124
|
function B() {
|
|
123
|
-
const n =
|
|
125
|
+
const n = a(m), l = a(b);
|
|
124
126
|
if (o.mode === "edit")
|
|
125
|
-
return e(
|
|
126
|
-
placeholder:
|
|
127
|
+
return e(_.Password, w(T(o, ["mode", "emptyText", "value", "onUpdate:value", "visible", "onUpdate:visible"]), {
|
|
128
|
+
placeholder: a(y),
|
|
127
129
|
value: n,
|
|
128
130
|
"onUpdate:value": v,
|
|
129
131
|
visible: l,
|
|
130
|
-
"onUpdate:visible":
|
|
131
|
-
ref:
|
|
132
|
-
}), E(
|
|
133
|
-
default: () => [
|
|
132
|
+
"onUpdate:visible": s,
|
|
133
|
+
ref: i
|
|
134
|
+
}), E(u) ? u : {
|
|
135
|
+
default: () => [u]
|
|
134
136
|
});
|
|
135
|
-
let
|
|
136
|
-
return n && (
|
|
137
|
+
let d = e(P, null, [o.emptyText]);
|
|
138
|
+
return n && (d = e(S, null, {
|
|
137
139
|
default: () => [e("span", null, [l ? n : "********"]), e("span", {
|
|
138
140
|
style: {
|
|
139
141
|
cursor: "pointer"
|
|
140
142
|
},
|
|
141
|
-
onClick: () =>
|
|
142
|
-
}, [l ? e(
|
|
143
|
-
})),
|
|
143
|
+
onClick: () => s(!l)
|
|
144
|
+
}, [l ? e(I, null, null) : e(O, null, null)])]
|
|
145
|
+
})), d;
|
|
144
146
|
}
|
|
145
147
|
return c({
|
|
146
148
|
focus: () => {
|
|
147
|
-
|
|
149
|
+
i.value?.focus();
|
|
148
150
|
},
|
|
149
151
|
blur: () => {
|
|
150
|
-
|
|
152
|
+
i.value?.blur();
|
|
151
153
|
}
|
|
152
|
-
}), (n, l) => (V(), U(
|
|
154
|
+
}), (n, l) => (V(), U(a(k), {
|
|
155
|
+
renderer: B
|
|
156
|
+
}));
|
|
153
157
|
}
|
|
154
158
|
});
|
|
155
159
|
export {
|
|
156
|
-
|
|
160
|
+
J as default
|
|
157
161
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { genComponentStyleHook as
|
|
2
|
-
const
|
|
3
|
-
const { componentCls:
|
|
1
|
+
import { genComponentStyleHook as e } from "../../utils/cssinjs/index.mjs";
|
|
2
|
+
const r = (t) => {
|
|
3
|
+
const { componentCls: o } = t;
|
|
4
4
|
return {
|
|
5
|
-
[
|
|
5
|
+
[o]: {
|
|
6
6
|
"&-default": {
|
|
7
7
|
position: "relative",
|
|
8
8
|
fontWeight: "bold",
|
|
@@ -19,7 +19,7 @@ const n = (t) => {
|
|
|
19
19
|
transform: "translateY(-50%)",
|
|
20
20
|
width: "3px",
|
|
21
21
|
height: "14px",
|
|
22
|
-
backgroundColor:
|
|
22
|
+
backgroundColor: t.colorPrimary,
|
|
23
23
|
borderRadius: "0px 4px 4px 0px"
|
|
24
24
|
}
|
|
25
25
|
},
|
|
@@ -34,17 +34,17 @@ const n = (t) => {
|
|
|
34
34
|
width: "8px",
|
|
35
35
|
height: "8px",
|
|
36
36
|
borderRadius: "50%",
|
|
37
|
-
border:
|
|
37
|
+
border: `2px solid ${t.colorPrimary}`,
|
|
38
38
|
background: "#fff"
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
|
-
},
|
|
45
|
-
|
|
44
|
+
}, a = e("ProCard.Title", (t) => [
|
|
45
|
+
r(t)
|
|
46
46
|
]);
|
|
47
47
|
export {
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
a as default,
|
|
49
|
+
r as genProCardTitleStyle
|
|
50
50
|
};
|
|
@@ -18,7 +18,7 @@ const l = (o) => {
|
|
|
18
18
|
boxSizing: "border-box",
|
|
19
19
|
padding: "8px 16px",
|
|
20
20
|
color: o.textColor2,
|
|
21
|
-
border: `1px solid ${o.
|
|
21
|
+
border: `1px solid ${o.borderColorBase}`,
|
|
22
22
|
borderRadius: o.borderRadius,
|
|
23
23
|
cursor: "pointer",
|
|
24
24
|
"&-close": {
|
|
@@ -69,7 +69,7 @@ const l = (o) => {
|
|
|
69
69
|
color: o.textColor3,
|
|
70
70
|
background: "#f9f9fa",
|
|
71
71
|
cursor: "not-allowed",
|
|
72
|
-
border: `1px solid ${o.
|
|
72
|
+
border: `1px solid ${o.borderColorBase}`
|
|
73
73
|
},
|
|
74
74
|
"&.select": {
|
|
75
75
|
backgroundColor: o.colorBgControl,
|
package/es/src/index.d.ts
CHANGED