UNPKG

@opensig/opendesign

Version:

<p align="center"><img src="../docs/public/opendesign-logo-light.png"/></p> <h1 align="center">opendesign</h1> <p align="center">一个 Vue 3 组件库</p> <p align="center"><b>皮肤可定制,使用 TypeScript</b></p>

136 lines (135 loc) 3.75 kB
import { ExtractPropTypes, PropType, Component } from 'vue'; import { DirectionT } from '../_utils/types'; export type CardDirectionT = DirectionT | 'hr'; export declare const CardCoverFitTypes: readonly ["cover", "contain", "fill", "none", "scale-down"]; export type CardCoverFitT = (typeof CardCoverFitTypes)[number]; export declare const CardHoverCursorTypes: readonly ["auto", "pointer"]; export type CardHoverCursorT = (typeof CardHoverCursorTypes)[number]; export declare const cardProps: { /** * @zh-CN 卡片方向('v'为竖向,'h'为横向,'hr'为反向横向) * @en-US Card direction('v' for vertical, 'h' for horizontal, 'hr' for reversed horizontal) * @default 'v' */ layout: { type: PropType<CardDirectionT>; default: string; }; /** * @zh-CN 封面图片url * @en-US Card cover image URL */ cover: { type: StringConstructor; }; /** * @zh-CN 封面长宽比 * @en-US Cover aspect ratio */ coverRatio: { type: NumberConstructor; }; /** * @zh-CN 封面填充方式 * @en-US Cover fit type * @default 'cover' */ coverFit: { type: PropType<CardCoverFitT>; default: string; }; /** * @zh-CN 图标 * @en-US Icon */ icon: { type: PropType<string | Component>; }; /** * @zh-CN title开头的行内图标 * @en-US Title prefix icon */ titleIcon: { type: PropType<string | Component>; }; /** * @zh-CN 标题 * @en-US Title */ title: { type: StringConstructor; }; /** * @zh-CN 标题行数(影响标题盒子高度) * @en-US Title row count (affects the height of the title box) */ titleRow: { type: NumberConstructor; }; /** * @zh-CN 标题最大行数(超过此行数会显示省略号) * @en-US Title maximum row count (exceeds this row count will show ellipsis) */ titleMaxRow: { type: NumberConstructor; }; /** * @zh-CN 详情 * @en-US Detail */ detail: { type: StringConstructor; }; /** * @zh-CN 详情行数(影响详情盒子高度) * @en-US Detail row count (affects the height of the detail box) */ detailRow: { type: NumberConstructor; }; /** * @zh-CN 详情最大行数(超过此行数会显示省略号) * @en-US Detail maximum row count (exceeds this row count will show ellipsis) */ detailMaxRow: { type: NumberConstructor; }; /** * @zh-CN 是否有鼠标悬停效果 * @en-US Whether the card has a hover effect */ hoverable: { type: BooleanConstructor; }; /** * @zh-CN 鼠标悬停时的光标样式 * @en-US Cursor style when hovering over the card * @default 'auto' */ cursor: { type: PropType<CardHoverCursorT>; default: string; }; /** * @zh-CN 封面盒子的类名(用来定制封面样式) * @en-US Class name for the cover box (used to customize the cover style) */ coverClass: { type: PropType<string | any[]>; }; /** * @zh-CN 跳转链接(该属性有值时,卡片会被渲染为链接) * @en-US Link URL (when this property has a value, the card will be rendered as a link) */ href: { type: StringConstructor; }; /** * @zh-CN 卡片尺寸是否跟随视口大小变化而变化 * @en-US Whether the card size changes with the viewport size */ noResponsive: { type: BooleanConstructor; }; }; export type CardPropsT = ExtractPropTypes<typeof cardProps>;