@oiij/naive-ui 0.0.7 → 0.0.9
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/components/data-table-plus/DataTablePlus.vue.d.ts +3 -1
- package/dist/components/preset-form/PresetForm.vue.d.ts +1 -1
- package/dist/components/preset-select/PresetSelect.vue.d.ts +14 -12
- package/dist/components/preset-select/index.d.ts +2 -2
- package/dist/components/remote-request/RemoteRequest.vue.d.ts +1 -1
- package/dist/components.cjs +20 -20
- package/dist/components.js +679 -637
- package/dist/components.umd.cjs +19 -19
- package/dist/composables/useNaiveForm.d.cts +4 -4
- package/dist/composables/useNaiveForm.d.ts +4 -4
- package/dist/composables/useNaiveTheme.d.cts +2 -2
- package/dist/composables/useNaiveTheme.d.ts +2 -2
- package/package.json +5 -5
|
@@ -2,7 +2,7 @@ import { DataTableBaseColumn, DataTableColumns, DataTableFilterState, DataTableP
|
|
|
2
2
|
import { CSSProperties } from 'vue';
|
|
3
3
|
import { UseRequestOptions, UseRequestPlugin } from 'vue-hooks-plus/es/useRequest/types';
|
|
4
4
|
import { ContextMenuSelectType, DataTablePlusClickRowType, DataTablePlusExposeActions, DataTablePlusExposeRefs, DataTablePlusFields, DataTablePlusFilterOptions } from '.';
|
|
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<{
|
|
5
|
+
declare const _default: <P extends Record<string, any> = Record<string, any>, D extends Record<string, any> = Record<string, any>, R extends Record<string, any> = 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
6
|
props: __VLS_PrettifyLocal<any & {
|
|
7
7
|
api: (params: P) => Promise<D>;
|
|
8
8
|
defaultParams?: P;
|
|
@@ -29,6 +29,8 @@ declare const _default: <P extends Record<string, any>, D extends Record<string,
|
|
|
29
29
|
refs: DataTablePlusExposeRefs<P, D, R>;
|
|
30
30
|
actions: DataTablePlusExposeActions<P, D>;
|
|
31
31
|
}): any;
|
|
32
|
+
empty?(_: {}): any;
|
|
33
|
+
loading?(_: {}): any;
|
|
32
34
|
actions?(_: {}): any;
|
|
33
35
|
extra?(_: {}): any;
|
|
34
36
|
pagination?(_: {}): any;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FormProps, GridProps } from 'naive-ui';
|
|
2
2
|
import { PresetFormOptions } from '.';
|
|
3
3
|
import { NaiveFormRules } from '../../composables';
|
|
4
|
-
declare const _default: <V 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<{
|
|
4
|
+
declare const _default: <V extends Record<string, any> = 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<{
|
|
5
5
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
6
6
|
readonly onValidated?: ((val: V) => any) | undefined;
|
|
7
7
|
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onValidated"> & {
|
|
@@ -1,23 +1,16 @@
|
|
|
1
1
|
import { PaginationProps, SelectOption, SelectProps } from 'naive-ui';
|
|
2
2
|
import { UseRequestOptions, UseRequestPlugin } from 'vue-hooks-plus/es/useRequest/types';
|
|
3
3
|
import { OptionFormat, PresetSelectExposeActions, PresetSelectExposeRefs, PresetSelectFields, PresetSelectValue } from '.';
|
|
4
|
-
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<{
|
|
5
|
-
props: __VLS_PrettifyLocal<
|
|
6
|
-
readonly onError?: ((err: Error, params: P[]) => any) | undefined;
|
|
7
|
-
readonly onSuccess?: ((data: D, params: P[]) => any) | undefined;
|
|
8
|
-
readonly "onUpdate:value"?: ((val: string | number | (string | number)[] | null, option: SelectOption | SelectOption[] | null, raw: R | R[] | null) => any) | undefined;
|
|
9
|
-
readonly onBefore?: ((params: P[]) => any) | undefined;
|
|
10
|
-
readonly "onUpdate:page"?: ((page: number) => any) | undefined;
|
|
11
|
-
readonly "onUpdate:pageSize"?: ((pageSize: number) => any) | undefined;
|
|
12
|
-
readonly onFinally?: ((params: P[], data?: D | undefined, err?: Error | undefined) => any) | undefined;
|
|
13
|
-
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onError" | "onUpdate:value" | "onUpdate:page" | "onUpdate:pageSize" | "onBefore" | "onSuccess" | "onFinally"> & {
|
|
4
|
+
declare const _default: <V extends PresetSelectValue = null, P extends Record<string, any> = Record<string, any>, D extends Record<string, any> = Record<string, any>, R extends Record<string, any> = 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<{
|
|
5
|
+
props: __VLS_PrettifyLocal<any & {
|
|
14
6
|
api: (...args: P[]) => Promise<D>;
|
|
15
|
-
value?:
|
|
7
|
+
value?: V;
|
|
16
8
|
fallbackLabel?: string;
|
|
17
9
|
defaultParams?: P;
|
|
18
10
|
manual?: boolean;
|
|
19
11
|
multiple?: boolean;
|
|
20
12
|
disabled?: boolean;
|
|
13
|
+
debounce?: boolean | number;
|
|
21
14
|
optionFormat?: OptionFormat<R>;
|
|
22
15
|
fields?: PresetSelectFields;
|
|
23
16
|
selectProps?: SelectProps;
|
|
@@ -31,16 +24,25 @@ declare const _default: <P extends Record<string, any>, D extends Record<string,
|
|
|
31
24
|
}>): void;
|
|
32
25
|
attrs: any;
|
|
33
26
|
slots: {
|
|
27
|
+
header?(_: {}): any;
|
|
34
28
|
action?(_: {}): any;
|
|
35
29
|
extra?(_: {}): any;
|
|
36
30
|
pagination?(_: {}): any;
|
|
31
|
+
empty?(_: {}): any;
|
|
32
|
+
arrow?(_: {}): any;
|
|
37
33
|
};
|
|
38
34
|
emit: {
|
|
39
35
|
(e: "before", params: P[]): void;
|
|
40
36
|
(e: "success", data: D, params: P[]): void;
|
|
41
37
|
(e: "error", err: Error, params: P[]): void;
|
|
42
38
|
(e: "finally", params: P[], data?: D, err?: Error): void;
|
|
43
|
-
(e: "
|
|
39
|
+
(e: "blur", ev: FocusEvent): void;
|
|
40
|
+
(e: "clear"): void;
|
|
41
|
+
(e: "create", label: string): SelectOption;
|
|
42
|
+
(e: "focus", ev: FocusEvent): void;
|
|
43
|
+
(e: "scroll", ev: Event): void;
|
|
44
|
+
(e: "search", value: string): void;
|
|
45
|
+
(e: "update:value", val: V | null, option: SelectOption | SelectOption[] | null, raw: R | R[] | null): void;
|
|
44
46
|
(e: "update:page", page: number): void;
|
|
45
47
|
(e: "update:pageSize", pageSize: number): void;
|
|
46
48
|
};
|
|
@@ -2,9 +2,9 @@ import { SelectGroupOption, SelectInst, SelectOption } from 'naive-ui';
|
|
|
2
2
|
import { ShallowRef } from 'vue';
|
|
3
3
|
import { DataTablePlusExposeActions, DataTablePlusExposeRefsBase } from '../data-table-plus';
|
|
4
4
|
export { default as NPresetSelect } from './PresetSelect.vue';
|
|
5
|
-
export type OptionFormat<R extends Record<string, any>> = (row: R) => SelectOption | SelectGroupOption;
|
|
5
|
+
export type OptionFormat<R extends Record<string, any>> = (row: R) => SelectOption | SelectGroupOption | false | undefined | null;
|
|
6
6
|
export type PresetSelectValue = string | number | (string | number)[] | null;
|
|
7
|
-
export type PresetSelectUpdateValue<R extends Record<string, any>> = (val:
|
|
7
|
+
export type PresetSelectUpdateValue<V extends PresetSelectValue, R extends Record<string, any>> = (val: V, option: SelectOption | SelectOption[] | null, raw: R | R[] | null) => void;
|
|
8
8
|
export type PresetSelectFields = Partial<Record<'page' | 'pageSize' | 'search' | 'list' | 'count' | 'rowKey' | 'label' | 'value' | 'children', string>>;
|
|
9
9
|
export interface PresetSelectPagination {
|
|
10
10
|
page: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UseRequestOptions, UseRequestPlugin } from 'vue-hooks-plus/es/useRequest/types';
|
|
2
2
|
import { RemoteRequestFields } from '.';
|
|
3
|
-
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
|
+
declare const _default: <P extends Record<string, any> = Record<string, any>, D extends Record<string, any> = 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<{
|
|
4
4
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
5
5
|
readonly onError?: ((err: Error, params: P[]) => any) | undefined;
|
|
6
6
|
readonly onSuccess?: ((data: D, params: P[]) => any) | undefined;
|