1.0.5 • Published 2 years ago
@teamix/quick-entry-card v1.0.5
快捷入口卡片
用于展示一些链接类快捷入口的卡片组件。
API
interface IProps extends CardProps {
dataSource: IEntry[];
col?: number;
}
参数名 | 说明 | 必填 | 类型 | 默认值 | 备注 |
---|---|---|---|---|---|
dataSource | 一个数组,字段见下方 IEntry | 是 | IEntry[] | ||
col | 定义快捷入口有几列,默认为 3 列 | 否 | number | 3 |
其他 API 与 Card 组件 相同(如 title、extra 等)。
IEntry
interface IEntry {
text?: string;
href?: string;
target?: string;
icon?: JSX.Element;
onClick?: () => void;
jsx?: JSX.Element; // jsx 属性存在时,上述属性均失效,直接渲染该属性
}
text、href 等属性用于描述一个快捷入口链接,你也可以使用 jsx 属性自定义要渲染的东西。