import * as React from 'react'; import { ComponentStory, ComponentMeta } from '@storybook/react'; import { Grid } from '@alife/cn-ui'; import { OPCard, OPTag } from '../../src/index'; import './card.story.scss'; const { Row, Col } = Grid; export default { title: '组件/数据展示/OPCard', component: OPCard, } as ComponentMeta; const Card: ComponentStory = (args): JSX.Element => (

卡片大小

文本卡片

图片卡片

颜色分类

包材信息

商品防护信息

重点信息

类型

单一文本

带标题文本

指定文字大小-24px

状态

选中

禁用

标题Tag

简单文本卡片高度

单行

多行

卡片最大高:maxHeight

组合文本

上下布局

正常 不正常 ), }, ]} maxHeight={true} />

左右布局,label宽度可自定义

泡沫箱

{[ { label: '泡沫箱-12873874' }, { label: '泡沫箱-78324', selected: true }, { label: '泡沫箱-33874837' }, ].map(({ label, selected }) => (
{label}
))}
} />

文本/图片

单张图片

两张图片

条码(参考jsbarcode)

图片缩放:宽高等图

fit: contain-out (短边适应容器)

fit: contain-in (长边适应容器)

fit: width (宽度100%)

fit: height (高度100%)

图片缩放:宽图

fit: contain-out (短边适应容器)

fit: contain-in (长边适应容器)

fit: width (宽度100%)

fit: height (高度100%)

图片缩放:高图

fit: contain-out (短边适应容器)

fit: contain-in (长边适应容器)

fit: width (宽度100%)

fit: height (高度100%)

卡片操作

{ alert('点击查看大图'); }, }} /> ); export const 卡片 = Card.bind({});