t-fighting-design
Version:
Fighting design can quickly build interactive interfaces in vue3 applications, which looks good.
179 lines (178 loc) • 6.28 kB
TypeScript
import type { SwitchSizeType, SwitchChangeInterface } from './src/interface.d';
import type { DefineComponent, PropType, VNode, RendererNode, RendererElement, ComputedRef, CSSProperties, Component, ComputedOptions, MethodOptions, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps } from 'vue';
import type { InstallType, OrdinaryFunctionInterface, ClassListInterface, HandleEventInterface } from '../_interface';
import Switch from "./src/switch";
export declare const FSwitch: InstallType<DefineComponent<{
readonly modelValue: {
readonly type: BooleanConstructor;
readonly default: () => boolean;
readonly required: true;
};
readonly size: {
readonly type: PropType<SwitchSizeType>;
readonly default: () => SwitchSizeType;
readonly validator: (val: SwitchSizeType) => boolean;
};
readonly disabled: {
readonly type: BooleanConstructor;
readonly default: () => boolean;
};
readonly icon: {
readonly type: PropType<VNode<RendererNode, RendererElement, {
[key: string]: any;
}>>;
readonly default: () => null;
};
readonly closeColor: {
readonly type: StringConstructor;
readonly default: () => string;
};
readonly openColor: {
readonly type: StringConstructor;
readonly default: () => string;
};
readonly openText: {
readonly type: StringConstructor;
readonly default: () => string;
};
readonly closeText: {
readonly type: StringConstructor;
readonly default: () => string;
};
readonly square: {
readonly type: BooleanConstructor;
readonly default: () => boolean;
};
readonly change: {
readonly type: PropType<SwitchChangeInterface>;
readonly default: () => null;
};
}, {
prop: {
readonly modelValue?: unknown;
readonly size?: unknown;
readonly disabled?: unknown;
readonly icon?: unknown;
readonly closeColor?: unknown;
readonly openColor?: unknown;
readonly openText?: unknown;
readonly closeText?: unknown;
readonly square?: unknown;
readonly change?: unknown;
} & {
size: SwitchSizeType;
disabled: boolean;
icon: VNode<RendererNode, RendererElement, {
[key: string]: any;
}>;
modelValue: boolean;
change: SwitchChangeInterface;
square: boolean;
openText: string;
closeText: string;
closeColor: string;
openColor: string;
} & {};
emit: (event: "update:modelValue", target: boolean) => void;
handleClick: OrdinaryFunctionInterface;
rollStyle: ComputedRef<CSSProperties>;
FSwitchClass: ComputedRef<ClassListInterface>;
FSvgIcon: InstallType<DefineComponent<{
readonly icon: {
readonly type: PropType<VNode<RendererNode, RendererElement, {
[key: string]: any;
}> | Component<any, any, any, ComputedOptions, MethodOptions>>;
readonly default: () => null;
};
readonly color: {
readonly type: StringConstructor;
readonly default: () => string;
};
readonly size: {
readonly type: PropType<string | number>;
readonly default: () => string;
};
readonly click: {
readonly type: PropType<HandleEventInterface>;
readonly default: () => null;
};
}, {
prop: {
readonly icon?: unknown;
readonly color?: unknown;
readonly size?: unknown;
readonly click?: unknown;
} & {
color: string;
size: string | number;
icon: VNode<RendererNode, RendererElement, {
[key: string]: any;
}> | Component<any, any, any, ComputedOptions, MethodOptions>;
click: HandleEventInterface;
} & {};
handleClick: HandleEventInterface;
styleList: ComputedRef<CSSProperties>;
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, Record<string, any>, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<{
readonly icon?: unknown;
readonly color?: unknown;
readonly size?: unknown;
readonly click?: unknown;
} & {
color: string;
size: string | number;
icon: VNode<RendererNode, RendererElement, {
[key: string]: any;
}> | Component<any, any, any, ComputedOptions, MethodOptions>;
click: HandleEventInterface;
} & {}>, {
color: string;
size: string | number;
icon: VNode<RendererNode, RendererElement, {
[key: string]: any;
}> | Component<any, any, any, ComputedOptions, MethodOptions>;
click: HandleEventInterface;
}>>;
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
readonly 'update:modelValue': (target: boolean) => string;
}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<{
readonly modelValue?: unknown;
readonly size?: unknown;
readonly disabled?: unknown;
readonly icon?: unknown;
readonly closeColor?: unknown;
readonly openColor?: unknown;
readonly openText?: unknown;
readonly closeText?: unknown;
readonly square?: unknown;
readonly change?: unknown;
} & {
size: SwitchSizeType;
disabled: boolean;
icon: VNode<RendererNode, RendererElement, {
[key: string]: any;
}>;
modelValue: boolean;
change: SwitchChangeInterface;
square: boolean;
openText: string;
closeText: string;
closeColor: string;
openColor: string;
} & {}> & {
"onUpdate:modelValue"?: ((target: boolean) => any) | undefined;
}, {
size: SwitchSizeType;
disabled: boolean;
icon: VNode<RendererNode, RendererElement, {
[key: string]: any;
}>;
change: SwitchChangeInterface;
square: boolean;
openText: string;
closeText: string;
closeColor: string;
openColor: string;
}>>;
export declare type SwitchInstance = InstanceType<typeof Switch>;
export * from './src/interface.d';
export default Switch;