@oiij/naive-ui 0.0.2 → 0.0.4
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/README.md +2 -15
- package/dist/_virtual/rolldown_runtime.cjs +30 -0
- package/dist/components/_utils/cssr-bem.d.ts +1 -0
- package/dist/components/_utils/index.d.ts +3 -0
- package/dist/components/_utils/prismjs.d.ts +1 -0
- package/dist/components/_utils/transition.cssr.d.ts +10 -0
- package/dist/components/bubble/Bubble.vue.d.ts +26 -0
- package/dist/components/bubble/bubble.cssr.d.ts +2 -0
- package/dist/components/bubble/index.d.ts +16 -0
- package/dist/components/config-providers/ConfigProviders.vue.d.ts +2 -20
- package/dist/components/config-providers/index.d.ts +19 -0
- package/dist/components/copy-button/CopyButton.vue.d.ts +3 -10
- package/dist/components/copy-button/index.d.ts +8 -0
- package/dist/components/data-table-plus/DataTablePlus.vue.d.ts +75 -0
- package/dist/components/data-table-plus/FilterTemplate.vue.d.ts +20 -0
- package/dist/components/data-table-plus/index.d.ts +53 -0
- package/dist/components/icons/EosIconsThreeDotsLoading.vue.d.ts +2 -0
- package/dist/components/icons/MageCopyFill.vue.d.ts +2 -0
- package/dist/components/icons/RiSearch2Line.vue.d.ts +2 -0
- package/dist/components/index.d.ts +4 -0
- package/dist/components/search-input/SearchInput.vue.d.ts +2076 -15
- package/dist/components/search-input/index.d.ts +10 -0
- package/dist/components/toggle-editor/ToggleEditor.vue.d.ts +1046 -0
- package/dist/components/toggle-editor/index.d.ts +1 -0
- package/dist/components/tooltip-button/TooltipButton.vue.d.ts +3 -8
- package/dist/components/tooltip-button/index.d.ts +6 -0
- package/dist/components/type-writer/TypeWriter.vue.d.ts +17 -0
- package/dist/components/type-writer/index.d.ts +9 -0
- package/dist/components/type-writer/type-writer.cssr.d.ts +2 -0
- package/dist/components.cjs +38 -1
- package/dist/components.js +6755 -132
- package/dist/components.umd.cjs +38 -1
- package/dist/composables/useNaiveForm.cjs +61 -0
- package/dist/composables/useNaiveForm.d.cts +36 -0
- package/dist/composables/useNaiveForm.d.ts +36 -0
- package/dist/composables/useNaiveForm.js +60 -0
- package/dist/composables/useNaiveTheme.cjs +120 -0
- package/dist/composables/useNaiveTheme.d.cts +165 -0
- package/dist/composables/useNaiveTheme.d.ts +165 -0
- package/dist/composables/useNaiveTheme.js +119 -0
- package/dist/index.cjs +4 -181
- package/dist/index.d.cts +2 -50
- package/dist/index.d.ts +2 -50
- package/dist/index.js +2 -155
- package/package.json +29 -65
package/README.md
CHANGED
|
@@ -1,16 +1,7 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
An expand component for NaiveUI.
|
|
1
|
+
# Naive-UI
|
|
4
2
|
|
|
5
3
|
[](https://www.npmjs.com/package/@oiij/naive-ui)
|
|
6
|
-
[](https://github.com/oiij/naive-ui)
|
|
7
4
|
[](https://github.com/Eiog/@oiij/naive-ui/blob/main/LICENSE)
|
|
8
|
-
[](https://github.com/oiij/naive-ui)
|
|
9
|
-
|
|
10
|
-
Features:
|
|
11
|
-
|
|
12
|
-
- Bundle with [tsup](https://github.com/egoist/tsup)
|
|
13
|
-
- Test with [vitest](https://vitest.dev)
|
|
14
5
|
|
|
15
6
|
## Usage
|
|
16
7
|
|
|
@@ -18,8 +9,4 @@ Features:
|
|
|
18
9
|
pnpm add @oiij/naive-ui
|
|
19
10
|
```
|
|
20
11
|
|
|
21
|
-
[在线文档](https://
|
|
22
|
-
|
|
23
|
-
## License
|
|
24
|
-
|
|
25
|
-
MIT
|
|
12
|
+
[在线文档](https://oiij-use.vercel.app/examples/naive-ui/started)
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
//#region rolldown:runtime
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
10
|
+
key = keys[i];
|
|
11
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
12
|
+
get: ((k) => from[k]).bind(null, key),
|
|
13
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
19
|
+
value: mod,
|
|
20
|
+
enumerable: true
|
|
21
|
+
}) : target, mod));
|
|
22
|
+
|
|
23
|
+
//#endregion
|
|
24
|
+
|
|
25
|
+
Object.defineProperty(exports, '__toESM', {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: function () {
|
|
28
|
+
return __toESM;
|
|
29
|
+
}
|
|
30
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const cssr: import('@oiij/css-render').CssRenderInstance, plugin: import('@oiij/css-render').CssRenderBemPlugin, namespace: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function highlight(code: string, lang: string): string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CNode } from '@oiij/css-render';
|
|
2
|
+
interface FadeInTransitionOptions {
|
|
3
|
+
name?: string;
|
|
4
|
+
enterDuration?: string;
|
|
5
|
+
leaveDuration?: string;
|
|
6
|
+
enterCubicBezier?: string;
|
|
7
|
+
leaveCubicBezier?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function fadeInTransition({ name, enterDuration, leaveDuration, enterCubicBezier, leaveCubicBezier, }?: FadeInTransitionOptions): CNode[];
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { BubbleProps } from './index';
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
attrs: Partial<{}>;
|
|
4
|
+
slots: {
|
|
5
|
+
avatar?(_: {}): any;
|
|
6
|
+
header?(_: {}): any;
|
|
7
|
+
loading?(_: {}): any;
|
|
8
|
+
default?(_: {}): any;
|
|
9
|
+
footer?(_: {}): any;
|
|
10
|
+
};
|
|
11
|
+
refs: {};
|
|
12
|
+
rootEl: any;
|
|
13
|
+
};
|
|
14
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
15
|
+
declare const __VLS_component: import('vue').DefineComponent<BubbleProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
16
|
+
typingComplete: () => any;
|
|
17
|
+
}, string, import('vue').PublicProps, Readonly<BubbleProps> & Readonly<{
|
|
18
|
+
onTypingComplete?: (() => any) | undefined;
|
|
19
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
20
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
21
|
+
export default _default;
|
|
22
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
23
|
+
new (): {
|
|
24
|
+
$slots: S;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { AvatarProps } from 'naive-ui';
|
|
2
|
+
import { CSSProperties, VNodeChild } from 'vue';
|
|
3
|
+
export { default as NBubble } from './Bubble.vue';
|
|
4
|
+
export interface BubbleProps {
|
|
5
|
+
avatar?: {
|
|
6
|
+
icon?: VNodeChild;
|
|
7
|
+
props?: AvatarProps;
|
|
8
|
+
};
|
|
9
|
+
content?: string;
|
|
10
|
+
contentClass?: string;
|
|
11
|
+
contentStyle?: CSSProperties;
|
|
12
|
+
loading?: boolean;
|
|
13
|
+
typing?: boolean;
|
|
14
|
+
markdown?: boolean;
|
|
15
|
+
placement?: 'start' | 'end';
|
|
16
|
+
}
|
|
@@ -1,22 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
type __VLS_Props = {
|
|
3
|
-
globalStyle?: boolean;
|
|
4
|
-
configProviderProps?: ConfigProviderProps;
|
|
5
|
-
loadingBarProps?: LoadingBarProviderProps;
|
|
6
|
-
dialogProviderProps?: DialogProviderProps;
|
|
7
|
-
modalProviderProps?: ModalProviderProps;
|
|
8
|
-
notificationProviderProps?: NotificationProviderProps;
|
|
9
|
-
messageProviderProps?: MessageProviderProps;
|
|
10
|
-
};
|
|
11
|
-
declare global {
|
|
12
|
-
interface Window {
|
|
13
|
-
$dialog: DialogProviderInst;
|
|
14
|
-
$loadingBar: LoadingBarProviderInst;
|
|
15
|
-
$message: MessageProviderInst;
|
|
16
|
-
$modal: ModalProviderInst;
|
|
17
|
-
$notification: NotificationProviderInst;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
1
|
+
import { ConfigProvidersProps } from './index';
|
|
20
2
|
declare function __VLS_template(): {
|
|
21
3
|
attrs: Partial<{}>;
|
|
22
4
|
slots: {
|
|
@@ -26,7 +8,7 @@ declare function __VLS_template(): {
|
|
|
26
8
|
rootEl: any;
|
|
27
9
|
};
|
|
28
10
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
29
|
-
declare const __VLS_component: import('vue').DefineComponent<
|
|
11
|
+
declare const __VLS_component: import('vue').DefineComponent<ConfigProvidersProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ConfigProvidersProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
30
12
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
31
13
|
export default _default;
|
|
32
14
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
@@ -1 +1,20 @@
|
|
|
1
|
+
import { ConfigProviderProps, DialogProviderInst, DialogProviderProps, LoadingBarProviderInst, LoadingBarProviderProps, MessageProviderInst, MessageProviderProps, ModalProviderInst, ModalProviderProps, NotificationProviderInst, NotificationProviderProps } from 'naive-ui';
|
|
1
2
|
export { default as NConfigProviders } from './ConfigProviders.vue';
|
|
3
|
+
export interface ConfigProvidersProps {
|
|
4
|
+
globalStyle?: boolean;
|
|
5
|
+
configProviderProps?: ConfigProviderProps;
|
|
6
|
+
loadingBarProps?: LoadingBarProviderProps;
|
|
7
|
+
dialogProviderProps?: DialogProviderProps;
|
|
8
|
+
modalProviderProps?: ModalProviderProps;
|
|
9
|
+
notificationProviderProps?: NotificationProviderProps;
|
|
10
|
+
messageProviderProps?: MessageProviderProps;
|
|
11
|
+
}
|
|
12
|
+
declare global {
|
|
13
|
+
interface Window {
|
|
14
|
+
$dialog: DialogProviderInst;
|
|
15
|
+
$loadingBar: LoadingBarProviderInst;
|
|
16
|
+
$message: MessageProviderInst;
|
|
17
|
+
$modal: ModalProviderInst;
|
|
18
|
+
$notification: NotificationProviderInst;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ButtonProps, TooltipProps } from 'naive-ui';
|
|
3
|
-
type __VLS_Props = {
|
|
4
|
-
value?: string;
|
|
5
|
-
config?: UseClipboardOptions<string | undefined>;
|
|
6
|
-
tooltipProps?: TooltipProps;
|
|
7
|
-
buttonProps?: ButtonProps;
|
|
8
|
-
};
|
|
1
|
+
import { CopyButtonProps } from './index';
|
|
9
2
|
declare function __VLS_template(): {
|
|
10
3
|
attrs: Partial<{}>;
|
|
11
4
|
slots: {
|
|
@@ -17,9 +10,9 @@ declare function __VLS_template(): {
|
|
|
17
10
|
rootEl: any;
|
|
18
11
|
};
|
|
19
12
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
20
|
-
declare const __VLS_component: import('vue').DefineComponent<
|
|
13
|
+
declare const __VLS_component: import('vue').DefineComponent<CopyButtonProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
21
14
|
copied: (v: string | undefined) => any;
|
|
22
|
-
}, string, import('vue').PublicProps, Readonly<
|
|
15
|
+
}, string, import('vue').PublicProps, Readonly<CopyButtonProps> & Readonly<{
|
|
23
16
|
onCopied?: ((v: string | undefined) => any) | undefined;
|
|
24
17
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
25
18
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
@@ -1 +1,9 @@
|
|
|
1
|
+
import { UseClipboardOptions } from '@vueuse/core';
|
|
2
|
+
import { ButtonProps, TooltipProps } from 'naive-ui';
|
|
1
3
|
export { default as NCopyButton } from './CopyButton.vue';
|
|
4
|
+
export interface CopyButtonProps {
|
|
5
|
+
value?: string;
|
|
6
|
+
config?: UseClipboardOptions<string | undefined>;
|
|
7
|
+
tooltipProps?: TooltipProps;
|
|
8
|
+
buttonProps?: ButtonProps;
|
|
9
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { DataTableBaseColumn, DataTableColumns, DataTableFilterState, DataTableInst, DataTableProps, DataTableSortState, DropdownOption, PaginationProps } from 'naive-ui';
|
|
2
|
+
import { CSSProperties } from 'vue';
|
|
3
|
+
import { UseRequestOptions, UseRequestPlugin } from 'vue-hooks-plus/es/useRequest/types';
|
|
4
|
+
import { ClickRowType, ContextMenuSelectType, DataTableFilterOptions } from './index';
|
|
5
|
+
declare const _default: <P extends Record<string, any>, D extends Record<string, any>, R 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_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
6
|
+
props: __VLS_PrettifyLocal<any & {
|
|
7
|
+
api: (params: P) => Promise<D>;
|
|
8
|
+
defaultParams?: P;
|
|
9
|
+
columns?: DataTableColumns<R>;
|
|
10
|
+
filterOptions?: DataTableFilterOptions<P, D>;
|
|
11
|
+
contextMenuOptions?: DropdownOption[];
|
|
12
|
+
fields?: Record<"page" | "pageSize" | "filter" | "sorter" | "list" | "count" | "rowKey", string>;
|
|
13
|
+
pagination?: Omit<PaginationProps, "page" | "pageSize">;
|
|
14
|
+
dataTableProps?: DataTableProps;
|
|
15
|
+
requestOptions?: UseRequestOptions<D, P[]>;
|
|
16
|
+
requestPlugins?: UseRequestPlugin<D, P[]>[];
|
|
17
|
+
customStyle?: CSSProperties;
|
|
18
|
+
customClass?: string;
|
|
19
|
+
} & Partial<{}>> & import('vue').PublicProps;
|
|
20
|
+
expose(exposed: import('vue').ShallowUnwrapRef<{
|
|
21
|
+
data: Readonly<import('vue').Ref<D | undefined, D | undefined>>;
|
|
22
|
+
params: Readonly<import('vue').Ref<[] | P[], [] | P[]>>;
|
|
23
|
+
error: Readonly<import('vue').Ref<Error | undefined, Error | undefined>>;
|
|
24
|
+
actions: {
|
|
25
|
+
run: (_params: Partial<P>) => void;
|
|
26
|
+
runAsync: (_params: Partial<P>) => Promise<D>;
|
|
27
|
+
refresh: () => void;
|
|
28
|
+
refreshAsync: () => Promise<D>;
|
|
29
|
+
cancel: () => void;
|
|
30
|
+
mutate: (data?: D | ((oldData?: D | undefined) => D | undefined) | undefined) => void;
|
|
31
|
+
setParams: (_params: Partial<P>) => void;
|
|
32
|
+
};
|
|
33
|
+
dataTableRef: Readonly<import('vue').ShallowRef<DataTableInst | null>>;
|
|
34
|
+
}>): void;
|
|
35
|
+
attrs: any;
|
|
36
|
+
slots: {
|
|
37
|
+
filter?(_: {
|
|
38
|
+
params: P;
|
|
39
|
+
data: D | undefined;
|
|
40
|
+
actions: {
|
|
41
|
+
run: (_params: Partial<P>) => void;
|
|
42
|
+
runAsync: (_params: Partial<P>) => Promise<D>;
|
|
43
|
+
refresh: () => void;
|
|
44
|
+
refreshAsync: () => Promise<D>;
|
|
45
|
+
cancel: () => void;
|
|
46
|
+
mutate: (data?: D | ((oldData?: D | undefined) => D | undefined) | undefined) => void;
|
|
47
|
+
setParams: (_params: Partial<P>) => void;
|
|
48
|
+
};
|
|
49
|
+
dataTableRef: DataTableInst | null;
|
|
50
|
+
}): any;
|
|
51
|
+
};
|
|
52
|
+
emit: {
|
|
53
|
+
(e: "loaded", data: D): void;
|
|
54
|
+
(e: "clickRow", data: ClickRowType<R>): void;
|
|
55
|
+
(e: "contextMenuRow", data: ClickRowType<R>): void;
|
|
56
|
+
(e: "contextMenuSelect", data: ContextMenuSelectType<R>): void;
|
|
57
|
+
(e: "load", rowData: object): Promise<void>;
|
|
58
|
+
(e: "scroll", ev: Event): void;
|
|
59
|
+
(e: "update:checkedRowKeys", keys: (number | string)[], rows: object[], meta: {
|
|
60
|
+
row: object | undefined;
|
|
61
|
+
action: "check" | "uncheck" | "checkAll" | "uncheckAll";
|
|
62
|
+
}): void;
|
|
63
|
+
(e: "update:expandedRowKeys", keys: (number | string)[]): void;
|
|
64
|
+
(e: "update:filters", filters: DataTableFilterState, initiatorColumn: DataTableBaseColumn): void;
|
|
65
|
+
(e: "update:sorter", options: DataTableSortState | DataTableSortState[] | null): void;
|
|
66
|
+
(e: "update:page", page: number): void;
|
|
67
|
+
(e: "update:pageSize", pageSize: number): void;
|
|
68
|
+
};
|
|
69
|
+
}>) => import('vue').VNode & {
|
|
70
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
71
|
+
};
|
|
72
|
+
export default _default;
|
|
73
|
+
type __VLS_PrettifyLocal<T> = {
|
|
74
|
+
[K in keyof T]: T[K];
|
|
75
|
+
} & {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { DataTableFilterOptions } from './index';
|
|
2
|
+
declare const _default: <P extends Record<string, any>, D 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_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
4
|
+
readonly "onUpdate:value"?: ((val?: unknown) => any) | undefined;
|
|
5
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onUpdate:value"> & {
|
|
6
|
+
options?: DataTableFilterOptions<P, D>[0];
|
|
7
|
+
value?: unknown;
|
|
8
|
+
loading?: boolean;
|
|
9
|
+
} & Partial<{}>> & import('vue').PublicProps;
|
|
10
|
+
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
|
|
11
|
+
attrs: any;
|
|
12
|
+
slots: {};
|
|
13
|
+
emit: (e: "update:value", val?: unknown) => void;
|
|
14
|
+
}>) => import('vue').VNode & {
|
|
15
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
16
|
+
};
|
|
17
|
+
export default _default;
|
|
18
|
+
type __VLS_PrettifyLocal<T> = {
|
|
19
|
+
[K in keyof T]: T[K];
|
|
20
|
+
} & {};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { DataTableInst, DatePickerProps, DropdownOption, FormItemProps, InputProps, SelectProps, SwitchProps, TimePickerProps } from 'naive-ui';
|
|
2
|
+
import { CSSProperties, VNode } from 'vue';
|
|
3
|
+
import { SearchInputProps } from '../index';
|
|
4
|
+
export { default as NDataTablePlus } from './DataTablePlus.vue';
|
|
5
|
+
interface FilterTypeProps {
|
|
6
|
+
'date-picker': DatePickerProps;
|
|
7
|
+
'input': InputProps;
|
|
8
|
+
'search': SearchInputProps;
|
|
9
|
+
'select': SelectProps;
|
|
10
|
+
'switch': SwitchProps;
|
|
11
|
+
'time-picker': TimePickerProps;
|
|
12
|
+
}
|
|
13
|
+
interface Actions<P extends Record<string, any>, D extends Record<string, any>> {
|
|
14
|
+
run: (params: P) => void;
|
|
15
|
+
runAsync: (params: P) => Promise<D>;
|
|
16
|
+
refresh: () => void;
|
|
17
|
+
refreshAsync: () => Promise<D>;
|
|
18
|
+
cancel: () => void;
|
|
19
|
+
mutate: (data?: D | ((oldData?: D | undefined) => D | undefined) | undefined) => void;
|
|
20
|
+
setParams: (params: P) => void;
|
|
21
|
+
}
|
|
22
|
+
export type DataTableFilterOptions<P extends Record<string, any>, D extends Record<string, any>> = {
|
|
23
|
+
[K in keyof FilterTypeProps]: {
|
|
24
|
+
key?: keyof P;
|
|
25
|
+
title?: string;
|
|
26
|
+
type?: K;
|
|
27
|
+
collapsed?: boolean;
|
|
28
|
+
props?: FilterTypeProps[K] & {
|
|
29
|
+
style?: CSSProperties;
|
|
30
|
+
class?: string;
|
|
31
|
+
};
|
|
32
|
+
labelProps?: FormItemProps & {
|
|
33
|
+
style?: CSSProperties;
|
|
34
|
+
class?: string;
|
|
35
|
+
};
|
|
36
|
+
render?: (opt: {
|
|
37
|
+
params: P;
|
|
38
|
+
data?: D;
|
|
39
|
+
actions: Actions<P, D>;
|
|
40
|
+
dataTableRef: DataTableInst | null;
|
|
41
|
+
}) => VNode;
|
|
42
|
+
};
|
|
43
|
+
}[keyof FilterTypeProps][];
|
|
44
|
+
export interface ClickRowType<R extends Record<string, any>> {
|
|
45
|
+
row: R;
|
|
46
|
+
index: number;
|
|
47
|
+
event: MouseEvent;
|
|
48
|
+
}
|
|
49
|
+
export interface ContextMenuSelectType<R extends Record<string, any>> {
|
|
50
|
+
key: string | number;
|
|
51
|
+
option: DropdownOption;
|
|
52
|
+
row?: R;
|
|
53
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
+
export * from './bubble';
|
|
1
2
|
export * from './config-providers';
|
|
2
3
|
export * from './copy-button';
|
|
4
|
+
export * from './data-table-plus';
|
|
3
5
|
export * from './search-input';
|
|
6
|
+
export * from './toggle-editor';
|
|
4
7
|
export * from './tooltip-button';
|
|
8
|
+
export * from './type-writer';
|