@aplus-frontend/ui 7.12.3 → 7.12.5
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/ag-grid/editable/form-item.vue.d.ts +4 -2
- package/es/src/ag-grid/editable/index.vue.d.ts +4 -2
- package/es/src/ag-grid/index.vue.d.ts +4 -2
- package/es/src/ag-grid/index.vue.mjs +33 -31
- package/es/src/ap-field/select/use-select-options.d.ts +2 -2
- package/es/src/ap-field/tree-select/use-request.d.ts +4 -4
- package/es/src/ap-form/ap-form.vue.d.ts +2 -1
- package/es/src/ap-form/drawer-form/index.vue.d.ts +4 -3
- package/es/src/ap-form/items/number/index.vue.d.ts +3 -2
- package/es/src/ap-form/items/select/index.vue.d.ts +6 -6
- package/es/src/ap-form/modal-form/index.vue.d.ts +4 -3
- package/es/src/ap-form/search-form/index.vue.d.ts +4 -3
- package/es/src/ap-grid/editable/form-item.vue.d.ts +4 -2
- package/es/src/ap-grid/editable/index.vue.d.ts +4 -2
- package/es/src/ap-grid/index.vue.d.ts +4 -2
- package/es/src/ap-list/index.vue.d.ts +4 -2
- package/es/src/ap-modal/utils/confirm.d.ts +1 -1
- package/es/src/ap-table/ap-table.vue.d.ts +4 -2
- package/es/src/ap-table/constants.d.ts +6 -6
- package/es/src/ap-table/hooks/use-table-column-state.d.ts +4 -4
- package/es/src/business/ap-batch-action-group/index.d.ts +3 -3
- package/es/src/business/ap-draggable-grid/ApDraggableGrid.vue.d.ts +1 -1
- package/es/src/business/ap-draggable-grid/index.d.ts +1 -1
- package/es/src/business/ap-expand-alert/ApExpandAlert.vue.d.ts +4 -2
- package/es/src/business/ap-select-layout/index.d.ts +4 -2
- package/es/src/business/ap-select-layout/select-layout.vue.d.ts +4 -2
- package/es/src/business/ap-table-modal/index.d.ts +5 -17
- package/es/src/business/ap-upload/apUpload.vue.d.ts +19 -0
- package/es/src/business/ap-upload/apUpload.vue.mjs +38 -30
- package/es/src/business/ap-upload/apUploadTypes.d.ts +9 -0
- package/es/src/business/ap-upload/components/MultipleFile.vue.d.ts +1 -1
- package/es/src/business/ap-upload/components/MultipleFile.vue2.mjs +101 -101
- package/es/src/business/ap-value-select-card/index.vue.d.ts +4 -2
- package/es/src/business/ap-view/components/main-button-content.vue.d.ts +4 -3
- package/es/src/business/ap-view/components/menu-list-content.vue.d.ts +3 -2
- package/es/src/business/batch-input-group/index.vue.mjs +67 -72
- package/es/src/business/batch-input-group/interface.d.ts +3 -0
- package/es/src/business/batch-input-group/popover-input/index.vue2.mjs +65 -43
- package/es/src/business/batch-input-group/style/index.mjs +9 -9
- package/es/src/check-card/style/index.mjs +1 -1
- package/es/src/config-provider/config-provider.mjs +33 -32
- package/es/src/config-provider/hooks/use-global-config.mjs +40 -37
- package/es/src/config-provider/hooks/use-namespace.d.ts +1 -5
- package/es/src/editable-table/form-item.vue.d.ts +4 -2
- package/es/src/editable-table/index.vue.d.ts +4 -2
- package/es/src/scroll-view/index.vue.d.ts +5 -5
- package/es/src/tests/wrapper.d.ts +4 -4
- package/es/src/utils/cssinjs/utils.d.ts +1 -0
- package/es/src/utils/cssinjs/utils.mjs +9 -9
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ag-grid/editable/form-item.vue.d.ts +4 -2
- package/lib/src/ag-grid/editable/index.vue.d.ts +4 -2
- package/lib/src/ag-grid/index.vue.d.ts +4 -2
- package/lib/src/ag-grid/index.vue.js +1 -1
- package/lib/src/ap-field/select/use-select-options.d.ts +2 -2
- package/lib/src/ap-field/tree-select/use-request.d.ts +4 -4
- package/lib/src/ap-form/ap-form.vue.d.ts +2 -1
- package/lib/src/ap-form/drawer-form/index.vue.d.ts +4 -3
- package/lib/src/ap-form/items/number/index.vue.d.ts +3 -2
- package/lib/src/ap-form/items/select/index.vue.d.ts +6 -6
- package/lib/src/ap-form/modal-form/index.vue.d.ts +4 -3
- package/lib/src/ap-form/search-form/index.vue.d.ts +4 -3
- package/lib/src/ap-grid/editable/form-item.vue.d.ts +4 -2
- package/lib/src/ap-grid/editable/index.vue.d.ts +4 -2
- package/lib/src/ap-grid/index.vue.d.ts +4 -2
- package/lib/src/ap-list/index.vue.d.ts +4 -2
- package/lib/src/ap-modal/utils/confirm.d.ts +1 -1
- package/lib/src/ap-table/ap-table.vue.d.ts +4 -2
- package/lib/src/ap-table/constants.d.ts +6 -6
- package/lib/src/ap-table/hooks/use-table-column-state.d.ts +4 -4
- package/lib/src/business/ap-batch-action-group/index.d.ts +3 -3
- package/lib/src/business/ap-draggable-grid/ApDraggableGrid.vue.d.ts +1 -1
- package/lib/src/business/ap-draggable-grid/index.d.ts +1 -1
- package/lib/src/business/ap-expand-alert/ApExpandAlert.vue.d.ts +4 -2
- package/lib/src/business/ap-select-layout/index.d.ts +4 -2
- package/lib/src/business/ap-select-layout/select-layout.vue.d.ts +4 -2
- package/lib/src/business/ap-table-modal/index.d.ts +5 -17
- package/lib/src/business/ap-upload/apUpload.vue.d.ts +19 -0
- package/lib/src/business/ap-upload/apUpload.vue.js +1 -1
- package/lib/src/business/ap-upload/apUploadTypes.d.ts +9 -0
- package/lib/src/business/ap-upload/components/MultipleFile.vue.d.ts +1 -1
- package/lib/src/business/ap-upload/components/MultipleFile.vue2.js +1 -1
- package/lib/src/business/ap-value-select-card/index.vue.d.ts +4 -2
- package/lib/src/business/ap-view/components/main-button-content.vue.d.ts +4 -3
- package/lib/src/business/ap-view/components/menu-list-content.vue.d.ts +3 -2
- package/lib/src/business/batch-input-group/index.vue.js +2 -2
- package/lib/src/business/batch-input-group/interface.d.ts +3 -0
- package/lib/src/business/batch-input-group/popover-input/index.vue2.js +3 -3
- package/lib/src/business/batch-input-group/style/index.js +1 -1
- package/lib/src/check-card/style/index.js +1 -1
- package/lib/src/config-provider/config-provider.js +1 -1
- package/lib/src/config-provider/hooks/use-global-config.js +1 -1
- package/lib/src/config-provider/hooks/use-namespace.d.ts +1 -5
- package/lib/src/editable-table/form-item.vue.d.ts +4 -2
- package/lib/src/editable-table/index.vue.d.ts +4 -2
- package/lib/src/scroll-view/index.vue.d.ts +5 -5
- package/lib/src/tests/wrapper.d.ts +4 -4
- package/lib/src/utils/cssinjs/utils.d.ts +1 -0
- package/lib/src/utils/cssinjs/utils.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +3 -3
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Form as
|
|
3
|
-
import {
|
|
1
|
+
import { defineComponent as z, ref as g, computed as u, unref as t, createElementBlock as T, openBlock as B, normalizeClass as C, createVNode as d, withCtx as b, createBlock as _, createCommentVNode as K, normalizeStyle as M, mergeProps as $ } from "vue";
|
|
2
|
+
import { Form as D, Space as G } from "@aplus-frontend/antdv";
|
|
3
|
+
import { omit as q } from "lodash-unified";
|
|
4
4
|
import "../../ap-field/index.mjs";
|
|
5
|
-
import { useDefaultPlaceholder as
|
|
5
|
+
import { useDefaultPlaceholder as H } from "../../ap-field/hooks/use-default-placeholder.mjs";
|
|
6
6
|
import "../../config-provider/index.mjs";
|
|
7
7
|
import "../../hooks/index.mjs";
|
|
8
8
|
import "../../utils/index.mjs";
|
|
9
9
|
import "./popover-input/index.vue.mjs";
|
|
10
|
-
import
|
|
11
|
-
import { splitValue as
|
|
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
|
|
10
|
+
import Y from "./style/index.mjs";
|
|
11
|
+
import { splitValue as J } from "./utils.mjs";
|
|
12
|
+
import { useControllableValue as Q } from "../../hooks/useControllableValue.mjs";
|
|
13
|
+
import { useLocale as W } from "../../config-provider/hooks/use-locale.mjs";
|
|
14
|
+
import { useNamespace as X } from "../../config-provider/hooks/use-namespace.mjs";
|
|
15
|
+
import { isDef as Z } from "../../utils/is.mjs";
|
|
16
|
+
import ee from "../../ap-field/select/index.vue.mjs";
|
|
17
|
+
import { ApFieldText as te } from "../../ap-field/text/index.mjs";
|
|
18
|
+
import oe from "./popover-input/index.vue2.mjs";
|
|
19
|
+
const c = "GROUP_SEARCH_ALL", be = /* @__PURE__ */ z({
|
|
20
20
|
name: "BatchInputGroup",
|
|
21
21
|
__name: "index",
|
|
22
22
|
props: {
|
|
@@ -28,6 +28,7 @@ const d = "GROUP_SEARCH_ALL", Ve = /* @__PURE__ */ $({
|
|
|
28
28
|
"onUpdate:value": {},
|
|
29
29
|
popoverPlacement: { default: "left" },
|
|
30
30
|
maxNum: { default: 200 },
|
|
31
|
+
getPopupContainer: {},
|
|
31
32
|
mode: { default: "edit" },
|
|
32
33
|
class: {},
|
|
33
34
|
variant: {},
|
|
@@ -77,91 +78,84 @@ const d = "GROUP_SEARCH_ALL", Ve = /* @__PURE__ */ $({
|
|
|
77
78
|
beforeInput: {}
|
|
78
79
|
},
|
|
79
80
|
emits: ["update:value"],
|
|
80
|
-
setup(
|
|
81
|
-
const o =
|
|
81
|
+
setup(A, { emit: I }) {
|
|
82
|
+
const o = A, V = H("Text", o), x = I, { value: a, updateValue: r } = Q(
|
|
82
83
|
o,
|
|
83
|
-
|
|
84
|
-
),
|
|
85
|
-
|
|
86
|
-
return {
|
|
87
|
-
"popover-left": Y(e) ? `${e}px` : e === "left" ? "0px" : "unset",
|
|
88
|
-
"popover-right": e === "right" ? "0px" : "unset"
|
|
89
|
-
};
|
|
90
|
-
}), P = r(() => o.options ? o.options.length > 1 && o.hasAll ? [
|
|
91
|
-
{ value: d, label: k("ap.common.all") },
|
|
84
|
+
x
|
|
85
|
+
), s = g(), f = g(), { t: S } = W(), { b: k } = X("batch-input-group"), v = Y("batch-input-group"), p = D.useInjectFormItemContext(), F = u(() => o.options ? o.options.length > 1 && o.hasAll ? [
|
|
86
|
+
{ value: c, label: S("ap.common.all") },
|
|
92
87
|
...o.options
|
|
93
|
-
] : o.options : []),
|
|
94
|
-
`) : ""),
|
|
88
|
+
] : o.options : []), U = u(() => o.options ? o.options.map((e) => e.value) : []), w = u(() => t(a)?.value?.length ? t(a).value.join(",") : ""), P = u(() => t(a)?.value?.length ? t(a).value.join(`
|
|
89
|
+
`) : ""), R = u(() => {
|
|
95
90
|
const e = t(a)?.key;
|
|
96
91
|
if (e?.length)
|
|
97
|
-
return e.length === 1 || !o.hasAll ? e[0] :
|
|
98
|
-
}),
|
|
92
|
+
return e.length === 1 || !o.hasAll ? e[0] : c;
|
|
93
|
+
}), j = u(() => {
|
|
99
94
|
const e = t(a)?.key;
|
|
100
|
-
return !e || e?.length <= 1 || o.hasAll === !1 ? t(
|
|
95
|
+
return !e || e?.length <= 1 || o.hasAll === !1 ? t(V) : (o.options || []).filter((n) => e.includes(n.value)).map((n) => n.label).join("/");
|
|
101
96
|
});
|
|
102
|
-
function
|
|
103
|
-
const l = t(a) || {}, n = e ===
|
|
104
|
-
|
|
97
|
+
function E(e) {
|
|
98
|
+
const l = t(a) || {}, n = e === c ? t(U) : Z(e) ? [e] : [];
|
|
99
|
+
r({
|
|
105
100
|
...l,
|
|
106
101
|
key: n
|
|
107
102
|
}), p.onFieldChange();
|
|
108
103
|
}
|
|
109
|
-
function
|
|
104
|
+
function L(e) {
|
|
110
105
|
const l = t(a) || {}, n = e.target.value || "";
|
|
111
|
-
let
|
|
112
|
-
if (n !==
|
|
106
|
+
let m = J(n, ",", ",", o.maxNum);
|
|
107
|
+
if (n !== m) {
|
|
113
108
|
const h = f.value?.$el?.querySelector("input");
|
|
114
|
-
h && (h.value =
|
|
109
|
+
h && (h.value = m);
|
|
115
110
|
}
|
|
116
|
-
let
|
|
117
|
-
|
|
111
|
+
let i = m.split(",");
|
|
112
|
+
i.length === 1 && i[0] === "" && (i = []), r({
|
|
118
113
|
...l,
|
|
119
|
-
value:
|
|
114
|
+
value: i
|
|
120
115
|
}), p.onFieldChange();
|
|
121
116
|
}
|
|
122
|
-
function
|
|
117
|
+
function N(e) {
|
|
123
118
|
const l = t(a) || {};
|
|
124
119
|
let n = e.split(/,|\n/);
|
|
125
|
-
|
|
120
|
+
r({
|
|
126
121
|
...l,
|
|
127
122
|
value: n
|
|
128
123
|
}), p.onFieldChange();
|
|
129
124
|
}
|
|
130
125
|
function y() {
|
|
131
126
|
const e = t(a) || {}, l = e.value?.filter(Boolean);
|
|
132
|
-
|
|
127
|
+
r({
|
|
133
128
|
...e,
|
|
134
129
|
value: l
|
|
135
130
|
}), p.onFieldChange();
|
|
136
131
|
}
|
|
137
|
-
function
|
|
132
|
+
function O(e) {
|
|
138
133
|
y(), o.onBlur?.(e);
|
|
139
134
|
}
|
|
140
|
-
return (e, l) => (B(),
|
|
135
|
+
return (e, l) => (B(), T("div", {
|
|
141
136
|
ref_key: "containerRef",
|
|
142
|
-
ref:
|
|
143
|
-
class:
|
|
144
|
-
style: C(t(U)(w.value)),
|
|
137
|
+
ref: s,
|
|
138
|
+
class: C([t(k)(), t(v)]),
|
|
145
139
|
onFocus: l[0] || (l[0] = //@ts-ignore
|
|
146
140
|
(...n) => e.onFocus && e.onFocus(...n)),
|
|
147
141
|
onBlur: l[1] || (l[1] = //@ts-ignore
|
|
148
142
|
(...n) => e.onBlur && e.onBlur(...n))
|
|
149
143
|
}, [
|
|
150
|
-
|
|
151
|
-
default:
|
|
152
|
-
e.options?.length ? (B(),
|
|
144
|
+
d(t(G).Compact, { block: "" }, {
|
|
145
|
+
default: b(() => [
|
|
146
|
+
e.options?.length ? (B(), _(t(ee), {
|
|
153
147
|
key: 0,
|
|
154
|
-
style:
|
|
155
|
-
options:
|
|
156
|
-
value:
|
|
148
|
+
style: M(e.style),
|
|
149
|
+
options: F.value,
|
|
150
|
+
value: R.value,
|
|
157
151
|
"allow-clear": !1,
|
|
158
152
|
"dropdown-match-select-width": !1,
|
|
159
153
|
disabled: e.disabled,
|
|
160
|
-
"get-popup-container": () =>
|
|
161
|
-
"onUpdate:value":
|
|
162
|
-
}, null, 8, ["style", "options", "value", "disabled", "get-popup-container"])) :
|
|
163
|
-
|
|
164
|
-
t(
|
|
154
|
+
"get-popup-container": () => s.value,
|
|
155
|
+
"onUpdate:value": E
|
|
156
|
+
}, null, 8, ["style", "options", "value", "disabled", "get-popup-container"])) : K("", !0),
|
|
157
|
+
d(t(te), $(
|
|
158
|
+
t(q)(o, [
|
|
165
159
|
"style",
|
|
166
160
|
"value",
|
|
167
161
|
"onUpdate:value",
|
|
@@ -174,32 +168,33 @@ const d = "GROUP_SEARCH_ALL", Ve = /* @__PURE__ */ $({
|
|
|
174
168
|
ref_key: "inputRef",
|
|
175
169
|
ref: f,
|
|
176
170
|
style: e.inputStyle,
|
|
177
|
-
value:
|
|
178
|
-
placeholder:
|
|
179
|
-
onInput:
|
|
180
|
-
onBlur:
|
|
171
|
+
value: w.value,
|
|
172
|
+
placeholder: j.value,
|
|
173
|
+
onInput: L,
|
|
174
|
+
onBlur: O
|
|
181
175
|
}
|
|
182
176
|
), {
|
|
183
|
-
suffix:
|
|
184
|
-
|
|
185
|
-
_parent:
|
|
186
|
-
value:
|
|
177
|
+
suffix: b(() => [
|
|
178
|
+
d(oe, {
|
|
179
|
+
_parent: s.value,
|
|
180
|
+
value: P.value,
|
|
187
181
|
disabled: e.disabled,
|
|
188
182
|
placement: o.popoverPlacement,
|
|
189
183
|
"max-num": e.maxNum,
|
|
190
|
-
class:
|
|
191
|
-
"
|
|
184
|
+
class: C(t(v)),
|
|
185
|
+
"get-popup-container": e.getPopupContainer,
|
|
186
|
+
"onUpdate:value": N,
|
|
192
187
|
onClose: y
|
|
193
|
-
}, null, 8, ["_parent", "value", "disabled", "placement", "max-num", "class"])
|
|
188
|
+
}, null, 8, ["_parent", "value", "disabled", "placement", "max-num", "class", "get-popup-container"])
|
|
194
189
|
]),
|
|
195
190
|
_: 1
|
|
196
191
|
}, 16, ["style", "value", "placeholder"])
|
|
197
192
|
]),
|
|
198
193
|
_: 1
|
|
199
194
|
})
|
|
200
|
-
],
|
|
195
|
+
], 34));
|
|
201
196
|
}
|
|
202
197
|
});
|
|
203
198
|
export {
|
|
204
|
-
|
|
199
|
+
be as default
|
|
205
200
|
};
|
|
@@ -36,12 +36,15 @@ export interface BatchInputGroupProps extends Omit<ApFieldTextProps, 'value' | '
|
|
|
36
36
|
* 最大输入条数,默认为200
|
|
37
37
|
*/
|
|
38
38
|
maxNum?: number;
|
|
39
|
+
getPopupContainer?: BatchInputGroupPopoverInputProps['getPopupContainer'];
|
|
39
40
|
}
|
|
40
41
|
export interface BatchInputGroupPopoverInputProps extends Pick<ApFieldTextAreaProps, 'value' | 'onUpdate:value'> {
|
|
41
42
|
_parent?: HTMLElement;
|
|
42
43
|
onClose?: () => void;
|
|
43
44
|
disabled?: boolean;
|
|
44
45
|
maxNum?: number;
|
|
46
|
+
getPopupContainer?: (triggerNode?: HTMLElement) => HTMLElement;
|
|
47
|
+
placement?: BatchInputGroupProps['popoverPlacement'];
|
|
45
48
|
}
|
|
46
49
|
export type ApFormItemBatchInputProps = ApFormItemProps & {
|
|
47
50
|
field?: Omit<BatchInputGroupProps, 'value' | 'onUpdate:value'>;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Popover as
|
|
3
|
-
import { IconApAdLineScreen as
|
|
1
|
+
import { defineComponent as E, ref as p, computed as v, createElementBlock as O, openBlock as F, normalizeClass as i, unref as n, createVNode as m, withCtx as d, createElementVNode as L } from "vue";
|
|
2
|
+
import { Popover as z, Textarea as G } from "@aplus-frontend/antdv";
|
|
3
|
+
import { IconApAdLineScreen as S } from "@aplus-frontend/icon";
|
|
4
|
+
import { isNumber as W } from "lodash-unified";
|
|
4
5
|
import "../../../config-provider/index.mjs";
|
|
5
6
|
import "../../../hooks/index.mjs";
|
|
6
|
-
import { splitValue as
|
|
7
|
-
import { useControllableValue as
|
|
8
|
-
import { useLocale as
|
|
9
|
-
import { useNamespace as
|
|
10
|
-
const
|
|
7
|
+
import { splitValue as j } from "../utils.mjs";
|
|
8
|
+
import { useControllableValue as T } from "../../../hooks/useControllableValue.mjs";
|
|
9
|
+
import { useLocale as U } from "../../../config-provider/hooks/use-locale.mjs";
|
|
10
|
+
import { useNamespace as g } from "../../../config-provider/hooks/use-namespace.mjs";
|
|
11
|
+
const ee = /* @__PURE__ */ E({
|
|
11
12
|
name: "BatchInputGroupPopoverInput",
|
|
12
13
|
inheritAttrs: !1,
|
|
13
14
|
__name: "index",
|
|
@@ -16,71 +17,92 @@ const H = /* @__PURE__ */ y({
|
|
|
16
17
|
onClose: { type: Function },
|
|
17
18
|
disabled: { type: Boolean },
|
|
18
19
|
maxNum: {},
|
|
20
|
+
getPopupContainer: { type: Function },
|
|
21
|
+
placement: {},
|
|
19
22
|
value: {},
|
|
20
23
|
"onUpdate:value": { type: Function }
|
|
21
24
|
},
|
|
22
25
|
emits: ["update:value"],
|
|
23
|
-
setup(
|
|
24
|
-
const o =
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
setup(h, { emit: C }) {
|
|
27
|
+
const o = h, b = C, { value: y, updateValue: x } = T(o, b), u = p(!1), s = p(), c = p(), r = p({
|
|
28
|
+
left: 0,
|
|
29
|
+
right: 0
|
|
30
|
+
}), P = (e) => o._parent || e, { t: V } = U();
|
|
31
|
+
function I(e) {
|
|
32
|
+
const a = e.target.value || "";
|
|
33
|
+
let t = j(a, `
|
|
28
34
|
,`, `
|
|
29
35
|
`, o.maxNum);
|
|
30
|
-
if (
|
|
31
|
-
`),
|
|
32
|
-
const
|
|
33
|
-
|
|
36
|
+
if (t = t.replace(/\\n/g, `
|
|
37
|
+
`), t !== a) {
|
|
38
|
+
const l = s.value?.$el || s.value;
|
|
39
|
+
l && (l.value = t);
|
|
34
40
|
}
|
|
35
|
-
|
|
41
|
+
x(t);
|
|
36
42
|
}
|
|
37
|
-
|
|
38
|
-
|
|
43
|
+
const N = () => {
|
|
44
|
+
if (o.getPopupContainer) {
|
|
45
|
+
const e = o._parent, a = o.getPopupContainer(), t = e?.getBoundingClientRect(), l = a?.getBoundingClientRect();
|
|
46
|
+
c.value = e?.offsetWidth, r.value.left = (t?.left || 0) - (l.left || 0), r.value.right = (t?.right || 0) - (l.right || 0);
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
function $(e) {
|
|
50
|
+
N(), o.disabled ? u.value = !1 : u.value = e, !e && o.onClose?.();
|
|
39
51
|
}
|
|
40
|
-
const { b:
|
|
41
|
-
|
|
42
|
-
|
|
52
|
+
const { b: f, e: R, em: _, bm: B } = g("batch-input-group-popover-input"), { cssVar: A } = g("batch-input-group-popover"), k = v(() => {
|
|
53
|
+
const e = o.placement, a = W(e) ? `${e}px` : e === "left" ? `${r.value.left}px` : "unset", t = e === "right" ? `${-r.value.right}px` : "unset";
|
|
54
|
+
return {
|
|
55
|
+
left: a,
|
|
56
|
+
right: t
|
|
57
|
+
};
|
|
58
|
+
}), w = v(() => A({
|
|
59
|
+
...k.value,
|
|
60
|
+
width: c.value ? `${c.value}px` : "100%"
|
|
61
|
+
}));
|
|
62
|
+
return (e, a) => (F(), O("div", {
|
|
63
|
+
class: i(n(f)())
|
|
43
64
|
}, [
|
|
44
|
-
|
|
45
|
-
"overlay-class-name": `${
|
|
46
|
-
"get-popup-container":
|
|
65
|
+
m(n(z), {
|
|
66
|
+
"overlay-class-name": `${n(R)("popover")} ${e.$attrs.class}`,
|
|
67
|
+
"get-popup-container": e.getPopupContainer ?? P,
|
|
47
68
|
trigger: "click",
|
|
48
69
|
placement: "bottomLeft",
|
|
49
|
-
open:
|
|
50
|
-
|
|
70
|
+
open: u.value,
|
|
71
|
+
"overlay-style": w.value,
|
|
72
|
+
onOpenChange: $
|
|
51
73
|
}, {
|
|
52
|
-
content:
|
|
53
|
-
|
|
54
|
-
class:
|
|
74
|
+
content: d(() => [
|
|
75
|
+
L("div", {
|
|
76
|
+
class: i(n(_)("popover", "content"))
|
|
55
77
|
}, [
|
|
56
|
-
|
|
78
|
+
m(n(G), {
|
|
57
79
|
ref_key: "textAreaRef",
|
|
58
|
-
ref:
|
|
59
|
-
placeholder:
|
|
80
|
+
ref: s,
|
|
81
|
+
placeholder: n(V)("ap.batchInputGroup.popoverInputPlaceholder", {
|
|
60
82
|
maxNum: e.maxNum + ""
|
|
61
83
|
}),
|
|
62
84
|
bordered: !1,
|
|
63
85
|
rows: 10,
|
|
64
|
-
value:
|
|
86
|
+
value: n(y),
|
|
65
87
|
"allow-clear": !1,
|
|
66
88
|
"auto-size": !1,
|
|
67
|
-
onInput:
|
|
89
|
+
onInput: I
|
|
68
90
|
}, null, 8, ["placeholder", "value"])
|
|
69
91
|
], 2)
|
|
70
92
|
]),
|
|
71
|
-
default:
|
|
72
|
-
|
|
73
|
-
class:
|
|
74
|
-
|
|
75
|
-
e.disabled ?
|
|
93
|
+
default: d(() => [
|
|
94
|
+
m(n(S), {
|
|
95
|
+
class: i([
|
|
96
|
+
n(f)("trigger-icon"),
|
|
97
|
+
e.disabled ? n(B)("trigger-icon", "disabled") : null
|
|
76
98
|
])
|
|
77
99
|
}, null, 8, ["class"])
|
|
78
100
|
]),
|
|
79
101
|
_: 1
|
|
80
|
-
}, 8, ["overlay-class-name", "open"])
|
|
102
|
+
}, 8, ["overlay-class-name", "get-popup-container", "open", "overlay-style"])
|
|
81
103
|
], 2));
|
|
82
104
|
}
|
|
83
105
|
});
|
|
84
106
|
export {
|
|
85
|
-
|
|
107
|
+
ee as default
|
|
86
108
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { genComponentStyleHook as
|
|
2
|
-
const
|
|
3
|
-
const { componentCls:
|
|
1
|
+
import { genComponentStyleHook as a } from "../../../utils/cssinjs/index.mjs";
|
|
2
|
+
const l = (o) => {
|
|
3
|
+
const { componentCls: p, namespace: t } = o, r = `${p}-popover-input`, e = `--${t}-batch-input-group-popover-left`, n = `--${t}-batch-input-group-popover-right`, i = `--${t}-batch-input-group-popover-width`;
|
|
4
4
|
return {
|
|
5
|
-
[
|
|
5
|
+
[p]: {
|
|
6
6
|
position: "relative",
|
|
7
7
|
[r]: {
|
|
8
8
|
display: "inline-flex",
|
|
@@ -26,9 +26,9 @@ const a = (o) => {
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
[`${r}__popover`]: {
|
|
29
|
-
width:
|
|
29
|
+
width: `var(${i})`,
|
|
30
30
|
minWidth: "300px",
|
|
31
|
-
left: `var(${
|
|
31
|
+
left: `var(${e}) !important`,
|
|
32
32
|
right: `var(${n}) !important`,
|
|
33
33
|
".ant-popover-arrow": {
|
|
34
34
|
display: "none"
|
|
@@ -45,13 +45,13 @@ const a = (o) => {
|
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
|
-
},
|
|
48
|
+
}, s = a(
|
|
49
49
|
"BatchInputGroup",
|
|
50
|
-
(o) => [
|
|
50
|
+
(o) => [l(o)],
|
|
51
51
|
{
|
|
52
52
|
batchInputGroupTriggerColorDisabled: "rgba(24, 41, 72, 0.25)"
|
|
53
53
|
}
|
|
54
54
|
);
|
|
55
55
|
export {
|
|
56
|
-
|
|
56
|
+
s as default
|
|
57
57
|
};
|
|
@@ -33,7 +33,7 @@ const s = (i) => {
|
|
|
33
33
|
insetInlineEnd: 0,
|
|
34
34
|
clipPath: "polygon(100% 0, 100% 100%, 0 0)",
|
|
35
35
|
background: i.colorPrimary,
|
|
36
|
-
|
|
36
|
+
borderTopRightRadius: i.calc(i.borderRadius).add("2px").equal()
|
|
37
37
|
},
|
|
38
38
|
"&--checked": {
|
|
39
39
|
outline: `${r} ${i.lineType} ${i.colorPrimary}`,
|
|
@@ -1,25 +1,26 @@
|
|
|
1
|
-
import { isVNode as
|
|
1
|
+
import { isVNode as f, ref as s, defineComponent as v, computed as n, watch as C, onActivated as P, createVNode as h, renderSlot as T } from "vue";
|
|
2
2
|
import { ConfigProvider as w } from "@aplus-frontend/antdv";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
import { merge as b, cloneDeep as A } from "lodash-unified";
|
|
4
|
+
import { useDevWarning as F } from "../utils/warning.mjs";
|
|
5
|
+
import { mergeAntdProviderConfigWithCache as l, mergeAntdProvideConfig as u } from "../utils/config-provider-preset.mjs";
|
|
6
|
+
import { configProviderProps as D } from "./config-provider-props.mjs";
|
|
7
|
+
import { DEFAULT_NAMESPACE as G } from "./constants.mjs";
|
|
8
|
+
import { useGlobalConfig as k, provideGlobalConfig as M } from "./hooks/use-global-config.mjs";
|
|
9
|
+
function N(e) {
|
|
10
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !f(e);
|
|
10
11
|
}
|
|
11
|
-
const
|
|
12
|
+
const i = s({}), _ = /* @__PURE__ */ v({
|
|
12
13
|
name: "AplusConfigProvider",
|
|
13
|
-
props:
|
|
14
|
+
props: D(),
|
|
14
15
|
setup(e, {
|
|
15
|
-
slots:
|
|
16
|
+
slots: d
|
|
16
17
|
}) {
|
|
17
|
-
|
|
18
|
-
function o(
|
|
19
|
-
return e[
|
|
18
|
+
F("ConfigProvider")(!e.uiMode, "breaking", "uiMode has been remove, see migrate guild https://aplus.aplnk.com/aplus-ui/guild/migrate-7.2.html");
|
|
19
|
+
function o(a, c) {
|
|
20
|
+
return e[a] ?? r.value?.[a] ?? c;
|
|
20
21
|
}
|
|
21
|
-
const
|
|
22
|
-
namespace: o("namespace",
|
|
22
|
+
const r = k(), p = n(() => b(A(r.value?.aplusToken || {}), e.aplusToken)), g = n(() => ({
|
|
23
|
+
namespace: o("namespace", G),
|
|
23
24
|
apGrid: o("apGrid"),
|
|
24
25
|
agGrid: o("agGrid"),
|
|
25
26
|
apProCard: o("apProCard"),
|
|
@@ -30,37 +31,37 @@ const a = m({}), E = /* @__PURE__ */ f({
|
|
|
30
31
|
apDescriptions: o("apDescriptions"),
|
|
31
32
|
apFilePreview: o("apFilePreview"),
|
|
32
33
|
aplusLocale: e.aplusLocale,
|
|
33
|
-
aplusToken:
|
|
34
|
+
aplusToken: p.value,
|
|
34
35
|
api: e.api,
|
|
35
36
|
valueTypeMap: e.valueTypeMap,
|
|
36
37
|
downloadCenterTriggerConfig: e.downloadCenterTriggerConfig,
|
|
37
38
|
exportField: e.exportField,
|
|
38
39
|
scrollYDomName: e.scrollYDomName,
|
|
39
40
|
viewCacheOption: e.viewCacheOption
|
|
40
|
-
})),
|
|
41
|
-
let
|
|
42
|
-
return
|
|
43
|
-
|
|
41
|
+
})), m = M(g);
|
|
42
|
+
let t = !0;
|
|
43
|
+
return C(() => e, (a) => {
|
|
44
|
+
i.value = l(u(a), i.value);
|
|
44
45
|
}, {
|
|
45
46
|
deep: !0,
|
|
46
47
|
immediate: !0
|
|
47
|
-
}),
|
|
48
|
-
if (
|
|
49
|
-
|
|
48
|
+
}), P(() => {
|
|
49
|
+
if (t) {
|
|
50
|
+
t = !1;
|
|
50
51
|
return;
|
|
51
52
|
}
|
|
52
|
-
|
|
53
|
+
i.value = l(u(e), i.value);
|
|
53
54
|
}), () => {
|
|
54
|
-
let
|
|
55
|
-
return
|
|
56
|
-
config:
|
|
57
|
-
})) ?
|
|
58
|
-
default: () => [
|
|
55
|
+
let a;
|
|
56
|
+
return h(w, i.value, N(a = T(d, "default", {
|
|
57
|
+
config: m?.value
|
|
58
|
+
})) ? a : {
|
|
59
|
+
default: () => [a]
|
|
59
60
|
});
|
|
60
61
|
};
|
|
61
62
|
}
|
|
62
63
|
});
|
|
63
64
|
export {
|
|
64
|
-
|
|
65
|
-
|
|
65
|
+
_ as ConfigProvider,
|
|
66
|
+
i as globalConfigCached
|
|
66
67
|
};
|
|
@@ -1,48 +1,51 @@
|
|
|
1
|
-
import { css as
|
|
2
|
-
import { merge as
|
|
3
|
-
import { ref as p, getCurrentInstance as v, inject as
|
|
4
|
-
import { defaultToken as
|
|
5
|
-
import { generateCssVar as
|
|
1
|
+
import { css as C } from "@emotion/css";
|
|
2
|
+
import { merge as k, cloneDeep as x, omit as y } from "lodash-unified";
|
|
3
|
+
import { ref as p, getCurrentInstance as v, inject as T, computed as u, provide as K, unref as b, watch as j } from "vue";
|
|
4
|
+
import { defaultToken as w } from "../../design-token/constants.mjs";
|
|
5
|
+
import { generateCssVar as G } from "../../utils/cssinjs/utils.mjs";
|
|
6
6
|
import { configProviderContextKey as d } from "../constants.mjs";
|
|
7
|
-
import { localeContextKey as
|
|
8
|
-
import { namespaceContextKey as
|
|
9
|
-
import { designTokenContextKey as
|
|
10
|
-
const m = (e) => Object.keys(e),
|
|
11
|
-
function
|
|
12
|
-
const n = v() ?
|
|
13
|
-
return e ?
|
|
7
|
+
import { localeContextKey as I } from "./use-locale.mjs";
|
|
8
|
+
import { namespaceContextKey as O } from "./use-namespace.mjs";
|
|
9
|
+
import { designTokenContextKey as S } from "./use-token.mjs";
|
|
10
|
+
const m = (e) => Object.keys(e), a = p();
|
|
11
|
+
function V(e, o = void 0) {
|
|
12
|
+
const n = v() ? T(d, a) : a;
|
|
13
|
+
return e ? u(() => n.value?.[e] ?? o) : n;
|
|
14
14
|
}
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
if (!
|
|
15
|
+
const E = (e, o, n = !1) => {
|
|
16
|
+
const i = !!v(), t = i ? V() : void 0, s = o?.provide ?? (i ? K : void 0);
|
|
17
|
+
if (!s)
|
|
18
18
|
return;
|
|
19
|
-
const r =
|
|
20
|
-
const
|
|
21
|
-
return t?.value ?
|
|
19
|
+
const r = u(() => {
|
|
20
|
+
const c = b(e);
|
|
21
|
+
return t?.value ? h(t.value, c) : c;
|
|
22
22
|
});
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
),
|
|
27
|
-
const f =
|
|
28
|
-
...
|
|
29
|
-
})),
|
|
30
|
-
return
|
|
31
|
-
() =>
|
|
32
|
-
(
|
|
33
|
-
const
|
|
34
|
-
|
|
23
|
+
s(d, r), s(
|
|
24
|
+
I,
|
|
25
|
+
u(() => r.value.aplusLocale)
|
|
26
|
+
), s(O, r.value.namespace);
|
|
27
|
+
const f = u(() => ({
|
|
28
|
+
...k(x(w), r.value.aplusToken || {})
|
|
29
|
+
})), l = p();
|
|
30
|
+
return j(
|
|
31
|
+
() => f.value,
|
|
32
|
+
() => {
|
|
33
|
+
const c = y(f.value, ["components"]), g = G(c, {
|
|
34
|
+
uniqueId: !0,
|
|
35
|
+
skipUnit: []
|
|
36
|
+
});
|
|
37
|
+
l.value = C(g);
|
|
35
38
|
},
|
|
36
39
|
{ deep: !0, immediate: !0 }
|
|
37
|
-
),
|
|
38
|
-
},
|
|
39
|
-
const n = [.../* @__PURE__ */ new Set([...m(e), ...m(o)])],
|
|
40
|
+
), s(S, { token: f, rootCls: l }), (n || !a.value) && (a.value = r.value), r;
|
|
41
|
+
}, h = (e, o) => {
|
|
42
|
+
const n = [.../* @__PURE__ */ new Set([...m(e), ...m(o)])], i = {};
|
|
40
43
|
for (const t of n)
|
|
41
|
-
|
|
42
|
-
return
|
|
44
|
+
i[t] = o[t] !== void 0 ? o[t] : e[t];
|
|
45
|
+
return i;
|
|
43
46
|
};
|
|
44
47
|
export {
|
|
45
48
|
m as keysOf,
|
|
46
|
-
|
|
47
|
-
|
|
49
|
+
E as provideGlobalConfig,
|
|
50
|
+
V as useGlobalConfig
|
|
48
51
|
};
|
|
@@ -2,11 +2,7 @@ import { InjectionKey, Ref, ComputedRef } from 'vue';
|
|
|
2
2
|
export declare const defaultNamespace = "aplus";
|
|
3
3
|
export declare const namespaceContextKey: InjectionKey<Ref<string | undefined>>;
|
|
4
4
|
export declare const useGetDerivedNamespace: (namespaceOverrides?: Ref<string | undefined>) => ComputedRef<string>;
|
|
5
|
-
export declare const useNamespace: (
|
|
6
|
-
/**
|
|
7
|
-
* 块 一般是指组件名
|
|
8
|
-
*/
|
|
9
|
-
block: string, namespaceOverrides?: Ref<string | undefined>) => {
|
|
5
|
+
export declare const useNamespace: (block: string, namespaceOverrides?: Ref<string | undefined>) => {
|
|
10
6
|
namespace: ComputedRef<string>;
|
|
11
7
|
b: (blockSuffix?: string) => string;
|
|
12
8
|
e: (element?: string) => string;
|