@aplus-frontend/ui 6.38.0 → 6.39.1
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 +110 -104
- package/es/src/ag-grid/hooks/use-columns-def.mjs +73 -71
- package/es/src/ag-grid/index.vue.mjs +201 -200
- package/es/src/ag-grid/interface.d.ts +14 -0
- package/es/src/ap-form/drawer-form/index.vue.d.ts +4 -0
- package/es/src/ap-form/modal-form/index.vue.d.ts +9 -1
- package/es/src/ap-modal/utils/createModal.mjs +34 -36
- package/es/src/ap-table/components/setting/modal/index.vue2.mjs +72 -71
- package/es/src/ap-table/interface.d.ts +6 -0
- package/es/src/business/ag-grid-modal/constants.d.ts +4 -0
- package/es/src/business/ag-grid-modal/constants.mjs +6 -0
- package/es/src/business/ag-grid-modal/hooks/use-ag-grid-instance.d.ts +33 -0
- package/es/src/business/ag-grid-modal/hooks/use-ag-grid-instance.mjs +50 -0
- package/es/src/business/ag-grid-modal/hooks/use-ag-grid-modal.d.ts +3 -0
- package/es/src/business/ag-grid-modal/hooks/use-ag-grid-modal.mjs +95 -0
- package/es/src/business/ag-grid-modal/hooks/use-ag-grid-select-modal.d.ts +2 -0
- package/es/src/business/ag-grid-modal/hooks/use-ag-grid-select-modal.mjs +165 -0
- package/es/src/business/ag-grid-modal/hooks/use-modal-title.d.ts +24 -0
- package/es/src/business/ag-grid-modal/hooks/use-modal-title.mjs +49 -0
- package/es/src/business/ag-grid-modal/index.d.ts +3 -0
- package/es/src/business/ag-grid-modal/index.mjs +8 -0
- package/es/src/business/ag-grid-modal/interface.d.ts +141 -0
- package/es/src/business/ag-grid-modal/modal-layout/index.vue.d.ts +44 -0
- package/es/src/business/ag-grid-modal/modal-layout/index.vue.mjs +4 -0
- package/es/src/business/ag-grid-modal/modal-layout/index.vue2.mjs +106 -0
- package/es/src/business/ag-grid-modal/selected-items/default.vue.d.ts +25 -0
- package/es/src/business/ag-grid-modal/selected-items/default.vue.mjs +4 -0
- package/es/src/business/ag-grid-modal/selected-items/default.vue2.mjs +33 -0
- package/es/src/business/ag-grid-modal/selected-items/index.d.ts +36 -0
- package/es/src/business/ag-grid-modal/selected-items/index.mjs +8 -0
- package/es/src/business/ag-grid-modal/selected-items/style/css.d.ts +0 -0
- package/es/src/business/ag-grid-modal/selected-items/style/css.js +1 -0
- package/es/src/business/ag-grid-modal/selected-items/style/index.d.ts +0 -0
- package/es/src/business/ag-grid-modal/selected-items/style/index.js +1 -0
- package/es/src/business/ag-grid-modal/style/css.d.ts +0 -0
- package/es/src/business/ag-grid-modal/style/css.js +1 -0
- package/es/src/business/ag-grid-modal/style/index.d.ts +0 -0
- package/es/src/business/ag-grid-modal/style/index.js +1 -0
- package/es/src/business/ag-grid-modal/utils.d.ts +54 -0
- package/es/src/business/ag-grid-modal/utils.mjs +72 -0
- package/es/src/business/ag-grid-modal/wrapper/index.vue.d.ts +23 -0
- package/es/src/business/ag-grid-modal/wrapper/index.vue.mjs +4 -0
- package/es/src/business/ag-grid-modal/wrapper/index.vue2.mjs +25 -0
- package/es/src/business/ap-table-modal/hooks/use-create-table-modal.d.ts +1 -0
- package/es/src/business/ap-table-modal/hooks/use-table-modal.d.ts +1 -0
- package/es/src/business/ap-table-modal/hooks/use-table-select-modal.d.ts +1 -0
- package/es/src/business/ap-table-modal/index.d.ts +3 -0
- package/es/src/business/ap-table-modal/table-modal.vue.d.ts +1 -0
- package/es/src/business/ap-table-modal/table-modal.vue2.mjs +23 -23
- package/es/src/business/hooks/usePageListApTable.d.ts +1 -0
- package/es/src/business/index.d.ts +1 -0
- package/es/src/business/index.mjs +55 -54
- package/es/src/index.mjs +95 -89
- package/es/src/path-map.mjs +4 -1
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/index.js +1 -1
- package/lib/src/ag-grid/hooks/use-columns-def.js +1 -1
- package/lib/src/ag-grid/index.vue.js +1 -1
- package/lib/src/ag-grid/interface.d.ts +14 -0
- package/lib/src/ap-form/drawer-form/index.vue.d.ts +4 -0
- package/lib/src/ap-form/modal-form/index.vue.d.ts +9 -1
- package/lib/src/ap-modal/utils/createModal.js +1 -1
- package/lib/src/ap-table/components/setting/modal/index.vue2.js +1 -1
- package/lib/src/ap-table/interface.d.ts +6 -0
- package/lib/src/business/ag-grid-modal/constants.d.ts +4 -0
- package/lib/src/business/ag-grid-modal/constants.js +1 -0
- package/lib/src/business/ag-grid-modal/hooks/use-ag-grid-instance.d.ts +33 -0
- package/lib/src/business/ag-grid-modal/hooks/use-ag-grid-instance.js +1 -0
- package/lib/src/business/ag-grid-modal/hooks/use-ag-grid-modal.d.ts +3 -0
- package/lib/src/business/ag-grid-modal/hooks/use-ag-grid-modal.js +1 -0
- package/lib/src/business/ag-grid-modal/hooks/use-ag-grid-select-modal.d.ts +2 -0
- package/lib/src/business/ag-grid-modal/hooks/use-ag-grid-select-modal.js +1 -0
- package/lib/src/business/ag-grid-modal/hooks/use-modal-title.d.ts +24 -0
- package/lib/src/business/ag-grid-modal/hooks/use-modal-title.js +1 -0
- package/lib/src/business/ag-grid-modal/index.d.ts +3 -0
- package/lib/src/business/ag-grid-modal/index.js +1 -0
- package/lib/src/business/ag-grid-modal/interface.d.ts +141 -0
- package/lib/src/business/ag-grid-modal/modal-layout/index.vue.d.ts +44 -0
- package/lib/src/business/ag-grid-modal/modal-layout/index.vue.js +1 -0
- package/lib/src/business/ag-grid-modal/modal-layout/index.vue2.js +1 -0
- package/lib/src/business/ag-grid-modal/selected-items/default.vue.d.ts +25 -0
- package/lib/src/business/ag-grid-modal/selected-items/default.vue.js +1 -0
- package/lib/src/business/ag-grid-modal/selected-items/default.vue2.js +1 -0
- package/lib/src/business/ag-grid-modal/selected-items/index.d.ts +36 -0
- package/lib/src/business/ag-grid-modal/selected-items/index.js +1 -0
- package/lib/src/business/ag-grid-modal/selected-items/style/css.cjs +1 -0
- package/lib/src/business/ag-grid-modal/selected-items/style/css.d.ts +0 -0
- package/lib/src/business/ag-grid-modal/selected-items/style/index.cjs +1 -0
- package/lib/src/business/ag-grid-modal/selected-items/style/index.d.ts +0 -0
- package/lib/src/business/ag-grid-modal/style/css.cjs +1 -0
- package/lib/src/business/ag-grid-modal/style/css.d.ts +0 -0
- package/lib/src/business/ag-grid-modal/style/index.cjs +1 -0
- package/lib/src/business/ag-grid-modal/style/index.d.ts +0 -0
- package/lib/src/business/ag-grid-modal/utils.d.ts +54 -0
- package/lib/src/business/ag-grid-modal/utils.js +1 -0
- package/lib/src/business/ag-grid-modal/wrapper/index.vue.d.ts +23 -0
- package/lib/src/business/ag-grid-modal/wrapper/index.vue.js +1 -0
- package/lib/src/business/ag-grid-modal/wrapper/index.vue2.js +1 -0
- package/lib/src/business/ap-table-modal/hooks/use-create-table-modal.d.ts +1 -0
- package/lib/src/business/ap-table-modal/hooks/use-table-modal.d.ts +1 -0
- package/lib/src/business/ap-table-modal/hooks/use-table-select-modal.d.ts +1 -0
- package/lib/src/business/ap-table-modal/index.d.ts +3 -0
- package/lib/src/business/ap-table-modal/table-modal.vue.d.ts +1 -0
- package/lib/src/business/ap-table-modal/table-modal.vue2.js +1 -1
- package/lib/src/business/hooks/usePageListApTable.d.ts +1 -0
- package/lib/src/business/index.d.ts +1 -0
- package/lib/src/business/index.js +1 -1
- package/lib/src/index.js +1 -1
- package/lib/src/path-map.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +3 -3
- package/theme/ag-grid/index.css +3 -0
- package/theme/ag-grid-modal/index.css +789 -0
- package/theme/ag-grid-modal/index.less +73 -0
- package/theme/ag-grid-modal/selected-items.css +72 -0
- package/theme/ag-grid-modal/selected-items.less +34 -0
- package/theme/ap-form/ap-form-item.css +3 -0
- package/theme/ap-form/ap-form-item.less +3 -0
- package/theme/ap-form/index.css +3 -0
- package/theme/ap-form/search-form.css +3 -0
- package/theme/ap-grid/index.css +3 -0
- package/theme/ap-table/ap-table.css +3 -0
- package/theme/ap-table-modal/index.css +3 -0
- package/theme/ap-upload/index.css +5 -0
- package/theme/ap-upload/multiple-file.css +5 -0
- package/theme/ap-upload/multiple-file.less +6 -0
- package/theme/editable-table/index.css +3 -0
- package/theme/index.css +96 -0
- package/theme/index.less +2 -0
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@aplus-frontend/ui/theme/ag-grid-modal/index.less';
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Recordable } from '../../type';
|
|
2
|
+
import { GetRowKey, ModalLayoutConfig, RequestReturn } from './interface';
|
|
3
|
+
import { VNodeChild, StyleValue } from 'vue';
|
|
4
|
+
export declare function genRequest(api: ((params: any) => Promise<RequestReturn<any>>) | undefined, gerRowKey: GetRowKey<any>, callback?: (length: number) => void): {
|
|
5
|
+
request: (params: any) => Promise<{
|
|
6
|
+
data: any[];
|
|
7
|
+
total: number;
|
|
8
|
+
}>;
|
|
9
|
+
setExtraParams: (params?: Recordable) => void;
|
|
10
|
+
};
|
|
11
|
+
export declare function addRowKeyField(row: any, gerRowKey: GetRowKey<any>): any;
|
|
12
|
+
export declare function delRowKeyField(row: any): any;
|
|
13
|
+
/** 解析props */
|
|
14
|
+
export declare function getModalLayoutConfig(props?: ModalLayoutConfig): {
|
|
15
|
+
props: {
|
|
16
|
+
readonly layoutType: "two-column" | undefined;
|
|
17
|
+
readonly leftTitle?: string | VNodeChild;
|
|
18
|
+
readonly rightContentStyle?: StyleValue;
|
|
19
|
+
readonly dividerOffset?: number;
|
|
20
|
+
readonly bordered?: boolean;
|
|
21
|
+
};
|
|
22
|
+
slots: {
|
|
23
|
+
renderSelectedItem: ((props: {
|
|
24
|
+
record: any;
|
|
25
|
+
actions: {
|
|
26
|
+
deleteItem: (record: any) => void;
|
|
27
|
+
deleteCurrent: () => void;
|
|
28
|
+
};
|
|
29
|
+
}) => any) | undefined;
|
|
30
|
+
rightTitle: ((selectedCount: number) => any) | undefined;
|
|
31
|
+
rightBottom: ((props: {
|
|
32
|
+
records: any[];
|
|
33
|
+
actions: {
|
|
34
|
+
deleteItem: (record: any) => void;
|
|
35
|
+
};
|
|
36
|
+
}) => any) | undefined;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* 异步回调
|
|
41
|
+
* buildPromise 构建异步回调
|
|
42
|
+
* resolve reject 兑现或拒绝回调
|
|
43
|
+
*/
|
|
44
|
+
export declare class AsyncCallback<T = any> {
|
|
45
|
+
private p;
|
|
46
|
+
private operateFn;
|
|
47
|
+
constructor();
|
|
48
|
+
buildPromise(): Promise<T>;
|
|
49
|
+
clear(): void;
|
|
50
|
+
/** 兑现回调 */
|
|
51
|
+
resolve(data: T): void;
|
|
52
|
+
/** 拒绝回调 */
|
|
53
|
+
reject(error?: string): void;
|
|
54
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { ROW_KEY as a } from "./constants.mjs";
|
|
2
|
+
import { isFunction as p } from "lodash-unified";
|
|
3
|
+
function m(t, e, r) {
|
|
4
|
+
let n = null;
|
|
5
|
+
return { request: async (s) => {
|
|
6
|
+
const i = t;
|
|
7
|
+
if (!i)
|
|
8
|
+
return r?.(0), {
|
|
9
|
+
data: [],
|
|
10
|
+
total: 0
|
|
11
|
+
};
|
|
12
|
+
n && (s = Object.assign(s, n));
|
|
13
|
+
const { records: l, total: u } = await i(Object.assign({}, s));
|
|
14
|
+
return r?.(l.length || 0), {
|
|
15
|
+
data: l.map((c) => h(c, e)),
|
|
16
|
+
total: u
|
|
17
|
+
};
|
|
18
|
+
}, setExtraParams: (s) => {
|
|
19
|
+
n = s || null;
|
|
20
|
+
} };
|
|
21
|
+
}
|
|
22
|
+
function h(t, e) {
|
|
23
|
+
return p(e) ? {
|
|
24
|
+
...t,
|
|
25
|
+
[a]: e(t)
|
|
26
|
+
} : t;
|
|
27
|
+
}
|
|
28
|
+
function g(t) {
|
|
29
|
+
return Reflect.deleteProperty(t, a), t;
|
|
30
|
+
}
|
|
31
|
+
function y(t) {
|
|
32
|
+
const { renderSelectedItem: e, rightTitle: r, rightBottom: n, ...o } = t || {};
|
|
33
|
+
return {
|
|
34
|
+
props: { ...o, layoutType: t && "two-column" },
|
|
35
|
+
slots: {
|
|
36
|
+
renderSelectedItem: e,
|
|
37
|
+
rightTitle: r,
|
|
38
|
+
rightBottom: n
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
class P {
|
|
43
|
+
constructor() {
|
|
44
|
+
this.p = null, this.operateFn = null;
|
|
45
|
+
}
|
|
46
|
+
buildPromise() {
|
|
47
|
+
return this.operateFn && this.operateFn.reject("reuse"), this.p = new Promise((e, r) => {
|
|
48
|
+
this.operateFn = {
|
|
49
|
+
reject: r,
|
|
50
|
+
resolve: e
|
|
51
|
+
};
|
|
52
|
+
}), this.p;
|
|
53
|
+
}
|
|
54
|
+
clear() {
|
|
55
|
+
this.p = null, this.operateFn = null;
|
|
56
|
+
}
|
|
57
|
+
/** 兑现回调 */
|
|
58
|
+
resolve(e) {
|
|
59
|
+
this.operateFn && (this.operateFn.resolve(e), this.clear());
|
|
60
|
+
}
|
|
61
|
+
/** 拒绝回调 */
|
|
62
|
+
reject(e) {
|
|
63
|
+
this.operateFn && (this.operateFn.reject(e), this.clear());
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
export {
|
|
67
|
+
P as AsyncCallback,
|
|
68
|
+
h as addRowKeyField,
|
|
69
|
+
g as delRowKeyField,
|
|
70
|
+
m as genRequest,
|
|
71
|
+
y as getModalLayoutConfig
|
|
72
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
rowHeight?: number;
|
|
4
|
+
};
|
|
5
|
+
declare function __VLS_template(): {
|
|
6
|
+
attrs: Partial<{}>;
|
|
7
|
+
slots: {
|
|
8
|
+
default?(_: {}): any;
|
|
9
|
+
};
|
|
10
|
+
refs: {};
|
|
11
|
+
rootEl: HTMLDivElement;
|
|
12
|
+
};
|
|
13
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
14
|
+
declare const __VLS_component: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
15
|
+
rowHeight: number;
|
|
16
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
17
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
18
|
+
export default _default;
|
|
19
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
20
|
+
new (): {
|
|
21
|
+
$slots: S;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { defineComponent as c, computed as t, createElementBlock as u, openBlock as s, normalizeStyle as d, unref as m, renderSlot as p } from "vue";
|
|
2
|
+
import { LARGER_HEIGHT as f, SMALL_HEIGHT as o } from "../constants.mjs";
|
|
3
|
+
import { useAgGridModalInject as h } from "../hooks/use-ag-grid-instance.mjs";
|
|
4
|
+
const v = /* @__PURE__ */ c({
|
|
5
|
+
__name: "index",
|
|
6
|
+
props: {
|
|
7
|
+
rowHeight: { default: 40 }
|
|
8
|
+
},
|
|
9
|
+
setup(r) {
|
|
10
|
+
const n = r, i = h(), l = t(() => i?.dataSourceLength?.value || 0), a = t(() => l.value * n.rowHeight > 400 ? f : o);
|
|
11
|
+
return (e, g) => (s(), u("div", {
|
|
12
|
+
style: d({
|
|
13
|
+
minHeight: m(o),
|
|
14
|
+
height: a.value,
|
|
15
|
+
display: "flex",
|
|
16
|
+
flexDirection: "column"
|
|
17
|
+
})
|
|
18
|
+
}, [
|
|
19
|
+
p(e.$slots, "default")
|
|
20
|
+
], 4));
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
export {
|
|
24
|
+
v as default
|
|
25
|
+
};
|
|
@@ -11,6 +11,7 @@ export declare function useCreateTableModal(props: UseCreateTableModalProps): {
|
|
|
11
11
|
readonly resetApTableData: () => void;
|
|
12
12
|
readonly getApTableInstance: () => {
|
|
13
13
|
submit: () => void;
|
|
14
|
+
submitWith: (resetCurrent?: boolean) => void;
|
|
14
15
|
reset: () => void;
|
|
15
16
|
refresh: () => void;
|
|
16
17
|
setSearchFormValues: (fields: Partial< Recordable>) => void;
|
|
@@ -9,6 +9,7 @@ export declare function useTableModal<TableRowType = Record<string, any>>(props:
|
|
|
9
9
|
resetApTableData: () => void;
|
|
10
10
|
getApTableInstance: () => {
|
|
11
11
|
submit: () => void;
|
|
12
|
+
submitWith: (resetCurrent?: boolean) => void;
|
|
12
13
|
reset: () => void;
|
|
13
14
|
refresh: () => void;
|
|
14
15
|
setSearchFormValues: (fields: Partial< Recordable>) => void;
|
|
@@ -8,6 +8,7 @@ export declare function useTableSelectModal<TableRowType = Record<string, any>>(
|
|
|
8
8
|
resetApTableData: () => void;
|
|
9
9
|
getApTableInstance: () => {
|
|
10
10
|
submit: () => void;
|
|
11
|
+
submitWith: (resetCurrent?: boolean) => void;
|
|
11
12
|
reset: () => void;
|
|
12
13
|
refresh: () => void;
|
|
13
14
|
setSearchFormValues: (fields: Partial< Recordable>) => void;
|
|
@@ -17,6 +17,7 @@ declare const ApTableModal: {
|
|
|
17
17
|
close: () => void;
|
|
18
18
|
getApTableInstance: () => {
|
|
19
19
|
submit: () => void;
|
|
20
|
+
submitWith: (resetCurrent?: boolean) => void;
|
|
20
21
|
reset: () => void;
|
|
21
22
|
refresh: () => void;
|
|
22
23
|
setSearchFormValues: (fields: Partial< Recordable>) => void;
|
|
@@ -128,6 +129,7 @@ declare const ApTableModal: {
|
|
|
128
129
|
close: () => void;
|
|
129
130
|
getApTableInstance: () => {
|
|
130
131
|
submit: () => void;
|
|
132
|
+
submitWith: (resetCurrent?: boolean) => void;
|
|
131
133
|
reset: () => void;
|
|
132
134
|
refresh: () => void;
|
|
133
135
|
setSearchFormValues: (fields: Partial< Recordable>) => void;
|
|
@@ -193,6 +195,7 @@ declare const ApTableModal: {
|
|
|
193
195
|
close: () => void;
|
|
194
196
|
getApTableInstance: () => {
|
|
195
197
|
submit: () => void;
|
|
198
|
+
submitWith: (resetCurrent?: boolean) => void;
|
|
196
199
|
reset: () => void;
|
|
197
200
|
refresh: () => void;
|
|
198
201
|
setSearchFormValues: (fields: Partial< Recordable>) => void;
|
|
@@ -10,6 +10,7 @@ declare const _default: DefineComponent<__VLS_Props, {
|
|
|
10
10
|
close: () => void;
|
|
11
11
|
getApTableInstance: () => {
|
|
12
12
|
submit: () => void;
|
|
13
|
+
submitWith: (resetCurrent?: boolean) => void;
|
|
13
14
|
reset: () => void;
|
|
14
15
|
refresh: () => void;
|
|
15
16
|
setSearchFormValues: (fields: Partial< Recordable>) => void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as E, ref as d, unref as r, computed as G, h as H, createBlock as
|
|
2
|
-
import { message as R, Modal as
|
|
1
|
+
import { defineComponent as E, ref as d, unref as r, computed as G, h as H, createBlock as g, openBlock as w, mergeProps as m, withCtx as k, createCommentVNode as U, createVNode as h, resolveDynamicComponent as j } from "vue";
|
|
2
|
+
import { message as R, Modal as q } from "@aplus-frontend/antdv";
|
|
3
3
|
import "../../config-provider/index.mjs";
|
|
4
|
-
import { ApTable as
|
|
5
|
-
import { cloneDeep as
|
|
4
|
+
import { ApTable as V } from "../../ap-table/index.mjs";
|
|
5
|
+
import { cloneDeep as $, omit as T } from "lodash-unified";
|
|
6
6
|
import { transformTableParams as z } from "@aplus-frontend/utils";
|
|
7
7
|
import "./modal-title.vue.mjs";
|
|
8
8
|
import { AsyncOpenResultError as y } from "./interface.mjs";
|
|
@@ -38,7 +38,7 @@ const ue = /* @__PURE__ */ E({
|
|
|
38
38
|
afterOpenChange: {},
|
|
39
39
|
centered: { type: Boolean, default: void 0 },
|
|
40
40
|
width: {},
|
|
41
|
-
footer: {},
|
|
41
|
+
footer: { type: [Object, String, Number, Boolean, null, Array, Function] },
|
|
42
42
|
okText: {},
|
|
43
43
|
okType: {},
|
|
44
44
|
cancelText: {},
|
|
@@ -65,10 +65,10 @@ const ue = /* @__PURE__ */ E({
|
|
|
65
65
|
},
|
|
66
66
|
emits: ["finish"],
|
|
67
67
|
setup(S, { expose: B, emit: P }) {
|
|
68
|
-
const e = S, M = P, s = d(!1), v = d({}), i = d(null), a = d([]),
|
|
68
|
+
const e = S, M = P, s = d(!1), v = d({}), i = d(null), a = d([]), b = d();
|
|
69
69
|
let f = null, u = null;
|
|
70
|
-
const { t:
|
|
71
|
-
switch (a.value = [...t], s.value = !0, v.value = o?.extraParams,
|
|
70
|
+
const { t: C } = W(), K = async (t = [], o = {}) => {
|
|
71
|
+
switch (a.value = [...t], s.value = !0, v.value = o?.extraParams, b.value = o.apTableDataSources || e.apTableProps?.dataSource, o.refreshMode || "reset") {
|
|
72
72
|
case "reset":
|
|
73
73
|
i.value?.reset();
|
|
74
74
|
break;
|
|
@@ -99,7 +99,7 @@ const ue = /* @__PURE__ */ E({
|
|
|
99
99
|
return;
|
|
100
100
|
}
|
|
101
101
|
if (e.getRowKey) {
|
|
102
|
-
const t =
|
|
102
|
+
const t = $(r(a)), o = t.map(e.getRowKey);
|
|
103
103
|
if (e.onOk && await e.onOk({
|
|
104
104
|
keys: o,
|
|
105
105
|
rows: t
|
|
@@ -122,7 +122,7 @@ const ue = /* @__PURE__ */ E({
|
|
|
122
122
|
onSelectAll(o, n) {
|
|
123
123
|
if (n.length > e.maxCount) {
|
|
124
124
|
R.warning(
|
|
125
|
-
|
|
125
|
+
C("ap.apTableModal.messageMaxCount", {
|
|
126
126
|
maxCount: e.maxCount
|
|
127
127
|
})
|
|
128
128
|
);
|
|
@@ -130,7 +130,7 @@ const ue = /* @__PURE__ */ E({
|
|
|
130
130
|
}
|
|
131
131
|
const l = i.value?.dataSource;
|
|
132
132
|
if (o) {
|
|
133
|
-
const c = r(l).filter((p) => !a.value.some((
|
|
133
|
+
const c = r(l).filter((p) => !a.value.some((L) => t(L) === t(p)));
|
|
134
134
|
a.value = a.value.concat(c);
|
|
135
135
|
} else
|
|
136
136
|
a.value = a.value?.filter((c) => !l.some((p) => t(p) === t(c)));
|
|
@@ -139,7 +139,7 @@ const ue = /* @__PURE__ */ E({
|
|
|
139
139
|
if (n) {
|
|
140
140
|
if (a.value.length >= e.maxCount) {
|
|
141
141
|
R.warning(
|
|
142
|
-
|
|
142
|
+
C("ap.apTableModal.messageMaxCount", {
|
|
143
143
|
maxCount: e.maxCount
|
|
144
144
|
})
|
|
145
145
|
);
|
|
@@ -159,7 +159,7 @@ const ue = /* @__PURE__ */ E({
|
|
|
159
159
|
}),
|
|
160
160
|
...e.rowSelection || {}
|
|
161
161
|
};
|
|
162
|
-
}),
|
|
162
|
+
}), N = () => e.isRenderModalTitleSuffix ? H(
|
|
163
163
|
J,
|
|
164
164
|
{
|
|
165
165
|
title: e.title,
|
|
@@ -169,9 +169,9 @@ const ue = /* @__PURE__ */ E({
|
|
|
169
169
|
{
|
|
170
170
|
default: e.renderModalTitleSuffix ?? void 0
|
|
171
171
|
}
|
|
172
|
-
) : e.title,
|
|
172
|
+
) : e.title, A = () => i.value, D = () => {
|
|
173
173
|
a.value = [];
|
|
174
|
-
},
|
|
174
|
+
}, F = (t) => {
|
|
175
175
|
const o = e.getRowKey;
|
|
176
176
|
if (!o) return;
|
|
177
177
|
const n = a.value.findIndex(
|
|
@@ -182,8 +182,8 @@ const ue = /* @__PURE__ */ E({
|
|
|
182
182
|
return B({
|
|
183
183
|
open: K,
|
|
184
184
|
close: x,
|
|
185
|
-
getApTableInstance:
|
|
186
|
-
}), (t, o) => (
|
|
185
|
+
getApTableInstance: A
|
|
186
|
+
}), (t, o) => (w(), g(r(q), m(
|
|
187
187
|
{
|
|
188
188
|
open: s.value,
|
|
189
189
|
"onUpdate:open": o[0] || (o[0] = (n) => s.value = n)
|
|
@@ -203,21 +203,21 @@ const ue = /* @__PURE__ */ E({
|
|
|
203
203
|
"tableLayoutConfig"
|
|
204
204
|
]),
|
|
205
205
|
{
|
|
206
|
-
title:
|
|
206
|
+
title: N(),
|
|
207
207
|
centered: e.centered ?? !0,
|
|
208
208
|
onOk: _,
|
|
209
209
|
onCancel: x
|
|
210
210
|
}
|
|
211
211
|
), {
|
|
212
212
|
default: k(() => [
|
|
213
|
-
e.renderHeader ? (
|
|
213
|
+
e.renderHeader ? (w(), g(j(e.renderHeader), { key: 0 })) : U("", !0),
|
|
214
214
|
h(Q, m(e.tableLayoutConfig || {}, {
|
|
215
215
|
"selected-list": a.value,
|
|
216
|
-
onClear:
|
|
217
|
-
onDeleteItem:
|
|
216
|
+
onClear: D,
|
|
217
|
+
onDeleteItem: F
|
|
218
218
|
}), {
|
|
219
219
|
default: k(() => [
|
|
220
|
-
h(r(
|
|
220
|
+
h(r(V), m({
|
|
221
221
|
ref_key: "apTableRef",
|
|
222
222
|
ref: i,
|
|
223
223
|
scroll: { y: 450 },
|
|
@@ -226,7 +226,7 @@ const ue = /* @__PURE__ */ E({
|
|
|
226
226
|
request: O,
|
|
227
227
|
"row-key": t.getRowKey,
|
|
228
228
|
"row-selection": I.value,
|
|
229
|
-
"data-source":
|
|
229
|
+
"data-source": b.value,
|
|
230
230
|
"search-form": {
|
|
231
231
|
sortable: !1,
|
|
232
232
|
countPerRow: 2
|
|
@@ -35,6 +35,7 @@ export declare function usePageListApTable(props?: UsePageListApTable): [ApTable
|
|
|
35
35
|
getSearchFormValues: (transform?: boolean) => any;
|
|
36
36
|
getApTableInstance: () => {
|
|
37
37
|
submit: () => void;
|
|
38
|
+
submitWith: (resetCurrent?: boolean) => void;
|
|
38
39
|
reset: () => void;
|
|
39
40
|
refresh: () => void;
|
|
40
41
|
setSearchFormValues: (fields: Partial< Recordable>) => void;
|
|
@@ -1,59 +1,60 @@
|
|
|
1
|
-
import { default as
|
|
2
|
-
import { ApAttachment as
|
|
3
|
-
import { ApBatchAction as
|
|
4
|
-
import { ApBatchActionGroup as
|
|
5
|
-
import { ApButtonGroup as
|
|
6
|
-
import { ApCard as
|
|
7
|
-
import { ApExpandAlert as
|
|
8
|
-
import { ApExportGroup as
|
|
9
|
-
import { ApImage as
|
|
10
|
-
import { ApInputRadio as
|
|
11
|
-
import { ApLabel as
|
|
12
|
-
import { ApLadder as
|
|
13
|
-
import { ApSelectLayout as
|
|
14
|
-
import { ApStatus as
|
|
15
|
-
import { ApTitle as
|
|
1
|
+
import { default as A } from "./ap-table-modal/index.mjs";
|
|
2
|
+
import { ApAttachment as x } from "./ap-attachment/index.mjs";
|
|
3
|
+
import { ApBatchAction as u } from "./ap-batch-action/index.mjs";
|
|
4
|
+
import { ApBatchActionGroup as l } from "./ap-batch-action-group/index.mjs";
|
|
5
|
+
import { ApButtonGroup as n } from "./ap-button-group/index.mjs";
|
|
6
|
+
import { ApCard as G } from "./ap-card/index.mjs";
|
|
7
|
+
import { ApExpandAlert as b } from "./ap-expand-alert/index.mjs";
|
|
8
|
+
import { ApExportGroup as I } from "./ap-export-group/index.mjs";
|
|
9
|
+
import { ApImage as g } from "./ap-image/index.mjs";
|
|
10
|
+
import { ApInputRadio as y } from "./ap-input-radio/index.mjs";
|
|
11
|
+
import { ApLabel as C, ApLabelGroup as T } from "./ap-label/index.mjs";
|
|
12
|
+
import { ApLadder as E } from "./ap-ladder/index.mjs";
|
|
13
|
+
import { ApSelectLayout as V } from "./ap-select-layout/index.mjs";
|
|
14
|
+
import { ApStatus as w, ApStatusGroup as z } from "./ap-status/index.mjs";
|
|
15
|
+
import { ApTitle as K } from "./ap-title/index.mjs";
|
|
16
16
|
import "./hooks/index.mjs";
|
|
17
|
-
import { ApSummary as
|
|
18
|
-
import { ApAppendix as
|
|
17
|
+
import { ApSummary as P } from "./ap-summary/index.mjs";
|
|
18
|
+
import { ApAppendix as k } from "./ap-appendix/index.mjs";
|
|
19
19
|
import "./ap-upload-file/index.mjs";
|
|
20
20
|
import "./batch-input-group/index.mjs";
|
|
21
|
-
import { ApSizeInput as
|
|
22
|
-
import { ApProductInfo as
|
|
23
|
-
import { ApCopy as
|
|
24
|
-
import { ApView as
|
|
25
|
-
import { ApRadioGroup as
|
|
26
|
-
import { ApKeepAlive as
|
|
27
|
-
import { ApDraggableGrid as
|
|
28
|
-
import { ApValueSelectCard as
|
|
29
|
-
import { ApTransformDataHelper as
|
|
21
|
+
import { ApSizeInput as F } from "./ap-size-input/index.mjs";
|
|
22
|
+
import { ApProductInfo as N } from "./ap-product-info/index.mjs";
|
|
23
|
+
import { ApCopy as Q } from "./ap-copy/index.mjs";
|
|
24
|
+
import { ApView as W } from "./ap-view/index.mjs";
|
|
25
|
+
import { ApRadioGroup as Y } from "./ap-radio-group/index.mjs";
|
|
26
|
+
import { ApKeepAlive as _ } from "./ap-keep-alive/index.mjs";
|
|
27
|
+
import { ApDraggableGrid as oo } from "./ap-draggable-grid/index.mjs";
|
|
28
|
+
import { ApValueSelectCard as po } from "./ap-value-select-card/index.mjs";
|
|
29
|
+
import { ApTransformDataHelper as eo } from "../utils/ap-trans-data/index.mjs";
|
|
30
|
+
import "./ag-grid-modal/index.mjs";
|
|
30
31
|
export {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
32
|
+
k as ApAppendix,
|
|
33
|
+
x as ApAttachment,
|
|
34
|
+
u as ApBatchAction,
|
|
35
|
+
l as ApBatchActionGroup,
|
|
36
|
+
n as ApButtonGroup,
|
|
37
|
+
G as ApCard,
|
|
38
|
+
Q as ApCopy,
|
|
39
|
+
oo as ApDraggableGrid,
|
|
40
|
+
b as ApExpandAlert,
|
|
41
|
+
I as ApExportGroup,
|
|
42
|
+
g as ApImage,
|
|
43
|
+
y as ApInputRadio,
|
|
44
|
+
_ as ApKeepAlive,
|
|
45
|
+
C as ApLabel,
|
|
46
|
+
T as ApLabelGroup,
|
|
47
|
+
E as ApLadder,
|
|
48
|
+
N as ApProductInfo,
|
|
49
|
+
Y as ApRadioGroup,
|
|
50
|
+
V as ApSelectLayout,
|
|
51
|
+
F as ApSizeInput,
|
|
52
|
+
w as ApStatus,
|
|
53
|
+
z as ApStatusGroup,
|
|
54
|
+
P as ApSummary,
|
|
55
|
+
A as ApTableModal,
|
|
56
|
+
K as ApTitle,
|
|
57
|
+
eo as ApTransformDataHelper,
|
|
58
|
+
po as ApValueSelectCard,
|
|
59
|
+
W as ApView
|
|
59
60
|
};
|