@oiij/naive-ui
Version:
Some Composable Functions And Components for Vue 3
83 lines (82 loc) • 3.48 kB
TypeScript
import { DataObject } from "../../composables/useDataRequest.js";
import { PresetFormExpose, PresetFormProps } from "./index.js";
import * as _vueuse_core38 from "@vueuse/core";
import * as vue69 from "vue";
import * as naive_ui27 from "naive-ui";
import { FormInst } from "naive-ui";
import * as async_validator0 from "async-validator";
//#region src/components/preset-form/PresetForm.vue.d.ts
declare const __VLS_export: <V extends DataObject>(__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<{
props: vue69.PublicProps & __VLS_PrettifyLocal<PresetFormProps<V> & {
onValidated?: ((val: V) => any) | undefined;
}> & (typeof globalThis extends {
__VLS_PROPS_FALLBACK: infer P;
} ? P : {});
expose: (exposed: vue69.ShallowUnwrapRef<PresetFormExpose<V>>) => void;
attrs: any;
slots: {
header?: (props: {
formRef: FormInst | null;
formValue: V;
formRules: Partial<Record<keyof V, naive_ui27.FormRules | naive_ui27.FormItemRule | naive_ui27.FormItemRule[]>>;
formProps: {
model: vue69.Reactive<V>;
rules: vue69.Reactive<Partial<Record<keyof V, naive_ui27.FormRules | naive_ui27.FormItemRule | naive_ui27.FormItemRule[]>>>;
};
setValue: (_value: Partial<V>) => void;
validate: () => Promise<{
warnings?: async_validator0.ValidateError[][];
}>;
resetValidation: () => void;
resetForm: () => void;
reset: () => void;
clear: () => void;
onValidated: _vueuse_core38.EventHookOn<[V]>;
}) => any;
} & {
default?: (props: {
formRef: FormInst | null;
formValue: V;
formRules: Partial<Record<keyof V, naive_ui27.FormRules | naive_ui27.FormItemRule | naive_ui27.FormItemRule[]>>;
formProps: {
model: vue69.Reactive<V>;
rules: vue69.Reactive<Partial<Record<keyof V, naive_ui27.FormRules | naive_ui27.FormItemRule | naive_ui27.FormItemRule[]>>>;
};
setValue: (_value: Partial<V>) => void;
validate: () => Promise<{
warnings?: async_validator0.ValidateError[][];
}>;
resetValidation: () => void;
resetForm: () => void;
reset: () => void;
clear: () => void;
onValidated: _vueuse_core38.EventHookOn<[V]>;
}) => any;
} & {
footer?: (props: {
formRef: FormInst | null;
formValue: V;
formRules: Partial<Record<keyof V, naive_ui27.FormRules | naive_ui27.FormItemRule | naive_ui27.FormItemRule[]>>;
formProps: {
model: vue69.Reactive<V>;
rules: vue69.Reactive<Partial<Record<keyof V, naive_ui27.FormRules | naive_ui27.FormItemRule | naive_ui27.FormItemRule[]>>>;
};
setValue: (_value: Partial<V>) => void;
validate: () => Promise<{
warnings?: async_validator0.ValidateError[][];
}>;
resetValidation: () => void;
resetForm: () => void;
reset: () => void;
clear: () => void;
onValidated: _vueuse_core38.EventHookOn<[V]>;
}) => any;
};
emit: (e: "validated", val: V) => void;
}>) => vue69.VNode & {
__ctx?: Awaited<typeof __VLS_setup>;
};
declare const _default: typeof __VLS_export;
type __VLS_PrettifyLocal<T> = (T extends any ? { [K in keyof T]: T[K] } : { [K in keyof T as K]: T[K] }) & {};
//#endregion
export { _default };