@aplus-frontend/ui 0.2.27 → 0.2.29
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-field/number/index.vue.d.ts +8 -8
- package/es/src/ap-field/select/index.vue.mjs +10 -10
- package/es/src/ap-field/text/index.vue2.mjs +23 -20
- package/es/src/ap-field/text/password.vue.mjs +19 -16
- package/es/src/ap-field/text-area/index.vue.mjs +7 -4
- package/es/src/ap-form/items/text/index.vue.d.ts +30 -0
- package/es/src/ap-form/items/text/password.vue.d.ts +30 -0
- package/es/src/ap-form/items/text-area/index.vue.d.ts +27 -0
- package/es/src/ap-form/search-form/index.vue.mjs +77 -77
- package/es/src/ap-form/search-form/utils.d.ts +1 -0
- package/es/src/ap-form/search-form/utils.mjs +18 -11
- package/es/src/ap-table/constants.d.ts +90 -0
- package/es/src/business/ap-export-group/ApExportGroup.vue.d.ts +15 -1
- package/es/src/business/ap-export-group/ApExportGroup.vue2.mjs +57 -56
- package/es/src/business/ap-export-group/index.d.ts +57 -35
- package/es/src/business/ap-export-group/interface.d.ts +1 -0
- package/es/src/business/ap-summary/ap-summary.vue2.mjs +5 -5
- package/es/src/business/batch-input-group/index.vue.mjs +35 -32
- package/es/src/locale/lang/en.mjs +2 -1
- package/es/src/locale/lang/zh-cn.mjs +2 -1
- package/lib/src/ap-field/number/index.vue.d.ts +8 -8
- package/lib/src/ap-field/select/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-field/text-area/index.vue.js +1 -1
- package/lib/src/ap-form/items/text/index.vue.d.ts +30 -0
- package/lib/src/ap-form/items/text/password.vue.d.ts +30 -0
- package/lib/src/ap-form/items/text-area/index.vue.d.ts +27 -0
- package/lib/src/ap-form/search-form/index.vue.js +1 -1
- package/lib/src/ap-form/search-form/utils.d.ts +1 -0
- package/lib/src/ap-form/search-form/utils.js +1 -1
- package/lib/src/ap-table/constants.d.ts +90 -0
- package/lib/src/business/ap-export-group/ApExportGroup.vue.d.ts +15 -1
- package/lib/src/business/ap-export-group/ApExportGroup.vue2.js +1 -1
- package/lib/src/business/ap-export-group/index.d.ts +57 -35
- package/lib/src/business/ap-export-group/interface.d.ts +1 -0
- package/lib/src/business/ap-summary/ap-summary.vue2.js +1 -1
- package/lib/src/business/batch-input-group/index.vue.js +2 -2
- package/lib/src/locale/lang/en.js +1 -1
- package/lib/src/locale/lang/zh-cn.js +1 -1
- package/package.json +5 -5
|
@@ -1,84 +1,85 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { DownOutlined as
|
|
3
|
-
import { Dropdown as
|
|
1
|
+
import { defineComponent as B, computed as l, ref as D, openBlock as m, createBlock as f, unref as a, normalizeClass as K, withCtx as s, createVNode as y, createTextVNode as g, toDisplayString as x, mergeProps as R, createCommentVNode as N } from "vue";
|
|
2
|
+
import { DownOutlined as T } from "@ant-design/icons-vue";
|
|
3
|
+
import { message as I, Dropdown as V, Menu as q, MenuItem as M, Button as F } from "@aplus-frontend/antdv";
|
|
4
4
|
import "../../config-provider/index.mjs";
|
|
5
|
-
import { ApExportGroupActionType as
|
|
6
|
-
import { usePermission as
|
|
7
|
-
import { handleExportDownload as
|
|
8
|
-
import { useNamespace as
|
|
9
|
-
import { useLocale as
|
|
10
|
-
import { useGlobalConfig as
|
|
11
|
-
const
|
|
5
|
+
import { ApExportGroupActionType as i } from "./interface.mjs";
|
|
6
|
+
import { usePermission as z } from "@aplus-frontend/hooks";
|
|
7
|
+
import { handleExportDownload as O } from "./handleExportDownload.mjs";
|
|
8
|
+
import { useNamespace as $ } from "../../config-provider/hooks/use-namespace.mjs";
|
|
9
|
+
import { useLocale as j } from "../../config-provider/hooks/use-locale.mjs";
|
|
10
|
+
import { useGlobalConfig as H } from "../../config-provider/hooks/use-global-config.mjs";
|
|
11
|
+
const oe = /* @__PURE__ */ B({
|
|
12
12
|
__name: "ApExportGroup",
|
|
13
13
|
props: {
|
|
14
14
|
selectedRowKeys: {},
|
|
15
15
|
disabled: { type: Boolean },
|
|
16
16
|
auth: {},
|
|
17
|
-
ifShow: {
|
|
17
|
+
ifShow: {},
|
|
18
18
|
text: {},
|
|
19
19
|
idKey: {},
|
|
20
|
-
request: {
|
|
21
|
-
getRequestParams: {
|
|
22
|
-
getInitialParams: {
|
|
23
|
-
beforeRequest: {
|
|
20
|
+
request: {},
|
|
21
|
+
getRequestParams: {},
|
|
22
|
+
getInitialParams: {},
|
|
23
|
+
beforeRequest: {},
|
|
24
|
+
successMessage: { type: [Boolean, String], default: !1 }
|
|
24
25
|
},
|
|
25
|
-
setup(
|
|
26
|
-
const { hasPermission:
|
|
26
|
+
setup(E) {
|
|
27
|
+
const { hasPermission: C } = z(), e = E, { b: S } = $("ap-export-group"), { t: n } = j(), _ = H("uiMode"), L = l(() => {
|
|
27
28
|
const t = {
|
|
28
29
|
aplus: "#0070FF",
|
|
29
30
|
admin: "#34b77c"
|
|
30
31
|
};
|
|
31
|
-
return b.value ? "" : t[
|
|
32
|
-
}), b =
|
|
32
|
+
return b.value ? "" : t[_.value] || t.aplus;
|
|
33
|
+
}), b = l(() => !!(e != null && e.disabled)), A = l(() => (e == null ? void 0 : e.successMessage) === !0 ? n("ap.apExportGroup.exportSuccess") : e != null && e.successMessage ? e.successMessage : ""), G = {
|
|
33
34
|
textAlign: "center"
|
|
34
|
-
},
|
|
35
|
+
}, c = D(!1), w = l(() => (e == null ? void 0 : e.selectedRowKeys) || []), P = l(() => {
|
|
35
36
|
let t = e == null ? void 0 : e.ifShow;
|
|
36
|
-
return !(e != null && e.ifShow) && (e != null && e.auth) && (t = () =>
|
|
37
|
+
return !(e != null && e.ifShow) && (e != null && e.auth) && (t = () => C(e.auth)), (t == null ? void 0 : t()) ?? !0;
|
|
37
38
|
});
|
|
38
|
-
async function
|
|
39
|
-
var
|
|
40
|
-
const { getRequestParams:
|
|
39
|
+
async function k({ key: t }) {
|
|
40
|
+
var v, h;
|
|
41
|
+
const { getRequestParams: u, request: o } = e || {};
|
|
41
42
|
let d = {};
|
|
42
|
-
t ===
|
|
43
|
+
t === i.SELECT ? d = {
|
|
43
44
|
[(e == null ? void 0 : e.idKey) || "ids"]: w.value
|
|
44
|
-
} : t ===
|
|
45
|
-
const
|
|
45
|
+
} : t === i.ALL && (d = (u == null ? void 0 : u()) || {});
|
|
46
|
+
const p = ((v = e == null ? void 0 : e.getInitialParams) == null ? void 0 : v.call(e)) || {};
|
|
46
47
|
try {
|
|
47
|
-
|
|
48
|
+
c.value = !0;
|
|
48
49
|
let r = {
|
|
49
50
|
...d,
|
|
50
|
-
...
|
|
51
|
+
...p
|
|
51
52
|
};
|
|
52
|
-
r = ((
|
|
53
|
+
r = ((h = e == null ? void 0 : e.beforeRequest) == null ? void 0 : h.call(e, r)) || r, await O(async () => await (o == null ? void 0 : o(r))), e != null && e.successMessage && I.success(A.value);
|
|
53
54
|
} finally {
|
|
54
|
-
|
|
55
|
+
c.value = !1;
|
|
55
56
|
}
|
|
56
57
|
}
|
|
57
|
-
return (t,
|
|
58
|
+
return (t, u) => P.value ? (m(), f(a(V), {
|
|
58
59
|
key: 0,
|
|
59
|
-
class:
|
|
60
|
-
overlayStyle:
|
|
60
|
+
class: K([a(S)()]),
|
|
61
|
+
overlayStyle: G,
|
|
61
62
|
disabled: b.value
|
|
62
63
|
}, {
|
|
63
|
-
overlay:
|
|
64
|
-
y(
|
|
65
|
-
default:
|
|
66
|
-
var
|
|
64
|
+
overlay: s(() => [
|
|
65
|
+
y(a(q), { onClick: k }, {
|
|
66
|
+
default: s(() => {
|
|
67
|
+
var o;
|
|
67
68
|
return [
|
|
68
|
-
(m(), f(
|
|
69
|
-
key:
|
|
70
|
-
disabled: ((
|
|
69
|
+
(m(), f(a(M), {
|
|
70
|
+
key: a(i).SELECT,
|
|
71
|
+
disabled: ((o = w.value) == null ? void 0 : o.length) === 0
|
|
71
72
|
}, {
|
|
72
|
-
default:
|
|
73
|
-
|
|
73
|
+
default: s(() => [
|
|
74
|
+
g(x(a(n)("ap.apExportGroup.exportSelected")), 1)
|
|
74
75
|
]),
|
|
75
76
|
_: 1
|
|
76
77
|
}, 8, ["disabled"])),
|
|
77
|
-
(m(), f(
|
|
78
|
-
key:
|
|
78
|
+
(m(), f(a(M), {
|
|
79
|
+
key: a(i).ALL
|
|
79
80
|
}, {
|
|
80
|
-
default:
|
|
81
|
-
|
|
81
|
+
default: s(() => [
|
|
82
|
+
g(x(a(n)("ap.apExportGroup.exportAll")), 1)
|
|
82
83
|
]),
|
|
83
84
|
_: 1
|
|
84
85
|
}))
|
|
@@ -87,26 +88,26 @@ const te = /* @__PURE__ */ G({
|
|
|
87
88
|
_: 1
|
|
88
89
|
})
|
|
89
90
|
]),
|
|
90
|
-
default:
|
|
91
|
-
y(
|
|
91
|
+
default: s(() => [
|
|
92
|
+
y(a(F), R({
|
|
92
93
|
...t.$attrs
|
|
93
94
|
}, {
|
|
94
95
|
style: {
|
|
95
|
-
color:
|
|
96
|
+
color: L.value
|
|
96
97
|
},
|
|
97
|
-
loading:
|
|
98
|
+
loading: c.value
|
|
98
99
|
}), {
|
|
99
|
-
default:
|
|
100
|
-
|
|
101
|
-
y(
|
|
100
|
+
default: s(() => [
|
|
101
|
+
g(x((e == null ? void 0 : e.text) ?? a(n)("ap.apExportGroup.export")) + " ", 1),
|
|
102
|
+
y(a(T))
|
|
102
103
|
]),
|
|
103
104
|
_: 1
|
|
104
105
|
}, 16, ["style", "loading"])
|
|
105
106
|
]),
|
|
106
107
|
_: 1
|
|
107
|
-
}, 8, ["class", "disabled"])) :
|
|
108
|
+
}, 8, ["class", "disabled"])) : N("", !0);
|
|
108
109
|
}
|
|
109
110
|
});
|
|
110
111
|
export {
|
|
111
|
-
|
|
112
|
+
oe as default
|
|
112
113
|
};
|
|
@@ -3,27 +3,27 @@ import { CreateComponentPublicInstance, ExtractPropTypes, PropType, ComponentOpt
|
|
|
3
3
|
export * from './interface';
|
|
4
4
|
declare const ApExportGroup: {
|
|
5
5
|
new (...args: any[]): CreateComponentPublicInstance<Readonly< ExtractPropTypes<{
|
|
6
|
-
|
|
7
|
-
type: PropType<
|
|
6
|
+
text: {
|
|
7
|
+
type: PropType<string>;
|
|
8
8
|
};
|
|
9
9
|
disabled: {
|
|
10
10
|
type: PropType<boolean>;
|
|
11
11
|
};
|
|
12
|
-
|
|
13
|
-
type: PropType<
|
|
12
|
+
request: {
|
|
13
|
+
type: PropType<(key: any) => Promise<any>>;
|
|
14
|
+
};
|
|
15
|
+
selectedRowKeys: {
|
|
16
|
+
type: PropType<any[]>;
|
|
14
17
|
};
|
|
15
18
|
ifShow: {
|
|
16
19
|
type: PropType<() => boolean>;
|
|
17
20
|
};
|
|
18
|
-
|
|
21
|
+
auth: {
|
|
19
22
|
type: PropType<string>;
|
|
20
23
|
};
|
|
21
24
|
idKey: {
|
|
22
25
|
type: PropType<string>;
|
|
23
26
|
};
|
|
24
|
-
request: {
|
|
25
|
-
type: PropType<(key: any) => Promise<any>>;
|
|
26
|
-
};
|
|
27
27
|
getRequestParams: {
|
|
28
28
|
type: PropType<() => Record<string, any>>;
|
|
29
29
|
};
|
|
@@ -33,28 +33,32 @@ declare const ApExportGroup: {
|
|
|
33
33
|
beforeRequest: {
|
|
34
34
|
type: PropType<(params: any) => Record<string, any>>;
|
|
35
35
|
};
|
|
36
|
+
successMessage: {
|
|
37
|
+
type: PropType<string | boolean>;
|
|
38
|
+
default: boolean;
|
|
39
|
+
};
|
|
36
40
|
}>>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, VNodeProps & AllowedComponentProps & ComponentCustomProps & Readonly< ExtractPropTypes<{
|
|
37
|
-
|
|
38
|
-
type: PropType<
|
|
41
|
+
text: {
|
|
42
|
+
type: PropType<string>;
|
|
39
43
|
};
|
|
40
44
|
disabled: {
|
|
41
45
|
type: PropType<boolean>;
|
|
42
46
|
};
|
|
43
|
-
|
|
44
|
-
type: PropType<
|
|
47
|
+
request: {
|
|
48
|
+
type: PropType<(key: any) => Promise<any>>;
|
|
49
|
+
};
|
|
50
|
+
selectedRowKeys: {
|
|
51
|
+
type: PropType<any[]>;
|
|
45
52
|
};
|
|
46
53
|
ifShow: {
|
|
47
54
|
type: PropType<() => boolean>;
|
|
48
55
|
};
|
|
49
|
-
|
|
56
|
+
auth: {
|
|
50
57
|
type: PropType<string>;
|
|
51
58
|
};
|
|
52
59
|
idKey: {
|
|
53
60
|
type: PropType<string>;
|
|
54
61
|
};
|
|
55
|
-
request: {
|
|
56
|
-
type: PropType<(key: any) => Promise<any>>;
|
|
57
|
-
};
|
|
58
62
|
getRequestParams: {
|
|
59
63
|
type: PropType<() => Record<string, any>>;
|
|
60
64
|
};
|
|
@@ -64,7 +68,13 @@ declare const ApExportGroup: {
|
|
|
64
68
|
beforeRequest: {
|
|
65
69
|
type: PropType<(params: any) => Record<string, any>>;
|
|
66
70
|
};
|
|
67
|
-
|
|
71
|
+
successMessage: {
|
|
72
|
+
type: PropType<string | boolean>;
|
|
73
|
+
default: boolean;
|
|
74
|
+
};
|
|
75
|
+
}>>, {
|
|
76
|
+
successMessage: boolean | string;
|
|
77
|
+
}, true, {}, {}, {
|
|
68
78
|
P: {};
|
|
69
79
|
B: {};
|
|
70
80
|
D: {};
|
|
@@ -72,27 +82,27 @@ declare const ApExportGroup: {
|
|
|
72
82
|
M: {};
|
|
73
83
|
Defaults: {};
|
|
74
84
|
}, Readonly< ExtractPropTypes<{
|
|
75
|
-
|
|
76
|
-
type: PropType<
|
|
85
|
+
text: {
|
|
86
|
+
type: PropType<string>;
|
|
77
87
|
};
|
|
78
88
|
disabled: {
|
|
79
89
|
type: PropType<boolean>;
|
|
80
90
|
};
|
|
81
|
-
|
|
82
|
-
type: PropType<
|
|
91
|
+
request: {
|
|
92
|
+
type: PropType<(key: any) => Promise<any>>;
|
|
93
|
+
};
|
|
94
|
+
selectedRowKeys: {
|
|
95
|
+
type: PropType<any[]>;
|
|
83
96
|
};
|
|
84
97
|
ifShow: {
|
|
85
98
|
type: PropType<() => boolean>;
|
|
86
99
|
};
|
|
87
|
-
|
|
100
|
+
auth: {
|
|
88
101
|
type: PropType<string>;
|
|
89
102
|
};
|
|
90
103
|
idKey: {
|
|
91
104
|
type: PropType<string>;
|
|
92
105
|
};
|
|
93
|
-
request: {
|
|
94
|
-
type: PropType<(key: any) => Promise<any>>;
|
|
95
|
-
};
|
|
96
106
|
getRequestParams: {
|
|
97
107
|
type: PropType<() => Record<string, any>>;
|
|
98
108
|
};
|
|
@@ -102,32 +112,38 @@ declare const ApExportGroup: {
|
|
|
102
112
|
beforeRequest: {
|
|
103
113
|
type: PropType<(params: any) => Record<string, any>>;
|
|
104
114
|
};
|
|
105
|
-
|
|
115
|
+
successMessage: {
|
|
116
|
+
type: PropType<string | boolean>;
|
|
117
|
+
default: boolean;
|
|
118
|
+
};
|
|
119
|
+
}>>, {}, {}, {}, {}, {
|
|
120
|
+
successMessage: boolean | string;
|
|
121
|
+
}>;
|
|
106
122
|
__isFragment?: never;
|
|
107
123
|
__isTeleport?: never;
|
|
108
124
|
__isSuspense?: never;
|
|
109
125
|
} & ComponentOptionsBase<Readonly< ExtractPropTypes<{
|
|
110
|
-
|
|
111
|
-
type: PropType<
|
|
126
|
+
text: {
|
|
127
|
+
type: PropType<string>;
|
|
112
128
|
};
|
|
113
129
|
disabled: {
|
|
114
130
|
type: PropType<boolean>;
|
|
115
131
|
};
|
|
116
|
-
|
|
117
|
-
type: PropType<
|
|
132
|
+
request: {
|
|
133
|
+
type: PropType<(key: any) => Promise<any>>;
|
|
134
|
+
};
|
|
135
|
+
selectedRowKeys: {
|
|
136
|
+
type: PropType<any[]>;
|
|
118
137
|
};
|
|
119
138
|
ifShow: {
|
|
120
139
|
type: PropType<() => boolean>;
|
|
121
140
|
};
|
|
122
|
-
|
|
141
|
+
auth: {
|
|
123
142
|
type: PropType<string>;
|
|
124
143
|
};
|
|
125
144
|
idKey: {
|
|
126
145
|
type: PropType<string>;
|
|
127
146
|
};
|
|
128
|
-
request: {
|
|
129
|
-
type: PropType<(key: any) => Promise<any>>;
|
|
130
|
-
};
|
|
131
147
|
getRequestParams: {
|
|
132
148
|
type: PropType<() => Record<string, any>>;
|
|
133
149
|
};
|
|
@@ -137,7 +153,13 @@ declare const ApExportGroup: {
|
|
|
137
153
|
beforeRequest: {
|
|
138
154
|
type: PropType<(params: any) => Record<string, any>>;
|
|
139
155
|
};
|
|
140
|
-
|
|
156
|
+
successMessage: {
|
|
157
|
+
type: PropType<string | boolean>;
|
|
158
|
+
default: boolean;
|
|
159
|
+
};
|
|
160
|
+
}>>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
|
|
161
|
+
successMessage: boolean | string;
|
|
162
|
+
}, {}, string, {}> & VNodeProps & AllowedComponentProps & ComponentCustomProps & ( Plugin & (new (...args: any[]) => {
|
|
141
163
|
$props: {
|
|
142
164
|
onClick?: () => void;
|
|
143
165
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as I, computed as L, createVNode as N, Fragment as y, openBlock as m, createBlock as i, unref as r, normalizeClass as f, withCtx as x, createElementBlock as w, renderList as z, normalizeStyle as B, resolveDynamicComponent as R } from "vue";
|
|
2
2
|
import { isNil as A, get as c } from "lodash-unified";
|
|
3
3
|
import { TableSummaryRow as D, TableSummaryCell as F } from "@aplus-frontend/antdv";
|
|
4
4
|
import { flattenColumns as V, formatDataIndex as u } from "./utils.mjs";
|
|
5
5
|
import "../../config-provider/index.mjs";
|
|
6
6
|
import { isNumeric as E, toThousand as P, toFixed as $ } from "@aplus-frontend/utils";
|
|
7
7
|
import { useNamespace as j } from "../../config-provider/hooks/use-namespace.mjs";
|
|
8
|
-
const Q = /* @__PURE__ */
|
|
8
|
+
const Q = /* @__PURE__ */ I({
|
|
9
9
|
name: "ApSummary",
|
|
10
10
|
__name: "ap-summary",
|
|
11
11
|
props: {
|
|
@@ -25,7 +25,7 @@ const Q = /* @__PURE__ */ v({
|
|
|
25
25
|
setup(k) {
|
|
26
26
|
const n = k, h = (a) => a === 0, T = (a, o) => {
|
|
27
27
|
var s;
|
|
28
|
-
if (!
|
|
28
|
+
if (!E(a) || o.valueType !== "number")
|
|
29
29
|
return a;
|
|
30
30
|
const e = (s = o.fieldProps) == null ? void 0 : s.field, t = (e == null ? void 0 : e.precision) || 0;
|
|
31
31
|
return (A(e == null ? void 0 : e.thousands) ? !0 : e == null ? void 0 : e.thousands) ? P(a, t) : $(a, t);
|
|
@@ -43,11 +43,11 @@ const Q = /* @__PURE__ */ v({
|
|
|
43
43
|
if (h(d))
|
|
44
44
|
s = n.summaryTitle;
|
|
45
45
|
else if (b && (t.customRender || t.renderText)) {
|
|
46
|
-
const p = c(n.data, u(t.dataIndex || t.key)),
|
|
46
|
+
const p = c(n.data, u(t.dataIndex || t.key)), v = u(t.dataIndex || t.key), l = t.customRender || t.renderText;
|
|
47
47
|
s = l == null ? void 0 : l({
|
|
48
48
|
value: p,
|
|
49
49
|
record: {
|
|
50
|
-
[
|
|
50
|
+
[v]: p
|
|
51
51
|
},
|
|
52
52
|
text: void 0,
|
|
53
53
|
index: 0,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as O, ref as B, computed as
|
|
1
|
+
import { defineComponent as O, ref as B, computed as r, unref as n, openBlock as g, createElementBlock as P, createVNode as s, 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
|
-
import { Space as
|
|
3
|
+
import { Space as $ } from "@aplus-frontend/antdv";
|
|
4
4
|
import "../../config-provider/index.mjs";
|
|
5
|
-
import { omit as
|
|
5
|
+
import { omit as D } from "lodash-unified";
|
|
6
6
|
import "./popover-input/index.vue.mjs";
|
|
7
7
|
import "../../hooks/index.mjs";
|
|
8
|
-
import { isDef as
|
|
9
|
-
import { useDefaultPlaceholder as
|
|
10
|
-
import { useControllableValue as
|
|
11
|
-
import { useLocale as
|
|
8
|
+
import { isDef as G } from "../../utils/index.mjs";
|
|
9
|
+
import { useDefaultPlaceholder as N } from "../../ap-field/hooks/use-default-placeholder.mjs";
|
|
10
|
+
import { useControllableValue as q } from "../../hooks/useControllableValue.mjs";
|
|
11
|
+
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";
|
|
@@ -39,10 +39,13 @@ const c = "GROUP_SEARCH_ALL", ce = /* @__PURE__ */ O({
|
|
|
39
39
|
onPressEnter: {},
|
|
40
40
|
onKeydown: {},
|
|
41
41
|
onKeyup: {},
|
|
42
|
+
onMousedown: {},
|
|
43
|
+
onMouseUp: {},
|
|
42
44
|
onFocus: {},
|
|
43
45
|
onBlur: {},
|
|
44
46
|
onChange: {},
|
|
45
47
|
onInput: {},
|
|
48
|
+
onRawInput: {},
|
|
46
49
|
onCompositionstart: {},
|
|
47
50
|
onCompositionend: {},
|
|
48
51
|
valueModifiers: {},
|
|
@@ -66,53 +69,53 @@ const c = "GROUP_SEARCH_ALL", ce = /* @__PURE__ */ O({
|
|
|
66
69
|
},
|
|
67
70
|
emits: ["update:value"],
|
|
68
71
|
setup(V, { emit: C }) {
|
|
69
|
-
const l = V, S =
|
|
72
|
+
const l = V, S = N("Text", l), x = C, { value: a, updateValue: p } = q(
|
|
70
73
|
l,
|
|
71
74
|
x
|
|
72
|
-
), f = B(), d = B(), { t:
|
|
73
|
-
{ value: c, label:
|
|
75
|
+
), f = B(), d = B(), { t: I } = H(), U = r(() => l.options ? l.options.length > 1 && l.hasAll ? [
|
|
76
|
+
{ value: c, label: I("ap.apGroupSearch.all") },
|
|
74
77
|
...l.options
|
|
75
|
-
] : l.options : []),
|
|
78
|
+
] : l.options : []), b = r(() => l.options ? l.options.map((e) => e.value) : []), w = r(() => {
|
|
76
79
|
var e, t;
|
|
77
80
|
return (t = (e = n(a)) == null ? void 0 : e.value) != null && t.length ? n(a).value.join(",") : "";
|
|
78
|
-
}),
|
|
81
|
+
}), _ = r(() => {
|
|
79
82
|
var e, t;
|
|
80
83
|
return (t = (e = n(a)) == null ? void 0 : e.value) != null && t.length ? n(a).value.join(`
|
|
81
84
|
`) : "";
|
|
82
|
-
}),
|
|
85
|
+
}), k = r(() => {
|
|
83
86
|
var t;
|
|
84
87
|
const e = (t = n(a)) == null ? void 0 : t.key;
|
|
85
88
|
if (e != null && e.length)
|
|
86
89
|
return e.length === 1 ? e[0] : c;
|
|
87
|
-
}), R =
|
|
90
|
+
}), R = r(() => {
|
|
88
91
|
var o;
|
|
89
92
|
const e = (o = n(a)) == null ? void 0 : o.key;
|
|
90
|
-
return !e || (e == null ? void 0 : e.length) <= 1 ? n(S) : (l.options || []).filter((
|
|
93
|
+
return !e || (e == null ? void 0 : e.length) <= 1 ? n(S) : (l.options || []).filter((u) => e.includes(u.value)).map((u) => u.label).join("/");
|
|
91
94
|
});
|
|
92
95
|
function j(e) {
|
|
93
|
-
const t = n(a) || {}, o = e === c ? n(
|
|
94
|
-
|
|
96
|
+
const t = n(a) || {}, o = e === c ? n(b) : G(e) ? [e] : [];
|
|
97
|
+
p({
|
|
95
98
|
...t,
|
|
96
99
|
key: o
|
|
97
100
|
});
|
|
98
101
|
}
|
|
99
102
|
function E(e) {
|
|
100
103
|
var v, y;
|
|
101
|
-
const t = n(a) || {}, o = e.target.value || "",
|
|
102
|
-
if (o !==
|
|
104
|
+
const t = n(a) || {}, o = e.target.value || "", u = o.replace(/[,]+/g, ",");
|
|
105
|
+
if (o !== u) {
|
|
103
106
|
const h = (y = (v = d.value) == null ? void 0 : v.$el) == null ? void 0 : y.querySelector("input");
|
|
104
|
-
h && (h.value =
|
|
107
|
+
h && (h.value = u);
|
|
105
108
|
}
|
|
106
|
-
let
|
|
107
|
-
|
|
109
|
+
let i = u.split(",");
|
|
110
|
+
i.length === 1 && i[0] === "" && (i = []), p({
|
|
108
111
|
...t,
|
|
109
|
-
value:
|
|
112
|
+
value: i
|
|
110
113
|
});
|
|
111
114
|
}
|
|
112
115
|
function F(e) {
|
|
113
116
|
const t = n(a) || {};
|
|
114
117
|
let o = e.split(/,|\n/);
|
|
115
|
-
|
|
118
|
+
p({
|
|
116
119
|
...t,
|
|
117
120
|
value: o
|
|
118
121
|
});
|
|
@@ -120,7 +123,7 @@ const c = "GROUP_SEARCH_ALL", ce = /* @__PURE__ */ O({
|
|
|
120
123
|
function m() {
|
|
121
124
|
var o;
|
|
122
125
|
const e = n(a) || {}, t = (o = e.value) == null ? void 0 : o.filter(Boolean);
|
|
123
|
-
|
|
126
|
+
p({
|
|
124
127
|
...e,
|
|
125
128
|
value: t
|
|
126
129
|
});
|
|
@@ -138,22 +141,22 @@ const c = "GROUP_SEARCH_ALL", ce = /* @__PURE__ */ O({
|
|
|
138
141
|
onBlur: t[1] || (t[1] = //@ts-ignore
|
|
139
142
|
(...o) => e.onBlur && e.onBlur(...o))
|
|
140
143
|
}, [
|
|
141
|
-
s(n(
|
|
144
|
+
s(n($).Compact, { block: "" }, {
|
|
142
145
|
default: A(() => {
|
|
143
146
|
var o;
|
|
144
147
|
return [
|
|
145
148
|
(o = e.options) != null && o.length ? (g(), T(n(Y), {
|
|
146
149
|
key: 0,
|
|
147
150
|
style: z(e.style),
|
|
148
|
-
options:
|
|
149
|
-
value:
|
|
151
|
+
options: U.value,
|
|
152
|
+
value: k.value,
|
|
150
153
|
"onUpdate:value": j,
|
|
151
154
|
"allow-clear": !1,
|
|
152
155
|
"dropdown-match-select-width": !1
|
|
153
156
|
}, null, 8, ["style", "options", "value"])) : K("", !0),
|
|
154
|
-
s(n(J),
|
|
157
|
+
s(n(J), M(
|
|
155
158
|
{ style: e.inputStyle },
|
|
156
|
-
n(
|
|
159
|
+
n(D)(l, [
|
|
157
160
|
"style",
|
|
158
161
|
"value",
|
|
159
162
|
"onUpdate:value",
|
|
@@ -164,7 +167,7 @@ const c = "GROUP_SEARCH_ALL", ce = /* @__PURE__ */ O({
|
|
|
164
167
|
{
|
|
165
168
|
ref_key: "inputRef",
|
|
166
169
|
ref: d,
|
|
167
|
-
value:
|
|
170
|
+
value: w.value,
|
|
168
171
|
onInput: E,
|
|
169
172
|
onBlur: L,
|
|
170
173
|
placeholder: R.value
|
|
@@ -173,7 +176,7 @@ const c = "GROUP_SEARCH_ALL", ce = /* @__PURE__ */ O({
|
|
|
173
176
|
suffix: A(() => [
|
|
174
177
|
s(Q, {
|
|
175
178
|
_parent: f.value,
|
|
176
|
-
value:
|
|
179
|
+
value: _.value,
|
|
177
180
|
"onUpdate:value": F,
|
|
178
181
|
onClose: m
|
|
179
182
|
}, null, 8, ["_parent", "value"])
|
|
@@ -78,7 +78,8 @@ const e = {
|
|
|
78
78
|
exportError: "Export error",
|
|
79
79
|
exportSelected: "Export selected",
|
|
80
80
|
exportAll: "Export all",
|
|
81
|
-
export: "Export Excel"
|
|
81
|
+
export: "Export Excel",
|
|
82
|
+
exportSuccess: "The task has been submitted,please go to the download center to check the progress"
|
|
82
83
|
},
|
|
83
84
|
apBatchAction: {
|
|
84
85
|
selected: "Selected",
|
|
@@ -279,6 +279,10 @@ declare function __VLS_template(): {
|
|
|
279
279
|
step: ValueType;
|
|
280
280
|
bordered: boolean;
|
|
281
281
|
onPressEnter: KeyboardEventHandler;
|
|
282
|
+
formatter: (value: ValueType, info: {
|
|
283
|
+
userTyping: boolean;
|
|
284
|
+
input: string;
|
|
285
|
+
}) => string;
|
|
282
286
|
keyboard: boolean;
|
|
283
287
|
onStep: (value: ValueType, info: {
|
|
284
288
|
offset: ValueType;
|
|
@@ -287,10 +291,6 @@ declare function __VLS_template(): {
|
|
|
287
291
|
stringMode: boolean;
|
|
288
292
|
controls: boolean;
|
|
289
293
|
parser: (displayValue: string) => ValueType;
|
|
290
|
-
formatter: (value: ValueType, info: {
|
|
291
|
-
userTyping: boolean;
|
|
292
|
-
input: string;
|
|
293
|
-
}) => string;
|
|
294
294
|
}, true, {}, CustomSlotsType<{
|
|
295
295
|
addonBefore?: any;
|
|
296
296
|
addonAfter?: any;
|
|
@@ -446,6 +446,10 @@ declare function __VLS_template(): {
|
|
|
446
446
|
step: ValueType;
|
|
447
447
|
bordered: boolean;
|
|
448
448
|
onPressEnter: KeyboardEventHandler;
|
|
449
|
+
formatter: (value: ValueType, info: {
|
|
450
|
+
userTyping: boolean;
|
|
451
|
+
input: string;
|
|
452
|
+
}) => string;
|
|
449
453
|
keyboard: boolean;
|
|
450
454
|
onStep: (value: ValueType, info: {
|
|
451
455
|
offset: ValueType;
|
|
@@ -454,10 +458,6 @@ declare function __VLS_template(): {
|
|
|
454
458
|
stringMode: boolean;
|
|
455
459
|
controls: boolean;
|
|
456
460
|
parser: (displayValue: string) => ValueType;
|
|
457
|
-
formatter: (value: ValueType, info: {
|
|
458
|
-
userTyping: boolean;
|
|
459
|
-
input: string;
|
|
460
|
-
}) => string;
|
|
461
461
|
}> | null;
|
|
462
462
|
};
|
|
463
463
|
attrs: Partial<{}>;
|