@aplus-frontend/ui 7.7.7 → 7.7.8
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/src/ap-action/item/index.vue2.mjs +30 -31
- package/es/src/ap-action/style/index.d.ts +1 -0
- package/es/src/ap-action/style/index.mjs +63 -36
- package/es/src/ap-form/style/item.mjs +6 -0
- package/es/src/business/batch-input-group/index.vue.mjs +63 -63
- package/es/src/design-token/index.mjs +4 -2
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ap-action/item/index.vue2.js +1 -1
- package/lib/src/ap-action/style/index.d.ts +1 -0
- package/lib/src/ap-action/style/index.js +1 -1
- package/lib/src/ap-form/style/item.js +1 -1
- package/lib/src/business/batch-input-group/index.vue.js +2 -2
- package/lib/src/design-token/index.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as A, useSlots as F, createPropsRestProxy as N, ref as S, computed as d, unref as t, renderSlot as y, createElementBlock as u, createCommentVNode as f, openBlock as l, mergeProps as g, createVNode as v, normalizeClass as V, withCtx as I, createElementVNode as L, createBlock as k, resolveDynamicComponent as b, isVNode as P, toDisplayString as $ } from "vue";
|
|
2
2
|
import "../../config-provider/index.mjs";
|
|
3
3
|
import w from "@aplus-frontend/antdv/es/button/LoadingIcon";
|
|
4
|
-
import { Tooltip as
|
|
5
|
-
import
|
|
6
|
-
import { useNamespace as
|
|
7
|
-
const
|
|
4
|
+
import { Tooltip as x } from "@aplus-frontend/antdv";
|
|
5
|
+
import D from "../style/index.mjs";
|
|
6
|
+
import { useNamespace as E } from "../../config-provider/hooks/use-namespace.mjs";
|
|
7
|
+
const T = { key: 1 }, K = /* @__PURE__ */ A({
|
|
8
8
|
name: "ApActionItem",
|
|
9
9
|
__name: "index",
|
|
10
10
|
props: {
|
|
@@ -20,52 +20,51 @@ const x = { key: 1 }, K = /* @__PURE__ */ h({
|
|
|
20
20
|
tooltip: { default: () => ({}) }
|
|
21
21
|
},
|
|
22
22
|
setup(o) {
|
|
23
|
-
const
|
|
23
|
+
const a = F(), s = N(o, ["color", "disabled", "visible", "loading", "iconFirst", "icon", "tooltip"]), { b: m, m: n, e: C } = E("action-item"), r = S(!1), c = d(() => o.iconFirst && !!(o.icon || a.icon)), B = D("action-item");
|
|
24
24
|
function p(e) {
|
|
25
|
-
|
|
25
|
+
t(i) || o.disabled || (s.onClick?.(e), s.onAction && (r.value = !0, s.onAction(e).finally(() => r.value = !1)));
|
|
26
26
|
}
|
|
27
|
-
const i =
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
o.disabled ?
|
|
33
|
-
i.value ?
|
|
27
|
+
const i = d(() => o.loading || t(r)), h = d(() => [
|
|
28
|
+
B.value,
|
|
29
|
+
m(),
|
|
30
|
+
n(o.color),
|
|
31
|
+
c.value ? n("icon-first") : null,
|
|
32
|
+
o.disabled ? n("disabled") : null,
|
|
33
|
+
i.value ? n("loading") : null
|
|
34
34
|
].filter(Boolean));
|
|
35
35
|
return (e, z) => y(e.$slots, "trigger", {
|
|
36
36
|
loading: i.value,
|
|
37
37
|
disabled: e.disabled,
|
|
38
38
|
onClick: p
|
|
39
39
|
}, () => [
|
|
40
|
-
e.visible ? (
|
|
41
|
-
class:
|
|
40
|
+
e.visible ? (l(), u("span", g({ key: 0 }, e.$attrs, {
|
|
41
|
+
class: h.value,
|
|
42
42
|
onClick: p
|
|
43
43
|
}), [
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
"prefix-cls": "btn",
|
|
44
|
+
v(t(w), {
|
|
45
|
+
"prefix-cls": t(m)(),
|
|
47
46
|
"exist-icon": !1,
|
|
48
|
-
loading:
|
|
49
|
-
}
|
|
50
|
-
e.icon ||
|
|
51
|
-
key:
|
|
52
|
-
class:
|
|
47
|
+
loading: i.value
|
|
48
|
+
}, null, 8, ["prefix-cls", "loading"]),
|
|
49
|
+
e.icon || a.icon ? (l(), u("span", {
|
|
50
|
+
key: 0,
|
|
51
|
+
class: V(t(C)("icon-wrapper"))
|
|
53
52
|
}, [
|
|
54
|
-
|
|
55
|
-
title:
|
|
53
|
+
v(t(x), g({
|
|
54
|
+
title: c.value ? e.text : null
|
|
56
55
|
}, e.tooltip), {
|
|
57
56
|
default: I(() => [
|
|
58
57
|
L("span", null, [
|
|
59
|
-
(
|
|
58
|
+
(l(), k(b(e.icon || a.icon)))
|
|
60
59
|
])
|
|
61
60
|
]),
|
|
62
61
|
_: 1
|
|
63
62
|
}, 16, ["title"])
|
|
64
|
-
], 2)) :
|
|
65
|
-
|
|
66
|
-
P(e.text) ? (
|
|
63
|
+
], 2)) : f("", !0),
|
|
64
|
+
c.value ? f("", !0) : y(e.$slots, "default", { key: 1 }, () => [
|
|
65
|
+
P(e.text) ? (l(), k(b(e.text), { key: 0 })) : (l(), u("span", T, $(e.text || ""), 1))
|
|
67
66
|
])
|
|
68
|
-
], 16)) :
|
|
67
|
+
], 16)) : f("", !0)
|
|
69
68
|
]);
|
|
70
69
|
}
|
|
71
70
|
});
|
|
@@ -1,80 +1,107 @@
|
|
|
1
|
-
import { resetComponent as
|
|
1
|
+
import { resetComponent as s } from "../../style/index.mjs";
|
|
2
2
|
import { genComponentStyleHook as d } from "../../utils/cssinjs/index.mjs";
|
|
3
|
-
const
|
|
3
|
+
const p = (o) => {
|
|
4
4
|
const {
|
|
5
|
-
loadingOpacity:
|
|
6
|
-
colorLink:
|
|
7
|
-
colorLinkHover:
|
|
8
|
-
colorSuccess:
|
|
9
|
-
colorError:
|
|
10
|
-
colorWarn:
|
|
11
|
-
componentCls:
|
|
5
|
+
loadingOpacity: r,
|
|
6
|
+
colorLink: n,
|
|
7
|
+
colorLinkHover: a,
|
|
8
|
+
colorSuccess: l,
|
|
9
|
+
colorError: c,
|
|
10
|
+
colorWarn: e,
|
|
11
|
+
componentCls: i
|
|
12
12
|
} = o;
|
|
13
13
|
return {
|
|
14
|
-
[
|
|
15
|
-
display: "inline-
|
|
14
|
+
[i]: {
|
|
15
|
+
display: "inline-flex",
|
|
16
|
+
justifyContent: "center",
|
|
17
|
+
alignItems: "center",
|
|
18
|
+
whiteSpace: "nowrap",
|
|
19
|
+
textAlign: "center",
|
|
20
|
+
gap: o.spaceXS,
|
|
16
21
|
cursor: "pointer",
|
|
17
|
-
...
|
|
22
|
+
...s(o),
|
|
18
23
|
"&--primary": {
|
|
19
|
-
color:
|
|
20
|
-
[`&:not(${
|
|
21
|
-
color:
|
|
24
|
+
color: n,
|
|
25
|
+
[`&:not(${i}--disabled):hover`]: {
|
|
26
|
+
color: a
|
|
22
27
|
},
|
|
23
|
-
[`&${
|
|
28
|
+
[`&${i}--disabled`]: {
|
|
24
29
|
color: o.colorLinkDisabled
|
|
25
30
|
}
|
|
26
31
|
},
|
|
27
32
|
"&--success": {
|
|
28
|
-
color:
|
|
29
|
-
[`&${
|
|
33
|
+
color: l,
|
|
34
|
+
[`&${i}--disabled`]: {
|
|
30
35
|
color: o.colorSuccessDisabled
|
|
31
36
|
}
|
|
32
37
|
},
|
|
33
38
|
"&--error": {
|
|
34
|
-
color:
|
|
35
|
-
[`&${
|
|
39
|
+
color: c,
|
|
40
|
+
[`&${i}--disabled`]: {
|
|
36
41
|
color: o.colorErrorDisabled
|
|
37
42
|
}
|
|
38
43
|
},
|
|
39
44
|
"&--warn": {
|
|
40
|
-
color:
|
|
41
|
-
[`&${
|
|
45
|
+
color: e,
|
|
46
|
+
[`&${i}--disabled`]: {
|
|
42
47
|
color: o.colorWarnDisabled
|
|
43
48
|
}
|
|
44
49
|
},
|
|
45
50
|
"&--loading": {
|
|
46
|
-
opacity:
|
|
51
|
+
opacity: r,
|
|
47
52
|
transition: `opacity ${o.motionDurationMid}`,
|
|
48
53
|
cursor: "default",
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
},
|
|
52
|
-
[`&${
|
|
54
|
+
// [`${componentCls}-loading-icon`]: {
|
|
55
|
+
// marginRight: token.spaceXS
|
|
56
|
+
// },
|
|
57
|
+
[`&${i}--disabled`]: {
|
|
53
58
|
opacity: 1
|
|
54
59
|
}
|
|
55
60
|
},
|
|
56
61
|
"&--disabled": {
|
|
57
62
|
cursor: "not-allowed"
|
|
58
63
|
},
|
|
59
|
-
[`${
|
|
60
|
-
paddingRight: o.spaceXS
|
|
61
|
-
},
|
|
64
|
+
[`${i}__icon-wrapper`]: {},
|
|
62
65
|
"&--icon-first": {
|
|
63
|
-
[`${
|
|
66
|
+
[`${i}__icon-wrapper`]: {
|
|
64
67
|
paddingRight: 0
|
|
65
68
|
}
|
|
69
|
+
},
|
|
70
|
+
[`${i}-loading-icon`]: {
|
|
71
|
+
display: "inline-block",
|
|
72
|
+
lineHeight: 0,
|
|
73
|
+
transition: ["width", "opacity", "margin"].map(
|
|
74
|
+
(t) => `${t} ${o.motionDurationSlow} ${o.apActionLoadingIconEase}`
|
|
75
|
+
).join(",")
|
|
76
|
+
},
|
|
77
|
+
[`${i}-loading-icon-motion`]: {
|
|
78
|
+
"&-enter-from": {
|
|
79
|
+
marginInlineEnd: o.calc(o.spaceXS).mul(-1).equal()
|
|
80
|
+
},
|
|
81
|
+
"&-enter-to": {
|
|
82
|
+
marginInlineEnd: 0
|
|
83
|
+
},
|
|
84
|
+
"&-leave-from": {
|
|
85
|
+
marginInlineEnd: 0
|
|
86
|
+
},
|
|
87
|
+
"&-leave-to": {
|
|
88
|
+
marginInlineEnd: o.calc(o.spaceXS).mul(-1).equal()
|
|
89
|
+
}
|
|
66
90
|
}
|
|
67
91
|
}
|
|
68
92
|
};
|
|
69
|
-
},
|
|
93
|
+
}, u = d(
|
|
70
94
|
"ApAction",
|
|
71
|
-
(o) => [
|
|
72
|
-
{
|
|
95
|
+
(o) => [p(o)],
|
|
96
|
+
{
|
|
97
|
+
loadingOpacity: 0.35,
|
|
98
|
+
apActionLoadingIconEase: "cubic-bezier(0.645, 0.045, 0.355, 1)"
|
|
99
|
+
},
|
|
73
100
|
{
|
|
74
101
|
skipUnit: ["loadingOpacity"]
|
|
75
102
|
}
|
|
76
103
|
);
|
|
77
104
|
export {
|
|
78
|
-
|
|
79
|
-
|
|
105
|
+
u as default,
|
|
106
|
+
p as genActionItemStyle
|
|
80
107
|
};
|
|
@@ -129,6 +129,12 @@ const r = (n) => {
|
|
|
129
129
|
paddingInline: n.space,
|
|
130
130
|
flex: 1
|
|
131
131
|
}
|
|
132
|
+
},
|
|
133
|
+
textarea: {
|
|
134
|
+
lineHeight: "20px"
|
|
135
|
+
},
|
|
136
|
+
"& .ant-input-affix-wrapper-textarea-with-clear-btn .ant-input-clear-icon": {
|
|
137
|
+
insetBlockStart: "8px"
|
|
132
138
|
}
|
|
133
139
|
}
|
|
134
140
|
};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as $, ref as g, computed as r, unref as t, createElementBlock as K, openBlock as B, normalizeStyle as C, normalizeClass as b, createVNode as m, withCtx as A, createBlock as M, createCommentVNode as D, mergeProps as G } from "vue";
|
|
2
2
|
import "../../ap-field/index.mjs";
|
|
3
|
-
import { Space as
|
|
3
|
+
import { Form as q, Space as H } from "@aplus-frontend/antdv";
|
|
4
4
|
import "../../config-provider/index.mjs";
|
|
5
|
-
import { isNumber as
|
|
5
|
+
import { isNumber as Y, omit as J } from "lodash-unified";
|
|
6
6
|
import "./popover-input/index.vue.mjs";
|
|
7
7
|
import "../../hooks/index.mjs";
|
|
8
8
|
import "../../utils/index.mjs";
|
|
9
|
-
import { useDefaultPlaceholder as
|
|
10
|
-
import { splitValue as
|
|
11
|
-
import
|
|
12
|
-
import { useControllableValue as
|
|
13
|
-
import { useLocale as
|
|
14
|
-
import { useNamespace as
|
|
15
|
-
import { isDef as
|
|
16
|
-
import
|
|
17
|
-
import { ApFieldText as
|
|
18
|
-
import
|
|
19
|
-
const
|
|
9
|
+
import { useDefaultPlaceholder as Q } from "../../ap-field/hooks/use-default-placeholder.mjs";
|
|
10
|
+
import { splitValue as W } from "./utils.mjs";
|
|
11
|
+
import X from "./style/index.mjs";
|
|
12
|
+
import { useControllableValue as Z } from "../../hooks/useControllableValue.mjs";
|
|
13
|
+
import { useLocale as ee } from "../../config-provider/hooks/use-locale.mjs";
|
|
14
|
+
import { useNamespace as te } from "../../config-provider/hooks/use-namespace.mjs";
|
|
15
|
+
import { isDef as oe } from "../../utils/is.mjs";
|
|
16
|
+
import ne from "../../ap-field/select/index.vue.mjs";
|
|
17
|
+
import { ApFieldText as le } from "../../ap-field/text/index.mjs";
|
|
18
|
+
import ae from "./popover-input/index.vue2.mjs";
|
|
19
|
+
const d = "GROUP_SEARCH_ALL", Ve = /* @__PURE__ */ $({
|
|
20
20
|
name: "BatchInputGroup",
|
|
21
21
|
__name: "index",
|
|
22
22
|
props: {
|
|
@@ -77,91 +77,91 @@ const m = "GROUP_SEARCH_ALL", Ve = /* @__PURE__ */ T({
|
|
|
77
77
|
beforeInput: {}
|
|
78
78
|
},
|
|
79
79
|
emits: ["update:value"],
|
|
80
|
-
setup(
|
|
81
|
-
const o =
|
|
80
|
+
setup(x, { emit: V }) {
|
|
81
|
+
const o = x, I = Q("Text", o), S = V, { value: a, updateValue: u } = Z(
|
|
82
82
|
o,
|
|
83
83
|
S
|
|
84
|
-
),
|
|
84
|
+
), i = g(), f = g(), { t: k } = ee(), { b: F, cssVar: U } = te("batch-input-group"), v = X("batch-input-group"), p = q.useInjectFormItemContext(), w = r(() => {
|
|
85
85
|
const e = o.popoverPlacement;
|
|
86
86
|
return {
|
|
87
|
-
"popover-left":
|
|
87
|
+
"popover-left": Y(e) ? `${e}px` : e === "left" ? "0px" : "unset",
|
|
88
88
|
"popover-right": e === "right" ? "0px" : "unset"
|
|
89
89
|
};
|
|
90
90
|
}), P = r(() => o.options ? o.options.length > 1 && o.hasAll ? [
|
|
91
|
-
{ value:
|
|
91
|
+
{ value: d, label: k("ap.common.all") },
|
|
92
92
|
...o.options
|
|
93
|
-
] : o.options : []), R = r(() => o.options ? o.options.map((e) => e.value) : []),
|
|
93
|
+
] : o.options : []), R = r(() => o.options ? o.options.map((e) => e.value) : []), j = r(() => t(a)?.value?.length ? t(a).value.join(",") : ""), N = r(() => t(a)?.value?.length ? t(a).value.join(`
|
|
94
94
|
`) : ""), E = r(() => {
|
|
95
95
|
const e = t(a)?.key;
|
|
96
96
|
if (e?.length)
|
|
97
|
-
return e.length === 1 || !o.hasAll ? e[0] :
|
|
98
|
-
}),
|
|
97
|
+
return e.length === 1 || !o.hasAll ? e[0] : d;
|
|
98
|
+
}), L = r(() => {
|
|
99
99
|
const e = t(a)?.key;
|
|
100
|
-
return !e || e?.length <= 1 ? t(
|
|
100
|
+
return !e || e?.length <= 1 ? t(I) : (o.options || []).filter((n) => e.includes(n.value)).map((n) => n.label).join("/");
|
|
101
101
|
});
|
|
102
|
-
function
|
|
103
|
-
const l = t(a) || {}, n = e ===
|
|
102
|
+
function O(e) {
|
|
103
|
+
const l = t(a) || {}, n = e === d ? t(R) : oe(e) ? [e] : [];
|
|
104
104
|
u({
|
|
105
105
|
...l,
|
|
106
106
|
key: n
|
|
107
|
-
});
|
|
107
|
+
}), p.onFieldChange();
|
|
108
108
|
}
|
|
109
|
-
function
|
|
109
|
+
function _(e) {
|
|
110
110
|
const l = t(a) || {}, n = e.target.value || "";
|
|
111
|
-
let
|
|
112
|
-
if (n !==
|
|
113
|
-
const
|
|
114
|
-
|
|
111
|
+
let c = W(n, ",", ",", o.maxNum);
|
|
112
|
+
if (n !== c) {
|
|
113
|
+
const h = f.value?.$el?.querySelector("input");
|
|
114
|
+
h && (h.value = c);
|
|
115
115
|
}
|
|
116
|
-
let
|
|
117
|
-
|
|
116
|
+
let s = c.split(",");
|
|
117
|
+
s.length === 1 && s[0] === "" && (s = []), u({
|
|
118
118
|
...l,
|
|
119
|
-
value:
|
|
120
|
-
});
|
|
119
|
+
value: s
|
|
120
|
+
}), p.onFieldChange();
|
|
121
121
|
}
|
|
122
|
-
function
|
|
122
|
+
function z(e) {
|
|
123
123
|
const l = t(a) || {};
|
|
124
124
|
let n = e.split(/,|\n/);
|
|
125
125
|
u({
|
|
126
126
|
...l,
|
|
127
127
|
value: n
|
|
128
|
-
});
|
|
128
|
+
}), p.onFieldChange();
|
|
129
129
|
}
|
|
130
|
-
function
|
|
130
|
+
function y() {
|
|
131
131
|
const e = t(a) || {}, l = e.value?.filter(Boolean);
|
|
132
132
|
u({
|
|
133
133
|
...e,
|
|
134
134
|
value: l
|
|
135
|
-
});
|
|
135
|
+
}), p.onFieldChange();
|
|
136
136
|
}
|
|
137
|
-
function
|
|
138
|
-
|
|
137
|
+
function T(e) {
|
|
138
|
+
y(), o.onBlur?.(e);
|
|
139
139
|
}
|
|
140
|
-
return (e, l) => (
|
|
140
|
+
return (e, l) => (B(), K("div", {
|
|
141
141
|
ref_key: "containerRef",
|
|
142
|
-
ref:
|
|
143
|
-
class: b([t(
|
|
144
|
-
style:
|
|
142
|
+
ref: i,
|
|
143
|
+
class: b([t(F)(), t(v)]),
|
|
144
|
+
style: C(t(U)(w.value)),
|
|
145
145
|
onFocus: l[0] || (l[0] = //@ts-ignore
|
|
146
146
|
(...n) => e.onFocus && e.onFocus(...n)),
|
|
147
147
|
onBlur: l[1] || (l[1] = //@ts-ignore
|
|
148
148
|
(...n) => e.onBlur && e.onBlur(...n))
|
|
149
149
|
}, [
|
|
150
|
-
|
|
150
|
+
m(t(H).Compact, { block: "" }, {
|
|
151
151
|
default: A(() => [
|
|
152
|
-
e.options?.length ? (
|
|
152
|
+
e.options?.length ? (B(), M(t(ne), {
|
|
153
153
|
key: 0,
|
|
154
|
-
style:
|
|
154
|
+
style: C(e.style),
|
|
155
155
|
options: P.value,
|
|
156
156
|
value: E.value,
|
|
157
157
|
"allow-clear": !1,
|
|
158
158
|
"dropdown-match-select-width": !1,
|
|
159
159
|
disabled: e.disabled,
|
|
160
|
-
"get-popup-container": () =>
|
|
161
|
-
"onUpdate:value":
|
|
162
|
-
}, null, 8, ["style", "options", "value", "disabled", "get-popup-container"])) :
|
|
163
|
-
|
|
164
|
-
t(
|
|
160
|
+
"get-popup-container": () => i.value,
|
|
161
|
+
"onUpdate:value": O
|
|
162
|
+
}, null, 8, ["style", "options", "value", "disabled", "get-popup-container"])) : D("", !0),
|
|
163
|
+
m(t(le), G(
|
|
164
|
+
t(J)(o, [
|
|
165
165
|
"style",
|
|
166
166
|
"value",
|
|
167
167
|
"onUpdate:value",
|
|
@@ -174,22 +174,22 @@ const m = "GROUP_SEARCH_ALL", Ve = /* @__PURE__ */ T({
|
|
|
174
174
|
ref_key: "inputRef",
|
|
175
175
|
ref: f,
|
|
176
176
|
style: e.inputStyle,
|
|
177
|
-
value:
|
|
178
|
-
placeholder:
|
|
179
|
-
onInput:
|
|
180
|
-
onBlur:
|
|
177
|
+
value: j.value,
|
|
178
|
+
placeholder: L.value,
|
|
179
|
+
onInput: _,
|
|
180
|
+
onBlur: T
|
|
181
181
|
}
|
|
182
182
|
), {
|
|
183
183
|
suffix: A(() => [
|
|
184
|
-
|
|
185
|
-
_parent:
|
|
186
|
-
value:
|
|
184
|
+
m(ae, {
|
|
185
|
+
_parent: i.value,
|
|
186
|
+
value: N.value,
|
|
187
187
|
disabled: e.disabled,
|
|
188
188
|
placement: o.popoverPlacement,
|
|
189
189
|
"max-num": e.maxNum,
|
|
190
|
-
class: b(t(
|
|
191
|
-
"onUpdate:value":
|
|
192
|
-
onClose:
|
|
190
|
+
class: b(t(v)),
|
|
191
|
+
"onUpdate:value": z,
|
|
192
|
+
onClose: y
|
|
193
193
|
}, null, 8, ["_parent", "value", "disabled", "placement", "max-num", "class"])
|
|
194
194
|
]),
|
|
195
195
|
_: 1
|
|
@@ -39,7 +39,8 @@ const o = {
|
|
|
39
39
|
colorBgSpotlight: "#000000cc",
|
|
40
40
|
controlItemBgActive: "#F5F9FF",
|
|
41
41
|
controlItemBgActiveHover: "#EAF2FF",
|
|
42
|
-
colorBorderSecondary: "#E9EDF3"
|
|
42
|
+
colorBorderSecondary: "#E9EDF3",
|
|
43
|
+
controlHeight: 30
|
|
43
44
|
}, c = {
|
|
44
45
|
...o,
|
|
45
46
|
// 主色
|
|
@@ -73,7 +74,8 @@ const o = {
|
|
|
73
74
|
colorBgSpotlight: "#000000cc",
|
|
74
75
|
controlItemBgActive: "#f3fbf7",
|
|
75
76
|
controlItemBgActiveHover: "#e6f6ef",
|
|
76
|
-
colorBorderSecondary: "#E9E9E9"
|
|
77
|
+
colorBorderSecondary: "#E9E9E9",
|
|
78
|
+
controlHeight: 30
|
|
77
79
|
};
|
|
78
80
|
export {
|
|
79
81
|
c as adminToken,
|
package/es/src/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "7.7.
|
|
1
|
+
declare const _default: "7.7.8";
|
|
2
2
|
export default _default;
|
package/es/src/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../config-provider/index.js");const p=require("@aplus-frontend/antdv/es/button/LoadingIcon"),k=require("@aplus-frontend/antdv"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../config-provider/index.js");const p=require("@aplus-frontend/antdv/es/button/LoadingIcon"),k=require("@aplus-frontend/antdv"),g=require("../style/index.js"),v=require("../../config-provider/hooks/use-namespace.js"),y={key:1},B=e.defineComponent({name:"ApActionItem",__name:"index",props:{text:{},color:{default:"primary"},disabled:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},onAction:{type:Function},onClick:{type:Function},loading:{type:Boolean,default:!1},icon:{},iconFirst:{type:Boolean,default:!1},tooltip:{default:()=>({})}},setup(t){const i=e.useSlots(),a=e.createPropsRestProxy(t,["color","disabled","visible","loading","iconFirst","icon","tooltip"]),{b:s,m:n,e:d}=v.useNamespace("action-item"),r=e.ref(!1),c=e.computed(()=>t.iconFirst&&!!(t.icon||i.icon)),f=g.default("action-item");function u(o){e.unref(l)||t.disabled||(a.onClick?.(o),a.onAction&&(r.value=!0,a.onAction(o).finally(()=>r.value=!1)))}const l=e.computed(()=>t.loading||e.unref(r)),m=e.computed(()=>[f.value,s(),n(t.color),c.value?n("icon-first"):null,t.disabled?n("disabled"):null,l.value?n("loading"):null].filter(Boolean));return(o,C)=>e.renderSlot(o.$slots,"trigger",{loading:l.value,disabled:o.disabled,onClick:u},()=>[o.visible?(e.openBlock(),e.createElementBlock("span",e.mergeProps({key:0},o.$attrs,{class:m.value,onClick:u}),[e.createVNode(e.unref(p),{"prefix-cls":e.unref(s)(),"exist-icon":!1,loading:l.value},null,8,["prefix-cls","loading"]),o.icon||i.icon?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(d)("icon-wrapper"))},[e.createVNode(e.unref(k.Tooltip),e.mergeProps({title:c.value?o.text:null},o.tooltip),{default:e.withCtx(()=>[e.createElementVNode("span",null,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.icon||i.icon)))])]),_:1},16,["title"])],2)):e.createCommentVNode("",!0),c.value?e.createCommentVNode("",!0):e.renderSlot(o.$slots,"default",{key:1},()=>[e.isVNode(o.text)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.text),{key:0})):(e.openBlock(),e.createElementBlock("span",y,e.toDisplayString(o.text||""),1))])],16)):e.createCommentVNode("",!0)])}});exports.default=B;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("../../style/index.js"),p=require("../../utils/cssinjs/index.js"),e=o=>{const{loadingOpacity:n,colorLink:r,colorLinkHover:l,colorSuccess:a,colorError:c,colorWarn:t,componentCls:i}=o;return{[i]:{display:"inline-flex",justifyContent:"center",alignItems:"center",whiteSpace:"nowrap",textAlign:"center",gap:o.spaceXS,cursor:"pointer",...d.resetComponent(o),"&--primary":{color:r,[`&:not(${i}--disabled):hover`]:{color:l},[`&${i}--disabled`]:{color:o.colorLinkDisabled}},"&--success":{color:a,[`&${i}--disabled`]:{color:o.colorSuccessDisabled}},"&--error":{color:c,[`&${i}--disabled`]:{color:o.colorErrorDisabled}},"&--warn":{color:t,[`&${i}--disabled`]:{color:o.colorWarnDisabled}},"&--loading":{opacity:n,transition:`opacity ${o.motionDurationMid}`,cursor:"default",[`&${i}--disabled`]:{opacity:1}},"&--disabled":{cursor:"not-allowed"},[`${i}__icon-wrapper`]:{},"&--icon-first":{[`${i}__icon-wrapper`]:{paddingRight:0}},[`${i}-loading-icon`]:{display:"inline-block",lineHeight:0,transition:["width","opacity","margin"].map(s=>`${s} ${o.motionDurationSlow} ${o.apActionLoadingIconEase}`).join(",")},[`${i}-loading-icon-motion`]:{"&-enter-from":{marginInlineEnd:o.calc(o.spaceXS).mul(-1).equal()},"&-enter-to":{marginInlineEnd:0},"&-leave-from":{marginInlineEnd:0},"&-leave-to":{marginInlineEnd:o.calc(o.spaceXS).mul(-1).equal()}}}}},u=p.genComponentStyleHook("ApAction",o=>[e(o)],{loadingOpacity:.35,apActionLoadingIconEase:"cubic-bezier(0.645, 0.045, 0.355, 1)"},{skipUnit:["loadingOpacity"]});exports.default=u;exports.genActionItemStyle=e;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("../../utils/cssinjs/index.js"),a=n=>{const{componentCls:t,namespace:e}=n,i=`${t}--disabled`;return{[t]:{"&--bordered":{boxSizing:"border-box",border:`${n.lineWidth} ${n.lineType} ${n.borderColorBase}`,borderRadius:n.borderRadius,paddingInline:n.space,".ant-input-affix-wrapper":{padding:0},[`&:has(.${e}-batch-input-group):has(.ant-select)`]:{".ant-input-affix-wrapper":{paddingInlineEnd:n.space}},"&:has(textarea.ant-input)":{paddingInlineEnd:0,".ant-input":{paddingInlineStart:0}},[`&:has(div.${e}-batch-input-group .ant-input)`]:{paddingInlineEnd:n.space,".ant-input":{paddingInlineStart:0}},".ant-picker":{padding:0},".ant-form-item-control-input-content":{"& > .ant-input-group":{"& > .ant-picker-range:nth-child(1)":{".ant-picker-clear":{insetInlineEnd:0}}}},".ant-space-compact-block":{".ant-input":{paddingInlineStart:n.space}},".ant-select-selector":{borderWidth:"0 !important",boxShadow:"none !important",background:"unset !important"},".ant-select-single .ant-select-selector":{height:`${n.controlHeight} !important`},"input.ant-input-number-input":{paddingInlineStart:0},"&:has(.ant-input-number)":{paddingInlineEnd:0},"&:has(.ant-select)":{paddingInlineEnd:0,".ant-form-item-label > label":{paddingInlineEnd:n.spaceXS}},"div.ant-form-item-control":{flex:"1 1 0",minWidth:0},".ant-form-item-label > label":{paddingRight:n.spaceLG,height:n.controlHeight,"&::after":{margin:0}},".ant-form-item-control-input":{minHeight:n.controlHeight,".ant-select-single":{height:"unset"}},[`&:hover:not(${i})`]:{borderColor:n.hoverColorBase},"&:focus":{borderColor:n.activeColorBase,boxShadow:"0 0 0 2px rgba(5, 155, 255, 0.1)"},[`.${e}-batch-input-group-popover-input__popover`]:{width:"calc(100% + 12px)"}},"&--disabled":{cursor:"not-allowed",backgroundColor:n.colorBgDisabled,".ant-select-selector":{backgroundColor:"transparent !important"}},"&--focused":{borderColor:n.activeColorBase,boxShadow:"0 0 0 2px rgba(5, 155, 255, 0.1)"},".ant-form-show-help":{".ant-form-item-explain-error":{fontSize:n.fontSize,lineHeight:n.lineHeightSM}},".ant-col .ant-form-item-extra":{lineHeight:n.lineHeightLG,minHeight:"unset",marginBlockStart:n.spaceXS,marginBlockEnd:n.spaceLG},".ant-input-group":{".ant-picker:only-child":{width:"100%"},".ant-select + .ant-picker":{paddingInline:n.space,flex:1}}}}},o=r.genComponentStyleHook("ApForm",n=>[a(n)]);exports.default=o;exports.genApFormItemStyle=a;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("../../utils/cssinjs/index.js"),a=n=>{const{componentCls:t,namespace:e}=n,i=`${t}--disabled`;return{[t]:{"&--bordered":{boxSizing:"border-box",border:`${n.lineWidth} ${n.lineType} ${n.borderColorBase}`,borderRadius:n.borderRadius,paddingInline:n.space,".ant-input-affix-wrapper":{padding:0},[`&:has(.${e}-batch-input-group):has(.ant-select)`]:{".ant-input-affix-wrapper":{paddingInlineEnd:n.space}},"&:has(textarea.ant-input)":{paddingInlineEnd:0,".ant-input":{paddingInlineStart:0}},[`&:has(div.${e}-batch-input-group .ant-input)`]:{paddingInlineEnd:n.space,".ant-input":{paddingInlineStart:0}},".ant-picker":{padding:0},".ant-form-item-control-input-content":{"& > .ant-input-group":{"& > .ant-picker-range:nth-child(1)":{".ant-picker-clear":{insetInlineEnd:0}}}},".ant-space-compact-block":{".ant-input":{paddingInlineStart:n.space}},".ant-select-selector":{borderWidth:"0 !important",boxShadow:"none !important",background:"unset !important"},".ant-select-single .ant-select-selector":{height:`${n.controlHeight} !important`},"input.ant-input-number-input":{paddingInlineStart:0},"&:has(.ant-input-number)":{paddingInlineEnd:0},"&:has(.ant-select)":{paddingInlineEnd:0,".ant-form-item-label > label":{paddingInlineEnd:n.spaceXS}},"div.ant-form-item-control":{flex:"1 1 0",minWidth:0},".ant-form-item-label > label":{paddingRight:n.spaceLG,height:n.controlHeight,"&::after":{margin:0}},".ant-form-item-control-input":{minHeight:n.controlHeight,".ant-select-single":{height:"unset"}},[`&:hover:not(${i})`]:{borderColor:n.hoverColorBase},"&:focus":{borderColor:n.activeColorBase,boxShadow:"0 0 0 2px rgba(5, 155, 255, 0.1)"},[`.${e}-batch-input-group-popover-input__popover`]:{width:"calc(100% + 12px)"}},"&--disabled":{cursor:"not-allowed",backgroundColor:n.colorBgDisabled,".ant-select-selector":{backgroundColor:"transparent !important"}},"&--focused":{borderColor:n.activeColorBase,boxShadow:"0 0 0 2px rgba(5, 155, 255, 0.1)"},".ant-form-show-help":{".ant-form-item-explain-error":{fontSize:n.fontSize,lineHeight:n.lineHeightSM}},".ant-col .ant-form-item-extra":{lineHeight:n.lineHeightLG,minHeight:"unset",marginBlockStart:n.spaceXS,marginBlockEnd:n.spaceLG},".ant-input-group":{".ant-picker:only-child":{width:"100%"},".ant-select + .ant-picker":{paddingInline:n.space,flex:1}},textarea:{lineHeight:"20px"},"& .ant-input-affix-wrapper-textarea-with-clear-btn .ant-input-clear-icon":{insetBlockStart:"8px"}}}},o=r.genComponentStyleHook("ApForm",n=>[a(n)]);exports.default=o;exports.genApFormItemStyle=a;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../ap-field/index.js");const
|
|
2
|
-
`):""),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../ap-field/index.js");const y=require("@aplus-frontend/antdv");require("../../config-provider/index.js");const h=require("lodash-unified");require("./popover-input/index.vue.js");require("../../hooks/index.js");require("../../utils/index.js");const R=require("../../ap-field/hooks/use-default-placeholder.js"),z=require("./utils.js"),L=require("./style/index.js"),O=require("../../hooks/useControllableValue.js"),E=require("../../config-provider/hooks/use-locale.js"),T=require("../../config-provider/hooks/use-namespace.js"),M=require("../../utils/is.js"),$=require("../../ap-field/select/index.vue.js"),D=require("../../ap-field/text/index.js"),K=require("./popover-input/index.vue2.js"),c="GROUP_SEARCH_ALL",G=e.defineComponent({name:"BatchInputGroup",__name:"index",props:{style:{type:[Boolean,null,String,Object,Array]},inputStyle:{type:[Boolean,null,String,Object,Array]},options:{},hasAll:{type:Boolean,default:!0},value:{},"onUpdate:value":{},popoverPlacement:{default:"left"},maxNum:{default:200},mode:{default:"edit"},class:{},variant:{},size:{},name:{},type:{default:"text"},onCompositionend:{},onCompositionstart:{},onFocus:{},onBlur:{},onChange:{},onInput:{},onKeydown:{},onKeyup:{},onMousedown:{},focused:{type:Boolean},hidden:{type:Boolean},disabled:{type:Boolean},prefixCls:{},id:{},readonly:{type:Boolean},autofocus:{type:Boolean},autocomplete:{},placeholder:{},lazy:{type:Boolean,default:!0},maxlength:{},loading:{type:Boolean},bordered:{type:Boolean,default:!0},showCount:{type:[Boolean,Object]},htmlSize:{},onPressEnter:{},onMouseUp:{},onRawInput:{},valueModifiers:{},status:{},defaultValue:{},inputElement:{},triggerFocus:{},handleReset:{},addonBefore:{},addonAfter:{},prefix:{},suffix:{},clearIcon:{},allowClear:{type:Boolean,default:!0},emptyText:{default:"--"},beforeInput:{}},emits:["update:value"],setup(g,{emit:B}){const n=g,C=R.useDefaultPlaceholder("Text",n),b=B,{value:u,updateValue:a}=O.useControllableValue(n,b),i=e.ref(),d=e.ref(),{t:x}=E.useLocale(),{b:V,cssVar:q}=T.useNamespace("batch-input-group"),f=L.default("batch-input-group"),r=y.Form.useInjectFormItemContext(),A=e.computed(()=>{const t=n.popoverPlacement;return{"popover-left":h.isNumber(t)?`${t}px`:t==="left"?"0px":"unset","popover-right":t==="right"?"0px":"unset"}}),_=e.computed(()=>n.options?n.options.length>1&&n.hasAll?[{value:c,label:x("ap.common.all")},...n.options]:n.options:[]),I=e.computed(()=>n.options?n.options.map(t=>t.value):[]),S=e.computed(()=>e.unref(u)?.value?.length?e.unref(u).value.join(","):""),k=e.computed(()=>e.unref(u)?.value?.length?e.unref(u).value.join(`
|
|
2
|
+
`):""),F=e.computed(()=>{const t=e.unref(u)?.key;if(t?.length)return t.length===1||!n.hasAll?t[0]:c}),P=e.computed(()=>{const t=e.unref(u)?.key;return!t||t?.length<=1?e.unref(C):(n.options||[]).filter(o=>t.includes(o.value)).map(o=>o.label).join("/")});function U(t){const l=e.unref(u)||{},o=t===c?e.unref(I):M.isDef(t)?[t]:[];a({...l,key:o}),r.onFieldChange()}function w(t){const l=e.unref(u)||{},o=t.target.value||"";let p=z.splitValue(o,",",",",n.maxNum);if(o!==p){const v=d.value?.$el?.querySelector("input");v&&(v.value=p)}let s=p.split(",");s.length===1&&s[0]===""&&(s=[]),a({...l,value:s}),r.onFieldChange()}function N(t){const l=e.unref(u)||{};let o=t.split(/,|\n/);a({...l,value:o}),r.onFieldChange()}function m(){const t=e.unref(u)||{},l=t.value?.filter(Boolean);a({...t,value:l}),r.onFieldChange()}function j(t){m(),n.onBlur?.(t)}return(t,l)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"containerRef",ref:i,class:e.normalizeClass([e.unref(V)(),e.unref(f)]),style:e.normalizeStyle(e.unref(q)(A.value)),onFocus:l[0]||(l[0]=(...o)=>t.onFocus&&t.onFocus(...o)),onBlur:l[1]||(l[1]=(...o)=>t.onBlur&&t.onBlur(...o))},[e.createVNode(e.unref(y.Space).Compact,{block:""},{default:e.withCtx(()=>[t.options?.length?(e.openBlock(),e.createBlock(e.unref($.default),{key:0,style:e.normalizeStyle(t.style),options:_.value,value:F.value,"allow-clear":!1,"dropdown-match-select-width":!1,disabled:t.disabled,"get-popup-container":()=>i.value,"onUpdate:value":U},null,8,["style","options","value","disabled","get-popup-container"])):e.createCommentVNode("",!0),e.createVNode(e.unref(D.ApFieldText),e.mergeProps(e.unref(h.omit)(n,["style","value","onUpdate:value","inputStyle","hasAll","options","onBlur"]),{ref_key:"inputRef",ref:d,style:t.inputStyle,value:S.value,placeholder:P.value,onInput:w,onBlur:j}),{suffix:e.withCtx(()=>[e.createVNode(K.default,{_parent:i.value,value:k.value,disabled:t.disabled,placement:n.popoverPlacement,"max-num":t.maxNum,class:e.normalizeClass(e.unref(f)),"onUpdate:value":N,onClose:m},null,8,["_parent","value","disabled","placement","max-num","class"])]),_:1},16,["style","value","placeholder"])]),_:1})],38))}});exports.default=G;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./interface.js");const o={borderRadius:4,fontSize:12,sizeStep:4,lineHeight:1.5,lineHeightSM:1.6,wireframe:!1,sizeUnit:3},r={...o,colorPrimary:"#0070FF",colorPrimaryHover:"#66A9FF",colorPrimaryActive:"#338CFF",colorTextBase:"#182948",colorText:"#182948",colorTextSecondary:"#526A90",colorTextTertiary:"#8896B0",colorTextPlaceholder:"#BFBFBF",colorBorder:"#DEE4ED",colorSplit:"#E9EDF3",colorInfo:"#0070FF",colorSuccess:"#2ED1A3",colorError:"#FF4D4F",colorWarning:"#FFA940",colorBgContainerDisabled:"#F2F6F9",wireframe:!1,colorBgLayout:"#F2F6F9",colorBgSpotlight:"#000000cc",controlItemBgActive:"#F5F9FF",controlItemBgActiveHover:"#EAF2FF",colorBorderSecondary:"#E9EDF3"},e={...o,colorPrimary:"#34B77C",colorPrimaryHover:"#85D4B0",colorPrimaryActive:"#5DC596",colorBgContainerDisabled:"#f5f5f5",colorTextBase:"#333333",colorText:"#333333",colorTextSecondary:"#666666",colorTextTertiary:"#999999",colorTextPlaceholder:"#ABB7CC",colorBorder:"#D9D9D9",colorSplit:"#E9E9E9",colorInfo:"#1890FF",colorSuccess:"#34b77c",colorError:"#FF4D4F",colorWarning:"#FAAD14",colorLink:"#1890FF",wireframe:!1,colorBgLayout:"#FAFAFA",colorBgSpotlight:"#000000cc",controlItemBgActive:"#f3fbf7",controlItemBgActiveHover:"#e6f6ef",colorBorderSecondary:"#E9E9E9"};exports.adminToken=e;exports.aplusToken=r;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./interface.js");const o={borderRadius:4,fontSize:12,sizeStep:4,lineHeight:1.5,lineHeightSM:1.6,wireframe:!1,sizeUnit:3},r={...o,colorPrimary:"#0070FF",colorPrimaryHover:"#66A9FF",colorPrimaryActive:"#338CFF",colorTextBase:"#182948",colorText:"#182948",colorTextSecondary:"#526A90",colorTextTertiary:"#8896B0",colorTextPlaceholder:"#BFBFBF",colorBorder:"#DEE4ED",colorSplit:"#E9EDF3",colorInfo:"#0070FF",colorSuccess:"#2ED1A3",colorError:"#FF4D4F",colorWarning:"#FFA940",colorBgContainerDisabled:"#F2F6F9",wireframe:!1,colorBgLayout:"#F2F6F9",colorBgSpotlight:"#000000cc",controlItemBgActive:"#F5F9FF",controlItemBgActiveHover:"#EAF2FF",colorBorderSecondary:"#E9EDF3",controlHeight:30},e={...o,colorPrimary:"#34B77C",colorPrimaryHover:"#85D4B0",colorPrimaryActive:"#5DC596",colorBgContainerDisabled:"#f5f5f5",colorTextBase:"#333333",colorText:"#333333",colorTextSecondary:"#666666",colorTextTertiary:"#999999",colorTextPlaceholder:"#ABB7CC",colorBorder:"#D9D9D9",colorSplit:"#E9E9E9",colorInfo:"#1890FF",colorSuccess:"#34b77c",colorError:"#FF4D4F",colorWarning:"#FAAD14",colorLink:"#1890FF",wireframe:!1,colorBgLayout:"#FAFAFA",colorBgSpotlight:"#000000cc",controlItemBgActive:"#f3fbf7",controlItemBgActiveHover:"#e6f6ef",colorBorderSecondary:"#E9E9E9",controlHeight:30};exports.adminToken=e;exports.aplusToken=r;
|
package/lib/src/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "7.7.
|
|
1
|
+
declare const _default: "7.7.8";
|
|
2
2
|
export default _default;
|
package/lib/src/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="7.7.
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="7.7.8";exports.default=e;
|