element-plus
Version:
A Component Library for Vue 3
58 lines (57 loc) • 2.52 kB
TypeScript
import type { Component, ExtractPublicPropTypes, PropType } from 'vue';
import type Link from './link.vue';
export interface LinkProps {
/**
* @description type
*/
type?: 'primary' | 'success' | 'warning' | 'info' | 'danger' | 'default';
/**
* @description when underlines should appear
*/
underline?: boolean | 'always' | 'never' | 'hover';
/**
* @description whether the component is disabled
*/
disabled?: boolean;
/**
* @description same as native hyperlink's `href`
*/
href?: string;
/**
* @description same as native hyperlink's `target`
*/
target?: '_blank' | '_parent' | '_self' | '_top' | (string & NonNullable<unknown>);
/**
* @description icon component
*/
icon?: string | Component;
}
/**
* @deprecated Removed after 3.0.0, Use `LinkProps` instead.
*/
export declare const linkProps: {
readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "default" | "primary" | "success" | "warning" | "info" | "danger", unknown, undefined, boolean>;
readonly underline: import("element-plus/es/utils").EpPropFinalized<readonly [BooleanConstructor, StringConstructor], boolean | "always" | "never" | "hover", unknown, undefined, boolean>;
readonly disabled: BooleanConstructor;
readonly href: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
readonly target: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => string) | (() => string) | ((new (...args: any[]) => string) | (() => string))[], unknown, unknown, "_self", boolean>;
readonly icon: {
readonly type: PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | Component) & {}) | (() => string | Component) | ((new (...args: any[]) => (string | Component) & {}) | (() => string | Component))[], unknown, unknown>>;
readonly required: false;
readonly validator: ((val: unknown) => boolean) | undefined;
__epPropKey: true;
};
};
/**
* @deprecated Removed after 3.0.0, Use `LinkProps` instead.
*/
export type LinkPropsPublic = ExtractPublicPropTypes<typeof linkProps>;
export declare const linkEmits: {
click: (evt: MouseEvent) => boolean;
};
export type LinkEmits = typeof linkEmits;
export type LinkInstance = InstanceType<typeof Link> & unknown;
export interface LinkConfigContext {
type?: LinkProps['type'];
underline?: LinkProps['underline'];
}