v-nuxt-ui 0.1.16 → 0.1.18
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/module.json +1 -1
- package/dist/runtime/components/DeleteModal.d.vue.ts +22 -10
- package/dist/runtime/components/DeleteModal.vue.d.ts +22 -10
- package/dist/runtime/components/Empty.d.vue.ts +1 -1
- package/dist/runtime/components/Empty.vue.d.ts +1 -1
- package/dist/runtime/components/layout/default.vue +1 -1
- package/dist/runtime/components/simple-table/index.d.vue.ts +1 -1
- package/dist/runtime/components/simple-table/index.vue.d.ts +1 -1
- package/dist/runtime/components/table/ExcelExportModal.d.vue.ts +22 -26
- package/dist/runtime/components/table/ExcelExportModal.vue.d.ts +22 -26
- package/dist/runtime/components/table/Page.d.vue.ts +1 -1
- package/dist/runtime/components/table/Page.vue.d.ts +1 -1
- package/dist/runtime/components/table/Pagination.d.vue.ts +1 -1
- package/dist/runtime/components/table/Pagination.vue.d.ts +1 -1
- package/dist/runtime/components/table/header/index.d.vue.ts +1 -1
- package/dist/runtime/components/table/header/index.vue +9 -4
- package/dist/runtime/components/table/header/index.vue.d.ts +1 -1
- package/dist/runtime/components/table/header/settings/columns/DndList.d.vue.ts +1 -1
- package/dist/runtime/components/table/header/settings/columns/DndList.vue.d.ts +1 -1
- package/dist/runtime/components/table/header/settings/columns/Item.d.vue.ts +23 -13
- package/dist/runtime/components/table/header/settings/columns/Item.vue.d.ts +23 -13
- package/dist/runtime/components/table/header/settings/columns/index.d.vue.ts +6 -19
- package/dist/runtime/components/table/header/settings/columns/index.vue.d.ts +6 -19
- package/dist/runtime/components/table/header/settings/index.d.vue.ts +10 -21
- package/dist/runtime/components/table/header/settings/index.vue.d.ts +10 -21
- package/dist/runtime/components/table/index.d.vue.ts +1 -1
- package/dist/runtime/components/table/index.vue.d.ts +1 -1
- package/dist/runtime/components/table/query/order/Item.d.vue.ts +28 -0
- package/dist/runtime/components/table/query/order/Item.vue.d.ts +28 -0
- package/dist/runtime/components/table/query/order/Newer.d.vue.ts +25 -0
- package/dist/runtime/components/table/query/order/Newer.vue.d.ts +25 -0
- package/dist/runtime/components/table/query/order/index.d.vue.ts +1 -1
- package/dist/runtime/components/table/query/order/index.vue.d.ts +1 -1
- package/dist/runtime/components/table/query/where/Newer.d.vue.ts +22 -10
- package/dist/runtime/components/table/query/where/Newer.vue.d.ts +22 -10
- package/dist/runtime/components/table/query/where/index.d.vue.ts +1 -1
- package/dist/runtime/components/table/query/where/index.vue.d.ts +1 -1
- package/dist/runtime/components/table/query/where/simple/index.d.vue.ts +18 -4
- package/dist/runtime/components/table/query/where/simple/index.vue +6 -1
- package/dist/runtime/components/table/query/where/simple/index.vue.d.ts +18 -4
- package/dist/runtime/components/table/query/where/simple/item/ColumnPicker.d.vue.ts +1 -1
- package/dist/runtime/components/table/query/where/simple/item/ColumnPicker.vue.d.ts +1 -1
- package/dist/runtime/components/table/query/where/simple/item/OprPicker.d.vue.ts +1 -1
- package/dist/runtime/components/table/query/where/simple/item/OprPicker.vue.d.ts +1 -1
- package/dist/runtime/components/table/query/where/simple/item/index.d.vue.ts +26 -16
- package/dist/runtime/components/table/query/where/simple/item/index.vue.d.ts +26 -16
- package/dist/runtime/components/table/query/where/simple/item/opr/AsyncSelect.vue +4 -5
- package/dist/runtime/components/table/query/where/simple/item/opr/DatePicker.d.vue.ts +1 -1
- package/dist/runtime/components/table/query/where/simple/item/opr/DatePicker.vue.d.ts +1 -1
- package/dist/runtime/components/table/query/where/simple/item/opr/Input.d.vue.ts +1 -1
- package/dist/runtime/components/table/query/where/simple/item/opr/Input.vue.d.ts +1 -1
- package/dist/runtime/components/table/query/where/simple/item/opr/InputNumber.d.vue.ts +1 -1
- package/dist/runtime/components/table/query/where/simple/item/opr/InputNumber.vue.d.ts +1 -1
- package/dist/runtime/components/table/query/where/simple/item/opr/Select.d.vue.ts +1 -1
- package/dist/runtime/components/table/query/where/simple/item/opr/Select.vue.d.ts +1 -1
- package/dist/runtime/components/table/query/where/simple/item/opr/index.d.vue.ts +25 -15
- package/dist/runtime/components/table/query/where/simple/item/opr/index.vue.d.ts +25 -15
- package/dist/runtime/composables/table/useTableColumns.d.ts +3 -3
- package/dist/runtime/composables/table/useTableColumns.js +17 -11
- package/dist/runtime/composables/table/useTablePagination.d.ts +1 -1
- package/dist/runtime/composables/useTheme.d.ts +1 -1
- package/dist/runtime/types/components/form/field.d.ts +7 -4
- package/dist/runtime/types/components/table/column.d.ts +31 -6
- package/dist/runtime/types/components/table/query/order.d.ts +1 -1
- package/dist/runtime/types/components/table/query/where.d.ts +1 -1
- package/dist/runtime/types/query.d.ts +3 -3
- package/dist/runtime/utils/excel.d.ts +1 -1
- package/dist/runtime/utils/request.d.ts +1 -1
- package/dist/runtime/utils/type.d.ts +14 -0
- package/dist/runtime/utils/type.js +3 -0
- package/package.json +1 -1
- package/dist/runtime/components/table/query/order/item.d.vue.ts +0 -0
- package/dist/runtime/components/table/query/order/item.vue.d.ts +0 -0
- package/dist/runtime/components/table/query/order/newer.d.vue.ts +0 -0
- package/dist/runtime/components/table/query/order/newer.vue.d.ts +0 -0
- /package/dist/runtime/components/table/query/order/{item.vue → Item.vue} +0 -0
- /package/dist/runtime/components/table/query/order/{newer.vue → Newer.vue} +0 -0
package/dist/module.json
CHANGED
|
@@ -1,15 +1,27 @@
|
|
|
1
1
|
import type { RequestResult } from '#v/types';
|
|
2
2
|
import type { Ref } from 'vue';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<{
|
|
5
|
+
ids: number[];
|
|
6
|
+
onDelete: ((ids: number[]) => Promise<{
|
|
7
|
+
data: Ref<RequestResult<T>>;
|
|
8
|
+
}> | undefined) | undefined | null;
|
|
9
|
+
} & {
|
|
10
|
+
onClose?: ((args_0: boolean) => any) | undefined;
|
|
11
|
+
}> & (typeof globalThis extends {
|
|
12
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
13
|
+
} ? P : {});
|
|
14
|
+
expose: (exposed: {}) => void;
|
|
15
|
+
attrs: any;
|
|
16
|
+
slots: {};
|
|
17
|
+
emit: (evt: "close", args_0: boolean) => void;
|
|
18
|
+
}>) => import("vue").VNode & {
|
|
19
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
8
20
|
};
|
|
9
|
-
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
10
|
-
close: (args_0: boolean) => any;
|
|
11
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
12
|
-
onClose?: ((args_0: boolean) => any) | undefined;
|
|
13
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
21
|
declare const _default: typeof __VLS_export;
|
|
15
22
|
export default _default;
|
|
23
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
24
|
+
[K in keyof T]: T[K];
|
|
25
|
+
} : {
|
|
26
|
+
[K in keyof T as K]: T[K];
|
|
27
|
+
}) & {};
|
|
@@ -1,15 +1,27 @@
|
|
|
1
1
|
import type { RequestResult } from '#v/types';
|
|
2
2
|
import type { Ref } from 'vue';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<{
|
|
5
|
+
ids: number[];
|
|
6
|
+
onDelete: ((ids: number[]) => Promise<{
|
|
7
|
+
data: Ref<RequestResult<T>>;
|
|
8
|
+
}> | undefined) | undefined | null;
|
|
9
|
+
} & {
|
|
10
|
+
onClose?: ((args_0: boolean) => any) | undefined;
|
|
11
|
+
}> & (typeof globalThis extends {
|
|
12
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
13
|
+
} ? P : {});
|
|
14
|
+
expose: (exposed: {}) => void;
|
|
15
|
+
attrs: any;
|
|
16
|
+
slots: {};
|
|
17
|
+
emit: (evt: "close", args_0: boolean) => void;
|
|
18
|
+
}>) => import("vue").VNode & {
|
|
19
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
8
20
|
};
|
|
9
|
-
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
10
|
-
close: (args_0: boolean) => any;
|
|
11
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
12
|
-
onClose?: ((args_0: boolean) => any) | undefined;
|
|
13
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
21
|
declare const _default: typeof __VLS_export;
|
|
15
22
|
export default _default;
|
|
23
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
24
|
+
[K in keyof T]: T[K];
|
|
25
|
+
} : {
|
|
26
|
+
[K in keyof T as K]: T[K];
|
|
27
|
+
}) & {};
|
|
@@ -4,9 +4,9 @@ type __VLS_Props = EmptyProps & {
|
|
|
4
4
|
};
|
|
5
5
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
6
6
|
title: string;
|
|
7
|
+
size: string | number | symbol;
|
|
7
8
|
variant: string | number | symbol;
|
|
8
9
|
icon: import("@nuxt/ui").IconProps["name"];
|
|
9
|
-
size: string | number | symbol;
|
|
10
10
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
11
|
declare const _default: typeof __VLS_export;
|
|
12
12
|
export default _default;
|
|
@@ -4,9 +4,9 @@ type __VLS_Props = EmptyProps & {
|
|
|
4
4
|
};
|
|
5
5
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
6
6
|
title: string;
|
|
7
|
+
size: string | number | symbol;
|
|
7
8
|
variant: string | number | symbol;
|
|
8
9
|
icon: import("@nuxt/ui").IconProps["name"];
|
|
9
|
-
size: string | number | symbol;
|
|
10
10
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
11
|
declare const _default: typeof __VLS_export;
|
|
12
12
|
export default _default;
|
|
@@ -48,7 +48,7 @@ watch(
|
|
|
48
48
|
}"
|
|
49
49
|
>
|
|
50
50
|
<template #header="{ collapsed }">
|
|
51
|
-
<LayoutModuleMenu :collapsed="collapsed" />
|
|
51
|
+
<LayoutModuleMenu :collapsed="collapsed" class="w-full" />
|
|
52
52
|
<LayoutThemePicker v-if="!collapsed" class="ml-auto" />
|
|
53
53
|
</template>
|
|
54
54
|
<template #default="{ collapsed }">
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { VTableProps } from '#v/types';
|
|
2
|
-
declare const __VLS_export: <T
|
|
2
|
+
declare const __VLS_export: <T extends Record<string, any>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
3
|
props: import("vue").PublicProps & __VLS_PrettifyLocal<Pick<VTableProps<T>, "bizColumns" | "singleRow" | "singleColumn" | "hideLastRowBorder"> & {
|
|
4
4
|
data: T[];
|
|
5
5
|
}> & (typeof globalThis extends {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { VTableProps } from '#v/types';
|
|
2
|
-
declare const __VLS_export: <T
|
|
2
|
+
declare const __VLS_export: <T extends Record<string, any>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
3
|
props: import("vue").PublicProps & __VLS_PrettifyLocal<Pick<VTableProps<T>, "bizColumns" | "singleRow" | "singleColumn" | "hideLastRowBorder"> & {
|
|
4
4
|
data: T[];
|
|
5
5
|
}> & (typeof globalThis extends {
|
|
@@ -1,28 +1,24 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
import type { VColumn, WhereQuery, WhereQueryOption, QueryTemplate, PageResult, RequestResult } from '#v/types';
|
|
2
|
+
import type { Ref } from 'vue';
|
|
3
|
+
type AnyRecord = Record<string, any>;
|
|
4
|
+
/**
|
|
5
|
+
* 使用 interface + 方法签名定义 props,使函数参数中的 T 保持双变(bivariant)。
|
|
6
|
+
* 这样 ListApi<SpecificType> 可以安全赋值给 listFn(...)。
|
|
7
|
+
*/
|
|
8
|
+
interface ExcelExportModalProps {
|
|
9
|
+
filename?: string;
|
|
10
|
+
filenameWithDateTime?: boolean;
|
|
11
|
+
columns: VColumn<AnyRecord>[];
|
|
12
|
+
whereQueryOptions: WhereQueryOption<AnyRecord>[];
|
|
13
|
+
extraWhereQueryInitValues?: WhereQuery<AnyRecord>;
|
|
14
|
+
listFn?(payload: Omit<QueryTemplate<AnyRecord>, 'selectQuery'>, ...args: unknown[]): Promise<{
|
|
15
|
+
data: Ref<RequestResult<PageResult<AnyRecord>>>;
|
|
16
|
+
}>;
|
|
17
|
+
}
|
|
18
|
+
declare const __VLS_export: import("vue").DefineComponent<ExcelExportModalProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
19
|
+
close: (args_0: boolean) => any;
|
|
20
|
+
}, string, import("vue").PublicProps, Readonly<ExcelExportModalProps> & Readonly<{
|
|
21
|
+
onClose?: ((args_0: boolean) => any) | undefined;
|
|
22
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
22
23
|
declare const _default: typeof __VLS_export;
|
|
23
24
|
export default _default;
|
|
24
|
-
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
25
|
-
[K in keyof T]: T[K];
|
|
26
|
-
} : {
|
|
27
|
-
[K in keyof T as K]: T[K];
|
|
28
|
-
}) & {};
|
|
@@ -1,28 +1,24 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
import type { VColumn, WhereQuery, WhereQueryOption, QueryTemplate, PageResult, RequestResult } from '#v/types';
|
|
2
|
+
import type { Ref } from 'vue';
|
|
3
|
+
type AnyRecord = Record<string, any>;
|
|
4
|
+
/**
|
|
5
|
+
* 使用 interface + 方法签名定义 props,使函数参数中的 T 保持双变(bivariant)。
|
|
6
|
+
* 这样 ListApi<SpecificType> 可以安全赋值给 listFn(...)。
|
|
7
|
+
*/
|
|
8
|
+
interface ExcelExportModalProps {
|
|
9
|
+
filename?: string;
|
|
10
|
+
filenameWithDateTime?: boolean;
|
|
11
|
+
columns: VColumn<AnyRecord>[];
|
|
12
|
+
whereQueryOptions: WhereQueryOption<AnyRecord>[];
|
|
13
|
+
extraWhereQueryInitValues?: WhereQuery<AnyRecord>;
|
|
14
|
+
listFn?(payload: Omit<QueryTemplate<AnyRecord>, 'selectQuery'>, ...args: unknown[]): Promise<{
|
|
15
|
+
data: Ref<RequestResult<PageResult<AnyRecord>>>;
|
|
16
|
+
}>;
|
|
17
|
+
}
|
|
18
|
+
declare const __VLS_export: import("vue").DefineComponent<ExcelExportModalProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
19
|
+
close: (args_0: boolean) => any;
|
|
20
|
+
}, string, import("vue").PublicProps, Readonly<ExcelExportModalProps> & Readonly<{
|
|
21
|
+
onClose?: ((args_0: boolean) => any) | undefined;
|
|
22
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
22
23
|
declare const _default: typeof __VLS_export;
|
|
23
24
|
export default _default;
|
|
24
|
-
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
25
|
-
[K in keyof T]: T[K];
|
|
26
|
-
} : {
|
|
27
|
-
[K in keyof T as K]: T[K];
|
|
28
|
-
}) & {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { VTableProps } from '#v/types';
|
|
2
|
-
declare const __VLS_export: <T
|
|
2
|
+
declare const __VLS_export: <T extends Record<string, any>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
3
|
props: import("vue").PublicProps & __VLS_PrettifyLocal<VTableProps<T>> & (typeof globalThis extends {
|
|
4
4
|
__VLS_PROPS_FALLBACK: infer P;
|
|
5
5
|
} ? P : {});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { VTableProps } from '#v/types';
|
|
2
|
-
declare const __VLS_export: <T
|
|
2
|
+
declare const __VLS_export: <T extends Record<string, any>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
3
|
props: import("vue").PublicProps & __VLS_PrettifyLocal<VTableProps<T>> & (typeof globalThis extends {
|
|
4
4
|
__VLS_PROPS_FALLBACK: infer P;
|
|
5
5
|
} ? P : {});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TablePaginationProps } from '#v/types';
|
|
2
|
-
declare const __VLS_export: <T
|
|
2
|
+
declare const __VLS_export: <T extends Record<string, any>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
3
|
props: import("vue").PublicProps & __VLS_PrettifyLocal<TablePaginationProps<T>> & (typeof globalThis extends {
|
|
4
4
|
__VLS_PROPS_FALLBACK: infer P;
|
|
5
5
|
} ? P : {});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TablePaginationProps } from '#v/types';
|
|
2
|
-
declare const __VLS_export: <T
|
|
2
|
+
declare const __VLS_export: <T extends Record<string, any>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
3
|
props: import("vue").PublicProps & __VLS_PrettifyLocal<TablePaginationProps<T>> & (typeof globalThis extends {
|
|
4
4
|
__VLS_PROPS_FALLBACK: infer P;
|
|
5
5
|
} ? P : {});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TableHeaderProps } from '#v/types';
|
|
2
|
-
declare const __VLS_export: <T
|
|
2
|
+
declare const __VLS_export: <T extends Record<string, any>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
3
|
props: import("vue").PublicProps & __VLS_PrettifyLocal<TableHeaderProps<T>> & (typeof globalThis extends {
|
|
4
4
|
__VLS_PROPS_FALLBACK: infer P;
|
|
5
5
|
} ? P : {});
|
|
@@ -10,6 +10,7 @@ import TableQueryOrder from "#v/components/table/query/order/index.vue";
|
|
|
10
10
|
import DeleteModal from "#v/components/DeleteModal.vue";
|
|
11
11
|
import TableHeaderSettings from "#v/components/table/header/settings/index.vue";
|
|
12
12
|
import TableExcelExportModal from "#v/components/table/ExcelExportModal.vue";
|
|
13
|
+
import { widenColumns } from "#v/utils";
|
|
13
14
|
const props = defineProps({
|
|
14
15
|
name: { type: String, required: true },
|
|
15
16
|
fetching: { type: Boolean, required: false },
|
|
@@ -34,6 +35,7 @@ const props = defineProps({
|
|
|
34
35
|
extraButtons: { type: Array, required: false },
|
|
35
36
|
size: { type: null, required: false, default: "md" }
|
|
36
37
|
});
|
|
38
|
+
const defaultNewRow = { id: 0 };
|
|
37
39
|
const overlay = useOverlay();
|
|
38
40
|
const deleteModal = overlay.create(DeleteModal);
|
|
39
41
|
const settingsModal = overlay.create(TableHeaderSettings);
|
|
@@ -49,7 +51,7 @@ const oprButtons = computed(() => {
|
|
|
49
51
|
icon: "i-lucide-plus",
|
|
50
52
|
size: props.size,
|
|
51
53
|
onClick: async () => {
|
|
52
|
-
const result = await props.onEditRowFromModal?.(props.onNew?.() ??
|
|
54
|
+
const result = await props.onEditRowFromModal?.(props.onNew?.() ?? defaultNewRow);
|
|
53
55
|
if (result) {
|
|
54
56
|
props.fetchList();
|
|
55
57
|
}
|
|
@@ -106,10 +108,13 @@ const oprButtons = computed(() => {
|
|
|
106
108
|
color: "neutral",
|
|
107
109
|
variant: "outline",
|
|
108
110
|
onClick: async () => {
|
|
111
|
+
if (!props.onUpdateBizColumns) return;
|
|
112
|
+
const updateFn = props.onUpdateBizColumns;
|
|
109
113
|
await settingsModal.open({
|
|
110
114
|
tblName: props.name,
|
|
111
|
-
rawBizColumns: props.rawBizColumns,
|
|
112
|
-
|
|
115
|
+
rawBizColumns: widenColumns(props.rawBizColumns),
|
|
116
|
+
// 列数据由父组件创建(VColumn<T>),模态框仅重排顺序后返回,运行时类型不变
|
|
117
|
+
onUpdateBizColumns: (cols) => updateFn(cols)
|
|
113
118
|
});
|
|
114
119
|
}
|
|
115
120
|
},
|
|
@@ -126,7 +131,7 @@ const oprButtons = computed(() => {
|
|
|
126
131
|
variant: "outline",
|
|
127
132
|
onClick: async () => {
|
|
128
133
|
await excelExportModal.open({
|
|
129
|
-
columns: props.rawBizColumns,
|
|
134
|
+
columns: widenColumns(props.rawBizColumns),
|
|
130
135
|
filename: props.exportExcel.filename,
|
|
131
136
|
filenameWithDateTime: props.exportExcel.filenameWithDateTime,
|
|
132
137
|
listFn: props.apiGroup?.().countAndList,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TableHeaderProps } from '#v/types';
|
|
2
|
-
declare const __VLS_export: <T
|
|
2
|
+
declare const __VLS_export: <T extends Record<string, any>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
3
|
props: import("vue").PublicProps & __VLS_PrettifyLocal<TableHeaderProps<T>> & (typeof globalThis extends {
|
|
4
4
|
__VLS_PROPS_FALLBACK: infer P;
|
|
5
5
|
} ? P : {});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { TableColumn } from '@nuxt/ui';
|
|
2
2
|
import type { FixType } from './index.vue.js';
|
|
3
3
|
import type { Column, DndProps } from '#v/types';
|
|
4
|
-
declare const __VLS_export: <T
|
|
4
|
+
declare const __VLS_export: <T extends Record<string, any>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
5
5
|
props: import("vue").PublicProps & __VLS_PrettifyLocal<({
|
|
6
6
|
name: string;
|
|
7
7
|
rawBizColumns: TableColumn<T>[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { TableColumn } from '@nuxt/ui';
|
|
2
2
|
import type { FixType } from './index.vue.js';
|
|
3
3
|
import type { Column, DndProps } from '#v/types';
|
|
4
|
-
declare const __VLS_export: <T
|
|
4
|
+
declare const __VLS_export: <T extends Record<string, any>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
5
5
|
props: import("vue").PublicProps & __VLS_PrettifyLocal<({
|
|
6
6
|
name: string;
|
|
7
7
|
rawBizColumns: TableColumn<T>[];
|
|
@@ -1,18 +1,28 @@
|
|
|
1
1
|
import type { FixType } from './index.vue.js';
|
|
2
2
|
import type { Column, VColumn } from '#v/types';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
declare const __VLS_export: <T extends Record<string, any>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<({
|
|
5
|
+
columns: VColumn<T>[];
|
|
6
|
+
stgCol: Column;
|
|
7
|
+
onFixCol: (col: Column, fixType: FixType) => void;
|
|
8
|
+
} & {
|
|
9
|
+
checked: boolean | undefined;
|
|
10
|
+
}) & {
|
|
11
|
+
"onUpdate:checked"?: ((value: boolean | undefined) => any) | undefined;
|
|
12
|
+
}> & (typeof globalThis extends {
|
|
13
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
14
|
+
} ? P : {});
|
|
15
|
+
expose: (exposed: {}) => void;
|
|
16
|
+
attrs: any;
|
|
17
|
+
slots: {};
|
|
18
|
+
emit: (event: "update:checked", value: boolean | undefined) => void;
|
|
19
|
+
}>) => import("vue").VNode & {
|
|
20
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
7
21
|
};
|
|
8
|
-
type __VLS_ModelProps = {
|
|
9
|
-
'checked': boolean | undefined;
|
|
10
|
-
};
|
|
11
|
-
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
12
|
-
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
13
|
-
"update:checked": (value: boolean | undefined) => any;
|
|
14
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
15
|
-
"onUpdate:checked"?: ((value: boolean | undefined) => any) | undefined;
|
|
16
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
17
22
|
declare const _default: typeof __VLS_export;
|
|
18
23
|
export default _default;
|
|
24
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
25
|
+
[K in keyof T]: T[K];
|
|
26
|
+
} : {
|
|
27
|
+
[K in keyof T as K]: T[K];
|
|
28
|
+
}) & {};
|
|
@@ -1,18 +1,28 @@
|
|
|
1
1
|
import type { FixType } from './index.vue.js';
|
|
2
2
|
import type { Column, VColumn } from '#v/types';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
declare const __VLS_export: <T extends Record<string, any>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<({
|
|
5
|
+
columns: VColumn<T>[];
|
|
6
|
+
stgCol: Column;
|
|
7
|
+
onFixCol: (col: Column, fixType: FixType) => void;
|
|
8
|
+
} & {
|
|
9
|
+
checked: boolean | undefined;
|
|
10
|
+
}) & {
|
|
11
|
+
"onUpdate:checked"?: ((value: boolean | undefined) => any) | undefined;
|
|
12
|
+
}> & (typeof globalThis extends {
|
|
13
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
14
|
+
} ? P : {});
|
|
15
|
+
expose: (exposed: {}) => void;
|
|
16
|
+
attrs: any;
|
|
17
|
+
slots: {};
|
|
18
|
+
emit: (event: "update:checked", value: boolean | undefined) => void;
|
|
19
|
+
}>) => import("vue").VNode & {
|
|
20
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
7
21
|
};
|
|
8
|
-
type __VLS_ModelProps = {
|
|
9
|
-
'checked': boolean | undefined;
|
|
10
|
-
};
|
|
11
|
-
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
12
|
-
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
13
|
-
"update:checked": (value: boolean | undefined) => any;
|
|
14
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
15
|
-
"onUpdate:checked"?: ((value: boolean | undefined) => any) | undefined;
|
|
16
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
17
22
|
declare const _default: typeof __VLS_export;
|
|
18
23
|
export default _default;
|
|
24
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
25
|
+
[K in keyof T]: T[K];
|
|
26
|
+
} : {
|
|
27
|
+
[K in keyof T as K]: T[K];
|
|
28
|
+
}) & {};
|
|
@@ -1,24 +1,11 @@
|
|
|
1
1
|
import type { VColumn } from '#v/types';
|
|
2
2
|
export type FixType = 'left' | 'right' | 'unfixed';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}> & (typeof globalThis extends {
|
|
9
|
-
__VLS_PROPS_FALLBACK: infer P;
|
|
10
|
-
} ? P : {});
|
|
11
|
-
expose: (exposed: {}) => void;
|
|
12
|
-
attrs: any;
|
|
13
|
-
slots: {};
|
|
14
|
-
emit: {};
|
|
15
|
-
}>) => import("vue").VNode & {
|
|
16
|
-
__ctx?: Awaited<typeof __VLS_setup>;
|
|
3
|
+
type AnyRecord = Record<string, any>;
|
|
4
|
+
type __VLS_Props = {
|
|
5
|
+
tblName: string;
|
|
6
|
+
rawBizColumns: VColumn<AnyRecord>[];
|
|
7
|
+
onUpdateBizColumns: (cols: VColumn<AnyRecord>[]) => void;
|
|
17
8
|
};
|
|
9
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
10
|
declare const _default: typeof __VLS_export;
|
|
19
11
|
export default _default;
|
|
20
|
-
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
21
|
-
[K in keyof T]: T[K];
|
|
22
|
-
} : {
|
|
23
|
-
[K in keyof T as K]: T[K];
|
|
24
|
-
}) & {};
|
|
@@ -1,24 +1,11 @@
|
|
|
1
1
|
import type { VColumn } from '#v/types';
|
|
2
2
|
export type FixType = 'left' | 'right' | 'unfixed';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}> & (typeof globalThis extends {
|
|
9
|
-
__VLS_PROPS_FALLBACK: infer P;
|
|
10
|
-
} ? P : {});
|
|
11
|
-
expose: (exposed: {}) => void;
|
|
12
|
-
attrs: any;
|
|
13
|
-
slots: {};
|
|
14
|
-
emit: {};
|
|
15
|
-
}>) => import("vue").VNode & {
|
|
16
|
-
__ctx?: Awaited<typeof __VLS_setup>;
|
|
3
|
+
type AnyRecord = Record<string, any>;
|
|
4
|
+
type __VLS_Props = {
|
|
5
|
+
tblName: string;
|
|
6
|
+
rawBizColumns: VColumn<AnyRecord>[];
|
|
7
|
+
onUpdateBizColumns: (cols: VColumn<AnyRecord>[]) => void;
|
|
17
8
|
};
|
|
9
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
10
|
declare const _default: typeof __VLS_export;
|
|
19
11
|
export default _default;
|
|
20
|
-
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
21
|
-
[K in keyof T]: T[K];
|
|
22
|
-
} : {
|
|
23
|
-
[K in keyof T as K]: T[K];
|
|
24
|
-
}) & {};
|
|
@@ -1,25 +1,14 @@
|
|
|
1
1
|
import type { VColumn } from '#v/types';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
} & {
|
|
8
|
-
onClose?: ((args_0: boolean) => any) | undefined;
|
|
9
|
-
}> & (typeof globalThis extends {
|
|
10
|
-
__VLS_PROPS_FALLBACK: infer P;
|
|
11
|
-
} ? P : {});
|
|
12
|
-
expose: (exposed: {}) => void;
|
|
13
|
-
attrs: any;
|
|
14
|
-
slots: {};
|
|
15
|
-
emit: (evt: "close", args_0: boolean) => void;
|
|
16
|
-
}>) => import("vue").VNode & {
|
|
17
|
-
__ctx?: Awaited<typeof __VLS_setup>;
|
|
2
|
+
type AnyRecord = Record<string, any>;
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
tblName: string;
|
|
5
|
+
rawBizColumns: VColumn<AnyRecord>[];
|
|
6
|
+
onUpdateBizColumns: (cols: VColumn<AnyRecord>[]) => void;
|
|
18
7
|
};
|
|
8
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
|
+
close: (args_0: boolean) => any;
|
|
10
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
+
onClose?: ((args_0: boolean) => any) | undefined;
|
|
12
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
19
13
|
declare const _default: typeof __VLS_export;
|
|
20
14
|
export default _default;
|
|
21
|
-
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
22
|
-
[K in keyof T]: T[K];
|
|
23
|
-
} : {
|
|
24
|
-
[K in keyof T as K]: T[K];
|
|
25
|
-
}) & {};
|
|
@@ -1,25 +1,14 @@
|
|
|
1
1
|
import type { VColumn } from '#v/types';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
} & {
|
|
8
|
-
onClose?: ((args_0: boolean) => any) | undefined;
|
|
9
|
-
}> & (typeof globalThis extends {
|
|
10
|
-
__VLS_PROPS_FALLBACK: infer P;
|
|
11
|
-
} ? P : {});
|
|
12
|
-
expose: (exposed: {}) => void;
|
|
13
|
-
attrs: any;
|
|
14
|
-
slots: {};
|
|
15
|
-
emit: (evt: "close", args_0: boolean) => void;
|
|
16
|
-
}>) => import("vue").VNode & {
|
|
17
|
-
__ctx?: Awaited<typeof __VLS_setup>;
|
|
2
|
+
type AnyRecord = Record<string, any>;
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
tblName: string;
|
|
5
|
+
rawBizColumns: VColumn<AnyRecord>[];
|
|
6
|
+
onUpdateBizColumns: (cols: VColumn<AnyRecord>[]) => void;
|
|
18
7
|
};
|
|
8
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
|
+
close: (args_0: boolean) => any;
|
|
10
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
+
onClose?: ((args_0: boolean) => any) | undefined;
|
|
12
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
19
13
|
declare const _default: typeof __VLS_export;
|
|
20
14
|
export default _default;
|
|
21
|
-
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
22
|
-
[K in keyof T]: T[K];
|
|
23
|
-
} : {
|
|
24
|
-
[K in keyof T as K]: T[K];
|
|
25
|
-
}) & {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { VTableProps } from '#v/types';
|
|
2
|
-
declare const __VLS_export: <T
|
|
2
|
+
declare const __VLS_export: <T extends Record<string, any>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
3
|
props: import("vue").PublicProps & __VLS_PrettifyLocal<VTableProps<T>> & (typeof globalThis extends {
|
|
4
4
|
__VLS_PROPS_FALLBACK: infer P;
|
|
5
5
|
} ? P : {});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { VTableProps } from '#v/types';
|
|
2
|
-
declare const __VLS_export: <T
|
|
2
|
+
declare const __VLS_export: <T extends Record<string, any>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
3
|
props: import("vue").PublicProps & __VLS_PrettifyLocal<VTableProps<T>> & (typeof globalThis extends {
|
|
4
4
|
__VLS_PROPS_FALLBACK: infer P;
|
|
5
5
|
} ? P : {});
|