@aplus-frontend/ui 0.4.20 → 0.4.22
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-table/interface.d.ts +2 -2
- package/es/src/business/ap-table-modal/hooks/use-create-table-modal.d.ts +4 -12
- package/es/src/business/ap-table-modal/hooks/use-table-modal.d.ts +4 -12
- package/es/src/business/ap-table-modal/hooks/use-table-select-modal.d.ts +4 -12
- package/es/src/business/ap-table-modal/index.d.ts +7 -36
- package/es/src/business/ap-table-modal/table-modal.vue.d.ts +3 -12
- package/es/src/business/hooks/usePageListApTable.d.ts +4 -12
- package/es/src/business/hooks/useTableRefresh.mjs +37 -33
- package/lib/src/ap-table/interface.d.ts +2 -2
- package/lib/src/business/ap-table-modal/hooks/use-create-table-modal.d.ts +4 -12
- package/lib/src/business/ap-table-modal/hooks/use-table-modal.d.ts +4 -12
- package/lib/src/business/ap-table-modal/hooks/use-table-select-modal.d.ts +4 -12
- package/lib/src/business/ap-table-modal/index.d.ts +7 -36
- package/lib/src/business/ap-table-modal/table-modal.vue.d.ts +3 -12
- package/lib/src/business/hooks/usePageListApTable.d.ts +4 -12
- package/lib/src/business/hooks/useTableRefresh.js +1 -1
- package/package.json +3 -3
|
@@ -374,7 +374,7 @@ export type ApTableExpose<SearchParamsType = Recordable, RecordType = any> = {
|
|
|
374
374
|
* 滚动条实例
|
|
375
375
|
*/
|
|
376
376
|
scrollBar: {
|
|
377
|
-
x: UnwrapRefProps<ScrollBarExpose
|
|
378
|
-
y: UnwrapRefProps<ScrollBarExpose
|
|
377
|
+
x: Ref<UnwrapRefProps<ScrollBarExpose>>;
|
|
378
|
+
y: Ref<UnwrapRefProps<ScrollBarExpose>>;
|
|
379
379
|
};
|
|
380
380
|
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { OpenOptions, UseCreateTableModalProps, OpenReturnType } from '../interface';
|
|
2
2
|
import { Recordable } from '../../../type';
|
|
3
3
|
import { TableColumnsType } from '@aplus-frontend/antdv';
|
|
4
|
+
import { UnwrapRefProps } from '../../../utils';
|
|
5
|
+
import { ScrollBarExpose } from '../../../scroll-bar';
|
|
4
6
|
export declare function useCreateTableModal(props: UseCreateTableModalProps): {
|
|
5
7
|
readonly openModal: <T>(selected?: any[], options?: OpenOptions) => Promise< OpenReturnType<T> | undefined>;
|
|
6
8
|
readonly closeModal: () => void;
|
|
@@ -26,18 +28,8 @@ export declare function useCreateTableModal(props: UseCreateTableModalProps): {
|
|
|
26
28
|
} | undefined;
|
|
27
29
|
getShownColumns: () => TableColumnsType<any>;
|
|
28
30
|
scrollBar: {
|
|
29
|
-
x:
|
|
30
|
-
|
|
31
|
-
currentScroll: number;
|
|
32
|
-
visible: boolean;
|
|
33
|
-
rootElement: HTMLElement;
|
|
34
|
-
};
|
|
35
|
-
y: {
|
|
36
|
-
scroll: (percent: number) => void;
|
|
37
|
-
currentScroll: number;
|
|
38
|
-
visible: boolean;
|
|
39
|
-
rootElement: HTMLElement;
|
|
40
|
-
};
|
|
31
|
+
x: UnwrapRefProps<ScrollBarExpose>;
|
|
32
|
+
y: UnwrapRefProps<ScrollBarExpose>;
|
|
41
33
|
};
|
|
42
34
|
} | null | undefined;
|
|
43
35
|
readonly isDestroyed: true;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { ApTableModalProps, OpenOptions } from '../interface';
|
|
2
2
|
import { Recordable } from '../../../type';
|
|
3
3
|
import { TableColumnsType } from '@aplus-frontend/antdv';
|
|
4
|
+
import { UnwrapRefProps } from '../../../utils';
|
|
5
|
+
import { ScrollBarExpose } from '../../..';
|
|
4
6
|
/** 函数式调用弹框表格 */
|
|
5
7
|
export declare function useTableModal<TableRowType = Record<string, any>>(props: ApTableModalProps<TableRowType>): {
|
|
6
8
|
reloadApTableData: () => void;
|
|
@@ -24,18 +26,8 @@ export declare function useTableModal<TableRowType = Record<string, any>>(props:
|
|
|
24
26
|
} | undefined;
|
|
25
27
|
getShownColumns: () => TableColumnsType<any>;
|
|
26
28
|
scrollBar: {
|
|
27
|
-
x:
|
|
28
|
-
|
|
29
|
-
currentScroll: number;
|
|
30
|
-
visible: boolean;
|
|
31
|
-
rootElement: HTMLElement;
|
|
32
|
-
};
|
|
33
|
-
y: {
|
|
34
|
-
scroll: (percent: number) => void;
|
|
35
|
-
currentScroll: number;
|
|
36
|
-
visible: boolean;
|
|
37
|
-
rootElement: HTMLElement;
|
|
38
|
-
};
|
|
29
|
+
x: UnwrapRefProps<ScrollBarExpose>;
|
|
30
|
+
y: UnwrapRefProps<ScrollBarExpose>;
|
|
39
31
|
};
|
|
40
32
|
} | null | undefined;
|
|
41
33
|
isDestroyed: true;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { OpenOptions, UseTableSelectModalProps } from '../interface';
|
|
2
2
|
import { Recordable } from '../../../type';
|
|
3
3
|
import { TableColumnsType } from '@aplus-frontend/antdv';
|
|
4
|
+
import { UnwrapRefProps } from '../../../utils';
|
|
5
|
+
import { ScrollBarExpose } from '../../..';
|
|
4
6
|
export declare function useTableSelectModal<TableRowType = Record<string, any>>(props: UseTableSelectModalProps<TableRowType>): {
|
|
5
7
|
reloadApTableData: () => void;
|
|
6
8
|
resetApTableData: () => void;
|
|
@@ -23,18 +25,8 @@ export declare function useTableSelectModal<TableRowType = Record<string, any>>(
|
|
|
23
25
|
} | undefined;
|
|
24
26
|
getShownColumns: () => TableColumnsType<any>;
|
|
25
27
|
scrollBar: {
|
|
26
|
-
x:
|
|
27
|
-
|
|
28
|
-
currentScroll: number;
|
|
29
|
-
visible: boolean;
|
|
30
|
-
rootElement: HTMLElement;
|
|
31
|
-
};
|
|
32
|
-
y: {
|
|
33
|
-
scroll: (percent: number) => void;
|
|
34
|
-
currentScroll: number;
|
|
35
|
-
visible: boolean;
|
|
36
|
-
rootElement: HTMLElement;
|
|
37
|
-
};
|
|
28
|
+
x: UnwrapRefProps<ScrollBarExpose>;
|
|
29
|
+
y: UnwrapRefProps<ScrollBarExpose>;
|
|
38
30
|
};
|
|
39
31
|
} | null | undefined;
|
|
40
32
|
isDestroyed: true;
|
|
@@ -4,6 +4,7 @@ import { CreateComponentPublicInstanceWithMixins, ComponentOptionsMixin, PublicP
|
|
|
4
4
|
import { ApTableModalProps, OpenOptions, OpenReturnType } from './interface';
|
|
5
5
|
import { Recordable } from '../../type';
|
|
6
6
|
import { TableColumnsType } from '@aplus-frontend/antdv';
|
|
7
|
+
import { UnwrapRefProps } from '../../utils';
|
|
7
8
|
import { ScrollBarExpose } from '../..';
|
|
8
9
|
/**
|
|
9
10
|
*
|
|
@@ -33,18 +34,8 @@ declare const ApTableModal: {
|
|
|
33
34
|
} | undefined;
|
|
34
35
|
getShownColumns: () => TableColumnsType<any>;
|
|
35
36
|
scrollBar: {
|
|
36
|
-
x:
|
|
37
|
-
|
|
38
|
-
currentScroll: number;
|
|
39
|
-
visible: boolean;
|
|
40
|
-
rootElement: HTMLElement;
|
|
41
|
-
};
|
|
42
|
-
y: {
|
|
43
|
-
scroll: (percent: number) => void;
|
|
44
|
-
currentScroll: number;
|
|
45
|
-
visible: boolean;
|
|
46
|
-
rootElement: HTMLElement;
|
|
47
|
-
};
|
|
37
|
+
x: UnwrapRefProps<ScrollBarExpose>;
|
|
38
|
+
y: UnwrapRefProps<ScrollBarExpose>;
|
|
48
39
|
};
|
|
49
40
|
} | null;
|
|
50
41
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
@@ -121,18 +112,8 @@ declare const ApTableModal: {
|
|
|
121
112
|
} | undefined;
|
|
122
113
|
getShownColumns: () => TableColumnsType<any>;
|
|
123
114
|
scrollBar: {
|
|
124
|
-
x:
|
|
125
|
-
|
|
126
|
-
currentScroll: number;
|
|
127
|
-
visible: boolean;
|
|
128
|
-
rootElement: HTMLElement;
|
|
129
|
-
};
|
|
130
|
-
y: {
|
|
131
|
-
scroll: (percent: number) => void;
|
|
132
|
-
currentScroll: number;
|
|
133
|
-
visible: boolean;
|
|
134
|
-
rootElement: HTMLElement;
|
|
135
|
-
};
|
|
115
|
+
x: UnwrapRefProps<ScrollBarExpose>;
|
|
116
|
+
y: UnwrapRefProps<ScrollBarExpose>;
|
|
136
117
|
};
|
|
137
118
|
} | null;
|
|
138
119
|
}, {}, {}, {}, {
|
|
@@ -180,18 +161,8 @@ declare const ApTableModal: {
|
|
|
180
161
|
} | undefined;
|
|
181
162
|
getShownColumns: () => TableColumnsType<any>;
|
|
182
163
|
scrollBar: {
|
|
183
|
-
x:
|
|
184
|
-
|
|
185
|
-
currentScroll: number;
|
|
186
|
-
visible: boolean;
|
|
187
|
-
rootElement: HTMLElement;
|
|
188
|
-
};
|
|
189
|
-
y: {
|
|
190
|
-
scroll: (percent: number) => void;
|
|
191
|
-
currentScroll: number;
|
|
192
|
-
visible: boolean;
|
|
193
|
-
rootElement: HTMLElement;
|
|
194
|
-
};
|
|
164
|
+
x: UnwrapRefProps<ScrollBarExpose>;
|
|
165
|
+
y: UnwrapRefProps<ScrollBarExpose>;
|
|
195
166
|
};
|
|
196
167
|
} | null;
|
|
197
168
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
@@ -2,6 +2,7 @@ import { OpenOptions, OpenReturnType, ApTableModalProps } from './interface';
|
|
|
2
2
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, ShallowUnwrapRef, ComputedRef, Ref } from 'vue';
|
|
3
3
|
import { Recordable } from '../../type';
|
|
4
4
|
import { TableColumnsType } from '@aplus-frontend/antdv';
|
|
5
|
+
import { UnwrapRefProps } from '../../utils';
|
|
5
6
|
import { ScrollBarExpose } from '../../scroll-bar';
|
|
6
7
|
type __VLS_Props = ApTableModalProps;
|
|
7
8
|
declare const _default: DefineComponent<__VLS_Props, {
|
|
@@ -26,18 +27,8 @@ declare const _default: DefineComponent<__VLS_Props, {
|
|
|
26
27
|
} | undefined;
|
|
27
28
|
getShownColumns: () => TableColumnsType<any>;
|
|
28
29
|
scrollBar: {
|
|
29
|
-
x:
|
|
30
|
-
|
|
31
|
-
currentScroll: number;
|
|
32
|
-
visible: boolean;
|
|
33
|
-
rootElement: HTMLElement;
|
|
34
|
-
};
|
|
35
|
-
y: {
|
|
36
|
-
scroll: (percent: number) => void;
|
|
37
|
-
currentScroll: number;
|
|
38
|
-
visible: boolean;
|
|
39
|
-
rootElement: HTMLElement;
|
|
40
|
-
};
|
|
30
|
+
x: UnwrapRefProps<ScrollBarExpose>;
|
|
31
|
+
y: UnwrapRefProps<ScrollBarExpose>;
|
|
41
32
|
};
|
|
42
33
|
} | null;
|
|
43
34
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
@@ -2,6 +2,8 @@ import { ApTableProps } from '../../';
|
|
|
2
2
|
import { UseTableRefreshOption } from './useTableRefresh';
|
|
3
3
|
import { Recordable } from '../../type';
|
|
4
4
|
import { TableColumnsType } from '@aplus-frontend/antdv';
|
|
5
|
+
import { UnwrapRefProps } from '../../utils';
|
|
6
|
+
import { ScrollBarExpose } from '../../scroll-bar';
|
|
5
7
|
export interface UsePageListApTable extends ApTableProps {
|
|
6
8
|
/** 是否显示默认的行选择配置
|
|
7
9
|
* @default true
|
|
@@ -50,18 +52,8 @@ export declare function usePageListApTable(props?: UsePageListApTable): [ApTable
|
|
|
50
52
|
} | undefined;
|
|
51
53
|
getShownColumns: () => TableColumnsType<any>;
|
|
52
54
|
scrollBar: {
|
|
53
|
-
x:
|
|
54
|
-
|
|
55
|
-
currentScroll: number;
|
|
56
|
-
visible: boolean;
|
|
57
|
-
rootElement: HTMLElement;
|
|
58
|
-
};
|
|
59
|
-
y: {
|
|
60
|
-
scroll: (percent: number) => void;
|
|
61
|
-
currentScroll: number;
|
|
62
|
-
visible: boolean;
|
|
63
|
-
rootElement: HTMLElement;
|
|
64
|
-
};
|
|
55
|
+
x: UnwrapRefProps<ScrollBarExpose>;
|
|
56
|
+
y: UnwrapRefProps<ScrollBarExpose>;
|
|
65
57
|
};
|
|
66
58
|
} | null | undefined;
|
|
67
59
|
getSearchFormValuesAndSorted: (transform?: boolean) => any;
|
|
@@ -1,51 +1,55 @@
|
|
|
1
|
-
import { ref as
|
|
1
|
+
import { ref as x, onMounted as D, nextTick as g, onActivated as o, onDeactivated as E } from "vue";
|
|
2
2
|
import "../../index.mjs";
|
|
3
|
-
import { useGlobalConfig as
|
|
3
|
+
import { useGlobalConfig as L } from "../../config-provider/hooks/use-global-config.mjs";
|
|
4
4
|
function v(e) {
|
|
5
5
|
return document.querySelector(e);
|
|
6
6
|
}
|
|
7
|
-
function q(e = ".demo") {
|
|
8
|
-
const
|
|
9
|
-
return l == null ? void 0 : l.scrollTop;
|
|
10
|
-
}
|
|
11
|
-
function A(e, l = ".demo") {
|
|
12
|
-
const s = v(l);
|
|
7
|
+
function q(e, r = ".demo") {
|
|
8
|
+
const s = v(r);
|
|
13
9
|
s && (s.scrollTop = e);
|
|
14
10
|
}
|
|
15
|
-
function
|
|
16
|
-
const
|
|
11
|
+
function k(e) {
|
|
12
|
+
const r = L("scrollYDomName");
|
|
17
13
|
let s = !0;
|
|
18
|
-
const d =
|
|
19
|
-
let
|
|
20
|
-
const n = (
|
|
14
|
+
const d = x(0), T = x(0), y = (["reset", "submit", void 0].includes(e == null ? void 0 : e.refreshType) ? e == null ? void 0 : e.refreshType : "submit") ?? "submit", b = (e == null ? void 0 : e.refreshBefore) ?? (() => !0);
|
|
15
|
+
let S = !0;
|
|
16
|
+
const n = (a) => {
|
|
21
17
|
if (s === !1) return;
|
|
22
|
-
const
|
|
23
|
-
|
|
18
|
+
const l = a.target;
|
|
19
|
+
T.value = l.scrollTop;
|
|
24
20
|
};
|
|
25
|
-
return
|
|
21
|
+
return D(() => {
|
|
26
22
|
g(() => {
|
|
27
|
-
|
|
28
|
-
});
|
|
29
|
-
}), x(() => {
|
|
30
|
-
setTimeout(() => {
|
|
31
|
-
const r = v(l.value);
|
|
32
|
-
r && r.addEventListener("scroll", n);
|
|
23
|
+
S = !1;
|
|
33
24
|
});
|
|
34
|
-
|
|
35
|
-
b
|
|
36
|
-
|
|
37
|
-
|
|
25
|
+
}), o(() => {
|
|
26
|
+
const a = b == null ? void 0 : b();
|
|
27
|
+
if (S) {
|
|
28
|
+
setTimeout(() => {
|
|
29
|
+
const l = v(r.value);
|
|
30
|
+
l && l.addEventListener("scroll", n);
|
|
31
|
+
});
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
a && setTimeout(() => {
|
|
35
|
+
var c, u, t, m, h, R, f, Y;
|
|
36
|
+
s = !0, (u = (c = e == null ? void 0 : e.apTableRef) == null ? void 0 : c.value) == null || u[y](), (Y = (f = (R = (h = (m = (t = e == null ? void 0 : e.apTableRef) == null ? void 0 : t.value) == null ? void 0 : m.scrollBar) == null ? void 0 : h.x) == null ? void 0 : R.value) == null ? void 0 : f.scroll) == null || Y.call(
|
|
37
|
+
f,
|
|
38
|
+
d.value
|
|
39
|
+
), q(T.value, r.value);
|
|
40
|
+
const l = v(r.value);
|
|
41
|
+
l && l.addEventListener("scroll", n);
|
|
38
42
|
});
|
|
39
|
-
}),
|
|
40
|
-
var
|
|
41
|
-
s = !1, d.value = ((t = (u = (
|
|
42
|
-
const
|
|
43
|
-
|
|
43
|
+
}), E(() => {
|
|
44
|
+
var l, c, u, t, m;
|
|
45
|
+
s = !1, d.value = ((m = (t = (u = (c = (l = e == null ? void 0 : e.apTableRef) == null ? void 0 : l.value) == null ? void 0 : c.scrollBar) == null ? void 0 : u.x) == null ? void 0 : t.value) == null ? void 0 : m.currentScroll) ?? 0;
|
|
46
|
+
const a = v(r.value);
|
|
47
|
+
a && a.removeEventListener("scroll", n);
|
|
44
48
|
}), {
|
|
45
49
|
tableScrollX: d,
|
|
46
|
-
tableScrollY:
|
|
50
|
+
tableScrollY: T
|
|
47
51
|
};
|
|
48
52
|
}
|
|
49
53
|
export {
|
|
50
|
-
|
|
54
|
+
k as useTableRefresh
|
|
51
55
|
};
|
|
@@ -374,7 +374,7 @@ export type ApTableExpose<SearchParamsType = Recordable, RecordType = any> = {
|
|
|
374
374
|
* 滚动条实例
|
|
375
375
|
*/
|
|
376
376
|
scrollBar: {
|
|
377
|
-
x: UnwrapRefProps<ScrollBarExpose
|
|
378
|
-
y: UnwrapRefProps<ScrollBarExpose
|
|
377
|
+
x: Ref<UnwrapRefProps<ScrollBarExpose>>;
|
|
378
|
+
y: Ref<UnwrapRefProps<ScrollBarExpose>>;
|
|
379
379
|
};
|
|
380
380
|
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { OpenOptions, UseCreateTableModalProps, OpenReturnType } from '../interface';
|
|
2
2
|
import { Recordable } from '../../../type';
|
|
3
3
|
import { TableColumnsType } from '@aplus-frontend/antdv';
|
|
4
|
+
import { UnwrapRefProps } from '../../../utils';
|
|
5
|
+
import { ScrollBarExpose } from '../../../scroll-bar';
|
|
4
6
|
export declare function useCreateTableModal(props: UseCreateTableModalProps): {
|
|
5
7
|
readonly openModal: <T>(selected?: any[], options?: OpenOptions) => Promise< OpenReturnType<T> | undefined>;
|
|
6
8
|
readonly closeModal: () => void;
|
|
@@ -26,18 +28,8 @@ export declare function useCreateTableModal(props: UseCreateTableModalProps): {
|
|
|
26
28
|
} | undefined;
|
|
27
29
|
getShownColumns: () => TableColumnsType<any>;
|
|
28
30
|
scrollBar: {
|
|
29
|
-
x:
|
|
30
|
-
|
|
31
|
-
currentScroll: number;
|
|
32
|
-
visible: boolean;
|
|
33
|
-
rootElement: HTMLElement;
|
|
34
|
-
};
|
|
35
|
-
y: {
|
|
36
|
-
scroll: (percent: number) => void;
|
|
37
|
-
currentScroll: number;
|
|
38
|
-
visible: boolean;
|
|
39
|
-
rootElement: HTMLElement;
|
|
40
|
-
};
|
|
31
|
+
x: UnwrapRefProps<ScrollBarExpose>;
|
|
32
|
+
y: UnwrapRefProps<ScrollBarExpose>;
|
|
41
33
|
};
|
|
42
34
|
} | null | undefined;
|
|
43
35
|
readonly isDestroyed: true;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { ApTableModalProps, OpenOptions } from '../interface';
|
|
2
2
|
import { Recordable } from '../../../type';
|
|
3
3
|
import { TableColumnsType } from '@aplus-frontend/antdv';
|
|
4
|
+
import { UnwrapRefProps } from '../../../utils';
|
|
5
|
+
import { ScrollBarExpose } from '../../..';
|
|
4
6
|
/** 函数式调用弹框表格 */
|
|
5
7
|
export declare function useTableModal<TableRowType = Record<string, any>>(props: ApTableModalProps<TableRowType>): {
|
|
6
8
|
reloadApTableData: () => void;
|
|
@@ -24,18 +26,8 @@ export declare function useTableModal<TableRowType = Record<string, any>>(props:
|
|
|
24
26
|
} | undefined;
|
|
25
27
|
getShownColumns: () => TableColumnsType<any>;
|
|
26
28
|
scrollBar: {
|
|
27
|
-
x:
|
|
28
|
-
|
|
29
|
-
currentScroll: number;
|
|
30
|
-
visible: boolean;
|
|
31
|
-
rootElement: HTMLElement;
|
|
32
|
-
};
|
|
33
|
-
y: {
|
|
34
|
-
scroll: (percent: number) => void;
|
|
35
|
-
currentScroll: number;
|
|
36
|
-
visible: boolean;
|
|
37
|
-
rootElement: HTMLElement;
|
|
38
|
-
};
|
|
29
|
+
x: UnwrapRefProps<ScrollBarExpose>;
|
|
30
|
+
y: UnwrapRefProps<ScrollBarExpose>;
|
|
39
31
|
};
|
|
40
32
|
} | null | undefined;
|
|
41
33
|
isDestroyed: true;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { OpenOptions, UseTableSelectModalProps } from '../interface';
|
|
2
2
|
import { Recordable } from '../../../type';
|
|
3
3
|
import { TableColumnsType } from '@aplus-frontend/antdv';
|
|
4
|
+
import { UnwrapRefProps } from '../../../utils';
|
|
5
|
+
import { ScrollBarExpose } from '../../..';
|
|
4
6
|
export declare function useTableSelectModal<TableRowType = Record<string, any>>(props: UseTableSelectModalProps<TableRowType>): {
|
|
5
7
|
reloadApTableData: () => void;
|
|
6
8
|
resetApTableData: () => void;
|
|
@@ -23,18 +25,8 @@ export declare function useTableSelectModal<TableRowType = Record<string, any>>(
|
|
|
23
25
|
} | undefined;
|
|
24
26
|
getShownColumns: () => TableColumnsType<any>;
|
|
25
27
|
scrollBar: {
|
|
26
|
-
x:
|
|
27
|
-
|
|
28
|
-
currentScroll: number;
|
|
29
|
-
visible: boolean;
|
|
30
|
-
rootElement: HTMLElement;
|
|
31
|
-
};
|
|
32
|
-
y: {
|
|
33
|
-
scroll: (percent: number) => void;
|
|
34
|
-
currentScroll: number;
|
|
35
|
-
visible: boolean;
|
|
36
|
-
rootElement: HTMLElement;
|
|
37
|
-
};
|
|
28
|
+
x: UnwrapRefProps<ScrollBarExpose>;
|
|
29
|
+
y: UnwrapRefProps<ScrollBarExpose>;
|
|
38
30
|
};
|
|
39
31
|
} | null | undefined;
|
|
40
32
|
isDestroyed: true;
|
|
@@ -4,6 +4,7 @@ import { CreateComponentPublicInstanceWithMixins, ComponentOptionsMixin, PublicP
|
|
|
4
4
|
import { ApTableModalProps, OpenOptions, OpenReturnType } from './interface';
|
|
5
5
|
import { Recordable } from '../../type';
|
|
6
6
|
import { TableColumnsType } from '@aplus-frontend/antdv';
|
|
7
|
+
import { UnwrapRefProps } from '../../utils';
|
|
7
8
|
import { ScrollBarExpose } from '../..';
|
|
8
9
|
/**
|
|
9
10
|
*
|
|
@@ -33,18 +34,8 @@ declare const ApTableModal: {
|
|
|
33
34
|
} | undefined;
|
|
34
35
|
getShownColumns: () => TableColumnsType<any>;
|
|
35
36
|
scrollBar: {
|
|
36
|
-
x:
|
|
37
|
-
|
|
38
|
-
currentScroll: number;
|
|
39
|
-
visible: boolean;
|
|
40
|
-
rootElement: HTMLElement;
|
|
41
|
-
};
|
|
42
|
-
y: {
|
|
43
|
-
scroll: (percent: number) => void;
|
|
44
|
-
currentScroll: number;
|
|
45
|
-
visible: boolean;
|
|
46
|
-
rootElement: HTMLElement;
|
|
47
|
-
};
|
|
37
|
+
x: UnwrapRefProps<ScrollBarExpose>;
|
|
38
|
+
y: UnwrapRefProps<ScrollBarExpose>;
|
|
48
39
|
};
|
|
49
40
|
} | null;
|
|
50
41
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
@@ -121,18 +112,8 @@ declare const ApTableModal: {
|
|
|
121
112
|
} | undefined;
|
|
122
113
|
getShownColumns: () => TableColumnsType<any>;
|
|
123
114
|
scrollBar: {
|
|
124
|
-
x:
|
|
125
|
-
|
|
126
|
-
currentScroll: number;
|
|
127
|
-
visible: boolean;
|
|
128
|
-
rootElement: HTMLElement;
|
|
129
|
-
};
|
|
130
|
-
y: {
|
|
131
|
-
scroll: (percent: number) => void;
|
|
132
|
-
currentScroll: number;
|
|
133
|
-
visible: boolean;
|
|
134
|
-
rootElement: HTMLElement;
|
|
135
|
-
};
|
|
115
|
+
x: UnwrapRefProps<ScrollBarExpose>;
|
|
116
|
+
y: UnwrapRefProps<ScrollBarExpose>;
|
|
136
117
|
};
|
|
137
118
|
} | null;
|
|
138
119
|
}, {}, {}, {}, {
|
|
@@ -180,18 +161,8 @@ declare const ApTableModal: {
|
|
|
180
161
|
} | undefined;
|
|
181
162
|
getShownColumns: () => TableColumnsType<any>;
|
|
182
163
|
scrollBar: {
|
|
183
|
-
x:
|
|
184
|
-
|
|
185
|
-
currentScroll: number;
|
|
186
|
-
visible: boolean;
|
|
187
|
-
rootElement: HTMLElement;
|
|
188
|
-
};
|
|
189
|
-
y: {
|
|
190
|
-
scroll: (percent: number) => void;
|
|
191
|
-
currentScroll: number;
|
|
192
|
-
visible: boolean;
|
|
193
|
-
rootElement: HTMLElement;
|
|
194
|
-
};
|
|
164
|
+
x: UnwrapRefProps<ScrollBarExpose>;
|
|
165
|
+
y: UnwrapRefProps<ScrollBarExpose>;
|
|
195
166
|
};
|
|
196
167
|
} | null;
|
|
197
168
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
@@ -2,6 +2,7 @@ import { OpenOptions, OpenReturnType, ApTableModalProps } from './interface';
|
|
|
2
2
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, ShallowUnwrapRef, ComputedRef, Ref } from 'vue';
|
|
3
3
|
import { Recordable } from '../../type';
|
|
4
4
|
import { TableColumnsType } from '@aplus-frontend/antdv';
|
|
5
|
+
import { UnwrapRefProps } from '../../utils';
|
|
5
6
|
import { ScrollBarExpose } from '../../scroll-bar';
|
|
6
7
|
type __VLS_Props = ApTableModalProps;
|
|
7
8
|
declare const _default: DefineComponent<__VLS_Props, {
|
|
@@ -26,18 +27,8 @@ declare const _default: DefineComponent<__VLS_Props, {
|
|
|
26
27
|
} | undefined;
|
|
27
28
|
getShownColumns: () => TableColumnsType<any>;
|
|
28
29
|
scrollBar: {
|
|
29
|
-
x:
|
|
30
|
-
|
|
31
|
-
currentScroll: number;
|
|
32
|
-
visible: boolean;
|
|
33
|
-
rootElement: HTMLElement;
|
|
34
|
-
};
|
|
35
|
-
y: {
|
|
36
|
-
scroll: (percent: number) => void;
|
|
37
|
-
currentScroll: number;
|
|
38
|
-
visible: boolean;
|
|
39
|
-
rootElement: HTMLElement;
|
|
40
|
-
};
|
|
30
|
+
x: UnwrapRefProps<ScrollBarExpose>;
|
|
31
|
+
y: UnwrapRefProps<ScrollBarExpose>;
|
|
41
32
|
};
|
|
42
33
|
} | null;
|
|
43
34
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
@@ -2,6 +2,8 @@ import { ApTableProps } from '../../';
|
|
|
2
2
|
import { UseTableRefreshOption } from './useTableRefresh';
|
|
3
3
|
import { Recordable } from '../../type';
|
|
4
4
|
import { TableColumnsType } from '@aplus-frontend/antdv';
|
|
5
|
+
import { UnwrapRefProps } from '../../utils';
|
|
6
|
+
import { ScrollBarExpose } from '../../scroll-bar';
|
|
5
7
|
export interface UsePageListApTable extends ApTableProps {
|
|
6
8
|
/** 是否显示默认的行选择配置
|
|
7
9
|
* @default true
|
|
@@ -50,18 +52,8 @@ export declare function usePageListApTable(props?: UsePageListApTable): [ApTable
|
|
|
50
52
|
} | undefined;
|
|
51
53
|
getShownColumns: () => TableColumnsType<any>;
|
|
52
54
|
scrollBar: {
|
|
53
|
-
x:
|
|
54
|
-
|
|
55
|
-
currentScroll: number;
|
|
56
|
-
visible: boolean;
|
|
57
|
-
rootElement: HTMLElement;
|
|
58
|
-
};
|
|
59
|
-
y: {
|
|
60
|
-
scroll: (percent: number) => void;
|
|
61
|
-
currentScroll: number;
|
|
62
|
-
visible: boolean;
|
|
63
|
-
rootElement: HTMLElement;
|
|
64
|
-
};
|
|
55
|
+
x: UnwrapRefProps<ScrollBarExpose>;
|
|
56
|
+
y: UnwrapRefProps<ScrollBarExpose>;
|
|
65
57
|
};
|
|
66
58
|
} | null | undefined;
|
|
67
59
|
getSearchFormValuesAndSorted: (transform?: boolean) => any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue");require("../../index.js");const q=require("../../config-provider/hooks/use-global-config.js");function m(e){return document.querySelector(e)}function Y(e,r=".demo"){const s=m(r);s&&(s.scrollTop=e)}function D(e){const r=q.useGlobalConfig("scrollYDomName");let s=!0;const b=a.ref(0),T=a.ref(0),o=(["reset","submit",void 0].includes(e==null?void 0:e.refreshType)?e==null?void 0:e.refreshType:"submit")??"submit",n=(e==null?void 0:e.refreshBefore)??(()=>!0);let g=!0;const S=u=>{if(s===!1)return;const l=u.target;T.value=l.scrollTop};return a.onMounted(()=>{a.nextTick(()=>{g=!1})}),a.onActivated(()=>{const u=n==null?void 0:n();if(g){setTimeout(()=>{const l=m(r.value);l&&l.addEventListener("scroll",S)});return}u&&setTimeout(()=>{var c,t,f,v,h,y,d,R;s=!0,(t=(c=e==null?void 0:e.apTableRef)==null?void 0:c.value)==null||t[o](),(R=(d=(y=(h=(v=(f=e==null?void 0:e.apTableRef)==null?void 0:f.value)==null?void 0:v.scrollBar)==null?void 0:h.x)==null?void 0:y.value)==null?void 0:d.scroll)==null||R.call(d,b.value),Y(T.value,r.value);const l=m(r.value);l&&l.addEventListener("scroll",S)})}),a.onDeactivated(()=>{var l,c,t,f,v;s=!1,b.value=((v=(f=(t=(c=(l=e==null?void 0:e.apTableRef)==null?void 0:l.value)==null?void 0:c.scrollBar)==null?void 0:t.x)==null?void 0:f.value)==null?void 0:v.currentScroll)??0;const u=m(r.value);u&&u.removeEventListener("scroll",S)}),{tableScrollX:b,tableScrollY:T}}exports.useTableRefresh=D;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aplus-frontend/ui",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.22",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -65,8 +65,8 @@
|
|
|
65
65
|
"sortablejs": "^1.15.2",
|
|
66
66
|
"vue-virtual-scroller": "2.0.0-beta.8",
|
|
67
67
|
"vuedraggable": "^4.1.0",
|
|
68
|
-
"@aplus-frontend/
|
|
69
|
-
"@aplus-frontend/
|
|
68
|
+
"@aplus-frontend/utils": "1.0.50",
|
|
69
|
+
"@aplus-frontend/hooks": "1.0.7"
|
|
70
70
|
},
|
|
71
71
|
"peerDependencies": {
|
|
72
72
|
"@aplus-frontend/antdv": "^1.0.12",
|