@aplus-frontend/ui 0.4.29 → 0.4.31
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/business/ap-batch-action-group/ApBatchActionGroup.vue2.mjs +35 -33
- package/es/src/business/ap-batch-action-group/index.d.ts +7 -7
- package/es/src/business/ap-batch-action-group/interface.d.ts +2 -2
- package/es/src/business/batch-input-group/index.vue.mjs +34 -33
- package/lib/src/business/ap-batch-action-group/ApBatchActionGroup.vue2.js +1 -1
- package/lib/src/business/ap-batch-action-group/index.d.ts +7 -7
- package/lib/src/business/ap-batch-action-group/interface.d.ts +2 -2
- package/lib/src/business/batch-input-group/index.vue.js +2 -2
- package/package.json +1 -1
- package/theme/ap-table/ap-table.css +2 -2
- package/theme/ap-table-modal/index.css +2 -2
- package/theme/index.css +2 -2
- package/theme/scroll-bar/index.css +2 -2
- package/theme/scroll-bar/index.less +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { DropdownButton as
|
|
1
|
+
import { defineComponent as T, computed as n, openBlock as c, createBlock as m, unref as a, mergeProps as p, withCtx as r, createVNode as d, createElementVNode as N, normalizeStyle as $, resolveDynamicComponent as h, h as w, normalizeClass as x, normalizeProps as z, guardReactiveProps as G, createCommentVNode as M } from "vue";
|
|
2
|
+
import { DropdownButton as S, Dropdown as V } from "@aplus-frontend/antdv";
|
|
3
3
|
import "../../ap-button/index.mjs";
|
|
4
4
|
import "./MenuItemGroup.vue.mjs";
|
|
5
5
|
import "../../config-provider/index.mjs";
|
|
@@ -9,17 +9,17 @@ import { useInjectApTable as j } from "../../ap-table/context.mjs";
|
|
|
9
9
|
import { useNamespace as E } from "../../config-provider/hooks/use-namespace.mjs";
|
|
10
10
|
import { useLocale as I } from "../../config-provider/hooks/use-locale.mjs";
|
|
11
11
|
import { useGlobalConfig as q } from "../../config-provider/hooks/use-global-config.mjs";
|
|
12
|
-
import
|
|
12
|
+
import P from "./MenuItemGroup.vue2.mjs";
|
|
13
13
|
import H from "../../ap-button/ap-button.vue.mjs";
|
|
14
|
-
const re = /* @__PURE__ */
|
|
14
|
+
const re = /* @__PURE__ */ T({
|
|
15
15
|
__name: "ApBatchActionGroup",
|
|
16
16
|
props: {
|
|
17
17
|
selectedRows: {},
|
|
18
18
|
buttonProps: {},
|
|
19
19
|
menuList: {}
|
|
20
20
|
},
|
|
21
|
-
setup(
|
|
22
|
-
const { b:
|
|
21
|
+
setup(_, { expose: g }) {
|
|
22
|
+
const { b: f } = E("ap-batch-action-group"), { t: k } = I(), { columns: A, dataSource: B } = j(), e = _, C = q("uiMode"), { hasPermission: L } = O(), b = n(
|
|
23
23
|
() => {
|
|
24
24
|
var t;
|
|
25
25
|
return ((t = e == null ? void 0 : e.buttonProps) == null ? void 0 : t.dropdownType) || "default";
|
|
@@ -29,22 +29,22 @@ const re = /* @__PURE__ */ D({
|
|
|
29
29
|
var t;
|
|
30
30
|
return ((t = e == null ? void 0 : e.buttonProps) == null ? void 0 : t.type) || "borderLink";
|
|
31
31
|
}
|
|
32
|
-
),
|
|
32
|
+
), v = n(
|
|
33
33
|
() => {
|
|
34
34
|
var t;
|
|
35
|
-
return ((t = e == null ? void 0 : e.buttonProps) == null ? void 0 : t.content) ||
|
|
35
|
+
return ((t = e == null ? void 0 : e.buttonProps) == null ? void 0 : t.content) || k("ap.apApBatchActionGroup.batchOperation");
|
|
36
36
|
}
|
|
37
|
-
),
|
|
37
|
+
), D = n(() => (e == null ? void 0 : e.selectedRows) || []), i = n(
|
|
38
38
|
() => {
|
|
39
39
|
var t;
|
|
40
|
-
return ((t = e == null ? void 0 : e.buttonProps) == null ? void 0 : t.disabled) ?? (Array.isArray(e.selectedRows) ?
|
|
40
|
+
return ((t = e == null ? void 0 : e.buttonProps) == null ? void 0 : t.disabled) ?? (Array.isArray(e.selectedRows) ? D.value.length === 0 : !1);
|
|
41
41
|
}
|
|
42
|
-
),
|
|
42
|
+
), R = n(() => {
|
|
43
43
|
const t = {
|
|
44
44
|
aplus: "#0070FF",
|
|
45
45
|
admin: "#34b77c"
|
|
46
46
|
};
|
|
47
|
-
return u.value === "borderLink" ?
|
|
47
|
+
return u.value === "borderLink" ? i.value ? void 0 : t[C.value] || t.aplus : void 0;
|
|
48
48
|
}), l = n(() => {
|
|
49
49
|
var t;
|
|
50
50
|
return ((t = e == null ? void 0 : e.menuList) == null ? void 0 : t.filter((o) => {
|
|
@@ -52,61 +52,63 @@ const re = /* @__PURE__ */ D({
|
|
|
52
52
|
return !(o != null && o.ifShow) && (o != null && o.auth) && (s = () => L(o.auth)), (s == null ? void 0 : s()) ?? !0;
|
|
53
53
|
})) || [];
|
|
54
54
|
});
|
|
55
|
-
function
|
|
55
|
+
function y() {
|
|
56
56
|
return e != null && e.buttonProps ? {
|
|
57
57
|
...e.buttonProps,
|
|
58
58
|
type: u.value === "borderLink" ? "default" : u.value
|
|
59
59
|
} : {};
|
|
60
60
|
}
|
|
61
|
-
return
|
|
62
|
-
columns:
|
|
63
|
-
dataSource:
|
|
64
|
-
}), (t, o) => l.value.length &&
|
|
61
|
+
return g({
|
|
62
|
+
columns: A,
|
|
63
|
+
dataSource: B
|
|
64
|
+
}), (t, o) => l.value.length && b.value === "dropdown" ? (c(), m(a(S), p({
|
|
65
65
|
key: 0,
|
|
66
|
-
class: [a(
|
|
66
|
+
class: [a(f)()]
|
|
67
67
|
}, {
|
|
68
68
|
...t.$attrs,
|
|
69
|
-
...
|
|
70
|
-
disabled:
|
|
69
|
+
...y(),
|
|
70
|
+
disabled: i.value
|
|
71
71
|
}), {
|
|
72
72
|
overlay: r(() => [
|
|
73
|
-
|
|
73
|
+
d(P, p({
|
|
74
74
|
...e
|
|
75
75
|
}, { "menu-list": l.value }), null, 16, ["menu-list"])
|
|
76
76
|
]),
|
|
77
77
|
default: r(() => [
|
|
78
78
|
N("span", {
|
|
79
|
-
style:
|
|
80
|
-
color:
|
|
79
|
+
style: $({
|
|
80
|
+
color: R.value
|
|
81
81
|
})
|
|
82
|
-
},
|
|
82
|
+
}, [
|
|
83
|
+
(c(), m(h(w("span", [v.value]))))
|
|
84
|
+
], 4)
|
|
83
85
|
]),
|
|
84
86
|
_: 1
|
|
85
|
-
}, 16, ["class"])) : l.value.length &&
|
|
87
|
+
}, 16, ["class"])) : l.value.length && b.value === "default" ? (c(), m(a(V), {
|
|
86
88
|
key: 1,
|
|
87
|
-
class: x([a(
|
|
88
|
-
disabled:
|
|
89
|
+
class: x([a(f)()]),
|
|
90
|
+
disabled: i.value
|
|
89
91
|
}, {
|
|
90
92
|
overlay: r(() => [
|
|
91
|
-
|
|
93
|
+
d(P, p({
|
|
92
94
|
...e
|
|
93
95
|
}, { "menu-list": l.value }), null, 16, ["menu-list"])
|
|
94
96
|
]),
|
|
95
97
|
default: r(() => [
|
|
96
|
-
|
|
98
|
+
d(a(H), z(G({
|
|
97
99
|
...t.$attrs,
|
|
98
|
-
...
|
|
100
|
+
...y(),
|
|
99
101
|
type: u.value
|
|
100
102
|
})), {
|
|
101
103
|
default: r(() => [
|
|
102
|
-
|
|
103
|
-
|
|
104
|
+
(c(), m(h(w("span", [v.value])))),
|
|
105
|
+
d(a(F))
|
|
104
106
|
]),
|
|
105
107
|
_: 1
|
|
106
108
|
}, 16)
|
|
107
109
|
]),
|
|
108
110
|
_: 1
|
|
109
|
-
}, 8, ["class", "disabled"])) :
|
|
111
|
+
}, 8, ["class", "disabled"])) : M("", !0);
|
|
110
112
|
}
|
|
111
113
|
});
|
|
112
114
|
export {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CreateComponentPublicInstanceWithMixins, ExtractPropTypes, PropType, CSSProperties, ComputedRef, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, ComponentOptionsBase, VNodeProps, AllowedComponentProps, ComponentCustomProps, Plugin } from 'vue';
|
|
1
|
+
import { CreateComponentPublicInstanceWithMixins, ExtractPropTypes, PropType, VNodeChild, CSSProperties, ComputedRef, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, ComponentOptionsBase, VNodeProps, AllowedComponentProps, ComponentCustomProps, Plugin } from 'vue';
|
|
2
2
|
import { ButtonType, ButtonShape, ButtonSize } from '@aplus-frontend/antdv/es/button';
|
|
3
3
|
import { ButtonHTMLType } from '@aplus-frontend/antdv/es/button/buttonTypes';
|
|
4
4
|
import { VueTypeValidableDef } from '../../../node_modules/vue-types';
|
|
@@ -69,7 +69,7 @@ declare const ApBatchActionGroup: {
|
|
|
69
69
|
lazy?: boolean | number;
|
|
70
70
|
onClick?: () => any | Promise<any>;
|
|
71
71
|
} & {
|
|
72
|
-
content?:
|
|
72
|
+
content?: VNodeChild;
|
|
73
73
|
}) | ({
|
|
74
74
|
dropdownType?: "dropdown" | undefined;
|
|
75
75
|
} & Omit<Partial< ExtractPropTypes<{
|
|
@@ -299,7 +299,7 @@ declare const ApBatchActionGroup: {
|
|
|
299
299
|
};
|
|
300
300
|
}>>, "type"> & {
|
|
301
301
|
type?: ButtonType | "borderLink" | undefined;
|
|
302
|
-
content?:
|
|
302
|
+
content?: VNodeChild;
|
|
303
303
|
}) | undefined;
|
|
304
304
|
menuList?: ApBatchActionGroupMenuProps<any>[] | undefined;
|
|
305
305
|
}> & Readonly<{}>, {
|
|
@@ -370,7 +370,7 @@ declare const ApBatchActionGroup: {
|
|
|
370
370
|
lazy?: boolean | number;
|
|
371
371
|
onClick?: () => any | Promise<any>;
|
|
372
372
|
} & {
|
|
373
|
-
content?:
|
|
373
|
+
content?: VNodeChild;
|
|
374
374
|
}) | ({
|
|
375
375
|
dropdownType?: "dropdown" | undefined;
|
|
376
376
|
} & Omit<Partial< ExtractPropTypes<{
|
|
@@ -600,7 +600,7 @@ declare const ApBatchActionGroup: {
|
|
|
600
600
|
};
|
|
601
601
|
}>>, "type"> & {
|
|
602
602
|
type?: ButtonType | "borderLink" | undefined;
|
|
603
|
-
content?:
|
|
603
|
+
content?: VNodeChild;
|
|
604
604
|
}) | undefined;
|
|
605
605
|
menuList?: ApBatchActionGroupMenuProps<any>[] | undefined;
|
|
606
606
|
}> & Readonly<{}>, {
|
|
@@ -668,7 +668,7 @@ declare const ApBatchActionGroup: {
|
|
|
668
668
|
lazy?: boolean | number;
|
|
669
669
|
onClick?: () => any | Promise<any>;
|
|
670
670
|
} & {
|
|
671
|
-
content?:
|
|
671
|
+
content?: VNodeChild;
|
|
672
672
|
}) | ({
|
|
673
673
|
dropdownType?: "dropdown" | undefined;
|
|
674
674
|
} & Omit<Partial< ExtractPropTypes<{
|
|
@@ -898,7 +898,7 @@ declare const ApBatchActionGroup: {
|
|
|
898
898
|
};
|
|
899
899
|
}>>, "type"> & {
|
|
900
900
|
type?: ButtonType | "borderLink" | undefined;
|
|
901
|
-
content?:
|
|
901
|
+
content?: VNodeChild;
|
|
902
902
|
}) | undefined;
|
|
903
903
|
menuList?: ApBatchActionGroupMenuProps<any>[] | undefined;
|
|
904
904
|
}> & Readonly<{}>, {
|
|
@@ -6,11 +6,11 @@ import { ColumnType } from '@aplus-frontend/antdv/es/table';
|
|
|
6
6
|
type ApBatchActionGroupButtonType = ButtonProps['type'] | 'borderLink';
|
|
7
7
|
type MixinButton<T> = Omit<T, 'type'> & {
|
|
8
8
|
type?: ApBatchActionGroupButtonType;
|
|
9
|
-
content?:
|
|
9
|
+
content?: VNodeChild;
|
|
10
10
|
};
|
|
11
11
|
interface ApBatchActionGroupTypeProps {
|
|
12
12
|
default: ApButtonProps & {
|
|
13
|
-
content?:
|
|
13
|
+
content?: VNodeChild;
|
|
14
14
|
};
|
|
15
15
|
dropdown: MixinButton<DropdownButtonProps>;
|
|
16
16
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as O, ref as
|
|
1
|
+
import { defineComponent as O, ref as g, computed as r, unref as n, openBlock as B, createElementBlock as P, createVNode as d, withCtx as A, createBlock as T, normalizeStyle as z, createCommentVNode as K, mergeProps as M } from "vue";
|
|
2
2
|
import "../../ap-field/index.mjs";
|
|
3
3
|
import { Space as $ } from "@aplus-frontend/antdv";
|
|
4
4
|
import "../../config-provider/index.mjs";
|
|
@@ -12,7 +12,7 @@ import { useLocale as H } from "../../config-provider/hooks/use-locale.mjs";
|
|
|
12
12
|
import Y from "../../ap-field/select/index.vue.mjs";
|
|
13
13
|
import { ApFieldText as J } from "../../ap-field/text/index.mjs";
|
|
14
14
|
import Q from "./popover-input/index.vue2.mjs";
|
|
15
|
-
const
|
|
15
|
+
const c = "GROUP_SEARCH_ALL", de = /* @__PURE__ */ O({
|
|
16
16
|
__name: "index",
|
|
17
17
|
props: {
|
|
18
18
|
style: { type: [Boolean, null, String, Object, Array] },
|
|
@@ -69,31 +69,31 @@ const d = "GROUP_SEARCH_ALL", de = /* @__PURE__ */ O({
|
|
|
69
69
|
},
|
|
70
70
|
emits: ["update:value"],
|
|
71
71
|
setup(b, { emit: V }) {
|
|
72
|
-
const
|
|
73
|
-
|
|
72
|
+
const l = b, C = N("Text", l), S = V, { value: a, updateValue: i } = q(
|
|
73
|
+
l,
|
|
74
74
|
S
|
|
75
|
-
),
|
|
76
|
-
{ value:
|
|
77
|
-
...
|
|
78
|
-
] :
|
|
75
|
+
), s = g(), f = g(), { t: I } = H(), U = r(() => l.options ? l.options.length > 1 && l.hasAll ? [
|
|
76
|
+
{ value: c, label: I("ap.apGroupSearch.all") },
|
|
77
|
+
...l.options
|
|
78
|
+
] : l.options : []), w = r(() => l.options ? l.options.map((e) => e.value) : []), k = r(() => {
|
|
79
79
|
var e, t;
|
|
80
|
-
return (t = (e =
|
|
80
|
+
return (t = (e = n(a)) == null ? void 0 : e.value) != null && t.length ? n(a).value.join(",") : "";
|
|
81
81
|
}), x = r(() => {
|
|
82
82
|
var e, t;
|
|
83
|
-
return (t = (e =
|
|
83
|
+
return (t = (e = n(a)) == null ? void 0 : e.value) != null && t.length ? n(a).value.join(`
|
|
84
84
|
`) : "";
|
|
85
85
|
}), R = r(() => {
|
|
86
86
|
var t;
|
|
87
|
-
const e = (t =
|
|
87
|
+
const e = (t = n(a)) == null ? void 0 : t.key;
|
|
88
88
|
if (e != null && e.length)
|
|
89
|
-
return e.length === 1 ? e[0] :
|
|
89
|
+
return e.length === 1 ? e[0] : c;
|
|
90
90
|
}), _ = r(() => {
|
|
91
91
|
var o;
|
|
92
|
-
const e = (o =
|
|
93
|
-
return !e || (e == null ? void 0 : e.length) <= 1 ?
|
|
92
|
+
const e = (o = n(a)) == null ? void 0 : o.key;
|
|
93
|
+
return !e || (e == null ? void 0 : e.length) <= 1 ? n(C) : (l.options || []).filter((u) => e.includes(u.value)).map((u) => u.label).join("/");
|
|
94
94
|
});
|
|
95
95
|
function j(e) {
|
|
96
|
-
const t =
|
|
96
|
+
const t = n(a) || {}, o = e === c ? n(w) : G(e) ? [e] : [];
|
|
97
97
|
i({
|
|
98
98
|
...t,
|
|
99
99
|
key: o
|
|
@@ -101,19 +101,19 @@ const d = "GROUP_SEARCH_ALL", de = /* @__PURE__ */ O({
|
|
|
101
101
|
}
|
|
102
102
|
function E(e) {
|
|
103
103
|
var v, y;
|
|
104
|
-
const t =
|
|
104
|
+
const t = n(a) || {}, o = e.target.value || "", u = o.replace(/[,]+/g, ",");
|
|
105
105
|
if (o !== u) {
|
|
106
|
-
const h = (y = (v =
|
|
106
|
+
const h = (y = (v = f.value) == null ? void 0 : v.$el) == null ? void 0 : y.querySelector("input");
|
|
107
107
|
h && (h.value = u);
|
|
108
108
|
}
|
|
109
|
-
let
|
|
110
|
-
|
|
109
|
+
let p = u.split(",");
|
|
110
|
+
p.length === 1 && p[0] === "" && (p = []), i({
|
|
111
111
|
...t,
|
|
112
|
-
value:
|
|
112
|
+
value: p
|
|
113
113
|
});
|
|
114
114
|
}
|
|
115
115
|
function F(e) {
|
|
116
|
-
const t =
|
|
116
|
+
const t = n(a) || {};
|
|
117
117
|
let o = e.split(/,|\n/);
|
|
118
118
|
i({
|
|
119
119
|
...t,
|
|
@@ -122,7 +122,7 @@ const d = "GROUP_SEARCH_ALL", de = /* @__PURE__ */ O({
|
|
|
122
122
|
}
|
|
123
123
|
function m() {
|
|
124
124
|
var o;
|
|
125
|
-
const e =
|
|
125
|
+
const e = n(a) || {}, t = (o = e.value) == null ? void 0 : o.filter(Boolean);
|
|
126
126
|
i({
|
|
127
127
|
...e,
|
|
128
128
|
value: t
|
|
@@ -130,22 +130,22 @@ const d = "GROUP_SEARCH_ALL", de = /* @__PURE__ */ O({
|
|
|
130
130
|
}
|
|
131
131
|
function L(e) {
|
|
132
132
|
var t;
|
|
133
|
-
m(), (t =
|
|
133
|
+
m(), (t = l.onBlur) == null || t.call(l, e);
|
|
134
134
|
}
|
|
135
|
-
return (e, t) => (
|
|
135
|
+
return (e, t) => (B(), P("div", {
|
|
136
136
|
ref_key: "containerRef",
|
|
137
|
-
ref:
|
|
137
|
+
ref: s,
|
|
138
138
|
style: { position: "relative" },
|
|
139
139
|
onFocus: t[0] || (t[0] = //@ts-ignore
|
|
140
140
|
(...o) => e.onFocus && e.onFocus(...o)),
|
|
141
141
|
onBlur: t[1] || (t[1] = //@ts-ignore
|
|
142
142
|
(...o) => e.onBlur && e.onBlur(...o))
|
|
143
143
|
}, [
|
|
144
|
-
|
|
144
|
+
d(n($).Compact, { block: "" }, {
|
|
145
145
|
default: A(() => {
|
|
146
146
|
var o;
|
|
147
147
|
return [
|
|
148
|
-
(o = e.options) != null && o.length ? (
|
|
148
|
+
(o = e.options) != null && o.length ? (B(), T(n(Y), {
|
|
149
149
|
key: 0,
|
|
150
150
|
style: z(e.style),
|
|
151
151
|
options: U.value,
|
|
@@ -153,10 +153,11 @@ const d = "GROUP_SEARCH_ALL", de = /* @__PURE__ */ O({
|
|
|
153
153
|
"allow-clear": !1,
|
|
154
154
|
"dropdown-match-select-width": !1,
|
|
155
155
|
disabled: e.disabled,
|
|
156
|
+
"get-popup-container": () => s.value,
|
|
156
157
|
"onUpdate:value": j
|
|
157
|
-
}, null, 8, ["style", "options", "value", "disabled"])) : K("", !0),
|
|
158
|
-
|
|
159
|
-
|
|
158
|
+
}, null, 8, ["style", "options", "value", "disabled", "get-popup-container"])) : K("", !0),
|
|
159
|
+
d(n(J), M(
|
|
160
|
+
n(D)(l, [
|
|
160
161
|
"style",
|
|
161
162
|
"value",
|
|
162
163
|
"onUpdate:value",
|
|
@@ -166,7 +167,7 @@ const d = "GROUP_SEARCH_ALL", de = /* @__PURE__ */ O({
|
|
|
166
167
|
]),
|
|
167
168
|
{
|
|
168
169
|
ref_key: "inputRef",
|
|
169
|
-
ref:
|
|
170
|
+
ref: f,
|
|
170
171
|
style: e.inputStyle,
|
|
171
172
|
value: k.value,
|
|
172
173
|
placeholder: _.value,
|
|
@@ -175,8 +176,8 @@ const d = "GROUP_SEARCH_ALL", de = /* @__PURE__ */ O({
|
|
|
175
176
|
}
|
|
176
177
|
), {
|
|
177
178
|
suffix: A(() => [
|
|
178
|
-
|
|
179
|
-
_parent:
|
|
179
|
+
d(Q, {
|
|
180
|
+
_parent: s.value,
|
|
180
181
|
value: x.value,
|
|
181
182
|
disabled: e.disabled,
|
|
182
183
|
"onUpdate:value": F,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),p=require("@aplus-frontend/antdv");require("../../ap-button/index.js");require("./MenuItemGroup.vue.js");require("../../config-provider/index.js");const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),p=require("@aplus-frontend/antdv");require("../../ap-button/index.js");require("./MenuItemGroup.vue.js");require("../../config-provider/index.js");const k=require("@ant-design/icons-vue"),B=require("@aplus-frontend/hooks"),q=require("../../ap-table/context.js"),C=require("../../config-provider/hooks/use-namespace.js"),L=require("../../config-provider/hooks/use-locale.js"),N=require("../../config-provider/hooks/use-global-config.js"),m=require("./MenuItemGroup.vue2.js"),x=require("../../ap-button/ap-button.vue.js"),A=e.defineComponent({__name:"ApBatchActionGroup",props:{selectedRows:{},buttonProps:{},menuList:{}},setup(v,{expose:b}){const{b:l}=C.useNamespace("ap-batch-action-group"),{t:f}=L.useLocale(),{columns:_,dataSource:h}=q.useInjectApTable(),t=v,y=N.useGlobalConfig("uiMode"),{hasPermission:w}=B.usePermission(),c=e.computed(()=>{var o;return((o=t==null?void 0:t.buttonProps)==null?void 0:o.dropdownType)||"default"}),n=e.computed(()=>{var o;return((o=t==null?void 0:t.buttonProps)==null?void 0:o.type)||"borderLink"}),d=e.computed(()=>{var o;return((o=t==null?void 0:t.buttonProps)==null?void 0:o.content)||f("ap.apApBatchActionGroup.batchOperation")}),P=e.computed(()=>(t==null?void 0:t.selectedRows)||[]),s=e.computed(()=>{var o;return((o=t==null?void 0:t.buttonProps)==null?void 0:o.disabled)??(Array.isArray(t.selectedRows)?P.value.length===0:!1)}),g=e.computed(()=>{const o={aplus:"#0070FF",admin:"#34b77c"};return n.value==="borderLink"?s.value?void 0:o[y.value]||o.aplus:void 0}),r=e.computed(()=>{var o;return((o=t==null?void 0:t.menuList)==null?void 0:o.filter(u=>{let a=u==null?void 0:u.ifShow;return!(u!=null&&u.ifShow)&&(u!=null&&u.auth)&&(a=()=>w(u.auth)),(a==null?void 0:a())??!0}))||[]});function i(){return t!=null&&t.buttonProps?{...t.buttonProps,type:n.value==="borderLink"?"default":n.value}:{}}return b({columns:_,dataSource:h}),(o,u)=>r.value.length&&c.value==="dropdown"?(e.openBlock(),e.createBlock(e.unref(p.DropdownButton),e.mergeProps({key:0,class:[e.unref(l)()]},{...o.$attrs,...i(),disabled:s.value}),{overlay:e.withCtx(()=>[e.createVNode(m.default,e.mergeProps({...t},{"menu-list":r.value}),null,16,["menu-list"])]),default:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle({color:g.value})},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.h("span",[d.value]))))],4)]),_:1},16,["class"])):r.value.length&&c.value==="default"?(e.openBlock(),e.createBlock(e.unref(p.Dropdown),{key:1,class:e.normalizeClass([e.unref(l)()]),disabled:s.value},{overlay:e.withCtx(()=>[e.createVNode(m.default,e.mergeProps({...t},{"menu-list":r.value}),null,16,["menu-list"])]),default:e.withCtx(()=>[e.createVNode(e.unref(x.default),e.normalizeProps(e.guardReactiveProps({...o.$attrs,...i(),type:n.value})),{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.h("span",[d.value])))),e.createVNode(e.unref(k.DownOutlined))]),_:1},16)]),_:1},8,["class","disabled"])):e.createCommentVNode("",!0)}});exports.default=A;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CreateComponentPublicInstanceWithMixins, ExtractPropTypes, PropType, CSSProperties, ComputedRef, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, ComponentOptionsBase, VNodeProps, AllowedComponentProps, ComponentCustomProps, Plugin } from 'vue';
|
|
1
|
+
import { CreateComponentPublicInstanceWithMixins, ExtractPropTypes, PropType, VNodeChild, CSSProperties, ComputedRef, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, ComponentOptionsBase, VNodeProps, AllowedComponentProps, ComponentCustomProps, Plugin } from 'vue';
|
|
2
2
|
import { ButtonType, ButtonShape, ButtonSize } from '@aplus-frontend/antdv/es/button';
|
|
3
3
|
import { ButtonHTMLType } from '@aplus-frontend/antdv/es/button/buttonTypes';
|
|
4
4
|
import { VueTypeValidableDef } from '../../../node_modules/vue-types';
|
|
@@ -69,7 +69,7 @@ declare const ApBatchActionGroup: {
|
|
|
69
69
|
lazy?: boolean | number;
|
|
70
70
|
onClick?: () => any | Promise<any>;
|
|
71
71
|
} & {
|
|
72
|
-
content?:
|
|
72
|
+
content?: VNodeChild;
|
|
73
73
|
}) | ({
|
|
74
74
|
dropdownType?: "dropdown" | undefined;
|
|
75
75
|
} & Omit<Partial< ExtractPropTypes<{
|
|
@@ -299,7 +299,7 @@ declare const ApBatchActionGroup: {
|
|
|
299
299
|
};
|
|
300
300
|
}>>, "type"> & {
|
|
301
301
|
type?: ButtonType | "borderLink" | undefined;
|
|
302
|
-
content?:
|
|
302
|
+
content?: VNodeChild;
|
|
303
303
|
}) | undefined;
|
|
304
304
|
menuList?: ApBatchActionGroupMenuProps<any>[] | undefined;
|
|
305
305
|
}> & Readonly<{}>, {
|
|
@@ -370,7 +370,7 @@ declare const ApBatchActionGroup: {
|
|
|
370
370
|
lazy?: boolean | number;
|
|
371
371
|
onClick?: () => any | Promise<any>;
|
|
372
372
|
} & {
|
|
373
|
-
content?:
|
|
373
|
+
content?: VNodeChild;
|
|
374
374
|
}) | ({
|
|
375
375
|
dropdownType?: "dropdown" | undefined;
|
|
376
376
|
} & Omit<Partial< ExtractPropTypes<{
|
|
@@ -600,7 +600,7 @@ declare const ApBatchActionGroup: {
|
|
|
600
600
|
};
|
|
601
601
|
}>>, "type"> & {
|
|
602
602
|
type?: ButtonType | "borderLink" | undefined;
|
|
603
|
-
content?:
|
|
603
|
+
content?: VNodeChild;
|
|
604
604
|
}) | undefined;
|
|
605
605
|
menuList?: ApBatchActionGroupMenuProps<any>[] | undefined;
|
|
606
606
|
}> & Readonly<{}>, {
|
|
@@ -668,7 +668,7 @@ declare const ApBatchActionGroup: {
|
|
|
668
668
|
lazy?: boolean | number;
|
|
669
669
|
onClick?: () => any | Promise<any>;
|
|
670
670
|
} & {
|
|
671
|
-
content?:
|
|
671
|
+
content?: VNodeChild;
|
|
672
672
|
}) | ({
|
|
673
673
|
dropdownType?: "dropdown" | undefined;
|
|
674
674
|
} & Omit<Partial< ExtractPropTypes<{
|
|
@@ -898,7 +898,7 @@ declare const ApBatchActionGroup: {
|
|
|
898
898
|
};
|
|
899
899
|
}>>, "type"> & {
|
|
900
900
|
type?: ButtonType | "borderLink" | undefined;
|
|
901
|
-
content?:
|
|
901
|
+
content?: VNodeChild;
|
|
902
902
|
}) | undefined;
|
|
903
903
|
menuList?: ApBatchActionGroupMenuProps<any>[] | undefined;
|
|
904
904
|
}> & Readonly<{}>, {
|
|
@@ -6,11 +6,11 @@ import { ColumnType } from '@aplus-frontend/antdv/es/table';
|
|
|
6
6
|
type ApBatchActionGroupButtonType = ButtonProps['type'] | 'borderLink';
|
|
7
7
|
type MixinButton<T> = Omit<T, 'type'> & {
|
|
8
8
|
type?: ApBatchActionGroupButtonType;
|
|
9
|
-
content?:
|
|
9
|
+
content?: VNodeChild;
|
|
10
10
|
};
|
|
11
11
|
interface ApBatchActionGroupTypeProps {
|
|
12
12
|
default: ApButtonProps & {
|
|
13
|
-
content?:
|
|
13
|
+
content?: VNodeChild;
|
|
14
14
|
};
|
|
15
15
|
dropdown: MixinButton<DropdownButtonProps>;
|
|
16
16
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue");require("../../ap-field/index.js");const k=require("@aplus-frontend/antdv");require("../../config-provider/index.js");const R=require("lodash-unified");require("./popover-input/index.vue.js");require("../../hooks/index.js");const j=require("../../utils/index.js"),L=require("../../ap-field/hooks/use-default-placeholder.js"),O=require("../../hooks/useControllableValue.js"),P=require("../../config-provider/hooks/use-locale.js"),E=require("../../ap-field/select/index.vue.js"),F=require("../../ap-field/text/index.js"),T=require("./popover-input/index.vue2.js"),
|
|
2
|
-
`):""}),q=t.computed(()=>{var n;const e=(n=t.unref(u))==null?void 0:n.key;if(e!=null&&e.length)return e.length===1?e[0]:
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue");require("../../ap-field/index.js");const k=require("@aplus-frontend/antdv");require("../../config-provider/index.js");const R=require("lodash-unified");require("./popover-input/index.vue.js");require("../../hooks/index.js");const j=require("../../utils/index.js"),L=require("../../ap-field/hooks/use-default-placeholder.js"),O=require("../../hooks/useControllableValue.js"),P=require("../../config-provider/hooks/use-locale.js"),E=require("../../ap-field/select/index.vue.js"),F=require("../../ap-field/text/index.js"),T=require("./popover-input/index.vue2.js"),p="GROUP_SEARCH_ALL",M=t.defineComponent({__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":{},mode:{default:"edit"},class:{},id:{},placeholder:{},autocomplete:{},type:{default:"text"},name:{},size:{},autofocus:{type:Boolean},lazy:{type:Boolean,default:!0},maxlength:{},loading:{type:Boolean},bordered:{type:Boolean,default:!0},showCount:{type:[Boolean,Object]},htmlSize:{},onPressEnter:{},onKeydown:{},onKeyup:{},onMousedown:{},onMouseUp:{},onFocus:{},onBlur:{},onChange:{},onInput:{},onRawInput:{},onCompositionstart:{},onCompositionend:{},valueModifiers:{},hidden:{type:Boolean},status:{},defaultValue:{},inputElement:{},prefixCls:{},disabled:{type:Boolean},focused:{type:Boolean},triggerFocus:{},readonly:{type:Boolean},handleReset:{},addonBefore:{},addonAfter:{},prefix:{},suffix:{},clearIcon:{},allowClear:{type:Boolean,default:!0},emptyText:{default:"--"}},emits:["update:value"],setup(m,{emit:h}){const l=m,g=L.useDefaultPlaceholder("Text",l),B=h,{value:u,updateValue:r}=O.useControllableValue(l,B),i=t.ref(),d=t.ref(),{t:_}=P.useLocale(),b=t.computed(()=>l.options?l.options.length>1&&l.hasAll?[{value:p,label:_("ap.apGroupSearch.all")},...l.options]:l.options:[]),V=t.computed(()=>l.options?l.options.map(e=>e.value):[]),A=t.computed(()=>{var e,n;return(n=(e=t.unref(u))==null?void 0:e.value)!=null&&n.length?t.unref(u).value.join(","):""}),C=t.computed(()=>{var e,n;return(n=(e=t.unref(u))==null?void 0:e.value)!=null&&n.length?t.unref(u).value.join(`
|
|
2
|
+
`):""}),q=t.computed(()=>{var n;const e=(n=t.unref(u))==null?void 0:n.key;if(e!=null&&e.length)return e.length===1?e[0]:p}),S=t.computed(()=>{var o;const e=(o=t.unref(u))==null?void 0:o.key;return!e||(e==null?void 0:e.length)<=1?t.unref(g):(l.options||[]).filter(a=>e.includes(a.value)).map(a=>a.label).join("/")});function x(e){const n=t.unref(u)||{},o=e===p?t.unref(V):j.isDef(e)?[e]:[];r({...n,key:o})}function U(e){var f,v;const n=t.unref(u)||{},o=e.target.value||"",a=o.replace(/[,]+/g,",");if(o!==a){const y=(v=(f=d.value)==null?void 0:f.$el)==null?void 0:v.querySelector("input");y&&(y.value=a)}let s=a.split(",");s.length===1&&s[0]===""&&(s=[]),r({...n,value:s})}function w(e){const n=t.unref(u)||{};let o=e.split(/,|\n/);r({...n,value:o})}function c(){var o;const e=t.unref(u)||{},n=(o=e.value)==null?void 0:o.filter(Boolean);r({...e,value:n})}function I(e){var n;c(),(n=l.onBlur)==null||n.call(l,e)}return(e,n)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"containerRef",ref:i,style:{position:"relative"},onFocus:n[0]||(n[0]=(...o)=>e.onFocus&&e.onFocus(...o)),onBlur:n[1]||(n[1]=(...o)=>e.onBlur&&e.onBlur(...o))},[t.createVNode(t.unref(k.Space).Compact,{block:""},{default:t.withCtx(()=>{var o;return[(o=e.options)!=null&&o.length?(t.openBlock(),t.createBlock(t.unref(E.default),{key:0,style:t.normalizeStyle(e.style),options:b.value,value:q.value,"allow-clear":!1,"dropdown-match-select-width":!1,disabled:e.disabled,"get-popup-container":()=>i.value,"onUpdate:value":x},null,8,["style","options","value","disabled","get-popup-container"])):t.createCommentVNode("",!0),t.createVNode(t.unref(F.ApFieldText),t.mergeProps(t.unref(R.omit)(l,["style","value","onUpdate:value","inputStyle","hasAll","options"]),{ref_key:"inputRef",ref:d,style:e.inputStyle,value:A.value,placeholder:S.value,onInput:U,onBlur:I}),{suffix:t.withCtx(()=>[t.createVNode(T.default,{_parent:i.value,value:C.value,disabled:e.disabled,"onUpdate:value":w,onClose:c},null,8,["_parent","value","disabled"])]),_:1},16,["style","value","placeholder"])]}),_:1})],544))}});exports.default=M;
|
package/package.json
CHANGED
|
@@ -450,11 +450,11 @@
|
|
|
450
450
|
top: 0;
|
|
451
451
|
inset-inline-start: 0;
|
|
452
452
|
cursor: pointer;
|
|
453
|
-
background-color: var(--aplus-scroll-bar-track-color,
|
|
453
|
+
background-color: var(--aplus-scroll-bar-track-color, #F2F2F2);
|
|
454
454
|
}
|
|
455
455
|
.aplus-scroll-bar__track--disabled {
|
|
456
456
|
pointer-events: none;
|
|
457
|
-
background-color:
|
|
457
|
+
background-color: #FAFAFA;
|
|
458
458
|
}
|
|
459
459
|
.aplus-scroll-bar__track--hidden {
|
|
460
460
|
pointer-events: none;
|
|
@@ -450,11 +450,11 @@
|
|
|
450
450
|
top: 0;
|
|
451
451
|
inset-inline-start: 0;
|
|
452
452
|
cursor: pointer;
|
|
453
|
-
background-color: var(--aplus-scroll-bar-track-color,
|
|
453
|
+
background-color: var(--aplus-scroll-bar-track-color, #F2F2F2);
|
|
454
454
|
}
|
|
455
455
|
.aplus-scroll-bar__track--disabled {
|
|
456
456
|
pointer-events: none;
|
|
457
|
-
background-color:
|
|
457
|
+
background-color: #FAFAFA;
|
|
458
458
|
}
|
|
459
459
|
.aplus-scroll-bar__track--hidden {
|
|
460
460
|
pointer-events: none;
|
package/theme/index.css
CHANGED
|
@@ -1780,11 +1780,11 @@ div.aplus-ap-info-layout-admin__header-shadow.aplus-ap-info-layout-admin__sticky
|
|
|
1780
1780
|
top: 0;
|
|
1781
1781
|
inset-inline-start: 0;
|
|
1782
1782
|
cursor: pointer;
|
|
1783
|
-
background-color: var(--aplus-scroll-bar-track-color,
|
|
1783
|
+
background-color: var(--aplus-scroll-bar-track-color, #F2F2F2);
|
|
1784
1784
|
}
|
|
1785
1785
|
.aplus-scroll-bar__track--disabled {
|
|
1786
1786
|
pointer-events: none;
|
|
1787
|
-
background-color:
|
|
1787
|
+
background-color: #FAFAFA;
|
|
1788
1788
|
}
|
|
1789
1789
|
.aplus-scroll-bar__track--hidden {
|
|
1790
1790
|
pointer-events: none;
|
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
top: 0;
|
|
17
17
|
inset-inline-start: 0;
|
|
18
18
|
cursor: pointer;
|
|
19
|
-
background-color: var(--aplus-scroll-bar-track-color,
|
|
19
|
+
background-color: var(--aplus-scroll-bar-track-color, #F2F2F2);
|
|
20
20
|
}
|
|
21
21
|
.aplus-scroll-bar__track--disabled {
|
|
22
22
|
pointer-events: none;
|
|
23
|
-
background-color:
|
|
23
|
+
background-color: #FAFAFA;
|
|
24
24
|
}
|
|
25
25
|
.aplus-scroll-bar__track--hidden {
|
|
26
26
|
pointer-events: none;
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
top: 0;
|
|
28
28
|
inset-inline-start: 0;
|
|
29
29
|
cursor: pointer;
|
|
30
|
-
background-color: var(@tc,
|
|
30
|
+
background-color: var(@tc, #F2F2F2);
|
|
31
31
|
&--disabled {
|
|
32
32
|
pointer-events: none;
|
|
33
|
-
background-color:
|
|
33
|
+
background-color: #FAFAFA;
|
|
34
34
|
}
|
|
35
35
|
&--hidden {
|
|
36
36
|
pointer-events: none;
|