@opensig/opendesign
Version:
119 lines (118 loc) • 2.38 kB
JavaScript
const LinkSizeTypes = ["large", "medium", "small", "auto"];
const linkProps = {
/**
* @zh-CN 包含超链接指向的 URL 或 URL 片段
* @en-US Contains the URL or URL fragment pointed to by the hyperlink
*/
href: {
type: String
},
/**
* @zh-CN 指定在何处显示链接的资源
* @en-US Specify where to display the linked resource
*/
target: {
type: String
},
/**
* @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: [String, Object]
},
/**
* @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: Boolean,
default: false
},
/**
* @zh-CN 是否为loading状态
* @en-US Whether it is in the loading state
*/
loading: {
type: Boolean
},
/**
* @zh-CN 链接颜色
* @en-US Link color
* @default 'normal'
*/
color: {
type: String,
default: "normal"
},
/**
* @zh-CN 尺寸大小
* @en-US size
* @default 'auto'
*/
size: {
type: String,
default: "auto"
},
/**
* @zh-CN 是否禁用
* @en-US Whether to disable
*/
disabled: {
type: Boolean
},
/**
* @zh-CN 前缀图标
* @en-US Prefix icon
*/
icon: {
type: Object
},
/**
* @zh-CN 后缀
* @en-US Suffix
*/
suffix: {
type: Boolean
},
/**
* @zh-CN hover时是否显示背景
* @en-US Whether the background is displayed when hovering
*/
hoverBg: {
type: Boolean
},
/**
* @zh-CN hover时是否显示下划线
* @en-US Whether an underline is displayed when hovering
*/
hoverUnderline: {
type: Boolean,
default: true
},
/**
* @zh-CN 元素标签
* @en-US Element tag
* @default 'a'
*/
tag: {
type: String,
default: "a"
},
/**
* @zh-CN 全局配置是否生效
* @en-US Whether the global configuration takes effect
* @default true
*/
global: {
type: Boolean,
default: true
}
};
export {
LinkSizeTypes,
linkProps
};