@aplus-frontend/ui 7.14.3 → 7.14.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/ap-field/checkbox/index.vue.d.ts +3 -1
- package/es/src/ap-field/checkbox/index.vue.mjs +37 -31
- package/es/src/ap-field/interface.d.ts +4 -2
- package/es/src/ap-field/radio/index.vue.d.ts +1 -2
- package/es/src/ap-field/radio/index.vue.mjs +36 -41
- package/es/src/ap-field/select/index.vue.d.ts +2 -2
- package/es/src/ap-field/select/index.vue.mjs +41 -39
- package/es/src/ap-field/style/select.mjs +1 -1
- package/es/src/ap-form/items/radio/index.vue.d.ts +5 -10
- package/es/src/ap-form/items/radio/index.vue.mjs +15 -20
- package/es/src/ap-table/constants.d.ts +5 -10
- package/es/src/business/ap-batch-action-group/ApBatchActionGroup.vue2.mjs +36 -36
- package/es/src/business/ap-button-group/ApButtonGroup.vue2.mjs +28 -27
- package/es/src/business/ap-export-group/ApExportGroup.vue2.mjs +78 -81
- package/es/src/config-provider/config-provider-props.d.ts +3 -1
- package/es/src/config-provider/config-provider.d.ts +7 -28
- package/es/src/config-provider/hooks/use-global-config.d.ts +3 -10
- package/es/src/config-provider/index.d.ts +13 -55
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ap-field/checkbox/index.vue.d.ts +3 -1
- package/lib/src/ap-field/checkbox/index.vue.js +1 -1
- package/lib/src/ap-field/interface.d.ts +4 -2
- package/lib/src/ap-field/radio/index.vue.d.ts +1 -2
- package/lib/src/ap-field/radio/index.vue.js +1 -1
- package/lib/src/ap-field/select/index.vue.d.ts +2 -2
- package/lib/src/ap-field/select/index.vue.js +1 -1
- package/lib/src/ap-field/style/select.js +1 -1
- package/lib/src/ap-form/items/radio/index.vue.d.ts +5 -10
- package/lib/src/ap-form/items/radio/index.vue.js +1 -1
- package/lib/src/ap-table/constants.d.ts +5 -10
- package/lib/src/business/ap-batch-action-group/ApBatchActionGroup.vue2.js +1 -1
- package/lib/src/business/ap-button-group/ApButtonGroup.vue2.js +1 -1
- package/lib/src/business/ap-export-group/ApExportGroup.vue2.js +1 -1
- package/lib/src/config-provider/config-provider-props.d.ts +3 -1
- package/lib/src/config-provider/config-provider.d.ts +7 -28
- package/lib/src/config-provider/hooks/use-global-config.d.ts +3 -10
- package/lib/src/config-provider/index.d.ts +13 -55
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +3 -3
|
@@ -2,7 +2,9 @@ import { ApFieldCheckboxProps } from '../interface';
|
|
|
2
2
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
3
|
import { FieldMode } from '..';
|
|
4
4
|
import { CheckboxOptionType } from '@aplus-frontend/antdv';
|
|
5
|
-
declare const _default: DefineComponent<ApFieldCheckboxProps, {
|
|
5
|
+
declare const _default: DefineComponent<ApFieldCheckboxProps, {
|
|
6
|
+
request: () => Promise<void>;
|
|
7
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
6
8
|
"update:value": (...args: any[]) => void;
|
|
7
9
|
}, string, PublicProps, Readonly<ApFieldCheckboxProps> & Readonly<{
|
|
8
10
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Spin as
|
|
3
|
-
import { isFunction as
|
|
1
|
+
import { defineComponent as V, ref as q, onMounted as B, createElementBlock as l, openBlock as o, Fragment as n, unref as e, createTextVNode as m, toDisplayString as d, createBlock as c, mergeProps as O } from "vue";
|
|
2
|
+
import { Spin as T, CheckboxGroup as U } from "@aplus-frontend/antdv";
|
|
3
|
+
import { isFunction as _, isNil as F, omit as N } from "lodash-unified";
|
|
4
4
|
import "../../config-provider/index.mjs";
|
|
5
5
|
import "../../hooks/index.mjs";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { getOptionValue as
|
|
9
|
-
import { useNamespace as
|
|
10
|
-
import { useControllableValue as
|
|
11
|
-
const
|
|
6
|
+
import S from "../hooks/use-options.mjs";
|
|
7
|
+
import A from "../style/index.mjs";
|
|
8
|
+
import { getOptionValue as j, getOptionLabel as z } from "./helper.mjs";
|
|
9
|
+
import { useNamespace as D } from "../../config-provider/hooks/use-namespace.mjs";
|
|
10
|
+
import { useControllableValue as E } from "../../hooks/useControllableValue.mjs";
|
|
11
|
+
const W = /* @__PURE__ */ V({
|
|
12
12
|
name: "ApFieldCheckbox",
|
|
13
13
|
inheritAttrs: !1,
|
|
14
14
|
__name: "index",
|
|
@@ -30,33 +30,39 @@ const Q = /* @__PURE__ */ g({
|
|
|
30
30
|
vertical: { type: Boolean }
|
|
31
31
|
},
|
|
32
32
|
emits: ["update:value"],
|
|
33
|
-
setup(
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
setup(f, { expose: v, emit: y }) {
|
|
34
|
+
const k = y, t = f, { options: u, updateOptions: x } = S(t), { b: h, m: b } = D("field-checkbox"), g = A("field"), r = q(!1);
|
|
35
|
+
async function p() {
|
|
36
|
+
if (_(t.request))
|
|
37
|
+
return r.value = !0, t.request().then((a) => x(a)).finally(() => {
|
|
38
|
+
r.value = !1;
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
B(() => {
|
|
42
|
+
p();
|
|
39
43
|
});
|
|
40
|
-
const { value:
|
|
44
|
+
const { value: i, updateValue: C } = E(
|
|
41
45
|
t,
|
|
42
|
-
|
|
46
|
+
k,
|
|
43
47
|
{
|
|
44
48
|
defaultValue: []
|
|
45
49
|
}
|
|
46
50
|
);
|
|
47
|
-
return (
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
51
|
+
return v({
|
|
52
|
+
request: p
|
|
53
|
+
}), (a, G) => a.mode === "read" ? (o(), l(n, { key: 0 }, [
|
|
54
|
+
e(F)(e(i)) ? (o(), l(n, { key: 0 }, [
|
|
55
|
+
m(d(t.emptyText), 1)
|
|
56
|
+
], 64)) : (o(), l(n, { key: 1 }, [
|
|
57
|
+
m(d(e(u)?.filter((s) => e(i).indexOf(e(j)(s)) > -1).map((s) => e(z)(s)).join("、") || t.emptyText), 1)
|
|
52
58
|
], 64))
|
|
53
|
-
], 64)) : (o(), l(
|
|
54
|
-
|
|
59
|
+
], 64)) : (o(), l(n, { key: 1 }, [
|
|
60
|
+
r.value ? (o(), c(e(T), {
|
|
55
61
|
key: 0,
|
|
56
62
|
size: "small"
|
|
57
|
-
})) : (o(),
|
|
63
|
+
})) : (o(), c(e(U), O(
|
|
58
64
|
{ key: 1 },
|
|
59
|
-
e(
|
|
65
|
+
e(N)(t, [
|
|
60
66
|
"onUpdate:value",
|
|
61
67
|
"value",
|
|
62
68
|
"request",
|
|
@@ -64,15 +70,15 @@ const Q = /* @__PURE__ */ g({
|
|
|
64
70
|
"emptyText"
|
|
65
71
|
]),
|
|
66
72
|
{
|
|
67
|
-
options: e(
|
|
68
|
-
value: e(
|
|
69
|
-
class: [e(
|
|
70
|
-
"onUpdate:value": e(
|
|
73
|
+
options: e(u),
|
|
74
|
+
value: e(i),
|
|
75
|
+
class: [e(h)(), a.vertical ? e(b)("vertical") : null, e(g)],
|
|
76
|
+
"onUpdate:value": e(C)
|
|
71
77
|
}
|
|
72
78
|
), null, 16, ["options", "value", "class", "onUpdate:value"]))
|
|
73
79
|
], 64));
|
|
74
80
|
}
|
|
75
81
|
});
|
|
76
82
|
export {
|
|
77
|
-
|
|
83
|
+
W as default
|
|
78
84
|
};
|
|
@@ -43,6 +43,9 @@ export type ApFieldCheckboxProps = BasicApFieldProps<CheckboxGroupProps> & {
|
|
|
43
43
|
request?: () => Promise<CheckboxGroupProps['options']>;
|
|
44
44
|
vertical?: boolean;
|
|
45
45
|
};
|
|
46
|
+
export type ApFieldCheckboxExpose = {
|
|
47
|
+
request: () => Promise<void>;
|
|
48
|
+
};
|
|
46
49
|
export type ApFieldDateProps = BasicApFieldProps<Omit<DatePickerProps, 'mode' | 'value' | 'defaultValue' | 'onChange' | 'onOk' | 'format' | 'onUpdate:value'>> & {
|
|
47
50
|
emptyText?: string;
|
|
48
51
|
value?: number | null;
|
|
@@ -94,8 +97,7 @@ export type ApFieldRadioProps = BasicApFieldProps<RadioGroupProps> & {
|
|
|
94
97
|
vertical?: boolean;
|
|
95
98
|
};
|
|
96
99
|
export type ApiFieldRadioExpose = {
|
|
97
|
-
|
|
98
|
-
blur: () => void;
|
|
100
|
+
request: () => Promise<void>;
|
|
99
101
|
};
|
|
100
102
|
export type ApFieldSwitchConfirmConfig = Pick<PopconfirmProps, 'title' | 'okText' | 'cancelText' | 'description' | 'showCancel' | 'icon' | 'okType' | 'onCancel' | 'okButtonProps' | 'cancelButtonProps'>;
|
|
101
103
|
export type ApFieldSwitchProps = BasicApFieldProps<Omit<SwitchProps, 'onClick'>> & {
|
|
@@ -7,8 +7,7 @@ import { RadioGroupButtonStyle, RadioGroupOptionType } from '@aplus-frontend/ant
|
|
|
7
7
|
import { RadioChangeEvent } from '@aplus-frontend/antdv';
|
|
8
8
|
import { VueNode } from '@aplus-frontend/antdv/es/_util/type';
|
|
9
9
|
declare const _default: DefineComponent<ApFieldRadioProps, {
|
|
10
|
-
|
|
11
|
-
blur: () => void;
|
|
10
|
+
request: () => Promise<void>;
|
|
12
11
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
13
12
|
"update:value": (...args: any[]) => void;
|
|
14
13
|
}, string, PublicProps, Readonly<ApFieldRadioProps> & Readonly<{
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Spin as
|
|
3
|
-
import { isNil as
|
|
1
|
+
import { defineComponent as h, ref as q, onMounted as V, computed as C, unref as e, createElementBlock as p, openBlock as a, Fragment as u, createTextVNode as O, toDisplayString as S, createBlock as m, mergeProps as U } from "vue";
|
|
2
|
+
import { Spin as _, RadioGroup as N } from "@aplus-frontend/antdv";
|
|
3
|
+
import { isNil as R, omit as z } from "lodash-unified";
|
|
4
4
|
import "../../config-provider/index.mjs";
|
|
5
5
|
import "../../hooks/index.mjs";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { getOptionValue as
|
|
9
|
-
import { useControllableValue as
|
|
10
|
-
import { useNamespace as
|
|
11
|
-
const
|
|
6
|
+
import F from "../hooks/use-options.mjs";
|
|
7
|
+
import G from "../style/index.mjs";
|
|
8
|
+
import { getOptionValue as A, getOptionLabel as D } from "./helper.mjs";
|
|
9
|
+
import { useControllableValue as E } from "../../hooks/useControllableValue.mjs";
|
|
10
|
+
import { useNamespace as I } from "../../config-provider/hooks/use-namespace.mjs";
|
|
11
|
+
const X = /* @__PURE__ */ h({
|
|
12
12
|
name: "ApFieldRadio",
|
|
13
13
|
__name: "index",
|
|
14
14
|
props: {
|
|
@@ -32,40 +32,36 @@ const $ = /* @__PURE__ */ V({
|
|
|
32
32
|
request: {}
|
|
33
33
|
},
|
|
34
34
|
emits: ["update:value"],
|
|
35
|
-
setup(d, { expose:
|
|
36
|
-
const t = d, v =
|
|
37
|
-
|
|
38
|
-
t.request && (
|
|
39
|
-
|
|
35
|
+
setup(d, { expose: c, emit: f }) {
|
|
36
|
+
const t = d, v = f, { options: n, updateOptions: y } = F(t), { value: r, updateValue: g } = E(t, v), { b: k, m: x } = I("field-radio"), b = G("field"), l = q(!1);
|
|
37
|
+
async function i() {
|
|
38
|
+
t.request && (l.value = !0, t.request?.().then((o) => y(o)).finally(() => {
|
|
39
|
+
l.value = !1;
|
|
40
40
|
}));
|
|
41
|
+
}
|
|
42
|
+
V(() => {
|
|
43
|
+
i();
|
|
41
44
|
});
|
|
42
|
-
const
|
|
43
|
-
const o = e(
|
|
44
|
-
if (
|
|
45
|
+
const B = C(() => {
|
|
46
|
+
const o = e(r);
|
|
47
|
+
if (R(o))
|
|
45
48
|
return t.emptyText;
|
|
46
|
-
const
|
|
47
|
-
(
|
|
49
|
+
const s = n.value?.find(
|
|
50
|
+
(T) => o === A(T)
|
|
48
51
|
);
|
|
49
|
-
return
|
|
52
|
+
return D(s) || t.emptyText;
|
|
50
53
|
});
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
return f({
|
|
58
|
-
focus: B,
|
|
59
|
-
blur: T
|
|
60
|
-
}), (o, i) => o.mode === "read" ? (a(), s(p, { key: 0 }, [
|
|
61
|
-
S(U(h.value), 1)
|
|
62
|
-
], 64)) : (a(), s(p, { key: 1 }, [
|
|
63
|
-
n.value ? (a(), m(e(N), {
|
|
54
|
+
return c({
|
|
55
|
+
request: i
|
|
56
|
+
}), (o, s) => o.mode === "read" ? (a(), p(u, { key: 0 }, [
|
|
57
|
+
O(S(B.value), 1)
|
|
58
|
+
], 64)) : (a(), p(u, { key: 1 }, [
|
|
59
|
+
l.value ? (a(), m(e(_), {
|
|
64
60
|
key: 0,
|
|
65
61
|
size: "small"
|
|
66
|
-
})) : (a(), m(e(
|
|
62
|
+
})) : (a(), m(e(N), U(
|
|
67
63
|
{ key: 1 },
|
|
68
|
-
e(
|
|
64
|
+
e(z)(t, [
|
|
69
65
|
"value",
|
|
70
66
|
"onUpdate:value",
|
|
71
67
|
"options",
|
|
@@ -73,11 +69,10 @@ const $ = /* @__PURE__ */ V({
|
|
|
73
69
|
"vertical"
|
|
74
70
|
]),
|
|
75
71
|
{
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
class: [e(k)(), o.vertical ? e(b)("vertical") : null, e(x)],
|
|
72
|
+
ref: "radioGroupRef",
|
|
73
|
+
value: e(r),
|
|
74
|
+
options: e(n),
|
|
75
|
+
class: [e(k)(), o.vertical ? e(x)("vertical") : null, e(b)],
|
|
81
76
|
"onUpdate:value": e(g)
|
|
82
77
|
}
|
|
83
78
|
), null, 16, ["value", "options", "class", "onUpdate:value"]))
|
|
@@ -85,5 +80,5 @@ const $ = /* @__PURE__ */ V({
|
|
|
85
80
|
}
|
|
86
81
|
});
|
|
87
82
|
export {
|
|
88
|
-
|
|
83
|
+
X as default
|
|
89
84
|
};
|
|
@@ -322,7 +322,7 @@ declare function __VLS_template(): {
|
|
|
322
322
|
};
|
|
323
323
|
animation: StringConstructor;
|
|
324
324
|
direction: {
|
|
325
|
-
type:
|
|
325
|
+
type: PropType<"rtl" | "ltr">;
|
|
326
326
|
};
|
|
327
327
|
disabled: {
|
|
328
328
|
type: BooleanConstructor;
|
|
@@ -782,7 +782,7 @@ declare const __VLS_component: DefineComponent<ApFieldSelectProps, {
|
|
|
782
782
|
};
|
|
783
783
|
animation: StringConstructor;
|
|
784
784
|
direction: {
|
|
785
|
-
type:
|
|
785
|
+
type: PropType<"rtl" | "ltr">;
|
|
786
786
|
};
|
|
787
787
|
disabled: {
|
|
788
788
|
type: BooleanConstructor;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as ie, useSlots as de, ref as I, shallowRef as ce, computed as s, onMounted as pe, watch as fe, unref as n, createVNode as
|
|
1
|
+
import { defineComponent as ie, useSlots as de, ref as I, shallowRef as ce, computed as s, onMounted as pe, watch as fe, unref as n, createVNode as f, createElementBlock as _, createBlock as C, openBlock as m, toDisplayString as N, mergeProps as me, h as he, createSlots as ve, withCtx as h, createElementVNode as x, normalizeClass as v, createCommentVNode as M, resolveDynamicComponent as P, withModifiers as ye, renderList as ge, renderSlot as Ce, normalizeProps as be, guardReactiveProps as we } from "vue";
|
|
2
2
|
import { Select as Se, Flex as D, Checkbox as T, Spin as ke } from "@aplus-frontend/antdv";
|
|
3
3
|
import { debounce as Be, isFunction as q, isArray as Ne, isNil as xe, omit as L, isNumber as Fe } from "lodash-unified";
|
|
4
4
|
import "../../config-provider/index.mjs";
|
|
@@ -180,7 +180,7 @@ const Me = {
|
|
|
180
180
|
const F = de(), e = E, {
|
|
181
181
|
b
|
|
182
182
|
} = R("field-select"), {
|
|
183
|
-
b:
|
|
183
|
+
b: d
|
|
184
184
|
} = R("field-select-popup-option"), K = Ae("field"), O = I(!1), {
|
|
185
185
|
t: A
|
|
186
186
|
} = Ie(), j = Be((t) => {
|
|
@@ -195,7 +195,7 @@ const Me = {
|
|
|
195
195
|
const l = e.fieldNames?.label || "label";
|
|
196
196
|
return typeof o?.[l] == "string" && o[l].toLowerCase().indexOf(t.toLowerCase()) > -1;
|
|
197
197
|
}, {
|
|
198
|
-
options:
|
|
198
|
+
options: c,
|
|
199
199
|
updateOptions: y
|
|
200
200
|
} = Ve(e), w = ce(), u = I(e?.loading || !1), W = $, G = s(() => {
|
|
201
201
|
if (e.multiple)
|
|
@@ -227,14 +227,14 @@ const Me = {
|
|
|
227
227
|
deep: !0
|
|
228
228
|
});
|
|
229
229
|
const {
|
|
230
|
-
value:
|
|
230
|
+
value: p,
|
|
231
231
|
updateValue: S
|
|
232
232
|
} = _e(e, W), Q = Oe("Select", e), X = s(() => {
|
|
233
|
-
const t = n(
|
|
233
|
+
const t = n(p);
|
|
234
234
|
if (!t)
|
|
235
235
|
return e.emptyText;
|
|
236
236
|
const o = e.fieldNames?.label || "label", l = e.fieldNames?.value || "value";
|
|
237
|
-
return Ne(t) ? t.map((
|
|
237
|
+
return Ne(t) ? t.map((a) => n(c).find((re) => re[l] === a)?.[o]).filter(Boolean).join("、") || e.emptyText : n(c).find((a) => a[l] === t)?.[o] || e.emptyText;
|
|
238
238
|
}), Y = s(() => {
|
|
239
239
|
const t = !!e?.showSearch, o = e.searchMode;
|
|
240
240
|
let l = {};
|
|
@@ -251,7 +251,7 @@ const Me = {
|
|
|
251
251
|
placeholder: n(Q),
|
|
252
252
|
...l
|
|
253
253
|
};
|
|
254
|
-
}), Z = s(() =>
|
|
254
|
+
}), Z = s(() => c.value.map((t) => t[e.fieldNames?.value || "value"])), k = s(() => c.value.filter((t) => !t.disabled).map((t) => t[e.fieldNames?.value || "value"])), V = s(() => !e.multiple || z(e.maxCount) ? !1 : Fe(e.addAll) ? Z.value.length >= e.addAll : !!e.addAll), ee = s(() => e.multiple && e.allowOnlySelect && (!z(e.maxCount) || e.maxCount >= 1));
|
|
255
255
|
function te() {
|
|
256
256
|
w.value?.focus();
|
|
257
257
|
}
|
|
@@ -264,39 +264,41 @@ const Me = {
|
|
|
264
264
|
}
|
|
265
265
|
function le(t) {
|
|
266
266
|
const o = B(t, "value");
|
|
267
|
-
S(e.multiple ? [o] : o);
|
|
267
|
+
S(e.multiple ? [o] : o), e.onChange?.([o], [t]);
|
|
268
268
|
}
|
|
269
269
|
function ne(t) {
|
|
270
|
-
return F.option ?
|
|
271
|
-
class:
|
|
272
|
-
}, [F.option(t)]) :
|
|
273
|
-
class:
|
|
270
|
+
return F.option ? f("div", {
|
|
271
|
+
class: d("custom")
|
|
272
|
+
}, [F.option(t)]) : f("span", {
|
|
273
|
+
class: d("label")
|
|
274
274
|
}, [B(t, "label")]);
|
|
275
275
|
}
|
|
276
276
|
const ae = s(() => {
|
|
277
|
-
const t = n(
|
|
277
|
+
const t = n(p) || [], o = k.value;
|
|
278
278
|
return o.length > 0 && o.every((l) => t.includes(l));
|
|
279
279
|
}), se = s(() => {
|
|
280
|
-
const t = n(
|
|
280
|
+
const t = n(p) || [], o = k.value, l = o.filter((i) => t.includes(i)).length;
|
|
281
281
|
return l > 0 && l < o.length;
|
|
282
282
|
});
|
|
283
283
|
function ue() {
|
|
284
|
-
const t = new Set(n(
|
|
285
|
-
o.length > 0 && o.every((a) => t.has(a)) ? o.forEach((a) => t.delete(a)) : o.forEach((a) => t.add(a))
|
|
284
|
+
const t = new Set(n(p) || []), o = k.value;
|
|
285
|
+
o.length > 0 && o.every((a) => t.has(a)) ? o.forEach((a) => t.delete(a)) : o.forEach((a) => t.add(a));
|
|
286
|
+
const i = c.value.filter((a) => t.has(a[e.fieldNames?.value || "value"]));
|
|
287
|
+
S([...t]), e.onChange?.([...t], i);
|
|
286
288
|
}
|
|
287
289
|
return U({
|
|
288
290
|
focus: te,
|
|
289
291
|
blur: oe,
|
|
290
292
|
request: g
|
|
291
|
-
}), (t, o) => t.mode === "read" ? (
|
|
293
|
+
}), (t, o) => t.mode === "read" ? (m(), _("span", Me, N(X.value), 1)) : (m(), C(n(Se), me({
|
|
292
294
|
key: 1,
|
|
293
295
|
ref_key: "selectRef",
|
|
294
296
|
ref: w,
|
|
295
297
|
"allow-clear": ""
|
|
296
298
|
}, Y.value, {
|
|
297
299
|
mode: G.value,
|
|
298
|
-
value: n(
|
|
299
|
-
options: n(
|
|
300
|
+
value: n(p),
|
|
301
|
+
options: n(c),
|
|
300
302
|
loading: u.value,
|
|
301
303
|
"menu-item-selected-icon": he("span"),
|
|
302
304
|
"popup-class-name": `${n(b)("popup")} ${n(K)}`,
|
|
@@ -305,55 +307,55 @@ const Me = {
|
|
|
305
307
|
onFocus: J,
|
|
306
308
|
onDropdownVisibleChange: o[0] || (o[0] = (l) => O.value = l)
|
|
307
309
|
}), ve({
|
|
308
|
-
option:
|
|
309
|
-
class:
|
|
310
|
-
}, [
|
|
310
|
+
option: h((l) => [x("div", {
|
|
311
|
+
class: v(n(d)("outter"))
|
|
312
|
+
}, [f(n(D), {
|
|
311
313
|
justify: "space-between",
|
|
312
314
|
align: "center",
|
|
313
|
-
class:
|
|
315
|
+
class: v(n(d)("wrapper")),
|
|
314
316
|
gap: 8
|
|
315
317
|
}, {
|
|
316
|
-
default:
|
|
318
|
+
default: h(() => [f(n(D), {
|
|
317
319
|
gap: 8,
|
|
318
320
|
align: "center",
|
|
319
|
-
class:
|
|
321
|
+
class: v(n(d)("content-wrapper"))
|
|
320
322
|
}, {
|
|
321
|
-
default:
|
|
323
|
+
default: h(() => [V.value ? (m(), C(n(T), {
|
|
322
324
|
key: 0,
|
|
323
|
-
checked: n(
|
|
324
|
-
}, null, 8, ["checked"])) : M("", !0), (
|
|
325
|
+
checked: n(p)?.includes(B(l, "value"))
|
|
326
|
+
}, null, 8, ["checked"])) : M("", !0), (m(), C(P(ne(l))))]),
|
|
325
327
|
_: 2
|
|
326
|
-
}, 1032, ["class"]), ee.value && !l?.disabled ? (
|
|
328
|
+
}, 1032, ["class"]), ee.value && !l?.disabled ? (m(), _("span", {
|
|
327
329
|
key: 0,
|
|
328
|
-
class:
|
|
330
|
+
class: v(n(d)("action")),
|
|
329
331
|
onClick: ye(() => le(l), ["stop"])
|
|
330
332
|
}, N(n(A)("ap.field.chooseOnly")), 11, Pe)) : M("", !0)]),
|
|
331
333
|
_: 2
|
|
332
334
|
}, 1032, ["class"])], 2)]),
|
|
333
335
|
_: 2
|
|
334
|
-
}, [ge(n(L)(t.$slots, ["option"]), (l,
|
|
335
|
-
name:
|
|
336
|
-
fn:
|
|
336
|
+
}, [ge(n(L)(t.$slots, ["option"]), (l, i) => ({
|
|
337
|
+
name: i,
|
|
338
|
+
fn: h((a) => [Ce(t.$slots, i, be(we(a || {})))])
|
|
337
339
|
})), u.value ? {
|
|
338
340
|
name: "notFoundContent",
|
|
339
|
-
fn:
|
|
341
|
+
fn: h(() => [f(n(ke), {
|
|
340
342
|
size: "small"
|
|
341
343
|
})]),
|
|
342
344
|
key: "0"
|
|
343
345
|
} : void 0, V.value ? {
|
|
344
346
|
name: "dropdownRender",
|
|
345
|
-
fn:
|
|
347
|
+
fn: h(({
|
|
346
348
|
menuNode: l
|
|
347
349
|
}) => [x("div", {
|
|
348
350
|
tabindex: -1,
|
|
349
|
-
class:
|
|
351
|
+
class: v(n(b)("popup-all-option")),
|
|
350
352
|
onClick: ue
|
|
351
|
-
}, [
|
|
353
|
+
}, [f(n(T), {
|
|
352
354
|
checked: ae.value,
|
|
353
355
|
indeterminate: se.value
|
|
354
356
|
}, null, 8, ["checked", "indeterminate"]), x("span", {
|
|
355
|
-
class:
|
|
356
|
-
}, N(n(A)("ap.field.selectAll")), 3)], 2), (
|
|
357
|
+
class: v(n(b)("popup-all-option-label"))
|
|
358
|
+
}, N(n(A)("ap.field.selectAll")), 3)], 2), (m(), C(P(l)))]),
|
|
357
359
|
key: "1"
|
|
358
360
|
} : void 0]), 1040, ["mode", "value", "options", "loading", "menu-item-selected-icon", "popup-class-name", "open", "onUpdate:value"]));
|
|
359
361
|
}
|
|
@@ -15,8 +15,7 @@ declare function __VLS_template(): {
|
|
|
15
15
|
radioRef: CreateComponentPublicInstanceWithMixins<Readonly< ApFieldRadioProps> & Readonly<{
|
|
16
16
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
17
17
|
}>, {
|
|
18
|
-
|
|
19
|
-
blur: () => void;
|
|
18
|
+
request: () => Promise<void>;
|
|
20
19
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
21
20
|
"update:value": (...args: any[]) => void;
|
|
22
21
|
}, PublicProps, {
|
|
@@ -139,8 +138,7 @@ declare function __VLS_template(): {
|
|
|
139
138
|
}, Readonly< ApFieldRadioProps> & Readonly<{
|
|
140
139
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
141
140
|
}>, {
|
|
142
|
-
|
|
143
|
-
blur: () => void;
|
|
141
|
+
request: () => Promise<void>;
|
|
144
142
|
}, {}, {}, {}, {
|
|
145
143
|
mode: FieldMode;
|
|
146
144
|
vertical: boolean;
|
|
@@ -152,8 +150,7 @@ declare function __VLS_template(): {
|
|
|
152
150
|
};
|
|
153
151
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
154
152
|
declare const __VLS_component: DefineComponent<ApFormItemRadioProps, {
|
|
155
|
-
|
|
156
|
-
blur: () => void;
|
|
153
|
+
request: () => Promise<void> | undefined;
|
|
157
154
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApFormItemRadioProps> & Readonly<{}>, {
|
|
158
155
|
disabled: boolean;
|
|
159
156
|
required: boolean;
|
|
@@ -166,8 +163,7 @@ declare const __VLS_component: DefineComponent<ApFormItemRadioProps, {
|
|
|
166
163
|
radioRef: CreateComponentPublicInstanceWithMixins<Readonly< ApFieldRadioProps> & Readonly<{
|
|
167
164
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
168
165
|
}>, {
|
|
169
|
-
|
|
170
|
-
blur: () => void;
|
|
166
|
+
request: () => Promise<void>;
|
|
171
167
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
172
168
|
"update:value": (...args: any[]) => void;
|
|
173
169
|
}, PublicProps, {
|
|
@@ -290,8 +286,7 @@ declare const __VLS_component: DefineComponent<ApFormItemRadioProps, {
|
|
|
290
286
|
}, Readonly< ApFieldRadioProps> & Readonly<{
|
|
291
287
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
292
288
|
}>, {
|
|
293
|
-
|
|
294
|
-
blur: () => void;
|
|
289
|
+
request: () => Promise<void>;
|
|
295
290
|
}, {}, {}, {}, {
|
|
296
291
|
mode: FieldMode;
|
|
297
292
|
vertical: boolean;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as u, useSlots as m, shallowRef as c, createBlock as y, openBlock as B, normalizeProps as a, guardReactiveProps as t, unref as r, createSlots as _, withCtx as s, createVNode as v, mergeProps as b, renderList as x, renderSlot as g } from "vue";
|
|
2
2
|
import { omit as h } from "lodash-unified";
|
|
3
3
|
import "../../../ap-field/index.mjs";
|
|
4
4
|
import "../../item/index.vue2.mjs";
|
|
5
5
|
import F from "../../item/index.vue.mjs";
|
|
6
6
|
import k from "../../../ap-field/radio/index.vue.mjs";
|
|
7
|
-
const
|
|
7
|
+
const A = /* @__PURE__ */ u({
|
|
8
8
|
name: "ApFormItemRadio",
|
|
9
9
|
__name: "index",
|
|
10
10
|
props: {
|
|
@@ -52,34 +52,29 @@ const q = /* @__PURE__ */ f({
|
|
|
52
52
|
autoFocus: { type: Boolean },
|
|
53
53
|
field: { default: () => ({}) }
|
|
54
54
|
},
|
|
55
|
-
setup(i, { expose:
|
|
56
|
-
const
|
|
57
|
-
return
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
},
|
|
61
|
-
blur: () => {
|
|
62
|
-
e.value?.blur();
|
|
63
|
-
}
|
|
64
|
-
}), (o, S) => (v(), b(F, a(t(r(h)(d, ["field"]))), y({
|
|
55
|
+
setup(i, { expose: d }) {
|
|
56
|
+
const n = i, p = m(), o = c();
|
|
57
|
+
return d({
|
|
58
|
+
request: () => o.value?.request()
|
|
59
|
+
}), (e, C) => (B(), y(F, a(t(r(h)(n, ["field"]))), _({
|
|
65
60
|
default: s(() => [
|
|
66
|
-
|
|
61
|
+
v(r(k), b({
|
|
67
62
|
ref_key: "radioRef",
|
|
68
|
-
ref:
|
|
69
|
-
disabled:
|
|
70
|
-
},
|
|
63
|
+
ref: o,
|
|
64
|
+
disabled: e.disabled
|
|
65
|
+
}, e.field), null, 16, ["disabled"])
|
|
71
66
|
]),
|
|
72
67
|
_: 2
|
|
73
68
|
}, [
|
|
74
|
-
x(p, (
|
|
69
|
+
x(p, (R, l) => ({
|
|
75
70
|
name: l,
|
|
76
|
-
fn: s((
|
|
77
|
-
g(
|
|
71
|
+
fn: s((f) => [
|
|
72
|
+
g(e.$slots, l, a(t(f || {})))
|
|
78
73
|
])
|
|
79
74
|
}))
|
|
80
75
|
]), 1040));
|
|
81
76
|
}
|
|
82
77
|
});
|
|
83
78
|
export {
|
|
84
|
-
|
|
79
|
+
A as default
|
|
85
80
|
};
|
|
@@ -726,8 +726,7 @@ export declare const apTableFormItemMap: {
|
|
|
726
726
|
});
|
|
727
727
|
radio: {
|
|
728
728
|
new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly< ApFormItemRadioProps> & Readonly<{}>, {
|
|
729
|
-
|
|
730
|
-
blur: () => void;
|
|
729
|
+
request: () => Promise<void> | undefined;
|
|
731
730
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
|
|
732
731
|
disabled: boolean;
|
|
733
732
|
required: boolean;
|
|
@@ -740,8 +739,7 @@ export declare const apTableFormItemMap: {
|
|
|
740
739
|
radioRef: CreateComponentPublicInstanceWithMixins<Readonly< ApFieldRadioProps> & Readonly<{
|
|
741
740
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
742
741
|
}>, {
|
|
743
|
-
|
|
744
|
-
blur: () => void;
|
|
742
|
+
request: () => Promise<void>;
|
|
745
743
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
746
744
|
"update:value": (...args: any[]) => void;
|
|
747
745
|
}, PublicProps, {
|
|
@@ -864,8 +862,7 @@ export declare const apTableFormItemMap: {
|
|
|
864
862
|
}, Readonly< ApFieldRadioProps> & Readonly<{
|
|
865
863
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
866
864
|
}>, {
|
|
867
|
-
|
|
868
|
-
blur: () => void;
|
|
865
|
+
request: () => Promise<void>;
|
|
869
866
|
}, {}, {}, {}, {
|
|
870
867
|
mode: FieldMode;
|
|
871
868
|
vertical: boolean;
|
|
@@ -880,8 +877,7 @@ export declare const apTableFormItemMap: {
|
|
|
880
877
|
M: {};
|
|
881
878
|
Defaults: {};
|
|
882
879
|
}, Readonly< ApFormItemRadioProps> & Readonly<{}>, {
|
|
883
|
-
|
|
884
|
-
blur: () => void;
|
|
880
|
+
request: () => Promise<void> | undefined;
|
|
885
881
|
}, {}, {}, {}, {
|
|
886
882
|
disabled: boolean;
|
|
887
883
|
required: boolean;
|
|
@@ -895,8 +891,7 @@ export declare const apTableFormItemMap: {
|
|
|
895
891
|
__isTeleport?: never;
|
|
896
892
|
__isSuspense?: never;
|
|
897
893
|
} & ComponentOptionsBase<Readonly< ApFormItemRadioProps> & Readonly<{}>, {
|
|
898
|
-
|
|
899
|
-
blur: () => void;
|
|
894
|
+
request: () => Promise<void> | undefined;
|
|
900
895
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
|
|
901
896
|
disabled: boolean;
|
|
902
897
|
required: boolean;
|