@ditari/bsui 5.1.15 → 5.1.17
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/dist/cjs/components/card/Card.cjs.map +1 -1
- package/dist/cjs/components/card/Card.d.ts +6 -0
- package/dist/cjs/components/card/index.d.ts +3 -0
- package/dist/cjs/components/card/style.d.ts +9 -0
- package/dist/cjs/components/date/RangePicker.vue.d.ts +64 -0
- package/dist/cjs/components/date/index.d.ts +3 -0
- package/dist/cjs/components/dic/DicReplace.d.ts +24 -0
- package/dist/cjs/components/dic/index.d.ts +3 -0
- package/dist/cjs/components/form/FormLayout.d.ts +49 -0
- package/dist/cjs/components/form/index.d.ts +3 -0
- package/dist/cjs/components/icon/index.d.ts +4 -0
- package/dist/cjs/components/index.d.ts +11 -0
- package/dist/cjs/components/layout/AppContext.d.ts +16 -0
- package/dist/cjs/components/layout/AppLayout.d.ts +3 -0
- package/dist/cjs/components/layout/Layout.vue.d.ts +269 -0
- package/dist/cjs/components/layout/List.d.ts +5 -0
- package/dist/cjs/components/layout/Show.d.ts +33 -0
- package/dist/cjs/components/layout/components/index.d.ts +5 -0
- package/dist/cjs/components/layout/components/layout/HeaderLayout.vue.d.ts +106 -0
- package/dist/cjs/components/layout/components/layout/RouterContent.vue.d.ts +11 -0
- package/dist/cjs/components/layout/components/layout/RouterContentName.vue.d.ts +19 -0
- package/dist/cjs/components/layout/components/layout/ThemeApp.vue.d.ts +24 -0
- package/dist/cjs/components/layout/components/menu/Menu.d.ts +5 -0
- package/dist/cjs/components/layout/components/mobile/MobileList.d.ts +3 -0
- package/dist/cjs/components/layout/components/settings/BlockCheckbox.vue.d.ts +47 -0
- package/dist/cjs/components/layout/components/settings/SettingDrawer.d.ts +50 -0
- package/dist/cjs/components/layout/index.d.ts +8 -0
- package/dist/cjs/components/layout/style.d.ts +5 -0
- package/dist/cjs/components/select/Select.vue.d.ts +98 -0
- package/dist/cjs/components/select/index.d.ts +3 -0
- package/dist/cjs/components/tab/Search.d.ts +3 -0
- package/dist/cjs/components/tab/Tab.vue.d.ts +78 -0
- package/dist/cjs/components/tab/index.d.ts +3 -0
- package/dist/cjs/components/table/Table.cjs +5 -48
- package/dist/cjs/components/table/Table.cjs.map +1 -1
- package/dist/cjs/components/table/Table.d.ts +137 -0
- package/dist/cjs/components/table/index.d.ts +4 -0
- package/dist/cjs/components/table/interface.d.ts +46 -0
- package/dist/cjs/components/table-form/TableForm.d.ts +46 -0
- package/dist/cjs/components/table-form/TableFormItem.d.ts +32 -0
- package/dist/cjs/components/table-form/index.d.ts +9 -0
- package/dist/cjs/components/table-form/interface.d.ts +56 -0
- package/dist/cjs/components/table-form/style.d.ts +12 -0
- package/dist/cjs/hooks/useDesign.d.ts +8 -0
- package/dist/cjs/index.d.ts +8 -0
- package/dist/cjs/utils/useMenuCore.d.ts +9 -0
- package/dist/cjs/utils/useTheme.d.ts +9 -0
- package/dist/cjs/utils/withInstall.d.ts +12 -0
- package/dist/esm/components/card/Card.d.ts +6 -0
- package/dist/esm/components/card/Card.mjs.map +1 -1
- package/dist/esm/components/card/index.d.ts +3 -0
- package/dist/esm/components/card/style.d.ts +9 -0
- package/dist/esm/components/date/RangePicker.vue.d.ts +64 -0
- package/dist/esm/components/date/index.d.ts +3 -0
- package/dist/esm/components/dic/DicReplace.d.ts +24 -0
- package/dist/esm/components/dic/index.d.ts +3 -0
- package/dist/esm/components/form/FormLayout.d.ts +49 -0
- package/dist/esm/components/form/index.d.ts +3 -0
- package/dist/esm/components/icon/index.d.ts +4 -0
- package/dist/esm/components/index.d.ts +11 -0
- package/dist/esm/components/layout/AppContext.d.ts +16 -0
- package/dist/esm/components/layout/AppLayout.d.ts +3 -0
- package/dist/esm/components/layout/Layout.vue.d.ts +269 -0
- package/dist/esm/components/layout/List.d.ts +5 -0
- package/dist/esm/components/layout/Show.d.ts +33 -0
- package/dist/esm/components/layout/components/index.d.ts +5 -0
- package/dist/esm/components/layout/components/layout/HeaderLayout.vue.d.ts +106 -0
- package/dist/esm/components/layout/components/layout/RouterContent.vue.d.ts +11 -0
- package/dist/esm/components/layout/components/layout/RouterContentName.vue.d.ts +19 -0
- package/dist/esm/components/layout/components/layout/ThemeApp.vue.d.ts +24 -0
- package/dist/esm/components/layout/components/menu/Menu.d.ts +5 -0
- package/dist/esm/components/layout/components/mobile/MobileList.d.ts +3 -0
- package/dist/esm/components/layout/components/settings/BlockCheckbox.vue.d.ts +47 -0
- package/dist/esm/components/layout/components/settings/SettingDrawer.d.ts +50 -0
- package/dist/esm/components/layout/index.d.ts +8 -0
- package/dist/esm/components/layout/style.d.ts +5 -0
- package/dist/esm/components/select/Select.vue.d.ts +98 -0
- package/dist/esm/components/select/index.d.ts +3 -0
- package/dist/esm/components/tab/Search.d.ts +3 -0
- package/dist/esm/components/tab/Tab.vue.d.ts +78 -0
- package/dist/esm/components/tab/index.d.ts +3 -0
- package/dist/esm/components/table/Table.d.ts +137 -0
- package/dist/esm/components/table/Table.mjs +6 -49
- package/dist/esm/components/table/Table.mjs.map +1 -1
- package/dist/esm/components/table/index.d.ts +4 -0
- package/dist/esm/components/table/interface.d.ts +46 -0
- package/dist/esm/components/table-form/TableForm.d.ts +46 -0
- package/dist/esm/components/table-form/TableFormItem.d.ts +32 -0
- package/dist/esm/components/table-form/index.d.ts +9 -0
- package/dist/esm/components/table-form/interface.d.ts +56 -0
- package/dist/esm/components/table-form/style.d.ts +12 -0
- package/dist/esm/hooks/useDesign.d.ts +8 -0
- package/dist/esm/index.d.ts +8 -0
- package/dist/esm/utils/useMenuCore.d.ts +9 -0
- package/dist/esm/utils/useTheme.d.ts +9 -0
- package/dist/esm/utils/withInstall.d.ts +12 -0
- package/dist/types/components/card/Card.d.ts.map +1 -1
- package/dist/types/components/table/Table.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Ref } from "vue";
|
|
2
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
3
|
+
themeJson: {
|
|
4
|
+
type: ObjectConstructor;
|
|
5
|
+
required: false;
|
|
6
|
+
default: () => {};
|
|
7
|
+
};
|
|
8
|
+
}>, {
|
|
9
|
+
props: any;
|
|
10
|
+
appTheme: Ref<unknown, unknown>;
|
|
11
|
+
useTheme: () => {
|
|
12
|
+
appTheme: Ref<unknown>;
|
|
13
|
+
};
|
|
14
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
15
|
+
themeJson: {
|
|
16
|
+
type: ObjectConstructor;
|
|
17
|
+
required: false;
|
|
18
|
+
default: () => {};
|
|
19
|
+
};
|
|
20
|
+
}>> & Readonly<{}>, {
|
|
21
|
+
themeJson: Record<string, any>;
|
|
22
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
23
|
+
export default _default;
|
|
24
|
+
//# sourceMappingURL=ThemeApp.vue.d.ts.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "onMenuClick"[], "onMenuClick", import("vue").PublicProps, Readonly<{}> & Readonly<{
|
|
2
|
+
onOnMenuClick?: ((...args: any[]) => any) | undefined;
|
|
3
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
4
|
+
export default _default;
|
|
5
|
+
//# sourceMappingURL=Menu.d.ts.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const DMobileList: import("vue").DefineComponent<{}, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default DMobileList;
|
|
3
|
+
//# sourceMappingURL=MobileList.d.ts.map
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
themes: {
|
|
3
|
+
type: StringConstructor;
|
|
4
|
+
required: false;
|
|
5
|
+
};
|
|
6
|
+
isDark: {
|
|
7
|
+
type: BooleanConstructor;
|
|
8
|
+
required: false;
|
|
9
|
+
};
|
|
10
|
+
checked: {
|
|
11
|
+
type: BooleanConstructor;
|
|
12
|
+
required: false;
|
|
13
|
+
};
|
|
14
|
+
t: {
|
|
15
|
+
type: FunctionConstructor;
|
|
16
|
+
required: false;
|
|
17
|
+
};
|
|
18
|
+
}>, {
|
|
19
|
+
props: any;
|
|
20
|
+
prefixCls: import("vue").ShallowRef<string, string>;
|
|
21
|
+
cls: import("vue").ComputedRef<{
|
|
22
|
+
[x: string]: any;
|
|
23
|
+
}>;
|
|
24
|
+
readonly CheckOutlined: import("@ant-design/icons-vue/lib/icons/CheckOutlined").CheckOutlinedIconType;
|
|
25
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
26
|
+
themes: {
|
|
27
|
+
type: StringConstructor;
|
|
28
|
+
required: false;
|
|
29
|
+
};
|
|
30
|
+
isDark: {
|
|
31
|
+
type: BooleanConstructor;
|
|
32
|
+
required: false;
|
|
33
|
+
};
|
|
34
|
+
checked: {
|
|
35
|
+
type: BooleanConstructor;
|
|
36
|
+
required: false;
|
|
37
|
+
};
|
|
38
|
+
t: {
|
|
39
|
+
type: FunctionConstructor;
|
|
40
|
+
required: false;
|
|
41
|
+
};
|
|
42
|
+
}>> & Readonly<{}>, {
|
|
43
|
+
isDark: boolean;
|
|
44
|
+
checked: boolean;
|
|
45
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
46
|
+
export default _default;
|
|
47
|
+
//# sourceMappingURL=BlockCheckbox.vue.d.ts.map
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { type ComputedRef } from "vue";
|
|
2
|
+
declare const _default: import("vue").DefineComponent<{}, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {
|
|
3
|
+
BlockCheckbox: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
|
+
themes: {
|
|
5
|
+
type: StringConstructor;
|
|
6
|
+
required: false;
|
|
7
|
+
};
|
|
8
|
+
isDark: {
|
|
9
|
+
type: BooleanConstructor;
|
|
10
|
+
required: false;
|
|
11
|
+
};
|
|
12
|
+
checked: {
|
|
13
|
+
type: BooleanConstructor;
|
|
14
|
+
required: false;
|
|
15
|
+
};
|
|
16
|
+
t: {
|
|
17
|
+
type: FunctionConstructor;
|
|
18
|
+
required: false;
|
|
19
|
+
};
|
|
20
|
+
}>, {
|
|
21
|
+
props: any;
|
|
22
|
+
prefixCls: import("vue").ShallowRef<string, string>;
|
|
23
|
+
cls: ComputedRef<{
|
|
24
|
+
[x: string]: any;
|
|
25
|
+
}>;
|
|
26
|
+
readonly CheckOutlined: import("@ant-design/icons-vue/lib/icons/CheckOutlined").CheckOutlinedIconType;
|
|
27
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
28
|
+
themes: {
|
|
29
|
+
type: StringConstructor;
|
|
30
|
+
required: false;
|
|
31
|
+
};
|
|
32
|
+
isDark: {
|
|
33
|
+
type: BooleanConstructor;
|
|
34
|
+
required: false;
|
|
35
|
+
};
|
|
36
|
+
checked: {
|
|
37
|
+
type: BooleanConstructor;
|
|
38
|
+
required: false;
|
|
39
|
+
};
|
|
40
|
+
t: {
|
|
41
|
+
type: FunctionConstructor;
|
|
42
|
+
required: false;
|
|
43
|
+
};
|
|
44
|
+
}>> & Readonly<{}>, {
|
|
45
|
+
isDark: boolean;
|
|
46
|
+
checked: boolean;
|
|
47
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
48
|
+
}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
49
|
+
export default _default;
|
|
50
|
+
//# sourceMappingURL=SettingDrawer.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import AppLayout from "./AppLayout";
|
|
2
|
+
import List from "./List";
|
|
3
|
+
import Show from "./Show";
|
|
4
|
+
import Layout from "./Layout.vue";
|
|
5
|
+
export * from "./AppContext";
|
|
6
|
+
export * from "./components";
|
|
7
|
+
export { AppLayout, Layout, List, Show };
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
interface DicItem {
|
|
2
|
+
value: string | number;
|
|
3
|
+
label: string;
|
|
4
|
+
}
|
|
5
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
6
|
+
value: {
|
|
7
|
+
type: null;
|
|
8
|
+
required: true;
|
|
9
|
+
default: undefined;
|
|
10
|
+
};
|
|
11
|
+
name: {
|
|
12
|
+
type: StringConstructor;
|
|
13
|
+
required: true;
|
|
14
|
+
default: string;
|
|
15
|
+
};
|
|
16
|
+
disabled: {
|
|
17
|
+
type: BooleanConstructor;
|
|
18
|
+
required: false;
|
|
19
|
+
default: boolean;
|
|
20
|
+
};
|
|
21
|
+
placeholder: {
|
|
22
|
+
type: StringConstructor;
|
|
23
|
+
required: false;
|
|
24
|
+
default: string;
|
|
25
|
+
};
|
|
26
|
+
include: {
|
|
27
|
+
type: ArrayConstructor;
|
|
28
|
+
required: false;
|
|
29
|
+
default: () => never[];
|
|
30
|
+
};
|
|
31
|
+
}>, {
|
|
32
|
+
props: any;
|
|
33
|
+
emits: (event: "update:value" | "change" | "select", ...args: any[]) => void;
|
|
34
|
+
getDicByKey: (key: string) => import("@ditari/store/dist/types/modules/useDicStore").DictionaryItem[];
|
|
35
|
+
keepNames: string[];
|
|
36
|
+
modelValue: import("vue").Ref<string | number | undefined, string | number | undefined>;
|
|
37
|
+
data: import("vue").Ref<{
|
|
38
|
+
value: string | number;
|
|
39
|
+
label: string;
|
|
40
|
+
}[], DicItem[] | {
|
|
41
|
+
value: string | number;
|
|
42
|
+
label: string;
|
|
43
|
+
}[]>;
|
|
44
|
+
onSelect: (value: string | number) => void;
|
|
45
|
+
onChange: () => void;
|
|
46
|
+
useSelect: () => {
|
|
47
|
+
data: import("vue").Ref<{
|
|
48
|
+
value: string | number;
|
|
49
|
+
label: string;
|
|
50
|
+
}[], DicItem[] | {
|
|
51
|
+
value: string | number;
|
|
52
|
+
label: string;
|
|
53
|
+
}[]>;
|
|
54
|
+
modelValue: import("vue").Ref<string | number | undefined, string | number | undefined>;
|
|
55
|
+
onSearch: (keywords: string) => void;
|
|
56
|
+
onSelect: (value: string | number) => void;
|
|
57
|
+
onChange: () => void;
|
|
58
|
+
};
|
|
59
|
+
onFilterOption: (inputValue: string, options: DicItem) => boolean;
|
|
60
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:value" | "change" | "select")[], "update:value" | "change" | "select", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
61
|
+
value: {
|
|
62
|
+
type: null;
|
|
63
|
+
required: true;
|
|
64
|
+
default: undefined;
|
|
65
|
+
};
|
|
66
|
+
name: {
|
|
67
|
+
type: StringConstructor;
|
|
68
|
+
required: true;
|
|
69
|
+
default: string;
|
|
70
|
+
};
|
|
71
|
+
disabled: {
|
|
72
|
+
type: BooleanConstructor;
|
|
73
|
+
required: false;
|
|
74
|
+
default: boolean;
|
|
75
|
+
};
|
|
76
|
+
placeholder: {
|
|
77
|
+
type: StringConstructor;
|
|
78
|
+
required: false;
|
|
79
|
+
default: string;
|
|
80
|
+
};
|
|
81
|
+
include: {
|
|
82
|
+
type: ArrayConstructor;
|
|
83
|
+
required: false;
|
|
84
|
+
default: () => never[];
|
|
85
|
+
};
|
|
86
|
+
}>> & Readonly<{
|
|
87
|
+
onSelect?: ((...args: any[]) => any) | undefined;
|
|
88
|
+
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
89
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
90
|
+
}>, {
|
|
91
|
+
name: string;
|
|
92
|
+
value: any;
|
|
93
|
+
disabled: boolean;
|
|
94
|
+
placeholder: string;
|
|
95
|
+
include: unknown[];
|
|
96
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
97
|
+
export default _default;
|
|
98
|
+
//# sourceMappingURL=Select.vue.d.ts.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
3
|
+
//# sourceMappingURL=Search.d.ts.map
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { type ComputedRef } from "vue";
|
|
2
|
+
declare const _default: import("vue").DefineComponent<{}, {
|
|
3
|
+
useStyle: () => {
|
|
4
|
+
tabsNavStyle: ComputedRef<string>;
|
|
5
|
+
tabHoverBgStyle: ComputedRef<string>;
|
|
6
|
+
closeBtnStyle: ComputedRef<string>;
|
|
7
|
+
dynamicVars: ComputedRef<{
|
|
8
|
+
"--active-tab-color": string | undefined;
|
|
9
|
+
"--splitColor": string | undefined;
|
|
10
|
+
"--active-text-color": string | undefined;
|
|
11
|
+
"--active-shadow-color": string | undefined;
|
|
12
|
+
"--tabs-text-color": string | undefined;
|
|
13
|
+
}>;
|
|
14
|
+
};
|
|
15
|
+
useTabAndMenu: () => {
|
|
16
|
+
activeKey: import("vue").Ref<string, string>;
|
|
17
|
+
list: ComputedRef<{
|
|
18
|
+
closeBtnVisible: boolean;
|
|
19
|
+
menus: {
|
|
20
|
+
key: string;
|
|
21
|
+
title: string;
|
|
22
|
+
icon: import("@ant-design/icons-vue/lib/icons/ReloadOutlined").ReloadOutlinedIconType;
|
|
23
|
+
disabled: boolean;
|
|
24
|
+
}[];
|
|
25
|
+
path?: string;
|
|
26
|
+
fullPath?: string;
|
|
27
|
+
query?: import("vue-router").LocationQuery;
|
|
28
|
+
params?: import("vue-router").RouteParams;
|
|
29
|
+
meta?: import("vue-router").RouteMeta;
|
|
30
|
+
name?: string;
|
|
31
|
+
openTime?: number | undefined;
|
|
32
|
+
}[]>;
|
|
33
|
+
enableTabContextMenu: boolean;
|
|
34
|
+
onChange: (key: string | number) => void;
|
|
35
|
+
onClose: ($event: Event, key: string | undefined) => void;
|
|
36
|
+
onContextMenuClick: ({ key }: {
|
|
37
|
+
key: string | number;
|
|
38
|
+
}, item: any) => void;
|
|
39
|
+
};
|
|
40
|
+
tabsNavStyle: ComputedRef<string>;
|
|
41
|
+
tabHoverBgStyle: ComputedRef<string>;
|
|
42
|
+
closeBtnStyle: ComputedRef<string>;
|
|
43
|
+
dynamicVars: ComputedRef<{
|
|
44
|
+
"--active-tab-color": string | undefined;
|
|
45
|
+
"--splitColor": string | undefined;
|
|
46
|
+
"--active-text-color": string | undefined;
|
|
47
|
+
"--active-shadow-color": string | undefined;
|
|
48
|
+
"--tabs-text-color": string | undefined;
|
|
49
|
+
}>;
|
|
50
|
+
activeKey: import("vue").Ref<string, string>;
|
|
51
|
+
list: ComputedRef<{
|
|
52
|
+
closeBtnVisible: boolean;
|
|
53
|
+
menus: {
|
|
54
|
+
key: string;
|
|
55
|
+
title: string;
|
|
56
|
+
icon: import("@ant-design/icons-vue/lib/icons/ReloadOutlined").ReloadOutlinedIconType;
|
|
57
|
+
disabled: boolean;
|
|
58
|
+
}[];
|
|
59
|
+
path?: string;
|
|
60
|
+
fullPath?: string;
|
|
61
|
+
query?: import("vue-router").LocationQuery;
|
|
62
|
+
params?: import("vue-router").RouteParams;
|
|
63
|
+
meta?: import("vue-router").RouteMeta;
|
|
64
|
+
name?: string;
|
|
65
|
+
openTime?: number | undefined;
|
|
66
|
+
}[]>;
|
|
67
|
+
enableTabContextMenu: boolean;
|
|
68
|
+
onChange: (key: string | number) => void;
|
|
69
|
+
onClose: ($event: Event, key: string | undefined) => void;
|
|
70
|
+
onContextMenuClick: ({ key }: {
|
|
71
|
+
key: string | number;
|
|
72
|
+
}, item: any) => void;
|
|
73
|
+
readonly Search: import("vue").DefineComponent<{}, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
74
|
+
readonly CloseOutlined: import("@ant-design/icons-vue/lib/icons/CloseOutlined").CloseOutlinedIconType;
|
|
75
|
+
readonly cx: (...classNames: import("@emotion/css/dist/declarations/src/create-instance").ClassNamesArg[]) => string;
|
|
76
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
77
|
+
export default _default;
|
|
78
|
+
//# sourceMappingURL=Tab.vue.d.ts.map
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { type ExtractPropTypes, type PropType } from "vue";
|
|
2
|
+
import { type PaginationProps } from "./interface";
|
|
3
|
+
import type { ColumnsType } from "ant-design-vue/es/table";
|
|
4
|
+
export type Key = string | number;
|
|
5
|
+
export type SizeType = "small" | "middle" | "large" | undefined;
|
|
6
|
+
interface Page {
|
|
7
|
+
total: number;
|
|
8
|
+
current: number;
|
|
9
|
+
pageSize: number;
|
|
10
|
+
}
|
|
11
|
+
interface Config<T = unknown> {
|
|
12
|
+
columns: ColumnsType<T>;
|
|
13
|
+
pagination?: Page | undefined;
|
|
14
|
+
paginationConfig?: PaginationProps;
|
|
15
|
+
changePagination?: (current: number, size: number) => void;
|
|
16
|
+
click?: (record: Record<string, unknown>, index: number) => void;
|
|
17
|
+
dbClick?: (record: Record<string, unknown>, index: number) => void;
|
|
18
|
+
getCheckboxProps?: (record: unknown) => Record<string, unknown> | undefined;
|
|
19
|
+
activeRowClass?: string;
|
|
20
|
+
selection?: string;
|
|
21
|
+
keepSelected?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export declare const tableProps: <T = unknown>() => {
|
|
24
|
+
height: {
|
|
25
|
+
type: NumberConstructor;
|
|
26
|
+
default: number;
|
|
27
|
+
};
|
|
28
|
+
data: {
|
|
29
|
+
type: PropType<T[]>;
|
|
30
|
+
default: () => never[];
|
|
31
|
+
};
|
|
32
|
+
loading: {
|
|
33
|
+
type: BooleanConstructor;
|
|
34
|
+
default: boolean;
|
|
35
|
+
};
|
|
36
|
+
rowKey: {
|
|
37
|
+
type: StringConstructor;
|
|
38
|
+
default: string;
|
|
39
|
+
};
|
|
40
|
+
bordered: {
|
|
41
|
+
type: BooleanConstructor;
|
|
42
|
+
default: boolean;
|
|
43
|
+
};
|
|
44
|
+
size: {
|
|
45
|
+
type: PropType<SizeType>;
|
|
46
|
+
default: string;
|
|
47
|
+
};
|
|
48
|
+
keys: {
|
|
49
|
+
type: PropType<Key[]>;
|
|
50
|
+
default: () => never[];
|
|
51
|
+
};
|
|
52
|
+
config: {
|
|
53
|
+
type: PropType<Config<T>>;
|
|
54
|
+
required: boolean;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
export type TableProps = Partial<ExtractPropTypes<ReturnType<typeof tableProps>>>;
|
|
58
|
+
declare const DTable: import("vue").DefineComponent<ExtractPropTypes<{
|
|
59
|
+
height: {
|
|
60
|
+
type: NumberConstructor;
|
|
61
|
+
default: number;
|
|
62
|
+
};
|
|
63
|
+
data: {
|
|
64
|
+
type: PropType<unknown[]>;
|
|
65
|
+
default: () => never[];
|
|
66
|
+
};
|
|
67
|
+
loading: {
|
|
68
|
+
type: BooleanConstructor;
|
|
69
|
+
default: boolean;
|
|
70
|
+
};
|
|
71
|
+
rowKey: {
|
|
72
|
+
type: StringConstructor;
|
|
73
|
+
default: string;
|
|
74
|
+
};
|
|
75
|
+
bordered: {
|
|
76
|
+
type: BooleanConstructor;
|
|
77
|
+
default: boolean;
|
|
78
|
+
};
|
|
79
|
+
size: {
|
|
80
|
+
type: PropType<SizeType>;
|
|
81
|
+
default: string;
|
|
82
|
+
};
|
|
83
|
+
keys: {
|
|
84
|
+
type: PropType<Key[]>;
|
|
85
|
+
default: () => never[];
|
|
86
|
+
};
|
|
87
|
+
config: {
|
|
88
|
+
type: PropType<Config<unknown>>;
|
|
89
|
+
required: boolean;
|
|
90
|
+
};
|
|
91
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:keys"[], "update:keys", import("vue").PublicProps, Readonly<ExtractPropTypes<{
|
|
92
|
+
height: {
|
|
93
|
+
type: NumberConstructor;
|
|
94
|
+
default: number;
|
|
95
|
+
};
|
|
96
|
+
data: {
|
|
97
|
+
type: PropType<unknown[]>;
|
|
98
|
+
default: () => never[];
|
|
99
|
+
};
|
|
100
|
+
loading: {
|
|
101
|
+
type: BooleanConstructor;
|
|
102
|
+
default: boolean;
|
|
103
|
+
};
|
|
104
|
+
rowKey: {
|
|
105
|
+
type: StringConstructor;
|
|
106
|
+
default: string;
|
|
107
|
+
};
|
|
108
|
+
bordered: {
|
|
109
|
+
type: BooleanConstructor;
|
|
110
|
+
default: boolean;
|
|
111
|
+
};
|
|
112
|
+
size: {
|
|
113
|
+
type: PropType<SizeType>;
|
|
114
|
+
default: string;
|
|
115
|
+
};
|
|
116
|
+
keys: {
|
|
117
|
+
type: PropType<Key[]>;
|
|
118
|
+
default: () => never[];
|
|
119
|
+
};
|
|
120
|
+
config: {
|
|
121
|
+
type: PropType<Config<unknown>>;
|
|
122
|
+
required: boolean;
|
|
123
|
+
};
|
|
124
|
+
}>> & Readonly<{
|
|
125
|
+
"onUpdate:keys"?: ((...args: any[]) => any) | undefined;
|
|
126
|
+
}>, {
|
|
127
|
+
keys: Key[];
|
|
128
|
+
data: unknown[];
|
|
129
|
+
size: SizeType;
|
|
130
|
+
height: number;
|
|
131
|
+
loading: boolean;
|
|
132
|
+
rowKey: string;
|
|
133
|
+
bordered: boolean;
|
|
134
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
135
|
+
export declare const useEleHeight: (node: Element) => number;
|
|
136
|
+
export default DTable;
|
|
137
|
+
//# sourceMappingURL=Table.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, onMounted, computed,
|
|
1
|
+
import { defineComponent, ref, onMounted, computed, watch, nextTick, createVNode, mergeProps } from 'vue';
|
|
2
2
|
import { Flex, Table, Pagination } from 'ant-design-vue';
|
|
3
3
|
import { css } from '@emotion/css';
|
|
4
4
|
import { merge } from 'lodash-es';
|
|
@@ -127,47 +127,9 @@ const DTable = /* @__PURE__ */ defineComponent({
|
|
|
127
127
|
};
|
|
128
128
|
}
|
|
129
129
|
function useSlots() {
|
|
130
|
-
const divTextStyle = css`
|
|
131
|
-
white-space: nowrap;
|
|
132
|
-
overflow: hidden;
|
|
133
|
-
text-overflow: ellipsis;
|
|
134
|
-
display: inline-block;
|
|
135
|
-
max-width: 100%;
|
|
136
|
-
vertical-align: middle;
|
|
137
|
-
`;
|
|
138
130
|
const tableSlots2 = {
|
|
139
131
|
bodyCell: (params) => {
|
|
140
132
|
var _a;
|
|
141
|
-
const {
|
|
142
|
-
column,
|
|
143
|
-
record,
|
|
144
|
-
index
|
|
145
|
-
} = params;
|
|
146
|
-
const dataIndex = column.dataIndex;
|
|
147
|
-
if ((column.width || column.minWidth) && column.ellipsis) {
|
|
148
|
-
const {
|
|
149
|
-
customRender
|
|
150
|
-
} = column;
|
|
151
|
-
const width = column.width || column.minWidth;
|
|
152
|
-
const originalText = record[dataIndex];
|
|
153
|
-
let content;
|
|
154
|
-
if (customRender) {
|
|
155
|
-
content = customRender({
|
|
156
|
-
text: originalText,
|
|
157
|
-
record,
|
|
158
|
-
index,
|
|
159
|
-
column
|
|
160
|
-
});
|
|
161
|
-
} else {
|
|
162
|
-
content = originalText;
|
|
163
|
-
}
|
|
164
|
-
return createVNode("div", {
|
|
165
|
-
"class": divTextStyle,
|
|
166
|
-
"style": {
|
|
167
|
-
width: typeof width === "number" ? `${width}px` : width
|
|
168
|
-
}
|
|
169
|
-
}, [content]);
|
|
170
|
-
}
|
|
171
133
|
return (_a = slots.bodyCell) == null ? void 0 : _a.call(slots, params);
|
|
172
134
|
},
|
|
173
135
|
summary: () => {
|
|
@@ -209,7 +171,7 @@ const DTable = /* @__PURE__ */ defineComponent({
|
|
|
209
171
|
summaryHeight = (_c = useEleHeight(summaryEl)) != null ? _c : 0;
|
|
210
172
|
}
|
|
211
173
|
tableHeight2.value = height - paginationHeight - headerHeight - summaryHeight;
|
|
212
|
-
antTableBodyRef2.value = tableEl.getElementsByClassName("ant-table-
|
|
174
|
+
antTableBodyRef2.value = tableEl.getElementsByClassName("ant-table-body")[0];
|
|
213
175
|
if (antTableBodyRef2.value) {
|
|
214
176
|
antTableBodyRef2.value.style.height = tableHeight2.value + "px";
|
|
215
177
|
}
|
|
@@ -343,7 +305,6 @@ const DTable = /* @__PURE__ */ defineComponent({
|
|
|
343
305
|
const selected = data2.length !== 0;
|
|
344
306
|
const _ids = props.data.map((record) => record[rowKey]);
|
|
345
307
|
selectedRowKeys.value = selected ? selectedRowKeys.value.concat(rowKeys.filter((key) => !selectedRowKeys.value.includes(key))) : selectedRowKeys.value.filter((key) => !_ids.includes(key));
|
|
346
|
-
console.log("onSelect", selectedRowKeys.value);
|
|
347
308
|
emit("update:keys", selectedRowKeys.value);
|
|
348
309
|
};
|
|
349
310
|
watch(() => props.keys, (val) => {
|
|
@@ -378,11 +339,7 @@ const DTable = /* @__PURE__ */ defineComponent({
|
|
|
378
339
|
"vertical": true,
|
|
379
340
|
"ref": tableRef
|
|
380
341
|
}, {
|
|
381
|
-
default: () => [createVNode(
|
|
382
|
-
"style": {
|
|
383
|
-
height: tableHeight.value + "px"
|
|
384
|
-
}
|
|
385
|
-
}, [createVNode(Table, mergeProps(attrs, {
|
|
342
|
+
default: () => [createVNode(Table, mergeProps(attrs, {
|
|
386
343
|
"loading": props.loading,
|
|
387
344
|
"size": props.size,
|
|
388
345
|
"bordered": props.bordered,
|
|
@@ -393,10 +350,11 @@ const DTable = /* @__PURE__ */ defineComponent({
|
|
|
393
350
|
"pagination": false,
|
|
394
351
|
"rowKey": props.rowKey,
|
|
395
352
|
"scroll": {
|
|
396
|
-
|
|
353
|
+
y: tableHeight.value,
|
|
354
|
+
x: "100%",
|
|
397
355
|
scrollToFirstRowOnChange: true
|
|
398
356
|
}
|
|
399
|
-
}), tableSlots)
|
|
357
|
+
}), tableSlots), pagination.value && createVNode("div", {
|
|
400
358
|
"class": [paginationStyle, "d-pagination"]
|
|
401
359
|
}, [createVNode(Pagination, {
|
|
402
360
|
"current": paginationConfig.value.current,
|
|
@@ -419,7 +377,6 @@ const DTable = /* @__PURE__ */ defineComponent({
|
|
|
419
377
|
}
|
|
420
378
|
});
|
|
421
379
|
const useEleHeight = (node) => {
|
|
422
|
-
if (!node) return 0;
|
|
423
380
|
const list = ["margin-top", "margin-bottom", "border-top", "border-bottom", "padding-top", "padding-bottom", "height"];
|
|
424
381
|
const style = getComputedStyle(node);
|
|
425
382
|
return list.map((k) => parseInt(style.getPropertyValue(k), 10)).reduce((prev, cur) => {
|