@vue-ui-kit/ant 1.0.0
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/index.js +1 -0
- package/dist/declarations/antProxy.d.ts +239 -0
- package/dist/declarations/type.d.ts +1 -0
- package/dist/es/index.js +2471 -0
- package/dist/index.d.ts +12 -0
- package/dist/packages/components/PForm.vue.d.ts +28 -0
- package/dist/packages/components/PFormGroup.vue.d.ts +29 -0
- package/dist/packages/components/PGrid.vue.d.ts +40 -0
- package/dist/packages/components/PGroupBlock.vue.d.ts +16 -0
- package/dist/packages/components/PromisePicker.vue.d.ts +48 -0
- package/dist/packages/components/RenderAntCell.d.ts +10 -0
- package/dist/packages/components/RenderAntItem.d.ts +17 -0
- package/dist/packages/components/RenderDefaultSlots.d.ts +14 -0
- package/dist/packages/components/RenderItemSlots.d.ts +10 -0
- package/dist/packages/components/RenderTitleSlots.d.ts +6 -0
- package/dist/packages/hooks/useMessage.d.ts +8 -0
- package/dist/packages/renders/Icon.d.ts +4 -0
- package/dist/packages/renders/TableInput.vue.d.ts +44 -0
- package/dist/packages/store/renderStore.d.ts +59 -0
- package/dist/packages/utils/AFormatters.d.ts +19 -0
- package/dist/packages/utils/core.d.ts +8 -0
- package/dist/packages/utils/is.d.ts +2 -0
- package/dist/packages/utils/treeHelper.d.ts +19 -0
- package/dist/style.css +1 -0
- package/package.json +72 -0
- package/src/declarations/README.md +9 -0
- package/src/declarations/antProxy.ts +255 -0
- package/src/declarations/global.d.ts +133 -0
- package/src/declarations/type.ts +1 -0
- package/src/index.ts +25 -0
- package/src/packages/components/PForm.vue +108 -0
- package/src/packages/components/PFormGroup.vue +90 -0
- package/src/packages/components/PGrid.vue +472 -0
- package/src/packages/components/PGroupBlock.vue +12 -0
- package/src/packages/components/PromisePicker.vue +64 -0
- package/src/packages/components/RenderAntCell.tsx +29 -0
- package/src/packages/components/RenderAntItem.tsx +54 -0
- package/src/packages/components/RenderDefaultSlots.tsx +44 -0
- package/src/packages/components/RenderItemSlots.tsx +24 -0
- package/src/packages/components/RenderTitleSlots.tsx +15 -0
- package/src/packages/hooks/useMessage.ts +19 -0
- package/src/packages/renders/Icon.ts +8 -0
- package/src/packages/renders/TableInput.vue +107 -0
- package/src/packages/store/renderStore.tsx +515 -0
- package/src/packages/styles/index.scss +184 -0
- package/src/packages/styles/variables.scss +3 -0
- package/src/packages/utils/AFormatters.ts +64 -0
- package/src/packages/utils/core.ts +52 -0
- package/src/packages/utils/is.ts +2 -0
- package/src/packages/utils/treeHelper.ts +72 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { App } from 'vue';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
install(app: App): void;
|
|
4
|
+
addFormatter: (formatter: Record<string, (a: import('./declarations/antProxy').CellFuncArg, ...args: any[]) => any>) => void;
|
|
5
|
+
addRender: (name: string, { renderItemContent, renderDefault, }: {
|
|
6
|
+
renderItemContent?: (options: import('./declarations/antProxy').RenderOptions, params: import('./declarations/antProxy').RenderFormParams, defaultHandler: Recordable) => any;
|
|
7
|
+
renderDefault?: (options: import('./declarations/antProxy').RenderOptions, params: import('./declarations/antProxy').RenderTableParams, defaultHandler: Recordable) => any;
|
|
8
|
+
}) => void;
|
|
9
|
+
};
|
|
10
|
+
export default _default;
|
|
11
|
+
export * from './declarations/antProxy';
|
|
12
|
+
export * from './packages/utils/core';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { PFormProps } from '../../declarations/antProxy';
|
|
2
|
+
declare const _default: <F = Recordable<any>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_Prettify<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
|
+
props: __VLS_Prettify<Pick<Partial<{}> & Omit<{
|
|
4
|
+
readonly onReset?: ((...args: any[]) => any) | undefined;
|
|
5
|
+
readonly onApply?: ((...args: any[]) => any) | undefined;
|
|
6
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & Readonly<{}> & Readonly<{
|
|
7
|
+
onReset?: ((...args: any[]) => any) | undefined;
|
|
8
|
+
onApply?: ((...args: any[]) => any) | undefined;
|
|
9
|
+
}>, never>, "onReset" | "onApply"> & (PFormProps<F> & {
|
|
10
|
+
data: F;
|
|
11
|
+
})> & import('vue').PublicProps;
|
|
12
|
+
expose(exposed: import('vue').ShallowUnwrapRef<{
|
|
13
|
+
reset: () => void;
|
|
14
|
+
$form: import('vue').ComputedRef<any>;
|
|
15
|
+
}>): void;
|
|
16
|
+
attrs: any;
|
|
17
|
+
slots: ReturnType<() => {}>;
|
|
18
|
+
emit: ((event: "reset" | "apply", ...args: any[]) => void) & {};
|
|
19
|
+
}>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
20
|
+
[key: string]: any;
|
|
21
|
+
}> & {
|
|
22
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
23
|
+
};
|
|
24
|
+
export default _default;
|
|
25
|
+
|
|
26
|
+
type __VLS_Prettify<T> = {
|
|
27
|
+
[K in keyof T]: T[K];
|
|
28
|
+
} & {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { PFormGroupProps } from '../../declarations/antProxy';
|
|
2
|
+
declare const _default: <F = Recordable<any>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_Prettify<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
|
+
props: __VLS_Prettify<Pick<Partial<{}> & Omit<{
|
|
4
|
+
readonly "onUpdate:modelValue"?: ((modelValue: any) => any) | undefined;
|
|
5
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & Readonly<{}> & Readonly<{
|
|
6
|
+
"onUpdate:modelValue"?: ((modelValue: any) => any) | undefined;
|
|
7
|
+
}>, never>, "onUpdate:modelValue"> & ({
|
|
8
|
+
modelValue?: any;
|
|
9
|
+
} & PFormGroupProps<F>)> & import('vue').PublicProps;
|
|
10
|
+
expose(exposed: import('vue').ShallowUnwrapRef<{
|
|
11
|
+
activeKey: import('vue').ComputedRef<number>;
|
|
12
|
+
setActiveKey: (key: number) => void;
|
|
13
|
+
}>): void;
|
|
14
|
+
attrs: any;
|
|
15
|
+
slots: ReturnType<() => {
|
|
16
|
+
rightExtra?(_: {}): any;
|
|
17
|
+
}>;
|
|
18
|
+
emit: {
|
|
19
|
+
'update:modelValue': [modelValue: any];
|
|
20
|
+
};
|
|
21
|
+
}>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
22
|
+
[key: string]: any;
|
|
23
|
+
}> & {
|
|
24
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
25
|
+
};
|
|
26
|
+
export default _default;
|
|
27
|
+
type __VLS_Prettify<T> = {
|
|
28
|
+
[K in keyof T]: T[K];
|
|
29
|
+
} & {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { PGridProps } from '../../declarations/antProxy';
|
|
2
|
+
declare const _default: <D = Recordable<any>, F = Recordable<any>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_Prettify<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
|
+
props: __VLS_Prettify<Pick<Partial<{}> & Omit<{
|
|
4
|
+
readonly onReset?: ((...args: any[]) => any) | undefined;
|
|
5
|
+
readonly onPick?: ((...args: any[]) => any) | undefined;
|
|
6
|
+
readonly onQuery?: ((...args: any[]) => any) | undefined;
|
|
7
|
+
readonly "onUpdate:tableData"?: ((...args: any[]) => any) | undefined;
|
|
8
|
+
readonly onToolbarButtonClick?: ((...args: any[]) => any) | undefined;
|
|
9
|
+
readonly onToolbarToolClick?: ((...args: any[]) => any) | undefined;
|
|
10
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & Readonly<{}> & Readonly<{
|
|
11
|
+
onReset?: ((...args: any[]) => any) | undefined;
|
|
12
|
+
onPick?: ((...args: any[]) => any) | undefined;
|
|
13
|
+
onQuery?: ((...args: any[]) => any) | undefined;
|
|
14
|
+
"onUpdate:tableData"?: ((...args: any[]) => any) | undefined;
|
|
15
|
+
onToolbarButtonClick?: ((...args: any[]) => any) | undefined;
|
|
16
|
+
onToolbarToolClick?: ((...args: any[]) => any) | undefined;
|
|
17
|
+
}>, never>, "onReset" | "onPick" | "onQuery" | "onUpdate:tableData" | "onToolbarButtonClick" | "onToolbarToolClick"> & PGridProps<D, F>> & import('vue').PublicProps;
|
|
18
|
+
expose(exposed: import('vue').ShallowUnwrapRef<{
|
|
19
|
+
commitProxy: {
|
|
20
|
+
query: import('lodash').DebouncedFunc<() => Promise<D[]>>;
|
|
21
|
+
reload: () => void;
|
|
22
|
+
reloadPage: () => Promise<D[]>;
|
|
23
|
+
passQuery: (params: Partial<F>) => Promise<D[]> | undefined;
|
|
24
|
+
};
|
|
25
|
+
$table: import('vue').ComputedRef<any>;
|
|
26
|
+
selectedRowKeys: import('vue').ComputedRef<string[] | number[]>;
|
|
27
|
+
$form: import('vue').ComputedRef<any>;
|
|
28
|
+
}>): void;
|
|
29
|
+
attrs: any;
|
|
30
|
+
slots: ReturnType<() => {}>;
|
|
31
|
+
emit: ((event: "reset" | "pick" | "query" | "update:tableData" | "toolbarButtonClick" | "toolbarToolClick", ...args: any[]) => void) & {};
|
|
32
|
+
}>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
33
|
+
[key: string]: any;
|
|
34
|
+
}> & {
|
|
35
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
36
|
+
};
|
|
37
|
+
export default _default;
|
|
38
|
+
type __VLS_Prettify<T> = {
|
|
39
|
+
[K in keyof T]: T[K];
|
|
40
|
+
} & {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { PBlockProps } from '../../declarations/antProxy';
|
|
2
|
+
declare const _default: <F = Recordable<any>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_Prettify<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
|
+
props: __VLS_Prettify<Pick<Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & Readonly<{}> & Readonly<{}>, never>, never> & PBlockProps<F>> & import('vue').PublicProps;
|
|
4
|
+
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
|
|
5
|
+
attrs: any;
|
|
6
|
+
slots: ReturnType<() => {}>;
|
|
7
|
+
emit: {};
|
|
8
|
+
}>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
}> & {
|
|
11
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
12
|
+
};
|
|
13
|
+
export default _default;
|
|
14
|
+
type __VLS_Prettify<T> = {
|
|
15
|
+
[K in keyof T]: T[K];
|
|
16
|
+
} & {};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { PGridProps } from '../../declarations/antProxy';
|
|
3
|
+
declare const _default: <D = Recordable<any>, F = Recordable<any>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_Prettify<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
|
+
props: __VLS_Prettify<Pick<Partial<{
|
|
5
|
+
title: string;
|
|
6
|
+
width: string | number;
|
|
7
|
+
bodyStyle: Record<string, any>;
|
|
8
|
+
}> & Omit<{
|
|
9
|
+
readonly title: string;
|
|
10
|
+
readonly width: string | number;
|
|
11
|
+
readonly bodyStyle: Record<string, any>;
|
|
12
|
+
readonly gridSetting: PGridProps<D, F>;
|
|
13
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & Readonly<import('vue').ExtractPropTypes<{
|
|
14
|
+
gridSetting: {
|
|
15
|
+
type: PropType<PGridProps<D, F>>;
|
|
16
|
+
required: true;
|
|
17
|
+
};
|
|
18
|
+
title: {
|
|
19
|
+
type: PropType<string>;
|
|
20
|
+
default: string;
|
|
21
|
+
};
|
|
22
|
+
width: {
|
|
23
|
+
type: PropType<string | number>;
|
|
24
|
+
default: string;
|
|
25
|
+
};
|
|
26
|
+
bodyStyle: {
|
|
27
|
+
type: ObjectConstructor;
|
|
28
|
+
default: () => {};
|
|
29
|
+
};
|
|
30
|
+
}>> & Readonly<{}>, "title" | "width" | "bodyStyle">, "gridSetting" | ("title" | "width" | "bodyStyle")> & {}> & import('vue').PublicProps;
|
|
31
|
+
expose(exposed: import('vue').ShallowUnwrapRef<{
|
|
32
|
+
pick: () => Promise<{
|
|
33
|
+
row: D;
|
|
34
|
+
field?: string;
|
|
35
|
+
}>;
|
|
36
|
+
}>): void;
|
|
37
|
+
attrs: any;
|
|
38
|
+
slots: ReturnType<() => {}>;
|
|
39
|
+
emit: {};
|
|
40
|
+
}>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
41
|
+
[key: string]: any;
|
|
42
|
+
}> & {
|
|
43
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
44
|
+
};
|
|
45
|
+
export default _default;
|
|
46
|
+
type __VLS_Prettify<T> = {
|
|
47
|
+
[K in keyof T]: T[K];
|
|
48
|
+
} & {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineSetupFnComponent<{
|
|
2
|
+
cellRender: any;
|
|
3
|
+
renderTableParams: any;
|
|
4
|
+
defaultHandler: any;
|
|
5
|
+
}, {}, {}, {
|
|
6
|
+
cellRender: any;
|
|
7
|
+
renderTableParams: any;
|
|
8
|
+
defaultHandler: any;
|
|
9
|
+
} & {}, import('vue').PublicProps>;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ItemRender, RenderFormParams } from '../../declarations/antProxy';
|
|
2
|
+
declare const _default: import('vue').DefineSetupFnComponent<{
|
|
3
|
+
itemRender: ItemRender;
|
|
4
|
+
renderFormParams: RenderFormParams<Recordable<any>>;
|
|
5
|
+
defaultHandler: {
|
|
6
|
+
[key: string]: (...args: any[]) => any;
|
|
7
|
+
};
|
|
8
|
+
}, "trigger"[], {}, {
|
|
9
|
+
itemRender: ItemRender;
|
|
10
|
+
renderFormParams: RenderFormParams<Recordable<any>>;
|
|
11
|
+
defaultHandler: {
|
|
12
|
+
[key: string]: (...args: any[]) => any;
|
|
13
|
+
};
|
|
14
|
+
} & {
|
|
15
|
+
onTrigger?: ((...args: any[]) => any) | undefined;
|
|
16
|
+
}, import('vue').PublicProps>;
|
|
17
|
+
export default _default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineSetupFnComponent<{
|
|
2
|
+
row: any;
|
|
3
|
+
column: any;
|
|
4
|
+
rowIndex: any;
|
|
5
|
+
defaultHandler: any;
|
|
6
|
+
tableData: any;
|
|
7
|
+
}, {}, {}, {
|
|
8
|
+
row: any;
|
|
9
|
+
column: any;
|
|
10
|
+
rowIndex: any;
|
|
11
|
+
defaultHandler: any;
|
|
12
|
+
tableData: any;
|
|
13
|
+
} & {}, import('vue').PublicProps>;
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const $confirm: ({ title, content }: {
|
|
2
|
+
title: any;
|
|
3
|
+
content: any;
|
|
4
|
+
}) => Promise<void>;
|
|
5
|
+
export declare const $success: (content: import('ant-design-vue/es/_util/type').VueNode | import('ant-design-vue').MessageArgsProps, duration?: number, onClose?: import('ant-design-vue/es/message').ConfigOnClose) => import('ant-design-vue/es/message').MessageType;
|
|
6
|
+
export declare const $error: (content: import('ant-design-vue/es/_util/type').VueNode | import('ant-design-vue').MessageArgsProps, duration?: number, onClose?: import('ant-design-vue/es/message').ConfigOnClose) => import('ant-design-vue/es/message').MessageType;
|
|
7
|
+
export declare const $info: (content: import('ant-design-vue/es/_util/type').VueNode | import('ant-design-vue').MessageArgsProps, duration?: number, onClose?: import('ant-design-vue/es/message').ConfigOnClose) => import('ant-design-vue/es/message').MessageType;
|
|
8
|
+
export declare const $warning: (content: import('ant-design-vue/es/_util/type').VueNode | import('ant-design-vue').MessageArgsProps, duration?: number, onClose?: import('ant-design-vue/es/message').ConfigOnClose) => import('ant-design-vue/es/message').MessageType;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { TableProps } from 'ant-design-vue';
|
|
3
|
+
import { ColumnProps } from '../../declarations/antProxy';
|
|
4
|
+
declare const _default: <D = Recordable<any>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_Prettify<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
5
|
+
props: __VLS_Prettify<Pick<Partial<{
|
|
6
|
+
modelValue: D[];
|
|
7
|
+
tableConfig: TableProps<any>;
|
|
8
|
+
editColumns: ColumnProps<Recordable<any>>[];
|
|
9
|
+
}> & Omit<{
|
|
10
|
+
readonly modelValue: D[];
|
|
11
|
+
readonly tableConfig: TableProps<any>;
|
|
12
|
+
readonly editColumns: ColumnProps<Recordable<any>>[];
|
|
13
|
+
readonly onTrigger?: ((...args: any[]) => any) | undefined;
|
|
14
|
+
readonly "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
15
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & Readonly<import('vue').ExtractPropTypes<{
|
|
16
|
+
modelValue: {
|
|
17
|
+
type: PropType<D[]>;
|
|
18
|
+
default: () => never[];
|
|
19
|
+
};
|
|
20
|
+
tableConfig: {
|
|
21
|
+
type: PropType<TableProps>;
|
|
22
|
+
default: () => {};
|
|
23
|
+
};
|
|
24
|
+
editColumns: {
|
|
25
|
+
type: PropType<ColumnProps[]>;
|
|
26
|
+
default: () => never[];
|
|
27
|
+
};
|
|
28
|
+
}>> & Readonly<{
|
|
29
|
+
onTrigger?: ((...args: any[]) => any) | undefined;
|
|
30
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
31
|
+
}>, "modelValue" | "tableConfig" | "editColumns">, "onTrigger" | "onUpdate:modelValue" | ("modelValue" | "tableConfig" | "editColumns")> & {}> & import('vue').PublicProps;
|
|
32
|
+
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
|
|
33
|
+
attrs: any;
|
|
34
|
+
slots: ReturnType<() => {}>;
|
|
35
|
+
emit: ((event: "trigger" | "update:modelValue", ...args: any[]) => void) & {};
|
|
36
|
+
}>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
37
|
+
[key: string]: any;
|
|
38
|
+
}> & {
|
|
39
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
40
|
+
};
|
|
41
|
+
export default _default;
|
|
42
|
+
type __VLS_Prettify<T> = {
|
|
43
|
+
[K in keyof T]: T[K];
|
|
44
|
+
} & {};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { RenderFormParams, RenderOptions, RenderTableParams } from '../../declarations/antProxy';
|
|
2
|
+
export declare const addRender: (name: string, { renderItemContent, renderDefault, }: {
|
|
3
|
+
renderItemContent?: (options: RenderOptions, params: RenderFormParams, defaultHandler: Recordable) => any;
|
|
4
|
+
renderDefault?: (options: RenderOptions, params: RenderTableParams, defaultHandler: Recordable) => any;
|
|
5
|
+
}) => void;
|
|
6
|
+
declare const _default: {
|
|
7
|
+
renders: {
|
|
8
|
+
$button: {
|
|
9
|
+
renderItemContent({ props, events }: RenderOptions, { data, field }: RenderFormParams, defaultHandler: {
|
|
10
|
+
[key: string]: (...args: any[]) => any;
|
|
11
|
+
}): import("vue/jsx-runtime").JSX.Element;
|
|
12
|
+
renderDefault({ props, events }: RenderOptions, { row, field }: RenderTableParams, defaultHandler: {
|
|
13
|
+
[key: string]: (...args: any[]) => any;
|
|
14
|
+
}): import("vue/jsx-runtime").JSX.Element;
|
|
15
|
+
};
|
|
16
|
+
$buttons: {
|
|
17
|
+
renderItemContent({ props, children }: RenderOptions, { data, field }: RenderFormParams, defaultHandler: {
|
|
18
|
+
[key: string]: (...args: any[]) => any;
|
|
19
|
+
}): import("vue/jsx-runtime").JSX.Element;
|
|
20
|
+
renderDefault({ props, children }: RenderOptions, { data, row, field }: RenderTableParams): import("vue/jsx-runtime").JSX.Element;
|
|
21
|
+
};
|
|
22
|
+
ButtonTree: {
|
|
23
|
+
renderDefault({ children, props }: {
|
|
24
|
+
children?: never[] | undefined;
|
|
25
|
+
props?: Recordable<any> | undefined;
|
|
26
|
+
}, params: RenderTableParams): import("vue/jsx-runtime").JSX.Element;
|
|
27
|
+
};
|
|
28
|
+
$radio: {
|
|
29
|
+
renderItemContent({ props, options }: RenderOptions, { data, field }: RenderFormParams): import("vue/jsx-runtime").JSX.Element | null;
|
|
30
|
+
renderDefault({ props, options }: RenderOptions, { row, field }: RenderTableParams): import("vue/jsx-runtime").JSX.Element | null;
|
|
31
|
+
};
|
|
32
|
+
$switch: {
|
|
33
|
+
renderItemContent({ props, events }: RenderOptions, { data, field }: RenderFormParams): import("vue/jsx-runtime").JSX.Element | null;
|
|
34
|
+
};
|
|
35
|
+
$checkbox: {
|
|
36
|
+
renderItemContent({ props, options, events }: RenderOptions, { data, field }: RenderFormParams): import("vue/jsx-runtime").JSX.Element | null;
|
|
37
|
+
renderDefault({ props, options }: RenderOptions, { row, field }: RenderTableParams): import("vue/jsx-runtime").JSX.Element | null;
|
|
38
|
+
};
|
|
39
|
+
$paragraph: {
|
|
40
|
+
renderDefault({ props }: RenderOptions, { row, field }: RenderTableParams): import("vue/jsx-runtime").JSX.Element | null;
|
|
41
|
+
};
|
|
42
|
+
$tableInput: {
|
|
43
|
+
renderItemContent({ props, handleTrigger }: RenderOptions, { data, field }: RenderFormParams): import("vue/jsx-runtime").JSX.Element | null;
|
|
44
|
+
};
|
|
45
|
+
PercentInput: {
|
|
46
|
+
renderItemContent({ props, attrs }: RenderOptions, { data, field }: RenderFormParams): import("vue/jsx-runtime").JSX.Element | null;
|
|
47
|
+
renderDefault({ props, attrs }: RenderOptions, { row, field }: RenderTableParams): (import("vue/jsx-runtime").JSX.Element | null)[] | null;
|
|
48
|
+
};
|
|
49
|
+
TreeSelect: {
|
|
50
|
+
renderItemContent({ props }: RenderOptions, { data, field }: RenderFormParams): import("vue/jsx-runtime").JSX.Element | null;
|
|
51
|
+
renderDefault({ props }: RenderOptions, { row, field }: RenderTableParams): import("vue/jsx-runtime").JSX.Element | null;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
addRender: (name: string, { renderItemContent, renderDefault, }: {
|
|
55
|
+
renderItemContent?: (options: RenderOptions, params: RenderFormParams, defaultHandler: Recordable) => any;
|
|
56
|
+
renderDefault?: (options: RenderOptions, params: RenderTableParams, defaultHandler: Recordable) => any;
|
|
57
|
+
}) => void;
|
|
58
|
+
};
|
|
59
|
+
export default _default;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { CellFuncArg, ColumnProps } from '../../declarations/antProxy';
|
|
2
|
+
export declare const antFormatters: {
|
|
3
|
+
toString: ({ cellValue }: {
|
|
4
|
+
cellValue: any;
|
|
5
|
+
}) => any;
|
|
6
|
+
formatByOptions: ({ cellValue }: {
|
|
7
|
+
cellValue: any;
|
|
8
|
+
}, options: IOption[], separator?: string) => string;
|
|
9
|
+
formatSex: ({ cellValue }: {
|
|
10
|
+
cellValue: any;
|
|
11
|
+
}) => "-" | "男" | "女";
|
|
12
|
+
};
|
|
13
|
+
export declare const renderAntFormat: <D = Recordable<any>>(formatter: string | [string, ...Array<any>] | ((arg: CellFuncArg<D>) => any), { record, index, column, field, }: {
|
|
14
|
+
record: D;
|
|
15
|
+
index: number;
|
|
16
|
+
field?: string;
|
|
17
|
+
column: ColumnProps<D>;
|
|
18
|
+
}) => any;
|
|
19
|
+
export declare const addFormatter: (formatter: Record<string, (a: CellFuncArg, ...args: any[]) => any>) => void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ColumnProps, Responsive } from '../../declarations/antProxy';
|
|
2
|
+
import { TableColumnGroupType, TableColumnType } from 'ant-design-vue';
|
|
3
|
+
export declare const cleanCol: (col: ColumnProps) => TableColumnType | TableColumnGroupType<Recordable>;
|
|
4
|
+
export declare const defaultItemResponsive: Responsive;
|
|
5
|
+
export declare const defaultLabelCol: Responsive;
|
|
6
|
+
export declare const labelColDict: Record<number, Responsive>;
|
|
7
|
+
export declare const get24rest: (exist: number[]) => number;
|
|
8
|
+
export declare const getButtonResponsive: (itemResponsive: number | Responsive[]) => import('lodash').Dictionary<number>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
interface TreeConfig {
|
|
2
|
+
children?: string;
|
|
3
|
+
}
|
|
4
|
+
export declare const eachTree: <T extends Recordable>(treeData: ((T | (T & {
|
|
5
|
+
children?: (T & any)[] | undefined;
|
|
6
|
+
})) & {
|
|
7
|
+
children?: ((T | (T & {
|
|
8
|
+
children?: (T & any)[] | undefined;
|
|
9
|
+
})) & any)[] | undefined;
|
|
10
|
+
})[], iterate: (item: T | (T & {
|
|
11
|
+
children?: (T & any)[] | undefined;
|
|
12
|
+
}) | ((T | (T & {
|
|
13
|
+
children?: (T & any)[] | undefined;
|
|
14
|
+
})) & {
|
|
15
|
+
children?: ((T | (T & {
|
|
16
|
+
children?: (T & any)[] | undefined;
|
|
17
|
+
})) & any)[] | undefined;
|
|
18
|
+
})) => any, options?: TreeConfig, context?: any) => any;
|
|
19
|
+
export {};
|
package/dist/style.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@charset "UTF-8";:root{--p-theme-bg: #fff}.p-pane{background-color:var(--p-theme-bg);padding:16px;border-radius:4px}.w-full{width:100%}.h-0{height:0}.h-full{height:100%}.flex{display:flex}.flex-col{flex-direction:column}.flex-1{flex:1}.items-center{align-items:center}.justify-between{justify-content:space-between}.gap-4px{gap:4px}.gap-8px{gap:8px}.pt-8px{padding-top:8px}.px-16px{padding-left:16px;padding-right:16px}.mt-4px{margin-top:4px}.text-right{text-align:right}.overflow-y-auto{overflow-y:auto}.p-theme-bg{background-color:var(--p-theme-bg)}.p-wrapper .p-form-wrapper{z-index:4}.p-wrapper .p-toolbar-wrapper{box-shadow:0 8px #fff;border-radius:.5em .5em 0 0;margin-bottom:-.5em}.p-wrapper .ant-form .ant-form-item{margin-bottom:0}.p-wrapper .ant-form .ant-form-item .ant-form-item-label{display:flex;align-items:start;justify-content:flex-end}.p-wrapper .ant-form .ant-form-item .ant-form-item-label>label{white-space:break-spaces;align-items:flex-start;height:fit-content;padding-top:.36em}.p-wrapper .ant-form .ant-form-item .ant-form-item-label>label:after{padding-left:4px;margin-inline-start:unset}.p-wrapper .ant-form.ant-form-vertical .ant-form-item .ant-form-item-label{justify-content:flex-start;font-weight:600}.p-wrapper .ant-table-sticky-scroll{visibility:hidden}.p-wrapper .ant-table-header.ant-table-sticky-holder:before{content:"";width:100%;position:absolute;height:22px;display:block;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);top:-16px}.p-wrapper .ant-table-wrapper .ant-table-pagination.ant-pagination{margin:unset;padding:16px 0}.p-wrapper .p-inner-scroll>.ant-table-wrapper{height:100%}.p-wrapper .p-inner-scroll>.ant-table-wrapper>.ant-spin-nested-loading{height:100%}.p-wrapper .p-inner-scroll>.ant-table-wrapper>.ant-spin-nested-loading>.ant-spin-container{height:100%;display:flex;flex-direction:column}.p-wrapper .p-inner-scroll>.ant-table-wrapper>.ant-spin-nested-loading>.ant-spin-container>.ant-table{border-radius:unset}.p-content-align-right.ant-form-item .ant-form-item-control-input-content{display:flex;justify-content:flex-end;align-items:center;text-align:right}.p-content-align-center.ant-form-item .ant-form-item-control-input-content{display:flex;justify-content:center;align-items:center;text-align:center}
|
package/package.json
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@vue-ui-kit/ant",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Vue3 UI Kit based on Ant Design",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"types": "./dist/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"require": "./dist/cjs/index.js",
|
|
10
|
+
"import": "./dist/es/index.js"
|
|
11
|
+
},
|
|
12
|
+
"./scss": "./src/packages/styles/index.scss"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist",
|
|
16
|
+
"src"
|
|
17
|
+
],
|
|
18
|
+
"scripts": {
|
|
19
|
+
"dev": "vue-tsc --noEmit --skipLibCheck & vite",
|
|
20
|
+
"build": "ts-patch install && vite build",
|
|
21
|
+
"prepack": "rimraf dist && yarn build",
|
|
22
|
+
"prepare": "husky",
|
|
23
|
+
"publish": "npm publish",
|
|
24
|
+
"lint:lint-staged": "lint-staged",
|
|
25
|
+
"lint:prettier": "prettier --write \"src/**/*.{js,json,tsx,css,less,scss,vue,html,md}\""
|
|
26
|
+
},
|
|
27
|
+
"keywords": [
|
|
28
|
+
"vue3",
|
|
29
|
+
"ui kit",
|
|
30
|
+
"ant design",
|
|
31
|
+
"ant",
|
|
32
|
+
"antdv"
|
|
33
|
+
],
|
|
34
|
+
"author": {
|
|
35
|
+
"name": "adoin",
|
|
36
|
+
"email": "adoin@qq.com"
|
|
37
|
+
},
|
|
38
|
+
"dependencies": {
|
|
39
|
+
"lodash-es": "^4.17.21",
|
|
40
|
+
"uuid": "^10.0.0"
|
|
41
|
+
},
|
|
42
|
+
"peerDependencies": {
|
|
43
|
+
"@ant-design/icons-vue": ">=7.0.0",
|
|
44
|
+
"ant-design-vue": ">=4.0.0",
|
|
45
|
+
"vue": ">=3.2.0"
|
|
46
|
+
},
|
|
47
|
+
"license": "GPL",
|
|
48
|
+
"engines": {
|
|
49
|
+
"node": ">=16"
|
|
50
|
+
},
|
|
51
|
+
"devDependencies": {
|
|
52
|
+
"@ant-design/icons-vue": ">=7.0.0",
|
|
53
|
+
"@commitlint/cli": "^19.4.1",
|
|
54
|
+
"@commitlint/config-conventional": "^19.4.1",
|
|
55
|
+
"@types/lodash-es": "^4.17.12",
|
|
56
|
+
"@types/uuid": "^10.0.0",
|
|
57
|
+
"@vitejs/plugin-vue": "^5.1.2",
|
|
58
|
+
"@vitejs/plugin-vue-jsx": "^4.0.1",
|
|
59
|
+
"ant-design-vue": "^4.2.3",
|
|
60
|
+
"esbuild": "^0.23.1",
|
|
61
|
+
"husky": "^9.1.5",
|
|
62
|
+
"lint-staged": "^15.2.9",
|
|
63
|
+
"prettier": "^3.3.3",
|
|
64
|
+
"rimraf": "^6.0.1",
|
|
65
|
+
"sass": "^1.77.8",
|
|
66
|
+
"ts-patch": "^3.2.1",
|
|
67
|
+
"typescript-transform-paths": "^3.5.0",
|
|
68
|
+
"vite": "^5.4.2",
|
|
69
|
+
"vite-plugin-dts": "^4.1.0",
|
|
70
|
+
"vue": "^3.4.38"
|
|
71
|
+
}
|
|
72
|
+
}
|