hongluan-ui
Version:
Hongluan Component Library for Vue 3
148 lines (147 loc) • 4.82 kB
TypeScript
export declare const HlSwitch: import("hongluan-ui/es/utils").SFCWithInstall<import("vue").DefineComponent<{
ariaLabel: StringConstructor;
modelValue: {
type: (BooleanConstructor | StringConstructor | NumberConstructor)[];
default: boolean;
};
value: {
type: (BooleanConstructor | StringConstructor | NumberConstructor)[];
default: boolean;
};
disabled: BooleanConstructor;
type: {
type: import("vue").PropType<"success" | "info" | "warning" | "danger" | "link" | "primary">;
validator: (val: string) => boolean;
};
size: {
type: import("vue").PropType<"xxxs" | "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | "xxxl">;
validator: (val: string) => boolean;
};
width: StringConstructor;
activeColor: {
type: StringConstructor;
default: string;
};
inactiveColor: {
type: StringConstructor;
default: string;
};
borderColor: {
type: StringConstructor;
default: string;
};
activeValue: {
type: (BooleanConstructor | StringConstructor | NumberConstructor)[];
default: boolean;
};
inactiveValue: {
type: (BooleanConstructor | StringConstructor | NumberConstructor)[];
default: boolean;
};
name: {
type: StringConstructor;
default: string;
};
validateEvent: {
type: BooleanConstructor;
default: boolean;
};
id: StringConstructor;
loading: BooleanConstructor;
beforeChange: import("vue").PropType<() => boolean | Promise<boolean>>;
tabindex: {
type: (StringConstructor | NumberConstructor)[];
};
label: {
type: StringConstructor;
default: any;
};
}, {
namespace: import("vue").ComputedRef<string>;
input: import("vue").Ref<HTMLInputElement>;
inputId: import("vue").Ref<string>;
switchSize: import("vue").ComputedRef<"xxxs" | "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | "xxxl">;
core: import("vue").Ref<HTMLElement>;
switchDisabled: import("vue").ComputedRef<boolean>;
checked: import("vue").ComputedRef<boolean>;
handleChange: () => void;
switchValue: () => void;
focus: () => void;
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change" | "input")[], "update:modelValue" | "change" | "input", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
ariaLabel: StringConstructor;
modelValue: {
type: (BooleanConstructor | StringConstructor | NumberConstructor)[];
default: boolean;
};
value: {
type: (BooleanConstructor | StringConstructor | NumberConstructor)[];
default: boolean;
};
disabled: BooleanConstructor;
type: {
type: import("vue").PropType<"success" | "info" | "warning" | "danger" | "link" | "primary">;
validator: (val: string) => boolean;
};
size: {
type: import("vue").PropType<"xxxs" | "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | "xxxl">;
validator: (val: string) => boolean;
};
width: StringConstructor;
activeColor: {
type: StringConstructor;
default: string;
};
inactiveColor: {
type: StringConstructor;
default: string;
};
borderColor: {
type: StringConstructor;
default: string;
};
activeValue: {
type: (BooleanConstructor | StringConstructor | NumberConstructor)[];
default: boolean;
};
inactiveValue: {
type: (BooleanConstructor | StringConstructor | NumberConstructor)[];
default: boolean;
};
name: {
type: StringConstructor;
default: string;
};
validateEvent: {
type: BooleanConstructor;
default: boolean;
};
id: StringConstructor;
loading: BooleanConstructor;
beforeChange: import("vue").PropType<() => boolean | Promise<boolean>>;
tabindex: {
type: (StringConstructor | NumberConstructor)[];
};
label: {
type: StringConstructor;
default: any;
};
}>> & {
onChange?: (...args: any[]) => any;
"onUpdate:modelValue"?: (...args: any[]) => any;
onInput?: (...args: any[]) => any;
}, {
name: string;
label: string;
validateEvent: boolean;
disabled: boolean;
modelValue: string | number | boolean;
value: string | number | boolean;
borderColor: string;
loading: boolean;
activeColor: string;
inactiveColor: string;
activeValue: string | number | boolean;
inactiveValue: string | number | boolean;
}>> & Record<string, any>;
export default HlSwitch;
export * from './src/switch';