@opensig/opendesign
Version:
119 lines (118 loc) • 3.09 kB
TypeScript
import { ExtractPropTypes, PropType, Component } from 'vue';
import { ColorT } from '../_utils/types';
export declare const LinkSizeTypes: readonly ["large", "medium", "small", "auto"];
export type LinkSizeT = (typeof LinkSizeTypes)[number];
export declare const linkProps: {
/**
* @zh-CN 包含超链接指向的 URL 或 URL 片段
* @en-US Contains the URL or URL fragment pointed to by the hyperlink
*/
href: {
type: StringConstructor;
};
/**
* @zh-CN 指定在何处显示链接的资源
* @en-US Specify where to display the linked resource
*/
target: {
type: PropType<"_blank" | "_parent" | "_self" | "_top">;
};
/**
* @zh-CN 路由跳转对象。当使用该参数时,OLink 会渲染为 RouterLink 组件
* @en-US Route jump object. When using this parameter, OLink will render as a RouterLink component
* @since 1.2.4
*/
to: {
type: PropType<string | Record<string, unknown>>;
};
/**
* @zh-CN 路由跳转时,是否覆盖浏览器历史记录。该参数会作为 RouterLink 的 replace 属性
* @en-US Whether to replace the browser history when routing. This parameter will be used as the replace attribute of RouterLink
* @default false
* @since 1.2.4
*/
replace: {
type: BooleanConstructor;
default: boolean;
};
/**
* @zh-CN 是否为loading状态
* @en-US Whether it is in the loading state
*/
loading: {
type: BooleanConstructor;
};
/**
* @zh-CN 链接颜色
* @en-US Link color
* @default 'normal'
*/
color: {
type: PropType<ColorT>;
default: string;
};
/**
* @zh-CN 尺寸大小
* @en-US size
* @default 'auto'
*/
size: {
type: PropType<LinkSizeT>;
default: string;
};
/**
* @zh-CN 是否禁用
* @en-US Whether to disable
*/
disabled: {
type: BooleanConstructor;
};
/**
* @zh-CN 前缀图标
* @en-US Prefix icon
*/
icon: {
type: PropType<Component>;
};
/**
* @zh-CN 后缀
* @en-US Suffix
*/
suffix: {
type: BooleanConstructor;
};
/**
* @zh-CN hover时是否显示背景
* @en-US Whether the background is displayed when hovering
*/
hoverBg: {
type: BooleanConstructor;
};
/**
* @zh-CN hover时是否显示下划线
* @en-US Whether an underline is displayed when hovering
*/
hoverUnderline: {
type: BooleanConstructor;
default: boolean;
};
/**
* @zh-CN 元素标签
* @en-US Element tag
* @default 'a'
*/
tag: {
type: StringConstructor;
default: string;
};
/**
* @zh-CN 全局配置是否生效
* @en-US Whether the global configuration takes effect
* @default true
*/
global: {
type: BooleanConstructor;
default: boolean;
};
};
export type LinkPropsT = ExtractPropTypes<typeof linkProps>;