@aplus-frontend/ui 0.4.18 → 0.4.20
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-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/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-list/index.vue.d.ts +4 -2
- package/es/src/ap-table/ap-table.vue.d.ts +9 -2
- package/es/src/ap-table/ap-table.vue2.mjs +72 -68
- package/es/src/ap-table/hooks/use-table-column-state.d.ts +4 -4
- package/es/src/ap-table/interface.d.ts +9 -0
- package/es/src/ap-upload/components/MultipleFile.vue.d.ts +1 -1
- package/es/src/ap-upload/components/Picture.vue.d.ts +7 -2
- package/es/src/business/ap-batch-action-group/index.d.ts +3 -3
- package/es/src/business/ap-expand-alert/ApExpandAlert.vue.d.ts +4 -2
- package/es/src/business/ap-expand-alert/index.d.ts +6 -4
- 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/hooks/use-create-table-modal.d.ts +14 -0
- package/es/src/business/ap-table-modal/hooks/use-table-modal.d.ts +14 -0
- package/es/src/business/ap-table-modal/hooks/use-table-select-modal.d.ts +14 -0
- package/es/src/business/ap-table-modal/index.d.ts +48 -1
- package/es/src/business/ap-table-modal/table-modal.vue.d.ts +20 -1
- package/es/src/business/hooks/usePageListApTable.d.ts +14 -0
- package/es/src/business/hooks/useTableRefresh.d.ts +4 -1
- package/es/src/business/hooks/useTableRefresh.mjs +46 -11
- package/es/src/config-provider/config-provider-props.d.ts +3 -0
- package/es/src/config-provider/config-provider-props.mjs +3 -0
- package/es/src/config-provider/config-provider.d.ts +6 -0
- package/es/src/config-provider/config-provider.mjs +24 -23
- package/es/src/config-provider/hooks/use-global-config.d.ts +3 -0
- package/es/src/config-provider/index.d.ts +9 -0
- 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-bar/index.vue.d.ts +1 -1
- package/es/src/scroll-bar/index.vue.mjs +51 -49
- package/es/src/scroll-bar/internal.vue.mjs +11 -10
- package/es/src/scroll-view/index.vue.d.ts +5 -5
- package/es/src/tests/wrapper.d.ts +4 -4
- package/es/src/utils/index.d.ts +8 -0
- package/es/src/work-order-modal/work-order-modal.vue.d.ts +3 -2
- 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/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-list/index.vue.d.ts +4 -2
- package/lib/src/ap-table/ap-table.vue.d.ts +9 -2
- package/lib/src/ap-table/ap-table.vue2.js +1 -1
- package/lib/src/ap-table/hooks/use-table-column-state.d.ts +4 -4
- package/lib/src/ap-table/interface.d.ts +9 -0
- package/lib/src/ap-upload/components/MultipleFile.vue.d.ts +1 -1
- package/lib/src/ap-upload/components/Picture.vue.d.ts +7 -2
- package/lib/src/business/ap-batch-action-group/index.d.ts +3 -3
- package/lib/src/business/ap-expand-alert/ApExpandAlert.vue.d.ts +4 -2
- package/lib/src/business/ap-expand-alert/index.d.ts +6 -4
- 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/hooks/use-create-table-modal.d.ts +14 -0
- package/lib/src/business/ap-table-modal/hooks/use-table-modal.d.ts +14 -0
- package/lib/src/business/ap-table-modal/hooks/use-table-select-modal.d.ts +14 -0
- package/lib/src/business/ap-table-modal/index.d.ts +48 -1
- package/lib/src/business/ap-table-modal/table-modal.vue.d.ts +20 -1
- package/lib/src/business/hooks/usePageListApTable.d.ts +14 -0
- package/lib/src/business/hooks/useTableRefresh.d.ts +4 -1
- package/lib/src/business/hooks/useTableRefresh.js +1 -1
- package/lib/src/config-provider/config-provider-props.d.ts +3 -0
- package/lib/src/config-provider/config-provider-props.js +1 -1
- package/lib/src/config-provider/config-provider.d.ts +6 -0
- package/lib/src/config-provider/config-provider.js +1 -1
- package/lib/src/config-provider/hooks/use-global-config.d.ts +3 -0
- package/lib/src/config-provider/index.d.ts +9 -0
- 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-bar/index.vue.d.ts +1 -1
- package/lib/src/scroll-bar/index.vue.js +1 -1
- package/lib/src/scroll-bar/internal.vue.js +1 -1
- package/lib/src/scroll-view/index.vue.d.ts +5 -5
- package/lib/src/tests/wrapper.d.ts +4 -4
- package/lib/src/utils/index.d.ts +8 -0
- package/lib/src/work-order-modal/work-order-modal.vue.d.ts +3 -2
- package/package.json +2 -2
- package/theme/ap-scroll-bar/index.css +0 -31
- package/theme/ap-scroll-bar/index.less +0 -39
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as z, toRef as g, ref as d, watchEffect as x, unref as c, watch as _, computed as s, openBlock as k, createBlock as C, mergeProps as B, createCommentVNode as L } from "vue";
|
|
2
2
|
import "./internal.vue2.mjs";
|
|
3
|
-
import { omit as
|
|
4
|
-
import { getScrollable as u, ensureRangeValue as
|
|
5
|
-
import { useResizeObserver as
|
|
6
|
-
import
|
|
7
|
-
const
|
|
3
|
+
import { omit as R } from "lodash-unified";
|
|
4
|
+
import { getScrollable as u, ensureRangeValue as w } from "./utils/index.mjs";
|
|
5
|
+
import { useResizeObserver as y } from "@vueuse/core";
|
|
6
|
+
import E from "./internal.vue.mjs";
|
|
7
|
+
const W = /* @__PURE__ */ z({
|
|
8
8
|
name: "ScrollBar",
|
|
9
9
|
__name: "index",
|
|
10
10
|
props: {
|
|
@@ -24,72 +24,74 @@ const j = /* @__PURE__ */ g({
|
|
|
24
24
|
onScroll: {},
|
|
25
25
|
onScrollEnd: {}
|
|
26
26
|
},
|
|
27
|
-
setup(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
l.value.scroll(i);
|
|
27
|
+
setup(p, { expose: S }) {
|
|
28
|
+
const t = p, l = g(t, "scrollContainer"), n = d(), a = d(t.barLength);
|
|
29
|
+
function m() {
|
|
30
|
+
if (!l.value || !n.value) return;
|
|
31
|
+
const { totalSize: e, visibleSize: r, distance: o } = u(
|
|
32
|
+
l.value,
|
|
33
|
+
t.direction
|
|
34
|
+
), i = o / (e + t.extraSize - r || 1) * 100;
|
|
35
|
+
n.value.scroll(i);
|
|
37
36
|
}
|
|
38
37
|
function f() {
|
|
39
|
-
const { visibleSize: e, totalSize:
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
const { visibleSize: e, totalSize: r } = u(
|
|
39
|
+
l.value,
|
|
40
|
+
t.direction
|
|
42
41
|
);
|
|
43
|
-
|
|
44
|
-
e / (
|
|
42
|
+
a.value = w(
|
|
43
|
+
e / (r + t.extraSize || 1) * 100
|
|
45
44
|
);
|
|
46
45
|
}
|
|
47
|
-
|
|
46
|
+
y(l, () => {
|
|
48
47
|
f();
|
|
49
|
-
}),
|
|
48
|
+
}), x(
|
|
50
49
|
() => {
|
|
51
|
-
const e =
|
|
52
|
-
e && (f(), e.addEventListener("scroll",
|
|
50
|
+
const e = c(l.value);
|
|
51
|
+
e && (f(), e.addEventListener("scroll", m));
|
|
53
52
|
},
|
|
54
53
|
{ flush: "post" }
|
|
55
|
-
),
|
|
56
|
-
() =>
|
|
54
|
+
), _(
|
|
55
|
+
() => t.barLength,
|
|
57
56
|
(e) => {
|
|
58
|
-
|
|
57
|
+
a.value = e;
|
|
59
58
|
}
|
|
60
59
|
);
|
|
61
|
-
function
|
|
62
|
-
const
|
|
63
|
-
if (!
|
|
64
|
-
const { totalSize:
|
|
65
|
-
|
|
66
|
-
|
|
60
|
+
function v(e) {
|
|
61
|
+
const r = c(l);
|
|
62
|
+
if (!r) return;
|
|
63
|
+
const { totalSize: o, visibleSize: i, topOrLeft: b } = u(
|
|
64
|
+
r,
|
|
65
|
+
t.direction
|
|
67
66
|
);
|
|
68
|
-
if (
|
|
69
|
-
const
|
|
70
|
-
|
|
67
|
+
if (o <= i) return;
|
|
68
|
+
const h = `scroll${b}`;
|
|
69
|
+
r[h] = e * (o + t.extraSize - i) / 100;
|
|
71
70
|
}
|
|
72
|
-
return
|
|
71
|
+
return S({
|
|
73
72
|
currentScroll: s(() => {
|
|
74
73
|
var e;
|
|
75
|
-
return
|
|
74
|
+
return c((e = n.value) == null ? void 0 : e.currentScroll);
|
|
76
75
|
}),
|
|
77
|
-
scroll: (
|
|
78
|
-
|
|
76
|
+
scroll: (e) => {
|
|
77
|
+
var r, o;
|
|
78
|
+
return (o = (r = n.value) == null ? void 0 : r.scroll) == null ? void 0 : o.call(r, e);
|
|
79
|
+
},
|
|
80
|
+
visible: s(() => a.value < 100),
|
|
79
81
|
rootElement: s(() => {
|
|
80
82
|
var e;
|
|
81
|
-
return
|
|
83
|
+
return c((e = n.value) == null ? void 0 : e.container);
|
|
82
84
|
})
|
|
83
|
-
}), (e,
|
|
85
|
+
}), (e, r) => a.value !== 100 ? (k(), C(E, B({
|
|
84
86
|
key: 0,
|
|
85
87
|
ref_key: "barRef",
|
|
86
|
-
ref:
|
|
87
|
-
},
|
|
88
|
-
"bar-length":
|
|
89
|
-
onScroll:
|
|
90
|
-
}), null, 16, ["bar-length"])) :
|
|
88
|
+
ref: n
|
|
89
|
+
}, c(R)(t, ["onScroll", "extraSize", "scrollContainer"]), {
|
|
90
|
+
"bar-length": a.value,
|
|
91
|
+
onScroll: v
|
|
92
|
+
}), null, 16, ["bar-length"])) : L("", !0);
|
|
91
93
|
}
|
|
92
94
|
});
|
|
93
95
|
export {
|
|
94
|
-
|
|
96
|
+
W as default
|
|
95
97
|
};
|
|
@@ -21,7 +21,7 @@ const I = /* @__PURE__ */ V({
|
|
|
21
21
|
onScrollEnd: {}
|
|
22
22
|
},
|
|
23
23
|
setup(D, { expose: M }) {
|
|
24
|
-
const t = D, k = f(), c = f(), l = f(), { b: B, e: v, m: P, em: d, cssVar: R } = Y("scroll-bar"), r = f(t.scroll), { handleMouseDown:
|
|
24
|
+
const t = D, k = f(), c = f(), l = f(), { b: B, e: v, m: P, em: d, cssVar: R } = Y("scroll-bar"), r = f(t.scroll), { handleMouseDown: g } = X({
|
|
25
25
|
currentScroll: r,
|
|
26
26
|
track: c,
|
|
27
27
|
bar: l,
|
|
@@ -60,11 +60,11 @@ const I = /* @__PURE__ */ V({
|
|
|
60
60
|
const n = o(c), i = o(l);
|
|
61
61
|
if (!n || !i)
|
|
62
62
|
return;
|
|
63
|
-
document.addEventListener("pointermove",
|
|
63
|
+
document.addEventListener("pointermove", S), document.addEventListener("pointerup", w);
|
|
64
64
|
const a = n.getBoundingClientRect(), y = i.getBoundingClientRect();
|
|
65
65
|
t.direction === "vertical" ? (b = a.height, s = y.top - a.top, u = e.clientY) : (b = a.width, s = y.left - a.left, u = e.clientX), (E = t.onScrollStart) == null || E.call(t, o(r));
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function S(e) {
|
|
68
68
|
var a;
|
|
69
69
|
e.stopPropagation(), e.preventDefault();
|
|
70
70
|
let n;
|
|
@@ -72,15 +72,16 @@ const I = /* @__PURE__ */ V({
|
|
|
72
72
|
const i = n / b / (100 - t.barLength) * 1e4;
|
|
73
73
|
r.value = C(i), (a = t.onScroll) == null || a.call(t, o(r));
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function w(e) {
|
|
76
76
|
var n;
|
|
77
|
-
e.preventDefault(), document.removeEventListener("pointermove",
|
|
77
|
+
e.preventDefault(), document.removeEventListener("pointermove", S), document.removeEventListener("pointerup", w), (n = t.onScrollEnd) == null || n.call(t, o(r));
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function p(e) {
|
|
80
80
|
e.cancelable && (e.stopPropagation(), e.preventDefault());
|
|
81
81
|
}
|
|
82
82
|
function $(e) {
|
|
83
|
-
|
|
83
|
+
var n;
|
|
84
|
+
Math.abs(o(r) - e) <= 1e-3 || (r.value = C(e), (n = t.onScroll) == null || n.call(t, e));
|
|
84
85
|
}
|
|
85
86
|
return M({
|
|
86
87
|
currentScroll: r,
|
|
@@ -110,8 +111,8 @@ const I = /* @__PURE__ */ V({
|
|
|
110
111
|
e.showTrack ? null : o(d)("track", "hidden")
|
|
111
112
|
]),
|
|
112
113
|
onPointerdown: n[0] || (n[0] = //@ts-ignore
|
|
113
|
-
(...i) => o(
|
|
114
|
-
onTouchstart:
|
|
114
|
+
(...i) => o(g) && o(g)(...i)),
|
|
115
|
+
onTouchstart: p
|
|
115
116
|
}, null, 34),
|
|
116
117
|
L("div", {
|
|
117
118
|
ref_key: "bar",
|
|
@@ -122,7 +123,7 @@ const I = /* @__PURE__ */ V({
|
|
|
122
123
|
e.disabled ? o(d)("bar", "disabled") : null
|
|
123
124
|
]),
|
|
124
125
|
onPointerdown: T,
|
|
125
|
-
onTouchstart:
|
|
126
|
+
onTouchstart: p
|
|
126
127
|
}, null, 34)
|
|
127
128
|
], 6));
|
|
128
129
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ScrollOptions, ScrollViewProps } from './interface';
|
|
2
|
-
import { ScrollBarDirection, InternalScrollBarProps } from '../scroll-bar';
|
|
2
|
+
import { ScrollBarDirection, InternalScrollBarProps, ColorType } from '../scroll-bar';
|
|
3
3
|
import { CreateComponentPublicInstanceWithMixins, Ref, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, DefineComponent, ComputedRef } from 'vue';
|
|
4
4
|
declare function scroll(x?: number, y?: number): void;
|
|
5
5
|
declare function scrollTo({ smooth, left, top }: ScrollOptions): void;
|
|
@@ -106,8 +106,8 @@ declare const __VLS_component: DefineComponent<ScrollViewProps, {
|
|
|
106
106
|
onScroll?: ((percent: number) => void) | undefined;
|
|
107
107
|
disabled?: boolean | undefined;
|
|
108
108
|
trackSpeed?: number | undefined;
|
|
109
|
-
barColor?:
|
|
110
|
-
trackColor?:
|
|
109
|
+
barColor?: ColorType;
|
|
110
|
+
trackColor?: ColorType;
|
|
111
111
|
trackWidth?: number | undefined;
|
|
112
112
|
showTrack?: boolean | undefined;
|
|
113
113
|
onScrollStart?: ((percent: number) => void) | undefined;
|
|
@@ -118,8 +118,8 @@ declare const __VLS_component: DefineComponent<ScrollViewProps, {
|
|
|
118
118
|
onScroll?: ((percent: number) => void) | undefined;
|
|
119
119
|
disabled?: boolean | undefined;
|
|
120
120
|
trackSpeed?: number | undefined;
|
|
121
|
-
barColor?:
|
|
122
|
-
trackColor?:
|
|
121
|
+
barColor?: ColorType;
|
|
122
|
+
trackColor?: ColorType;
|
|
123
123
|
trackWidth?: number | undefined;
|
|
124
124
|
showTrack?: boolean | undefined;
|
|
125
125
|
onScrollStart?: ((percent: number) => void) | undefined;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
2
|
export declare const Wrapper: DefineComponent<{
|
|
3
|
-
uiMode?: "admin" | "aplus" | undefined;
|
|
4
|
-
lang?: "en" | "zh-cn" | undefined;
|
|
3
|
+
uiMode?: ("admin" | "aplus") | undefined;
|
|
4
|
+
lang?: ("en" | "zh-cn") | undefined;
|
|
5
5
|
}, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{
|
|
6
|
-
uiMode?: "admin" | "aplus" | undefined;
|
|
7
|
-
lang?: "en" | "zh-cn" | undefined;
|
|
6
|
+
uiMode?: ("admin" | "aplus") | undefined;
|
|
7
|
+
lang?: ("en" | "zh-cn") | undefined;
|
|
8
8
|
}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
package/es/src/utils/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
1
2
|
import { Recordable } from '../type';
|
|
2
3
|
/**
|
|
3
4
|
* @description: Set ui mount node
|
|
@@ -40,3 +41,10 @@ export declare function runFunction<T extends any[]>(func: any, ...restParams: T
|
|
|
40
41
|
*/
|
|
41
42
|
export declare function getRouteType(): "history" | "hash";
|
|
42
43
|
export declare function getScrollbarSize(): number;
|
|
44
|
+
export type UnwrapRef<T> = T extends Ref<infer U> ? U : T;
|
|
45
|
+
/**
|
|
46
|
+
* 将传入的泛型中所有类型为 Ref<x> 转换为类型 x
|
|
47
|
+
*/
|
|
48
|
+
export type UnwrapRefProps<T> = {
|
|
49
|
+
[K in keyof T]: UnwrapRef<T[K]>;
|
|
50
|
+
};
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { WorkOrderModalProps } from './interfaces';
|
|
2
2
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, ComponentInternalInstance, ExtractPropTypes, PropType, HTMLAttributes, VNodeProps, AllowedComponentProps, ComponentCustomProps, CreateComponentPublicInstanceWithMixins, GlobalComponents, GlobalDirectives, Slot, ComponentPublicInstance, ComponentOptionsBase, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties } from 'vue';
|
|
3
3
|
import { ButtonSize, SizeType } from '@aplus-frontend/antdv/es/button';
|
|
4
|
-
import { ValidateMessages, FormLabelAlign, FieldData, ValidateErrorEntity, NamePath, ValidateOptions, InternalNamePath } from '@aplus-frontend/antdv/es/form/interface';
|
|
4
|
+
import { ValidateMessages, FormLabelAlign, FieldData, ValidateErrorEntity, NamePath, RuleObject, ValidateOptions, InternalNamePath } from '@aplus-frontend/antdv/es/form/interface';
|
|
5
5
|
import { RequiredMark } from '@aplus-frontend/antdv/es/form/Form';
|
|
6
6
|
import { ColSize } from '@aplus-frontend/antdv/es/grid';
|
|
7
7
|
import { RuleObject } from '@aplus-frontend/antdv/es/form';
|
|
8
8
|
import { Options } from '../../node_modules/scroll-into-view-if-needed';
|
|
9
9
|
import { Recordable } from '../type';
|
|
10
10
|
import { VueTypeDef, VueTypeValidableDef } from '../../node_modules/vue-types';
|
|
11
|
+
import { SizeType } from '@aplus-frontend/antdv/es/config-provider';
|
|
11
12
|
import { VueNode } from '@aplus-frontend/antdv/es/_util/type';
|
|
12
13
|
import { ApFormProps, ApFormInternalInstance, WatchFunc } from '..';
|
|
13
14
|
import { OnCleanup } from '@vue/reactivity';
|
|
@@ -112,7 +113,7 @@ declare const _default: DefineComponent<WorkOrderModalProps, {}, {}, {}, {}, Com
|
|
|
112
113
|
readonly onValidate?: ((name: string | number | string[] | number[], status: boolean, errors: string[]) => void) | undefined;
|
|
113
114
|
readonly initialValues?: Recordable | undefined;
|
|
114
115
|
readonly onValuesChange?: ((changedValues: Recordable, allValues: Recordable, fieldName: NamePath) => void) | undefined;
|
|
115
|
-
readonly syncToUrl?: boolean | ((values: Recordable, type: "get" | "set") => Recordable) | undefined;
|
|
116
|
+
readonly syncToUrl?: (boolean | ((values: Recordable, type: "get" | "set") => Recordable)) | undefined;
|
|
116
117
|
readonly syncToUrlPriority?: boolean | undefined;
|
|
117
118
|
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
118
119
|
$attrs: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApFormProps, WatchFunc, ApFormInternalInstance } from './interface';
|
|
2
|
-
import { InternalNamePath, NamePath, ValidateOptions, FormLabelAlign, ValidateMessages, FieldData, ValidateErrorEntity } from '@aplus-frontend/antdv/es/form/interface';
|
|
2
|
+
import { InternalNamePath, NamePath, ValidateOptions, FormLabelAlign, RuleObject, ValidateMessages, FieldData, ValidateErrorEntity } from '@aplus-frontend/antdv/es/form/interface';
|
|
3
3
|
import { Recordable } from '../type';
|
|
4
4
|
import { CreateComponentPublicInstanceWithMixins, ExtractPropTypes, PropType, HTMLAttributes, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, DefineComponent } from 'vue';
|
|
5
5
|
import { VueTypeDef, VueTypeValidableDef } from '../../node_modules/vue-types';
|
|
@@ -7,6 +7,7 @@ import { ColSize } from '@aplus-frontend/antdv/es/grid';
|
|
|
7
7
|
import { RequiredMark } from '@aplus-frontend/antdv/es/form/Form';
|
|
8
8
|
import { RuleObject } from '@aplus-frontend/antdv/es/form';
|
|
9
9
|
import { Options } from '../../node_modules/scroll-into-view-if-needed';
|
|
10
|
+
import { SizeType } from '@aplus-frontend/antdv/es/config-provider';
|
|
10
11
|
import { SizeType } from '@aplus-frontend/antdv/es/button';
|
|
11
12
|
import { VueNode } from '@aplus-frontend/antdv/es/_util/type';
|
|
12
13
|
declare function __VLS_template(): {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ApFormDrawerFormProps, CustomizeResizeType } from '../interface';
|
|
2
2
|
import { VNode, ComponentInternalInstance, ExtractPropTypes, PropType, HTMLAttributes, VNodeProps, AllowedComponentProps, ComponentCustomProps, CreateComponentPublicInstanceWithMixins, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, Slot, ComponentPublicInstance, ComponentOptionsBase, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, DefineComponent, CSSProperties } from 'vue';
|
|
3
|
-
import { InternalNamePath, NamePath, ValidateOptions, ValidateMessages, FormLabelAlign, FieldData, ValidateErrorEntity } from '@aplus-frontend/antdv/es/form/interface';
|
|
3
|
+
import { InternalNamePath, NamePath, ValidateOptions, ValidateMessages, FormLabelAlign, FieldData, ValidateErrorEntity, RuleObject } from '@aplus-frontend/antdv/es/form/interface';
|
|
4
4
|
import { ButtonSize, SizeType } from '@aplus-frontend/antdv/es/button';
|
|
5
5
|
import { RequiredMark } from '@aplus-frontend/antdv/es/form/Form';
|
|
6
6
|
import { ColSize } from '@aplus-frontend/antdv/es/grid';
|
|
@@ -8,6 +8,7 @@ import { RuleObject } from '@aplus-frontend/antdv/es/form';
|
|
|
8
8
|
import { Options } from '../../../node_modules/scroll-into-view-if-needed';
|
|
9
9
|
import { Recordable } from '../../type';
|
|
10
10
|
import { VueTypeDef, VueTypeValidableDef } from '../../../node_modules/vue-types';
|
|
11
|
+
import { SizeType } from '@aplus-frontend/antdv/es/config-provider';
|
|
11
12
|
import { VueNode } from '@aplus-frontend/antdv/es/_util/type';
|
|
12
13
|
import { ApFormProps, ApFormInternalInstance, WatchFunc, ApFormSubmitterConfig } from '..';
|
|
13
14
|
import { OnCleanup } from '@vue/reactivity';
|
|
@@ -117,7 +118,7 @@ declare function __VLS_template(): {
|
|
|
117
118
|
readonly onValidate?: ((name: string | number | string[] | number[], status: boolean, errors: string[]) => void) | undefined;
|
|
118
119
|
readonly initialValues?: Recordable | undefined;
|
|
119
120
|
readonly onValuesChange?: ((changedValues: Recordable, allValues: Recordable, fieldName: NamePath) => void) | undefined;
|
|
120
|
-
readonly syncToUrl?: boolean | ((values: Recordable, type: "get" | "set") => Recordable) | undefined;
|
|
121
|
+
readonly syncToUrl?: (boolean | ((values: Recordable, type: "get" | "set") => Recordable)) | undefined;
|
|
121
122
|
readonly syncToUrlPriority?: boolean | undefined;
|
|
122
123
|
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
123
124
|
$attrs: {
|
|
@@ -1059,7 +1060,7 @@ declare const __VLS_component: DefineComponent<ApFormDrawerFormProps, {
|
|
|
1059
1060
|
readonly onValidate?: ((name: string | number | string[] | number[], status: boolean, errors: string[]) => void) | undefined;
|
|
1060
1061
|
readonly initialValues?: Recordable | undefined;
|
|
1061
1062
|
readonly onValuesChange?: ((changedValues: Recordable, allValues: Recordable, fieldName: NamePath) => void) | undefined;
|
|
1062
|
-
readonly syncToUrl?: boolean | ((values: Recordable, type: "get" | "set") => Recordable) | undefined;
|
|
1063
|
+
readonly syncToUrl?: (boolean | ((values: Recordable, type: "get" | "set") => Recordable)) | undefined;
|
|
1063
1064
|
readonly syncToUrlPriority?: boolean | undefined;
|
|
1064
1065
|
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
1065
1066
|
$attrs: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ApFormModalFormProps } from '../interface';
|
|
2
2
|
import { VNode, ComponentInternalInstance, ExtractPropTypes, PropType, HTMLAttributes, VNodeProps, AllowedComponentProps, ComponentCustomProps, CreateComponentPublicInstanceWithMixins, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, Slot, ComponentPublicInstance, ComponentOptionsBase, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, DefineComponent, CSSProperties } from 'vue';
|
|
3
|
-
import { InternalNamePath, NamePath, ValidateOptions, ValidateMessages, FormLabelAlign, FieldData, ValidateErrorEntity } from '@aplus-frontend/antdv/es/form/interface';
|
|
3
|
+
import { InternalNamePath, NamePath, ValidateOptions, ValidateMessages, FormLabelAlign, FieldData, ValidateErrorEntity, RuleObject } from '@aplus-frontend/antdv/es/form/interface';
|
|
4
4
|
import { Recordable } from '../../type';
|
|
5
5
|
import { ButtonSize, SizeType, ButtonType, ButtonShape } from '@aplus-frontend/antdv/es/button';
|
|
6
6
|
import { RequiredMark } from '@aplus-frontend/antdv/es/form/Form';
|
|
@@ -8,6 +8,7 @@ import { ColSize } from '@aplus-frontend/antdv/es/grid';
|
|
|
8
8
|
import { RuleObject } from '@aplus-frontend/antdv/es/form';
|
|
9
9
|
import { Options } from '../../../node_modules/scroll-into-view-if-needed';
|
|
10
10
|
import { VueTypeDef, VueTypeValidableDef } from '../../../node_modules/vue-types';
|
|
11
|
+
import { SizeType } from '@aplus-frontend/antdv/es/config-provider';
|
|
11
12
|
import { VueNode } from '@aplus-frontend/antdv/es/_util/type';
|
|
12
13
|
import { ApFormProps, ApFormInternalInstance, WatchFunc, ApFormSubmitterConfig } from '..';
|
|
13
14
|
import { OnCleanup } from '@vue/reactivity';
|
|
@@ -117,7 +118,7 @@ declare function __VLS_template(): {
|
|
|
117
118
|
readonly onValidate?: ((name: string | number | string[] | number[], status: boolean, errors: string[]) => void) | undefined;
|
|
118
119
|
readonly initialValues?: Recordable | undefined;
|
|
119
120
|
readonly onValuesChange?: ((changedValues: Recordable, allValues: Recordable, fieldName: NamePath) => void) | undefined;
|
|
120
|
-
readonly syncToUrl?: boolean | ((values: Recordable, type: "get" | "set") => Recordable) | undefined;
|
|
121
|
+
readonly syncToUrl?: (boolean | ((values: Recordable, type: "get" | "set") => Recordable)) | undefined;
|
|
121
122
|
readonly syncToUrlPriority?: boolean | undefined;
|
|
122
123
|
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
123
124
|
$attrs: {
|
|
@@ -1247,7 +1248,7 @@ declare const __VLS_component: DefineComponent<ApFormModalFormProps, {
|
|
|
1247
1248
|
readonly onValidate?: ((name: string | number | string[] | number[], status: boolean, errors: string[]) => void) | undefined;
|
|
1248
1249
|
readonly initialValues?: Recordable | undefined;
|
|
1249
1250
|
readonly onValuesChange?: ((changedValues: Recordable, allValues: Recordable, fieldName: NamePath) => void) | undefined;
|
|
1250
|
-
readonly syncToUrl?: boolean | ((values: Recordable, type: "get" | "set") => Recordable) | undefined;
|
|
1251
|
+
readonly syncToUrl?: (boolean | ((values: Recordable, type: "get" | "set") => Recordable)) | undefined;
|
|
1251
1252
|
readonly syncToUrlPriority?: boolean | undefined;
|
|
1252
1253
|
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
1253
1254
|
$attrs: {
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { ApFormExpose, ApFormSearchFormProps } from '../interface';
|
|
2
2
|
import { ComponentInternalInstance, ExtractPropTypes, PropType, HTMLAttributes, VNodeProps, AllowedComponentProps, ComponentCustomProps, CreateComponentPublicInstanceWithMixins, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, Slot, ComponentPublicInstance, ComponentOptionsBase, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, DefineComponent, ComputedRef } from 'vue';
|
|
3
3
|
import { ButtonSize, SizeType } from '@aplus-frontend/antdv/es/button';
|
|
4
|
-
import { ValidateMessages, FormLabelAlign, FieldData, ValidateErrorEntity, NamePath, ValidateOptions, InternalNamePath } from '@aplus-frontend/antdv/es/form/interface';
|
|
4
|
+
import { ValidateMessages, FormLabelAlign, FieldData, ValidateErrorEntity, NamePath, RuleObject, ValidateOptions, InternalNamePath } from '@aplus-frontend/antdv/es/form/interface';
|
|
5
5
|
import { RequiredMark } from '@aplus-frontend/antdv/es/form/Form';
|
|
6
6
|
import { ColSize } from '@aplus-frontend/antdv/es/grid';
|
|
7
7
|
import { RuleObject } from '@aplus-frontend/antdv/es/form';
|
|
8
8
|
import { Options } from '../../../node_modules/scroll-into-view-if-needed';
|
|
9
9
|
import { Recordable } from '../../type';
|
|
10
10
|
import { VueTypeDef, VueTypeValidableDef } from '../../../node_modules/vue-types';
|
|
11
|
+
import { SizeType } from '@aplus-frontend/antdv/es/config-provider';
|
|
11
12
|
import { VueNode } from '@aplus-frontend/antdv/es/_util/type';
|
|
12
13
|
import { ApFormProps, ApFormInternalInstance, WatchFunc } from '..';
|
|
13
14
|
import { OnCleanup } from '@vue/reactivity';
|
|
@@ -115,7 +116,7 @@ declare function __VLS_template(): {
|
|
|
115
116
|
readonly onValidate?: ((name: string | number | string[] | number[], status: boolean, errors: string[]) => void) | undefined;
|
|
116
117
|
readonly initialValues?: Recordable | undefined;
|
|
117
118
|
readonly onValuesChange?: ((changedValues: Recordable, allValues: Recordable, fieldName: NamePath) => void) | undefined;
|
|
118
|
-
readonly syncToUrl?: boolean | ((values: Recordable, type: "get" | "set") => Recordable) | undefined;
|
|
119
|
+
readonly syncToUrl?: (boolean | ((values: Recordable, type: "get" | "set") => Recordable)) | undefined;
|
|
119
120
|
readonly syncToUrlPriority?: boolean | undefined;
|
|
120
121
|
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
121
122
|
$attrs: {
|
|
@@ -952,7 +953,7 @@ declare const __VLS_component: DefineComponent<ApFormSearchFormProps, {
|
|
|
952
953
|
readonly onValidate?: ((name: string | number | string[] | number[], status: boolean, errors: string[]) => void) | undefined;
|
|
953
954
|
readonly initialValues?: Recordable | undefined;
|
|
954
955
|
readonly onValuesChange?: ((changedValues: Recordable, allValues: Recordable, fieldName: NamePath) => void) | undefined;
|
|
955
|
-
readonly syncToUrl?: boolean | ((values: Recordable, type: "get" | "set") => Recordable) | undefined;
|
|
956
|
+
readonly syncToUrl?: (boolean | ((values: Recordable, type: "get" | "set") => Recordable)) | undefined;
|
|
956
957
|
readonly syncToUrlPriority?: boolean | undefined;
|
|
957
958
|
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
958
959
|
$attrs: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ApListProps } from './interface';
|
|
2
2
|
import { Recordable } from '../type';
|
|
3
|
-
import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, Ref, VNode } from 'vue';
|
|
3
|
+
import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, Ref, VNode, RendererNode, RendererElement } from 'vue';
|
|
4
4
|
import { ApFormSearchFormExpose } from '..';
|
|
5
5
|
declare const _default: <RecordType extends Recordable>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
6
6
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>, never> & ApListProps<RecordType> & Partial<{}>> & PublicProps;
|
|
@@ -41,7 +41,9 @@ declare const _default: <RecordType extends Recordable>(__VLS_props: NonNullable
|
|
|
41
41
|
}): any;
|
|
42
42
|
};
|
|
43
43
|
emit: {};
|
|
44
|
-
}>) => VNode
|
|
44
|
+
}>) => VNode<RendererNode, RendererElement, {
|
|
45
|
+
[key: string]: any;
|
|
46
|
+
}> & {
|
|
45
47
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
46
48
|
};
|
|
47
49
|
export default _default;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ApColumnType, ApTableProps } from './interface';
|
|
2
2
|
import { ColumnsType, ColumnType } from '@aplus-frontend/antdv/es/table';
|
|
3
3
|
import { RowSelectionReturnType } from './hooks/use-table-row-selection';
|
|
4
|
-
import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, ComputedRef, VNode } from 'vue';
|
|
4
|
+
import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, ComputedRef, Ref, VNode, RendererNode, RendererElement } from 'vue';
|
|
5
|
+
import { ScrollBarExpose } from '../scroll-bar';
|
|
5
6
|
declare const _default: <RecordType>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
6
7
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>, never> & ApTableProps<RecordType> & Partial<{}>> & PublicProps;
|
|
7
8
|
expose(exposed: ShallowUnwrapRef<{
|
|
@@ -22,6 +23,10 @@ declare const _default: <RecordType>(__VLS_props: NonNullable<Awaited<typeof __V
|
|
|
22
23
|
toggleSelect: (item: RecordType) => void;
|
|
23
24
|
selectedRows: ComputedRef<RecordType[]>;
|
|
24
25
|
};
|
|
26
|
+
scrollBar: {
|
|
27
|
+
x: Ref< ScrollBarExpose | undefined, ScrollBarExpose | undefined>;
|
|
28
|
+
y: undefined;
|
|
29
|
+
};
|
|
25
30
|
}>): void;
|
|
26
31
|
attrs: any;
|
|
27
32
|
slots: Readonly<{
|
|
@@ -76,7 +81,9 @@ declare const _default: <RecordType>(__VLS_props: NonNullable<Awaited<typeof __V
|
|
|
76
81
|
}) => void;
|
|
77
82
|
};
|
|
78
83
|
emit: {};
|
|
79
|
-
}>) => VNode
|
|
84
|
+
}>) => VNode<RendererNode, RendererElement, {
|
|
85
|
+
[key: string]: any;
|
|
86
|
+
}> & {
|
|
80
87
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
81
88
|
};
|
|
82
89
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),L=require("@aplus-frontend/antdv"),ie=require("@aplus-frontend/antdv/es/theme/internal"),fe=require("../ap-form/index.js"),A=require("./constants.js");require("../config-provider/index.js");const pe=require("./hooks/use-table-paging-ng.js"),c=require("lodash-unified"),s=require("./utils.js"),me=require("./hooks/use-table-content-height.js"),ye=require("./hooks/use-table-row-selection.js"),ge=require("../utils/index.js");require("./components/setting/modal/index.vue.js");require("./components/paragraph-ellipsis/index.vue.js");const Se=require("./context.js");require("../scroll-bar/index.js");const be=require("./hooks/use-sticky-scroll.js"),he=require("../config-provider/css-var.js"),we=require("../config-provider/hooks/use-namespace.js"),Ce=require("../config-provider/hooks/use-global-config.js"),ve=require("./components/paragraph-ellipsis/index.vue2.js"),Re=require("./components/setting/modal/index.vue2.js"),Be=require("../scroll-bar/index.vue.js"),ke=e.defineComponent({name:"ApTable",__name:"ap-table",props:{dropdownPrefixCls:{},loading:{type:[Boolean,Object],default:void 0},bordered:{type:Boolean,default:!1},locale:{},onChange:{},onResizeColumn:{},getPopupContainer:{},scroll:{},sortDirections:{default:()=>["ascend","descend"]},showSorterTooltip:{type:[Boolean,Object],default:!1},prefixCls:{},rowKey:{default:"key"},tableLayout:{},rowClassName:{},title:{},footer:{},id:{},showHeader:{type:Boolean,default:!0},components:{},customRow:{},customHeaderRow:{},direction:{},expandFixed:{type:[String,Boolean],default:!1},expandColumnWidth:{},expandedRowKeys:{},defaultExpandedRowKeys:{},expandedRowRender:{},expandRowByClick:{type:Boolean,default:!1},expandIcon:{},onExpand:{},onExpandedRowsChange:{},defaultExpandAllRows:{type:Boolean,default:!1},indentSize:{default:15},expandIconColumnIndex:{},showExpandColumn:{type:Boolean,default:!0},expandedRowClassName:{},childrenColumnName:{default:"children"},rowExpandable:{},sticky:{type:[Boolean,Object]},transformCellText:{},columns:{},rowSelection:{type:[Boolean,Object]},card:{type:Boolean,default:!1},params:{},searchFormRender:{},request:{},onLoad:{},defaultData:{},dataSource:{},onLoadingChange:{},searchForm:{type:[Boolean,Object],default:void 0},beforeSearchSubmit:{},pagination:{type:[Boolean,Object],default:void 0},searchFormWrapperStyle:{},tableWrapperStyle:{},manual:{type:Boolean,default:!1},size:{default:"middle"},adaptive:{type:Boolean,default:!1},columnResizable:{type:Boolean,default:!1},settings:{type:[Boolean,Object],default:void 0}},setup(U,{expose:D}){const t=U;let R=0;const y=e.useSlots(),[,$]=ie.useToken(),{e:h,b:i,be:B,m:j}=we.useNamespace("ap-table"),k=Ce.useGlobalConfig("valueTypeMap"),{height:W,contentRef:H}=me.default(),x=e.ref(),T=e.ref(),{isStickyMode:F,scrollBarRef:M}=be.useStickyScroll(x),w=e.ref(t.size),d=e.ref([]),q=e.ref([]);Se.useProvideApTable({columns:e.computed(()=>d.value),columnsBackup:e.computed(()=>q.value),size:e.computed(()=>w.value),updateColumns(r){d.value=r},updateSize(r){w.value=r},dataSource:e.computed(()=>e.unref(p).records)});const z=e.computed(()=>{var r,a,o;return R++,((o=(a=(r=t.columns)==null?void 0:r.filter(n=>!n.hideInSearch&&n.dataIndex&&(n.valueType||n.customRenderFormItem)&&!A.noRenderAsFormItemValueList.includes(n.valueType)))==null?void 0:a.sort((n,u)=>{let l=s.getColumnOrder(n.order);return s.getColumnOrder(u.order)-l}))==null?void 0:o.map(n=>{const u=s.updateFormProps(n,s.getFieldProps(n.fieldProps,{})),l={...n,fieldProps:{label:n.title,name:n.dataIndex,...u||{},_signal:R},renderNode:void 0};return l.renderNode=s.getSearchFormItemRenderNode(l,e.unref(k)),l}))||[]}),G=e.computed(()=>s.recursionApColumns(e.unref(d),r=>{if(r.sorter===!0)return r.key||r.dataIndex}).filter(Boolean)),J=e.computed(()=>s.recursionApColumns(e.unref(d),r=>{if(r.filters&&!r.onFilter)return r.key||r.dataIndex}).filter(Boolean)),Q=e.computed(()=>c.isUndefined(t.dataSource)?p.records:t.dataSource),{rowSelection:g,selectedRows:S,...b}=ye.default({fixed:!0,...t.rowSelection===!0?{}:t.rowSelection,rowKey:t.rowKey,dataSource:Q}),{formRef:C,submit:N,reset:P,tableProps:_,refresh:X,data:p,setDataSource:Y,getColumnSFConfig:Z}=pe.useTablePaging({async request(r){var o,n;if(!g.value.preserveSelectedRowKeys&&c.isUndefined(t.dataSource)&&b.clearAll(),!c.isUndefined(t.dataSource))return{data:t.dataSource||[],total:t.dataSource.length||0};const a=await((o=t.request)==null?void 0:o.call(t,r));return(n=t.onLoad)==null||n.call(t,(a==null?void 0:a.data)||[]),{data:(a==null?void 0:a.data)||[],total:(a==null?void 0:a.total)||0}},filterFields:J,sortFields:G,defaultParams:t.params,defaultData:t.defaultData,manual:t.manual,formatParams:t.beforeSearchSubmit,pagination:t.pagination}),ee=()=>{var o;let r=((o=t.columns)==null?void 0:o.filter(n=>!n.hideInTable))||[];function a(n,u){return n.map(l=>({resizable:ge.isDef(l.resizable)?l.resizable:t.columnResizable,...c.omit(s.apColumnToColumn(l),["ellipsis"]),...Z(l),fixed:u?u.fixed:l.fixed,title:s.getTableTitle(l,B("table-header","title"),y.headerCell,e.unref($).colorPrimary),customRender({value:f,...m}){var O,K;const E=s.getTableRenderType(l),ue=s.getTableRenderProps({...l,valueType:E},{value:f,...m}),de=s.getTableCellRenderNode(E,ue,m.record,e.unref(k)),I=((O=l.renderText)==null?void 0:O.call(l,{value:f,...m}))||f,ce=l.renderText?e.createVNode(e.Fragment,null,[(K=l.renderText)==null?void 0:K.call(l,{value:f,...m})]):de;let v=ne(l,I,ce);return l.customRender&&(v=l.customRender({value:f,...m,column:l,originalNode:v,originalText:I})),v},children:a(l.children||[],u||l)}))}return a(r)};e.watchEffect(()=>{const r=ee();d.value=r,q.value=r});const re=e.computed(()=>{var a,o;if(t.adaptive&&(p.total>0||((a=t.dataSource)==null?void 0:a.length)))return{y:e.unref(W),x:((o=t.scroll)==null?void 0:o.x)||"100%"};if(t.scroll)return t.scroll}),te=e.computed(()=>{var r;if(t.tableLayout)return t.tableLayout;if((r=t.columns)!=null&&r.some(a=>a.ellipsis))return"fixed"}),V=e.computed(()=>{var o;const r=e.unref(_),a=e.unref(g);return{...t,...r,rowSelection:t.rowSelection===!0||((o=t.rowSelection)==null?void 0:o.mode)==="internal"?{...a,preserveSelectedRowKeys:c.isUndefined(t.dataSource)?a.preserveSelectedRowKeys:!0}:s.falseToUndefined(t.rowSelection),loading:c.isUndefined(t.loading)?r.loading:t.loading,pagination:t.pagination===!1?!1:r.pagination,scroll:e.unref(re)}}),oe=e.computed(()=>[i(),t.card?null:i("wrapper"),t.adaptive?i("adaptive"):null,F?j(`sticky-${he.scrollbarSize===0?"absolute":"relative"}`):null].filter(Boolean));function ne(r,a,o){return A.noRenderAsFormItemValueList.includes(r.valueType)?o:r.copyable||r.ellipsis?e.createVNode(ve.default,{copyable:r.copyable,ellipsis:r.ellipsis?c.isBoolean(r.ellipsis)?{tooltip:o,rows:1}:{...r.ellipsis,tooltip:o}:!1,content:o},null):o}e.watch(()=>e.unref(p).loading,r=>{var a;(a=t.onLoadingChange)==null||a.call(t,r)}),e.watch(()=>t.dataSource,r=>{Y(r)},{immediate:!0});function ae(r){var a,o,n;(n=(o=(a=C.value)==null?void 0:a.apForm)==null?void 0:o.setFieldsValue)==null||n.call(o,r)}function le(r=!1){var o,n,u;const a=r?"getFieldsValueTransformed":"getFieldsValue";return(u=(n=(o=C.value)==null?void 0:o.apForm)==null?void 0:n[a])==null?void 0:u.call(n,!0)}function se(){return e.unref(d)}return D({submit:()=>N(),reset:()=>P(),refresh:()=>X(),setSearchFormValues:ae,getSearchFormValues:le,getShownColumns:se,dataSource:e.computed(()=>e.unref(p).records),rowSelection:{selectedRows:e.computed(()=>e.unref(S)),...b}}),(r,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tableWrapperRef",ref:x,class:e.normalizeClass(oe.value)},[e.unref(c.isUndefined)(r.dataSource)&&r.searchForm!==!1&&z.value.length>0?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(r.card?e.unref(h)("search-wrapper"):null),style:e.normalizeStyle(r.searchFormWrapperStyle)},[e.createVNode(e.unref(fe.ApForm).SearchForm,e.mergeProps(r.searchForm||{},{ref_key:"formRef",ref:C,"custom-reset":"","submit-loading":e.unref(_).loading,onSubmit:e.unref(N),onReset:e.unref(P)}),e.createSlots({default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(z.value,o=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.renderNode.Comp),e.mergeProps({key:o.dataIndex,item:o,ref_for:!0},o.fieldProps||{},{span:o.span,"custom-render":o.renderNode.render}),null,16,["item","span","custom-render"]))),128))]),_:2},[y.searchFormExtra?{name:"extra",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"searchFormExtra")]),key:"0"}:void 0]),1040,["submit-loading","onSubmit","onReset"])],6)):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"contentRef",ref:H,class:e.normalizeClass([e.unref(h)("table-wrapper"),r.card?e.unref(h)("table-wrapper-card"):null]),style:e.normalizeStyle(r.tableWrapperStyle)},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(i)("header-wrapper"))},[r.settings?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(i)("header"))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(B)("header","title"))},[e.renderSlot(r.$slots,"title",e.mergeProps({selectedRows:e.unref(S),selectedRowKeys:e.unref(g).selectedRowKeys,shownColumns:d.value},b))],2),y.title?(e.openBlock(),e.createBlock(e.unref(L.Divider),{key:0,type:"vertical"})):e.createCommentVNode("",!0),e.createVNode(Re.default,{config:r.settings===!0?{}:r.settings},null,8,["config"])],2)):e.renderSlot(r.$slots,"title",e.mergeProps({key:1,selectedRows:e.unref(S),selectedRowKeys:e.unref(g).selectedRowKeys,shownColumns:d.value},b))],2),e.createVNode(e.unref(L.Table),e.mergeProps({ref_key:"antdTableRef",ref:T,class:e.unref(i)("table")},V.value,{size:w.value,"table-layout":te.value,columns:d.value,onResizeColumn:a[0]||(a[0]=(o,n)=>n.width=o)}),e.createSlots({summary:e.withCtx(()=>[e.renderSlot(r.$slots,"summary",{columns:d.value,records:V.value.dataSource,selectedRows:e.unref(S)})]),_:2},[e.unref(F)?{name:"bottomPaginationTop",fn:e.withCtx(()=>{var o,n;return[e.createVNode(e.unref(Be.default),{ref_key:"scrollBarRef",ref:M,"scroll-container":(n=(o=T.value)==null?void 0:o.table)==null?void 0:n.scrollBodyRef,direction:"horizontal"},null,8,["scroll-container"])]}),key:"0"}:void 0,e.renderList(e.unref(c.omit)(y,["title","searchFormExtra","headerCell","summary"]),(o,n)=>({name:n,fn:e.withCtx(u=>[e.renderSlot(r.$slots,n,e.normalizeProps(e.guardReactiveProps(u||{})))])}))]),1040,["class","size","table-layout","columns"])],6)],2))}});exports.default=ke;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),A=require("@aplus-frontend/antdv"),ie=require("@aplus-frontend/antdv/es/theme/internal"),fe=require("../ap-form/index.js"),U=require("./constants.js");require("../config-provider/index.js");const pe=require("./hooks/use-table-paging-ng.js"),c=require("lodash-unified"),s=require("./utils.js"),me=require("./hooks/use-table-content-height.js"),ye=require("./hooks/use-table-row-selection.js"),ge=require("../utils/index.js");require("./components/setting/modal/index.vue.js");require("./components/paragraph-ellipsis/index.vue.js");const Se=require("./context.js");require("../scroll-bar/index.js");const be=require("./hooks/use-sticky-scroll.js"),he=require("../config-provider/css-var.js"),we=require("../config-provider/hooks/use-namespace.js"),Ce=require("../config-provider/hooks/use-global-config.js"),ve=require("./components/paragraph-ellipsis/index.vue2.js"),Re=require("./components/setting/modal/index.vue2.js"),Be=require("../scroll-bar/index.vue.js"),xe=e.defineComponent({name:"ApTable",__name:"ap-table",props:{dropdownPrefixCls:{},loading:{type:[Boolean,Object],default:void 0},bordered:{type:Boolean,default:!1},locale:{},onChange:{},onResizeColumn:{},getPopupContainer:{},scroll:{},sortDirections:{default:()=>["ascend","descend"]},showSorterTooltip:{type:[Boolean,Object],default:!1},prefixCls:{},rowKey:{default:"key"},tableLayout:{},rowClassName:{},title:{},footer:{},id:{},showHeader:{type:Boolean,default:!0},components:{},customRow:{},customHeaderRow:{},direction:{},expandFixed:{type:[String,Boolean],default:!1},expandColumnWidth:{},expandedRowKeys:{},defaultExpandedRowKeys:{},expandedRowRender:{},expandRowByClick:{type:Boolean,default:!1},expandIcon:{},onExpand:{},onExpandedRowsChange:{},defaultExpandAllRows:{type:Boolean,default:!1},indentSize:{default:15},expandIconColumnIndex:{},showExpandColumn:{type:Boolean,default:!0},expandedRowClassName:{},childrenColumnName:{default:"children"},rowExpandable:{},sticky:{type:[Boolean,Object]},transformCellText:{},columns:{},rowSelection:{type:[Boolean,Object]},card:{type:Boolean,default:!1},params:{},searchFormRender:{},request:{},onLoad:{},defaultData:{},dataSource:{},onLoadingChange:{},searchForm:{type:[Boolean,Object],default:void 0},beforeSearchSubmit:{},pagination:{type:[Boolean,Object],default:void 0},searchFormWrapperStyle:{},tableWrapperStyle:{},manual:{type:Boolean,default:!1},size:{default:"middle"},adaptive:{type:Boolean,default:!1},columnResizable:{type:Boolean,default:!1},settings:{type:[Boolean,Object],default:void 0}},setup(D,{expose:$}){const t=D;let R=0;const y=e.useSlots(),[,j]=ie.useToken(),{e:h,b:i,be:B,m:W}=we.useNamespace("ap-table"),x=Ce.useGlobalConfig("valueTypeMap"),{height:H,contentRef:M}=me.default(),k=e.ref(),T=e.ref(),{isStickyMode:F,scrollBarRef:q}=be.useStickyScroll(k),w=e.ref(t.size),d=e.ref([]),z=e.ref([]);Se.useProvideApTable({columns:e.computed(()=>d.value),columnsBackup:e.computed(()=>z.value),size:e.computed(()=>w.value),updateColumns(r){d.value=r},updateSize(r){w.value=r},dataSource:e.computed(()=>e.unref(p).records)});const N=e.computed(()=>{var r,a,o;return R++,((o=(a=(r=t.columns)==null?void 0:r.filter(n=>!n.hideInSearch&&n.dataIndex&&(n.valueType||n.customRenderFormItem)&&!U.noRenderAsFormItemValueList.includes(n.valueType)))==null?void 0:a.sort((n,u)=>{let l=s.getColumnOrder(n.order);return s.getColumnOrder(u.order)-l}))==null?void 0:o.map(n=>{const u=s.updateFormProps(n,s.getFieldProps(n.fieldProps,{})),l={...n,fieldProps:{label:n.title,name:n.dataIndex,...u||{},_signal:R},renderNode:void 0};return l.renderNode=s.getSearchFormItemRenderNode(l,e.unref(x)),l}))||[]}),G=e.computed(()=>s.recursionApColumns(e.unref(d),r=>{if(r.sorter===!0)return r.key||r.dataIndex}).filter(Boolean)),J=e.computed(()=>s.recursionApColumns(e.unref(d),r=>{if(r.filters&&!r.onFilter)return r.key||r.dataIndex}).filter(Boolean)),Q=e.computed(()=>c.isUndefined(t.dataSource)?p.records:t.dataSource),{rowSelection:g,selectedRows:S,...b}=ye.default({fixed:!0,...t.rowSelection===!0?{}:t.rowSelection,rowKey:t.rowKey,dataSource:Q}),{formRef:C,submit:P,reset:_,tableProps:V,refresh:X,data:p,setDataSource:Y,getColumnSFConfig:Z}=pe.useTablePaging({async request(r){var o,n;if(!g.value.preserveSelectedRowKeys&&c.isUndefined(t.dataSource)&&b.clearAll(),!c.isUndefined(t.dataSource))return{data:t.dataSource||[],total:t.dataSource.length||0};const a=await((o=t.request)==null?void 0:o.call(t,r));return(n=t.onLoad)==null||n.call(t,(a==null?void 0:a.data)||[]),{data:(a==null?void 0:a.data)||[],total:(a==null?void 0:a.total)||0}},filterFields:J,sortFields:G,defaultParams:t.params,defaultData:t.defaultData,manual:t.manual,formatParams:t.beforeSearchSubmit,pagination:t.pagination}),ee=()=>{var o;let r=((o=t.columns)==null?void 0:o.filter(n=>!n.hideInTable))||[];function a(n,u){return n.map(l=>({resizable:ge.isDef(l.resizable)?l.resizable:t.columnResizable,...c.omit(s.apColumnToColumn(l),["ellipsis"]),...Z(l),fixed:u?u.fixed:l.fixed,title:s.getTableTitle(l,B("table-header","title"),y.headerCell,e.unref(j).colorPrimary),customRender({value:f,...m}){var K,L;const I=s.getTableRenderType(l),ue=s.getTableRenderProps({...l,valueType:I},{value:f,...m}),de=s.getTableCellRenderNode(I,ue,m.record,e.unref(x)),O=((K=l.renderText)==null?void 0:K.call(l,{value:f,...m}))||f,ce=l.renderText?e.createVNode(e.Fragment,null,[(L=l.renderText)==null?void 0:L.call(l,{value:f,...m})]):de;let v=ne(l,O,ce);return l.customRender&&(v=l.customRender({value:f,...m,column:l,originalNode:v,originalText:O})),v},children:a(l.children||[],u||l)}))}return a(r)};e.watchEffect(()=>{const r=ee();d.value=r,z.value=r});const re=e.computed(()=>{var a,o;if(t.adaptive&&(p.total>0||((a=t.dataSource)==null?void 0:a.length)))return{y:e.unref(H),x:((o=t.scroll)==null?void 0:o.x)||"100%"};if(t.scroll)return t.scroll}),te=e.computed(()=>{var r;if(t.tableLayout)return t.tableLayout;if((r=t.columns)!=null&&r.some(a=>a.ellipsis))return"fixed"}),E=e.computed(()=>{var o;const r=e.unref(V),a=e.unref(g);return{...t,...r,rowSelection:t.rowSelection===!0||((o=t.rowSelection)==null?void 0:o.mode)==="internal"?{...a,preserveSelectedRowKeys:c.isUndefined(t.dataSource)?a.preserveSelectedRowKeys:!0}:s.falseToUndefined(t.rowSelection),loading:c.isUndefined(t.loading)?r.loading:t.loading,pagination:t.pagination===!1?!1:r.pagination,scroll:e.unref(re)}}),oe=e.computed(()=>[i(),t.card?null:i("wrapper"),t.adaptive?i("adaptive"):null,F?W(`sticky-${he.scrollbarSize===0?"absolute":"relative"}`):null].filter(Boolean));function ne(r,a,o){return U.noRenderAsFormItemValueList.includes(r.valueType)?o:r.copyable||r.ellipsis?e.createVNode(ve.default,{copyable:r.copyable,ellipsis:r.ellipsis?c.isBoolean(r.ellipsis)?{tooltip:o,rows:1}:{...r.ellipsis,tooltip:o}:!1,content:o},null):o}e.watch(()=>e.unref(p).loading,r=>{var a;(a=t.onLoadingChange)==null||a.call(t,r)}),e.watch(()=>t.dataSource,r=>{Y(r)},{immediate:!0});function ae(r){var a,o,n;(n=(o=(a=C.value)==null?void 0:a.apForm)==null?void 0:o.setFieldsValue)==null||n.call(o,r)}function le(r=!1){var o,n,u;const a=r?"getFieldsValueTransformed":"getFieldsValue";return(u=(n=(o=C.value)==null?void 0:o.apForm)==null?void 0:n[a])==null?void 0:u.call(n,!0)}function se(){return e.unref(d)}return $({submit:()=>P(),reset:()=>_(),refresh:()=>X(),setSearchFormValues:ae,getSearchFormValues:le,getShownColumns:se,dataSource:e.computed(()=>e.unref(p).records),rowSelection:{selectedRows:e.computed(()=>e.unref(S)),...b},scrollBar:{x:q,y:void 0}}),(r,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tableWrapperRef",ref:k,class:e.normalizeClass(oe.value)},[e.unref(c.isUndefined)(r.dataSource)&&r.searchForm!==!1&&N.value.length>0?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(r.card?e.unref(h)("search-wrapper"):null),style:e.normalizeStyle(r.searchFormWrapperStyle)},[e.createVNode(e.unref(fe.ApForm).SearchForm,e.mergeProps(r.searchForm||{},{ref_key:"formRef",ref:C,"custom-reset":"","submit-loading":e.unref(V).loading,onSubmit:e.unref(P),onReset:e.unref(_)}),e.createSlots({default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,o=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.renderNode.Comp),e.mergeProps({key:o.dataIndex,item:o,ref_for:!0},o.fieldProps||{},{span:o.span,"custom-render":o.renderNode.render}),null,16,["item","span","custom-render"]))),128))]),_:2},[y.searchFormExtra?{name:"extra",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"searchFormExtra")]),key:"0"}:void 0]),1040,["submit-loading","onSubmit","onReset"])],6)):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"contentRef",ref:M,class:e.normalizeClass([e.unref(h)("table-wrapper"),r.card?e.unref(h)("table-wrapper-card"):null]),style:e.normalizeStyle(r.tableWrapperStyle)},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(i)("header-wrapper"))},[r.settings?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(i)("header"))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(B)("header","title"))},[e.renderSlot(r.$slots,"title",e.mergeProps({selectedRows:e.unref(S),selectedRowKeys:e.unref(g).selectedRowKeys,shownColumns:d.value},b))],2),y.title?(e.openBlock(),e.createBlock(e.unref(A.Divider),{key:0,type:"vertical"})):e.createCommentVNode("",!0),e.createVNode(Re.default,{config:r.settings===!0?{}:r.settings},null,8,["config"])],2)):e.renderSlot(r.$slots,"title",e.mergeProps({key:1,selectedRows:e.unref(S),selectedRowKeys:e.unref(g).selectedRowKeys,shownColumns:d.value},b))],2),e.createVNode(e.unref(A.Table),e.mergeProps({ref_key:"antdTableRef",ref:T,class:e.unref(i)("table")},E.value,{size:w.value,"table-layout":te.value,columns:d.value,onResizeColumn:a[0]||(a[0]=(o,n)=>n.width=o)}),e.createSlots({summary:e.withCtx(()=>[e.renderSlot(r.$slots,"summary",{columns:d.value,records:E.value.dataSource,selectedRows:e.unref(S)})]),_:2},[e.unref(F)?{name:"bottomPaginationTop",fn:e.withCtx(()=>{var o,n;return[e.createVNode(e.unref(Be.default),{ref_key:"scrollBarRef",ref:q,"scroll-container":(n=(o=T.value)==null?void 0:o.table)==null?void 0:n.scrollBodyRef,direction:"horizontal"},null,8,["scroll-container"])]}),key:"0"}:void 0,e.renderList(e.unref(c.omit)(y,["title","searchFormExtra","headerCell","summary"]),(o,n)=>({name:n,fn:e.withCtx(u=>[e.renderSlot(r.$slots,n,e.normalizeProps(e.guardReactiveProps(u||{})))])}))]),1040,["class","size","table-layout","columns"])],6)],2))}});exports.default=xe;
|
|
@@ -4,18 +4,18 @@ export declare const useTableColumnState: (columnSetting: ApTableSettingType, pe
|
|
|
4
4
|
columnState: Ref<{
|
|
5
5
|
key: string | number;
|
|
6
6
|
show?: boolean | undefined;
|
|
7
|
-
fixed?: "left" | "right" | undefined;
|
|
7
|
+
fixed?: ("left" | "right") | undefined;
|
|
8
8
|
disabled?: boolean | undefined;
|
|
9
9
|
label?: any;
|
|
10
|
-
children?:
|
|
10
|
+
children?: any[] | undefined;
|
|
11
11
|
order?: number | undefined;
|
|
12
12
|
}[], ApColumnState[] | {
|
|
13
13
|
key: string | number;
|
|
14
14
|
show?: boolean | undefined;
|
|
15
|
-
fixed?: "left" | "right" | undefined;
|
|
15
|
+
fixed?: ("left" | "right") | undefined;
|
|
16
16
|
disabled?: boolean | undefined;
|
|
17
17
|
label?: any;
|
|
18
|
-
children?:
|
|
18
|
+
children?: any[] | undefined;
|
|
19
19
|
order?: number | undefined;
|
|
20
20
|
}[]>;
|
|
21
21
|
selectAll: () => void;
|
|
@@ -8,6 +8,8 @@ import { ApActionGroupProps } from '../ap-action';
|
|
|
8
8
|
import { ApTableIndexProps } from './components/interface';
|
|
9
9
|
import { EllipsisConfig } from '@aplus-frontend/antdv/es/typography/Base';
|
|
10
10
|
import { RowSelectionReturnType } from './hooks/use-table-row-selection';
|
|
11
|
+
import { ScrollBarExpose } from '../scroll-bar/interface';
|
|
12
|
+
import { UnwrapRefProps } from '../utils';
|
|
11
13
|
export type ValueEnumType = {
|
|
12
14
|
text: string;
|
|
13
15
|
/**
|
|
@@ -368,4 +370,11 @@ export type ApTableExpose<SearchParamsType = Recordable, RecordType = any> = {
|
|
|
368
370
|
* @returns
|
|
369
371
|
*/
|
|
370
372
|
getShownColumns: () => ColumnsType<RecordType>;
|
|
373
|
+
/**
|
|
374
|
+
* 滚动条实例
|
|
375
|
+
*/
|
|
376
|
+
scrollBar: {
|
|
377
|
+
x: UnwrapRefProps<ScrollBarExpose>;
|
|
378
|
+
y: UnwrapRefProps<ScrollBarExpose>;
|
|
379
|
+
};
|
|
371
380
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UploadFile, UploadChangeParam } from '@aplus-frontend/antdv';
|
|
2
2
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, CreateComponentPublicInstanceWithMixins, ExtractPropTypes, PropType, GlobalComponents, GlobalDirectives } from 'vue';
|
|
3
|
-
import { UploadType, UploadFile, FileType, HttpRequestHeader, ShowUploadListInterface, UploadListType, UploadLocale, UploadListProgressProps, ItemRender } from '@aplus-frontend/antdv/es/upload/interface';
|
|
3
|
+
import { UploadType, UploadFile, FileType, HttpRequestHeader, ShowUploadListInterface, UploadChangeParam, UploadListType, UploadLocale, UploadListProgressProps, ItemRender } from '@aplus-frontend/antdv/es/upload/interface';
|
|
4
4
|
import { UploadRequestOption } from '@aplus-frontend/antdv/es/vc-upload/interface';
|
|
5
5
|
import { VueNode } from '@aplus-frontend/antdv/es/_util/type';
|
|
6
6
|
declare function setValue(val: (string | Record<string, any>)[]): void;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Oss } from '../hooks/useOss';
|
|
2
|
-
import { actionResponse } from '@aplus-frontend/oss';
|
|
3
2
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
4
3
|
declare function setValue(val?: (string | Record<string, any>)[]): void;
|
|
5
4
|
interface UploadFile extends File {
|
|
@@ -18,7 +17,13 @@ declare function __VLS_template(): {
|
|
|
18
17
|
pictureContext?(_: {
|
|
19
18
|
fileList: {
|
|
20
19
|
oss: {
|
|
21
|
-
pauseUpload: (() => Promise<
|
|
20
|
+
pauseUpload: (() => Promise<{
|
|
21
|
+
status: number;
|
|
22
|
+
previewUrl?: string;
|
|
23
|
+
saveUrl?: string;
|
|
24
|
+
originalFileName?: string;
|
|
25
|
+
message: string;
|
|
26
|
+
}>) | undefined;
|
|
22
27
|
};
|
|
23
28
|
}[];
|
|
24
29
|
remove: typeof handleRemove;
|
|
@@ -3,8 +3,8 @@ import { ButtonType, ButtonShape, ButtonSize } from '@aplus-frontend/antdv/es/bu
|
|
|
3
3
|
import { ButtonHTMLType } from '@aplus-frontend/antdv/es/button/buttonTypes';
|
|
4
4
|
import { VueTypeValidableDef } from '../../../node_modules/vue-types';
|
|
5
5
|
import { MouseEventHandler, FocusEventHandler } from '@aplus-frontend/antdv/es/_util/EventInterface';
|
|
6
|
+
import { ButtonProps, ItemType, MenuTheme, MenuMode } from '@aplus-frontend/antdv';
|
|
6
7
|
import { DropdownArrowOptions, Trigger, Align } from '@aplus-frontend/antdv/es/dropdown/props';
|
|
7
|
-
import { ItemType, MenuTheme, MenuMode, ButtonProps } from '@aplus-frontend/antdv';
|
|
8
8
|
import { Key } from '@aplus-frontend/antdv/es/_util/type';
|
|
9
9
|
import { CSSMotionProps } from '@aplus-frontend/antdv/es/_util/transition';
|
|
10
10
|
import { BuiltinPlacements, TriggerSubMenuAction, SelectEventHandler, MenuClickEventHandler } from '@aplus-frontend/antdv/es/menu/src/interface';
|
|
@@ -63,7 +63,7 @@ declare const ApBatchActionGroup: {
|
|
|
63
63
|
type: PropType< MouseEventHandler | MouseEventHandler[]>;
|
|
64
64
|
};
|
|
65
65
|
}>>, "type" | "onClick"> & {
|
|
66
|
-
type?:
|
|
66
|
+
type?: ButtonProps["type"] | "borderLink";
|
|
67
67
|
borderLinkColor?: string;
|
|
68
68
|
minWidth?: boolean | number | string;
|
|
69
69
|
lazy?: boolean | number;
|
|
@@ -361,7 +361,7 @@ declare const ApBatchActionGroup: {
|
|
|
361
361
|
type: PropType< MouseEventHandler | MouseEventHandler[]>;
|
|
362
362
|
};
|
|
363
363
|
}>>, "type" | "onClick"> & {
|
|
364
|
-
type?:
|
|
364
|
+
type?: ButtonProps["type"] | "borderLink";
|
|
365
365
|
borderLinkColor?: string;
|
|
366
366
|
minWidth?: boolean | number | string;
|
|
367
367
|
lazy?: boolean | number;
|