@aplus-frontend/ui 0.0.33 → 0.0.34
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/index.mjs +217 -215
- package/es/src/ap-field/select/index.vue.mjs +36 -32
- package/es/src/ap-form/ap-form-item-group/index.vue.mjs +27 -26
- package/es/src/ap-form/ap-form.vue2.mjs +11 -11
- package/es/src/ap-form/search-form/index.vue.mjs +79 -78
- package/es/src/ap-modal/utils/createModal.mjs +34 -31
- package/es/src/ap-table/ap-table.vue.d.ts +54 -11
- package/es/src/ap-table/ap-table.vue.mjs +171 -148
- package/es/src/ap-table/hooks/use-table-paging.d.ts +1 -0
- package/es/src/ap-table/hooks/use-table-paging.mjs +47 -46
- package/es/src/ap-table/hooks/use-table-row-selection.d.ts +60 -0
- package/es/src/ap-table/hooks/use-table-row-selection.mjs +62 -0
- package/es/src/ap-table/interface.d.ts +14 -2
- package/es/src/ap-table/style/ap-table.css +2 -0
- package/es/src/ap-upload/apUpload.vue.d.ts +3 -3
- package/es/src/ap-upload/hooks/useOss.d.ts +3 -3
- package/es/src/business/ap-select-layout/index.css +117 -0
- package/es/src/business/ap-select-layout/index.d.ts +4 -0
- package/es/src/business/ap-select-layout/interface.d.ts +9 -0
- package/es/src/business/ap-select-layout/select-layout.vue.d.ts +76 -0
- package/es/src/business/ap-select-layout/select-layout.vue.mjs +4 -0
- package/es/src/business/ap-select-layout/select-layout.vue2.mjs +145 -0
- package/es/src/business/index.d.ts +76 -1
- package/es/src/business/index.mjs +9 -6
- package/es/src/config-provider/config-provider.d.ts +144 -1
- package/es/src/config-provider/config-provider.mjs +35 -29
- package/es/src/config-provider/index.mjs +22 -20
- package/es/src/design-token/index.mjs +1 -1
- package/es/src/editable-table/form-item.vue.d.ts +7 -7
- package/es/src/editable-table/form-item.vue.mjs +2 -2
- package/es/src/editable-table/index.vue.d.ts +7 -7
- package/es/src/editable-table/index.vue.mjs +10 -10
- package/es/src/editable-table/interface.d.ts +1 -1
- package/es/src/index.mjs +188 -186
- package/es/src/theme/ap-select-layout/ap-select-layout.css +117 -0
- package/es/src/theme/ap-table/ap-table.css +2 -0
- package/lib/index.js +1 -1
- package/lib/src/ap-field/select/index.vue.js +1 -1
- package/lib/src/ap-form/ap-form-item-group/index.vue.js +1 -1
- package/lib/src/ap-form/ap-form.vue2.js +1 -1
- package/lib/src/ap-form/search-form/index.vue.js +1 -1
- package/lib/src/ap-modal/utils/createModal.js +1 -1
- package/lib/src/ap-table/ap-table.vue.d.ts +54 -11
- package/lib/src/ap-table/ap-table.vue.js +1 -1
- package/lib/src/ap-table/hooks/use-table-paging.d.ts +1 -0
- package/lib/src/ap-table/hooks/use-table-paging.js +1 -1
- package/lib/src/ap-table/hooks/use-table-row-selection.d.ts +60 -0
- package/lib/src/ap-table/hooks/use-table-row-selection.js +1 -0
- package/lib/src/ap-table/interface.d.ts +14 -2
- package/lib/src/ap-table/style/ap-table.css +2 -0
- package/lib/src/ap-upload/apUpload.vue.d.ts +3 -3
- package/lib/src/ap-upload/hooks/useOss.d.ts +3 -3
- package/lib/src/business/ap-select-layout/index.css +117 -0
- package/lib/src/business/ap-select-layout/index.d.ts +4 -0
- package/lib/src/business/ap-select-layout/interface.d.ts +9 -0
- package/lib/src/business/ap-select-layout/select-layout.vue.d.ts +76 -0
- package/lib/src/business/ap-select-layout/select-layout.vue.js +1 -0
- package/lib/src/business/ap-select-layout/select-layout.vue2.js +1 -0
- package/lib/src/business/index.d.ts +76 -1
- package/lib/src/business/index.js +1 -1
- package/lib/src/config-provider/config-provider.d.ts +144 -1
- package/lib/src/config-provider/config-provider.js +1 -1
- package/lib/src/config-provider/index.js +1 -1
- package/lib/src/design-token/index.js +1 -1
- package/lib/src/editable-table/form-item.vue.d.ts +7 -7
- package/lib/src/editable-table/form-item.vue.js +1 -1
- package/lib/src/editable-table/index.vue.d.ts +7 -7
- package/lib/src/editable-table/index.vue.js +1 -1
- package/lib/src/editable-table/interface.d.ts +1 -1
- package/lib/src/index.js +1 -1
- package/lib/src/theme/ap-select-layout/ap-select-layout.css +117 -0
- package/lib/src/theme/ap-table/ap-table.css +2 -0
- package/package.json +2 -2
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { defineComponent as M, ref as s, computed as O, onMounted as U, openBlock as p, createElementBlock as v, normalizeClass as n, unref as e, createVNode as r, Transition as W, withCtx as i, withDirectives as S, createElementVNode as a, toDisplayString as $, createTextVNode as x, Fragment as z, renderList as R, renderSlot as A, vShow as N, createCommentVNode as j } from "vue";
|
|
2
|
+
import "../../ap-field/index.mjs";
|
|
3
|
+
import { IconApLeftarrow as G, IconApMenu as H } from "@aplus-frontend/icon";
|
|
4
|
+
import "../../config-provider/index.mjs";
|
|
5
|
+
import { Tooltip as V, TypographyText as J } from "ant-design-vue";
|
|
6
|
+
import { debounce as K } from "lodash-unified";
|
|
7
|
+
import "./index.css";
|
|
8
|
+
import { useNamespace as P } from "../../config-provider/hooks/use-namespace.mjs";
|
|
9
|
+
import { ApFieldText as Q } from "../../ap-field/text/index.mjs";
|
|
10
|
+
const X = ["onClick"], de = /* @__PURE__ */ M({
|
|
11
|
+
__name: "select-layout",
|
|
12
|
+
props: {
|
|
13
|
+
title: {},
|
|
14
|
+
request: {},
|
|
15
|
+
defaultFold: { type: Boolean, default: !1 }
|
|
16
|
+
},
|
|
17
|
+
emits: ["onSelect", "afterEnter", "afterLeave"],
|
|
18
|
+
setup(_, { emit: w }) {
|
|
19
|
+
const { b: m, be: f, bem: d } = P("ap-select-layout"), c = _, h = w, y = s(), u = s(c.defaultFold), C = s(!c.defaultFold), g = s(), T = s(), b = s(), k = s(""), L = () => {
|
|
20
|
+
u.value = !u.value, g.value = !1, T.value = !1;
|
|
21
|
+
}, F = (t) => {
|
|
22
|
+
b.value = t, h("onSelect", t);
|
|
23
|
+
}, B = K((t) => {
|
|
24
|
+
var l;
|
|
25
|
+
k.value = (l = t.target) == null ? void 0 : l.value;
|
|
26
|
+
}, 500), q = O(() => {
|
|
27
|
+
var t;
|
|
28
|
+
return (t = y.value) == null ? void 0 : t.filter((l) => l.name.includes(k.value));
|
|
29
|
+
}), D = (t) => {
|
|
30
|
+
C.value = !0, h("afterEnter", t);
|
|
31
|
+
}, I = (t) => {
|
|
32
|
+
C.value = !1, h("afterLeave", t);
|
|
33
|
+
};
|
|
34
|
+
return U(() => {
|
|
35
|
+
c.request().then((t) => {
|
|
36
|
+
var l;
|
|
37
|
+
y.value = t, F((l = y.value) == null ? void 0 : l[0]);
|
|
38
|
+
});
|
|
39
|
+
}), (t, l) => {
|
|
40
|
+
var E;
|
|
41
|
+
return p(), v("div", {
|
|
42
|
+
class: n(e(m)())
|
|
43
|
+
}, [
|
|
44
|
+
r(W, {
|
|
45
|
+
mode: "out-in",
|
|
46
|
+
onAfterEnter: D,
|
|
47
|
+
onAfterLeave: I
|
|
48
|
+
}, {
|
|
49
|
+
default: i(() => [
|
|
50
|
+
S(a("div", {
|
|
51
|
+
class: n(e(m)("side"))
|
|
52
|
+
}, [
|
|
53
|
+
a("div", {
|
|
54
|
+
class: n(e(f)("side", "header"))
|
|
55
|
+
}, [
|
|
56
|
+
a("h3", null, $(c.title), 1),
|
|
57
|
+
a("div", {
|
|
58
|
+
class: n(e(d)("side", "header", "imgWrap"))
|
|
59
|
+
}, [
|
|
60
|
+
r(e(V), {
|
|
61
|
+
open: g.value,
|
|
62
|
+
"onUpdate:open": l[0] || (l[0] = (o) => g.value = o)
|
|
63
|
+
}, {
|
|
64
|
+
title: i(() => [
|
|
65
|
+
x("收起")
|
|
66
|
+
]),
|
|
67
|
+
default: i(() => [
|
|
68
|
+
r(e(G), { onClick: L })
|
|
69
|
+
]),
|
|
70
|
+
_: 1
|
|
71
|
+
}, 8, ["open"])
|
|
72
|
+
], 2)
|
|
73
|
+
], 2),
|
|
74
|
+
a("div", {
|
|
75
|
+
class: n(e(f)("side", "body"))
|
|
76
|
+
}, [
|
|
77
|
+
a("div", {
|
|
78
|
+
class: n(e(d)("side", "body", "search"))
|
|
79
|
+
}, [
|
|
80
|
+
r(e(Q), {
|
|
81
|
+
placeholder: "请输入",
|
|
82
|
+
onChange: e(B)
|
|
83
|
+
}, null, 8, ["onChange"])
|
|
84
|
+
], 2),
|
|
85
|
+
a("div", {
|
|
86
|
+
class: n(e(d)("side", "body", "scroll"))
|
|
87
|
+
}, [
|
|
88
|
+
(p(!0), v(z, null, R(q.value, (o) => S((p(), v("div", {
|
|
89
|
+
key: o.value,
|
|
90
|
+
class: n(`${e(d)("side", "body", "scroll-item")} ${b.value === o ? "active" : ""}`),
|
|
91
|
+
onClick: (Y) => F(o)
|
|
92
|
+
}, [
|
|
93
|
+
A(t.$slots, "itemRender", { item: o }, () => [
|
|
94
|
+
r(e(J), {
|
|
95
|
+
ellipsis: { tooltip: o.name },
|
|
96
|
+
content: `${o.name}`
|
|
97
|
+
}, null, 8, ["ellipsis", "content"])
|
|
98
|
+
])
|
|
99
|
+
], 10, X)), [
|
|
100
|
+
[N, C.value]
|
|
101
|
+
])), 128))
|
|
102
|
+
], 2)
|
|
103
|
+
], 2)
|
|
104
|
+
], 2), [
|
|
105
|
+
[N, !u.value]
|
|
106
|
+
])
|
|
107
|
+
]),
|
|
108
|
+
_: 3
|
|
109
|
+
}),
|
|
110
|
+
a("div", {
|
|
111
|
+
class: n(e(m)("content"))
|
|
112
|
+
}, [
|
|
113
|
+
a("div", {
|
|
114
|
+
class: n(e(f)("content", "header"))
|
|
115
|
+
}, [
|
|
116
|
+
u.value ? (p(), v("div", {
|
|
117
|
+
key: 0,
|
|
118
|
+
class: n(e(d)("content", "header", "imgWrap"))
|
|
119
|
+
}, [
|
|
120
|
+
r(e(V), {
|
|
121
|
+
open: T.value,
|
|
122
|
+
"onUpdate:open": l[1] || (l[1] = (o) => T.value = o)
|
|
123
|
+
}, {
|
|
124
|
+
title: i(() => [
|
|
125
|
+
x("展开")
|
|
126
|
+
]),
|
|
127
|
+
default: i(() => [
|
|
128
|
+
r(e(H), { onClick: L })
|
|
129
|
+
]),
|
|
130
|
+
_: 1
|
|
131
|
+
}, 8, ["open"])
|
|
132
|
+
], 2)) : j("", !0),
|
|
133
|
+
a("div", {
|
|
134
|
+
class: n(e(d)("content", "header", "title"))
|
|
135
|
+
}, $((E = b.value) == null ? void 0 : E.name), 3)
|
|
136
|
+
], 2),
|
|
137
|
+
A(t.$slots, "default")
|
|
138
|
+
], 2)
|
|
139
|
+
], 2);
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
export {
|
|
144
|
+
de as default
|
|
145
|
+
};
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { CreateComponentPublicInstance, ExtractPropTypes, PropType, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ComponentOptionsBase, Plugin, CSSProperties } from 'vue';
|
|
1
|
+
import { CreateComponentPublicInstance, ExtractPropTypes, PropType, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ComponentOptionsBase, Plugin, CSSProperties, ShallowUnwrapRef, VNode, RendererNode, RendererElement } from 'vue';
|
|
2
2
|
import { LiteralUnion } from 'ant-design-vue/es/_util/type';
|
|
3
3
|
import { TooltipPlacement } from 'ant-design-vue/es/tooltip';
|
|
4
4
|
import { ApStatusProps } from './ap-status/interface';
|
|
5
|
+
import { ApSelectItem } from './ap-select-layout/interface';
|
|
5
6
|
export type { ApTitleProps } from './title/interface';
|
|
6
7
|
export type { ApExpandAlertProps } from './expandAlert/interface';
|
|
7
8
|
export type { ApLabelProps } from './ap-label/interface';
|
|
8
9
|
export type { ApStatusProps, ApStatusGroupProps, ApStatusGroupItemProps } from './ap-status/interface';
|
|
10
|
+
export type { ApSelectItem, ApSelectLayoutProps } from './ap-select-layout/interface';
|
|
9
11
|
export declare const ApTitle: {
|
|
10
12
|
new (...args: any[]): CreateComponentPublicInstance<Readonly< ExtractPropTypes<{
|
|
11
13
|
trigger: {
|
|
@@ -839,3 +841,76 @@ export declare const ApStatusGroup: {
|
|
|
839
841
|
onClick?: (() => void) | undefined;
|
|
840
842
|
};
|
|
841
843
|
});
|
|
844
|
+
export declare const ApSelectLayout: (<T extends ApSelectItem>(__VLS_props: {
|
|
845
|
+
onAfterEnter?: ((el: Element) => any) | undefined;
|
|
846
|
+
onAfterLeave?: ((el: Element) => any) | undefined;
|
|
847
|
+
title: string;
|
|
848
|
+
request: () => Promise<T[]>;
|
|
849
|
+
onOnSelect?: ((value: T) => any) | undefined;
|
|
850
|
+
defaultFold?: boolean | undefined;
|
|
851
|
+
} & VNodeProps & AllowedComponentProps & ComponentCustomProps, __VLS_ctx?: {
|
|
852
|
+
attrs: any;
|
|
853
|
+
slots: {
|
|
854
|
+
itemRender?(_: {
|
|
855
|
+
item: T;
|
|
856
|
+
}): any;
|
|
857
|
+
default?(_: {}): any;
|
|
858
|
+
};
|
|
859
|
+
emit: {
|
|
860
|
+
(event: "onSelect", value: T): void;
|
|
861
|
+
(event: "afterEnter", el: Element): void;
|
|
862
|
+
(event: "afterLeave", el: Element): void;
|
|
863
|
+
};
|
|
864
|
+
} | undefined, __VLS_expose?: ((exposed: ShallowUnwrapRef<{}>) => void) | undefined, __VLS_setup?: Promise<{
|
|
865
|
+
props: {
|
|
866
|
+
onAfterEnter?: ((el: Element) => any) | undefined;
|
|
867
|
+
onAfterLeave?: ((el: Element) => any) | undefined;
|
|
868
|
+
title: string;
|
|
869
|
+
request: () => Promise<T[]>;
|
|
870
|
+
onOnSelect?: ((value: T) => any) | undefined;
|
|
871
|
+
defaultFold?: boolean | undefined;
|
|
872
|
+
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
873
|
+
expose(exposed: ShallowUnwrapRef<{}>): void;
|
|
874
|
+
attrs: any;
|
|
875
|
+
slots: {
|
|
876
|
+
itemRender?(_: {
|
|
877
|
+
item: T;
|
|
878
|
+
}): any;
|
|
879
|
+
default?(_: {}): any;
|
|
880
|
+
};
|
|
881
|
+
emit: {
|
|
882
|
+
(event: "onSelect", value: T): void;
|
|
883
|
+
(event: "afterEnter", el: Element): void;
|
|
884
|
+
(event: "afterLeave", el: Element): void;
|
|
885
|
+
};
|
|
886
|
+
}>) => VNode<RendererNode, RendererElement, {
|
|
887
|
+
[key: string]: any;
|
|
888
|
+
}> & {
|
|
889
|
+
__ctx?: {
|
|
890
|
+
props: {
|
|
891
|
+
onAfterEnter?: ((el: Element) => any) | undefined;
|
|
892
|
+
onAfterLeave?: ((el: Element) => any) | undefined;
|
|
893
|
+
title: string;
|
|
894
|
+
request: () => Promise<T[]>;
|
|
895
|
+
onOnSelect?: ((value: T) => any) | undefined;
|
|
896
|
+
defaultFold?: boolean | undefined;
|
|
897
|
+
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
898
|
+
expose(exposed: ShallowUnwrapRef<{}>): void;
|
|
899
|
+
attrs: any;
|
|
900
|
+
slots: {
|
|
901
|
+
itemRender?(_: {
|
|
902
|
+
item: T;
|
|
903
|
+
}): any;
|
|
904
|
+
default?(_: {}): any;
|
|
905
|
+
};
|
|
906
|
+
emit: {
|
|
907
|
+
(event: "onSelect", value: T): void;
|
|
908
|
+
(event: "afterEnter", el: Element): void;
|
|
909
|
+
(event: "afterLeave", el: Element): void;
|
|
910
|
+
};
|
|
911
|
+
} | undefined;
|
|
912
|
+
}) & Plugin & (new (...args: any[]) => {
|
|
913
|
+
$props: {
|
|
914
|
+
onClick?: (() => void) | undefined;
|
|
915
|
+
};
|
|
916
|
+
});
|
|
@@ -4,16 +4,19 @@ import "./expandAlert/ApExpandAlert.vue.mjs";
|
|
|
4
4
|
import "./ap-label/ApLabel.vue.mjs";
|
|
5
5
|
import "./ap-status/ApStatus.vue.mjs";
|
|
6
6
|
import "./ap-status/ApStatusGroup.vue.mjs";
|
|
7
|
+
import "./ap-select-layout/select-layout.vue.mjs";
|
|
7
8
|
import o from "./title/ApTitle.vue2.mjs";
|
|
8
9
|
import m from "./expandAlert/ApExpandAlert.vue2.mjs";
|
|
9
10
|
import r from "./ap-label/ApLabel.vue2.mjs";
|
|
10
11
|
import p from "./ap-status/ApStatus.vue2.mjs";
|
|
11
12
|
import i from "./ap-status/ApStatusGroup.vue2.mjs";
|
|
12
|
-
|
|
13
|
+
import s from "./ap-select-layout/select-layout.vue2.mjs";
|
|
14
|
+
const b = t(o), d = m, h = t(r), w = t(p), y = t(i), E = t(s);
|
|
13
15
|
export {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
d as ApExpandAlert,
|
|
17
|
+
h as ApLabel,
|
|
18
|
+
E as ApSelectLayout,
|
|
19
|
+
w as ApStatus,
|
|
20
|
+
y as ApStatusGroup,
|
|
21
|
+
b as ApTitle
|
|
19
22
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Ref, ExtractPropTypes, PropType, DefineComponent, ComponentOptionsMixin, PublicProps } from 'vue';
|
|
2
2
|
import { default as __DTS_DEFAULT_0__ } from 'ant-design-vue/es/config-provider/renderEmpty';
|
|
3
3
|
import { TransformCellTextProps } from 'ant-design-vue/es/table/interface';
|
|
4
4
|
import { CSPConfig } from 'ant-design-vue/es/config-provider';
|
|
@@ -9,6 +9,149 @@ import { RequiredMark } from 'ant-design-vue/es/form/Form';
|
|
|
9
9
|
import { ThemeConfig } from 'ant-design-vue/es/config-provider/context';
|
|
10
10
|
import { LocaleType } from 'src';
|
|
11
11
|
import { ApiType, TableDefaultConfig, ScrollbarGlobalConfig, ApUploadConfig } from './constants';
|
|
12
|
+
|
|
13
|
+
export declare const globalConfigCached: Ref<Partial< ExtractPropTypes<{
|
|
14
|
+
iconPrefixCls: StringConstructor;
|
|
15
|
+
getTargetContainer: {
|
|
16
|
+
type: PropType<() => Window | HTMLElement>;
|
|
17
|
+
};
|
|
18
|
+
getPopupContainer: {
|
|
19
|
+
type: PropType<(triggerNode?: HTMLElement | undefined) => HTMLElement>;
|
|
20
|
+
};
|
|
21
|
+
prefixCls: StringConstructor;
|
|
22
|
+
getPrefixCls: {
|
|
23
|
+
type: PropType<(suffixCls?: string | undefined, customizePrefixCls?: string | undefined) => string>;
|
|
24
|
+
};
|
|
25
|
+
renderEmpty: {
|
|
26
|
+
type: PropType<__DTS_DEFAULT_0__>;
|
|
27
|
+
};
|
|
28
|
+
transformCellText: {
|
|
29
|
+
type: PropType<(tableProps: TransformCellTextProps) => any>;
|
|
30
|
+
};
|
|
31
|
+
csp: {
|
|
32
|
+
type: PropType<CSPConfig>;
|
|
33
|
+
default: CSPConfig;
|
|
34
|
+
};
|
|
35
|
+
input: {
|
|
36
|
+
type: PropType<{
|
|
37
|
+
autocomplete?: string | undefined;
|
|
38
|
+
}>;
|
|
39
|
+
default: {
|
|
40
|
+
autocomplete?: string | undefined;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
autoInsertSpaceInButton: {
|
|
44
|
+
type: BooleanConstructor;
|
|
45
|
+
default: any;
|
|
46
|
+
};
|
|
47
|
+
locale: {
|
|
48
|
+
type: PropType<Locale>;
|
|
49
|
+
default: Locale;
|
|
50
|
+
};
|
|
51
|
+
pageHeader: {
|
|
52
|
+
type: PropType<{
|
|
53
|
+
ghost?: boolean | undefined;
|
|
54
|
+
}>;
|
|
55
|
+
default: {
|
|
56
|
+
ghost?: boolean | undefined;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
componentSize: {
|
|
60
|
+
type: PropType<ButtonSize>;
|
|
61
|
+
};
|
|
62
|
+
componentDisabled: {
|
|
63
|
+
type: BooleanConstructor;
|
|
64
|
+
default: any;
|
|
65
|
+
};
|
|
66
|
+
direction: {
|
|
67
|
+
type: PropType<"ltr" | "rtl">;
|
|
68
|
+
default: string;
|
|
69
|
+
};
|
|
70
|
+
space: {
|
|
71
|
+
type: PropType<{
|
|
72
|
+
size?: number | ButtonSize;
|
|
73
|
+
}>;
|
|
74
|
+
default: {
|
|
75
|
+
size?: number | ButtonSize;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
virtual: {
|
|
79
|
+
type: BooleanConstructor;
|
|
80
|
+
default: any;
|
|
81
|
+
};
|
|
82
|
+
dropdownMatchSelectWidth: {
|
|
83
|
+
type: (BooleanConstructor | NumberConstructor)[];
|
|
84
|
+
default: boolean;
|
|
85
|
+
};
|
|
86
|
+
form: {
|
|
87
|
+
type: PropType<{
|
|
88
|
+
validateMessages?: ValidateMessages | undefined;
|
|
89
|
+
requiredMark?: RequiredMark | undefined;
|
|
90
|
+
colon?: boolean | undefined;
|
|
91
|
+
}>;
|
|
92
|
+
default: {
|
|
93
|
+
validateMessages?: ValidateMessages | undefined;
|
|
94
|
+
requiredMark?: RequiredMark | undefined;
|
|
95
|
+
colon?: boolean | undefined;
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
pagination: {
|
|
99
|
+
type: PropType<{
|
|
100
|
+
showSizeChanger?: boolean | undefined;
|
|
101
|
+
}>;
|
|
102
|
+
default: {
|
|
103
|
+
showSizeChanger?: boolean | undefined;
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
theme: {
|
|
107
|
+
type: PropType<ThemeConfig>;
|
|
108
|
+
default: ThemeConfig;
|
|
109
|
+
};
|
|
110
|
+
select: {
|
|
111
|
+
type: PropType<{
|
|
112
|
+
showSearch?: boolean | undefined;
|
|
113
|
+
}>;
|
|
114
|
+
default: {
|
|
115
|
+
showSearch?: boolean | undefined;
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
wave: {
|
|
119
|
+
type: PropType<{
|
|
120
|
+
disabled?: boolean | undefined;
|
|
121
|
+
}>;
|
|
122
|
+
default: {
|
|
123
|
+
disabled?: boolean | undefined;
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
aplusLocale: {
|
|
127
|
+
type: PropType<LocaleType>;
|
|
128
|
+
};
|
|
129
|
+
namespace: {
|
|
130
|
+
type: StringConstructor;
|
|
131
|
+
default: string;
|
|
132
|
+
};
|
|
133
|
+
api: {
|
|
134
|
+
type: PropType<ApiType>;
|
|
135
|
+
default: () => {};
|
|
136
|
+
};
|
|
137
|
+
table: {
|
|
138
|
+
type: PropType<TableDefaultConfig>;
|
|
139
|
+
};
|
|
140
|
+
scrollbar: {
|
|
141
|
+
type: PropType<ScrollbarGlobalConfig>;
|
|
142
|
+
default: () => {
|
|
143
|
+
native: boolean;
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
uiMode: {
|
|
147
|
+
type: PropType<"aplus" | "admin">;
|
|
148
|
+
default: string;
|
|
149
|
+
};
|
|
150
|
+
apUpload: {
|
|
151
|
+
type: PropType<ApUploadConfig>;
|
|
152
|
+
default: () => {};
|
|
153
|
+
};
|
|
154
|
+
}>>>;
|
|
12
155
|
export declare const ConfigProvider: DefineComponent<{
|
|
13
156
|
iconPrefixCls: StringConstructor;
|
|
14
157
|
getTargetContainer: {
|
|
@@ -1,40 +1,46 @@
|
|
|
1
|
-
import { isVNode as
|
|
2
|
-
import { ConfigProvider as
|
|
3
|
-
import { provideGlobalConfig as
|
|
4
|
-
import { configProviderProps as
|
|
5
|
-
import { tableDefaultConfig as
|
|
6
|
-
import { mergeAntdProvideConfig as
|
|
7
|
-
function
|
|
8
|
-
return typeof
|
|
1
|
+
import { isVNode as l, ref as n, defineComponent as f, computed as c, watch as d, createVNode as m, renderSlot as u } from "vue";
|
|
2
|
+
import { ConfigProvider as p } from "ant-design-vue";
|
|
3
|
+
import { provideGlobalConfig as g } from "./hooks/use-global-config.mjs";
|
|
4
|
+
import { configProviderProps as b } from "./config-provider-props.mjs";
|
|
5
|
+
import { tableDefaultConfig as v } from "./constants.mjs";
|
|
6
|
+
import { mergeAntdProvideConfig as C } from "../utils/config-provider-preset.mjs";
|
|
7
|
+
function s(e) {
|
|
8
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !l(e);
|
|
9
9
|
}
|
|
10
|
-
const
|
|
10
|
+
const r = n({}), L = /* @__PURE__ */ f({
|
|
11
11
|
name: "AplusConfigProvider",
|
|
12
|
-
props:
|
|
13
|
-
setup(
|
|
14
|
-
slots:
|
|
12
|
+
props: b(),
|
|
13
|
+
setup(e, {
|
|
14
|
+
slots: a
|
|
15
15
|
}) {
|
|
16
|
-
const i =
|
|
17
|
-
namespace:
|
|
18
|
-
aplusLocale:
|
|
19
|
-
api:
|
|
16
|
+
const i = c(() => ({
|
|
17
|
+
namespace: e.namespace,
|
|
18
|
+
aplusLocale: e.aplusLocale,
|
|
19
|
+
api: e.api,
|
|
20
20
|
table: {
|
|
21
|
-
...
|
|
22
|
-
...
|
|
21
|
+
...v,
|
|
22
|
+
...e.table || {}
|
|
23
23
|
},
|
|
24
|
-
scrollbar:
|
|
25
|
-
uiMode:
|
|
26
|
-
apUpload:
|
|
27
|
-
})),
|
|
28
|
-
return () => {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
24
|
+
scrollbar: e.scrollbar,
|
|
25
|
+
uiMode: e.uiMode,
|
|
26
|
+
apUpload: e.apUpload
|
|
27
|
+
})), t = g(i);
|
|
28
|
+
return d(() => e, (o) => {
|
|
29
|
+
r.value = C(o);
|
|
30
|
+
}, {
|
|
31
|
+
deep: !0,
|
|
32
|
+
immediate: !0
|
|
33
|
+
}), () => {
|
|
34
|
+
let o;
|
|
35
|
+
return m(p, r.value, s(o = u(a, "default", {
|
|
36
|
+
config: t == null ? void 0 : t.value
|
|
37
|
+
})) ? o : {
|
|
38
|
+
default: () => [o]
|
|
34
39
|
});
|
|
35
40
|
};
|
|
36
41
|
}
|
|
37
42
|
});
|
|
38
43
|
export {
|
|
39
|
-
|
|
44
|
+
L as ConfigProvider,
|
|
45
|
+
r as globalConfigCached
|
|
40
46
|
};
|
|
@@ -1,28 +1,30 @@
|
|
|
1
1
|
import { withInstall as e } from "@aplus-frontend/utils";
|
|
2
2
|
import { ConfigProvider as o } from "./config-provider.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
3
|
+
import { globalConfigCached as i } from "./config-provider.mjs";
|
|
4
|
+
import { configProviderProps as p } from "./config-provider-props.mjs";
|
|
5
|
+
import { configProviderContextKey as m, tableDefaultConfig as c } from "./constants.mjs";
|
|
6
|
+
import { keysOf as x, provideGlobalConfig as C, useGlobalConfig as g } from "./hooks/use-global-config.mjs";
|
|
7
|
+
import { buildLocaleContext as b, buildTranslator as v, localeContextKey as P, translate as y, useLocale as G } from "./hooks/use-locale.mjs";
|
|
8
|
+
import { defaultNamespace as N, namespaceContextKey as h, useGetDerivedNamespace as D, useNamespace as L } from "./hooks/use-namespace.mjs";
|
|
8
9
|
const a = e(o);
|
|
9
10
|
export {
|
|
10
11
|
a as APConfigProvider,
|
|
11
12
|
o as ConfigProvider,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
b as buildLocaleContext,
|
|
14
|
+
v as buildTranslator,
|
|
15
|
+
m as configProviderContextKey,
|
|
16
|
+
p as configProviderProps,
|
|
16
17
|
a as default,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
18
|
+
N as defaultNamespace,
|
|
19
|
+
i as globalConfigCached,
|
|
20
|
+
x as keysOf,
|
|
21
|
+
P as localeContextKey,
|
|
22
|
+
h as namespaceContextKey,
|
|
23
|
+
C as provideGlobalConfig,
|
|
24
|
+
c as tableDefaultConfig,
|
|
25
|
+
y as translate,
|
|
26
|
+
D as useGetDerivedNamespace,
|
|
27
|
+
g as useGlobalConfig,
|
|
28
|
+
G as useLocale,
|
|
29
|
+
L as useNamespace
|
|
28
30
|
};
|
|
@@ -2,7 +2,7 @@ import { EditableColumnType } from './interface';
|
|
|
2
2
|
import { ExtractPropTypes, PropType, VNode, RendererNode, RendererElement, CSSProperties, HTMLAttributes, VNodeProps, AllowedComponentProps, ComponentCustomProps, ShallowUnwrapRef } from 'vue';
|
|
3
3
|
import { SpinSize } from 'ant-design-vue/es/spin/Spin';
|
|
4
4
|
import { VueTypeValidableDef, VueTypeDef } from '../../node_modules/vue-types';
|
|
5
|
-
import { GetPopupContainer,
|
|
5
|
+
import { GetPopupContainer, TableLocale, SortOrder, TableRowSelection } from 'ant-design-vue/es/table/interface';
|
|
6
6
|
import { RenderExpandIcon, PanelRender, TableComponents, TransformCellText, TableLayout, GetRowKey, TableSticky, DataIndex, RowClassName, GetComponentProps, ColumnType, Key, ExpandedRowRender } from 'ant-design-vue/es/vc-table/interface';
|
|
7
7
|
import { ButtonSize } from 'ant-design-vue/es/button';
|
|
8
8
|
import { TablePaginationConfig, TableColumnType } from 'ant-design-vue';
|
|
@@ -39,7 +39,7 @@ declare const _default: <RecordType = any>(__VLS_props: {
|
|
|
39
39
|
footer?: PanelRender<RecordType> | undefined;
|
|
40
40
|
direction?: "ltr" | "rtl" | undefined;
|
|
41
41
|
size?: ButtonSize;
|
|
42
|
-
onChange?: ((
|
|
42
|
+
onChange?: ((value: RecordType[]) => void) | undefined;
|
|
43
43
|
scroll?: ({
|
|
44
44
|
x?: string | number | true | undefined;
|
|
45
45
|
y?: string | number | undefined;
|
|
@@ -149,6 +149,7 @@ declare const _default: <RecordType = any>(__VLS_props: {
|
|
|
149
149
|
onOpenChange: PropType<(vis: boolean) => void>;
|
|
150
150
|
'onUpdate:open': PropType<(vis: boolean) => void>;
|
|
151
151
|
}>> | undefined;
|
|
152
|
+
rowSelection?: TableRowSelection<RecordType> | undefined;
|
|
152
153
|
rowClassName?: string | RowClassName<RecordType> | undefined;
|
|
153
154
|
showHeader?: boolean | undefined;
|
|
154
155
|
customRow?: GetComponentProps<RecordType> | undefined;
|
|
@@ -168,7 +169,6 @@ declare const _default: <RecordType = any>(__VLS_props: {
|
|
|
168
169
|
childrenColumnName?: string | undefined;
|
|
169
170
|
rowExpandable?: ((record: RecordType) => boolean) | undefined;
|
|
170
171
|
onResizeColumn?: ((w: number, col: TableColumnType<any>) => void) | undefined;
|
|
171
|
-
rowSelection?: TableRowSelection<RecordType> | undefined;
|
|
172
172
|
formItem?: Partial<Omit<Partial< ExtractPropTypes<{
|
|
173
173
|
htmlFor: StringConstructor;
|
|
174
174
|
prefixCls: StringConstructor;
|
|
@@ -347,7 +347,7 @@ declare const _default: <RecordType = any>(__VLS_props: {
|
|
|
347
347
|
footer?: PanelRender<RecordType> | undefined;
|
|
348
348
|
direction?: "ltr" | "rtl" | undefined;
|
|
349
349
|
size?: ButtonSize;
|
|
350
|
-
onChange?: ((
|
|
350
|
+
onChange?: ((value: RecordType[]) => void) | undefined;
|
|
351
351
|
scroll?: ({
|
|
352
352
|
x?: string | number | true | undefined;
|
|
353
353
|
y?: string | number | undefined;
|
|
@@ -457,6 +457,7 @@ declare const _default: <RecordType = any>(__VLS_props: {
|
|
|
457
457
|
onOpenChange: PropType<(vis: boolean) => void>;
|
|
458
458
|
'onUpdate:open': PropType<(vis: boolean) => void>;
|
|
459
459
|
}>> | undefined;
|
|
460
|
+
rowSelection?: TableRowSelection<RecordType> | undefined;
|
|
460
461
|
rowClassName?: string | RowClassName<RecordType> | undefined;
|
|
461
462
|
showHeader?: boolean | undefined;
|
|
462
463
|
customRow?: GetComponentProps<RecordType> | undefined;
|
|
@@ -476,7 +477,6 @@ declare const _default: <RecordType = any>(__VLS_props: {
|
|
|
476
477
|
childrenColumnName?: string | undefined;
|
|
477
478
|
rowExpandable?: ((record: RecordType) => boolean) | undefined;
|
|
478
479
|
onResizeColumn?: ((w: number, col: TableColumnType<any>) => void) | undefined;
|
|
479
|
-
rowSelection?: TableRowSelection<RecordType> | undefined;
|
|
480
480
|
formItem?: Partial<Omit<Partial< ExtractPropTypes<{
|
|
481
481
|
htmlFor: StringConstructor;
|
|
482
482
|
prefixCls: StringConstructor;
|
|
@@ -659,7 +659,7 @@ declare const _default: <RecordType = any>(__VLS_props: {
|
|
|
659
659
|
footer?: PanelRender<RecordType> | undefined;
|
|
660
660
|
direction?: "ltr" | "rtl" | undefined;
|
|
661
661
|
size?: ButtonSize;
|
|
662
|
-
onChange?: ((
|
|
662
|
+
onChange?: ((value: RecordType[]) => void) | undefined;
|
|
663
663
|
scroll?: ({
|
|
664
664
|
x?: string | number | true | undefined;
|
|
665
665
|
y?: string | number | undefined;
|
|
@@ -769,6 +769,7 @@ declare const _default: <RecordType = any>(__VLS_props: {
|
|
|
769
769
|
onOpenChange: PropType<(vis: boolean) => void>;
|
|
770
770
|
'onUpdate:open': PropType<(vis: boolean) => void>;
|
|
771
771
|
}>> | undefined;
|
|
772
|
+
rowSelection?: TableRowSelection<RecordType> | undefined;
|
|
772
773
|
rowClassName?: string | RowClassName<RecordType> | undefined;
|
|
773
774
|
showHeader?: boolean | undefined;
|
|
774
775
|
customRow?: GetComponentProps<RecordType> | undefined;
|
|
@@ -788,7 +789,6 @@ declare const _default: <RecordType = any>(__VLS_props: {
|
|
|
788
789
|
childrenColumnName?: string | undefined;
|
|
789
790
|
rowExpandable?: ((record: RecordType) => boolean) | undefined;
|
|
790
791
|
onResizeColumn?: ((w: number, col: TableColumnType<any>) => void) | undefined;
|
|
791
|
-
rowSelection?: TableRowSelection<RecordType> | undefined;
|
|
792
792
|
formItem?: Partial<Omit<Partial< ExtractPropTypes<{
|
|
793
793
|
htmlFor: StringConstructor;
|
|
794
794
|
prefixCls: StringConstructor;
|
|
@@ -31,7 +31,6 @@ const ge = /* @__PURE__ */ P({
|
|
|
31
31
|
default: !1
|
|
32
32
|
},
|
|
33
33
|
locale: {},
|
|
34
|
-
onChange: {},
|
|
35
34
|
onResizeColumn: {},
|
|
36
35
|
rowSelection: {},
|
|
37
36
|
getPopupContainer: {},
|
|
@@ -102,6 +101,7 @@ const ge = /* @__PURE__ */ P({
|
|
|
102
101
|
value: {},
|
|
103
102
|
defaultValue: {},
|
|
104
103
|
"onUpdate:value": {},
|
|
104
|
+
onChange: {},
|
|
105
105
|
maxLength: {},
|
|
106
106
|
onFieldChange: {},
|
|
107
107
|
label: {},
|
|
@@ -176,7 +176,7 @@ const ge = /* @__PURE__ */ P({
|
|
|
176
176
|
name: e.name,
|
|
177
177
|
label: e.label
|
|
178
178
|
}), {
|
|
179
|
-
default: m(() => [K(o(X), C(o(Y)(a, ["name", "maxLength"]), {
|
|
179
|
+
default: m(() => [K(o(X), C(o(Y)(a, ["name", "maxLength", "onChange"]), {
|
|
180
180
|
class: [o(p)(), o(L) === "admin" ? o(p)("admin") : null],
|
|
181
181
|
columns: o(v),
|
|
182
182
|
"data-source": r.value
|