卡片 A

引入

import { CardA } from '@lhlyu/caviar'

例子

props

字段类型默认值说明
timestring,number0创建时间
titlestring''标题
hotnumber0热度
commentNumnumber0评论数
categorystring''分类
contentstring''内容/摘要
imgstring() => 'http://api.btstu.cn/sjbz/?lx=dongman&t=' + Math.random()封面
typestringleft主题类型: none,left,right,vertical

slot

字段说明
time创建时间
title标题
meta属性
default内容
btn按钮
cover封面

css 变量(设置前提: props.type = 'none')

css 变量说明
--card-a-height卡片的高度
--card-a-width卡片的宽度
--card-a-cover-height封面的高度
--card-a-cover-width封面的宽度
--card-a-info-padding内容块填充大小
--card-a-align文本的对齐方向: left,right,center
--card-a-direction布局的方向:row,row-reverse,column,column-reverse

最近更新: