Welink React-ui表单组件List
List
List(双行) UI 提供与WeLink规范一致的视图,包含:
带说明跳转
参数说明
Cell
名称 | 类型 | 默认值 | 说明 |
---|---|---|---|
access | bool | false | 是否需要箭头 |
list | bool | false | 是否需要内部上下间距格式 |
component | func | 传递组件替换单元格 | |
link | bool | false | 是否为连接 |
CellHeader、CellBody、CellFooter
参数 | 类型 | 默认值 | 说明 |
---|---|---|---|
primary | bool | false | 是否为主模块 |
import React from 'react';
import {
Cells, Cell, CellBody, CellBodyExplan, CellFooter
} from '@wecode/react-weui';
const iconBase64 = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAACgCAIAAAAErfB6AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3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gGBAMCAYEAwIRjAgGBAMCAYEA4IBwQgGBAOCAcGAYEAwIBjBgGBAMCAYPp//BBgAStflVPGsRa8AAAAASUVORK5CYII=';
const cellFooterStyle = {
display: 'inline-block',
width: '16px',
marginLeft: '12px',
verticalAlign: 'middle'
};
const cellBodyPStyle = { lineHeight: 1.5 };
const ListDemo = props => (
<section>
<Cells>
<Cell list>
<CellBody>
<p style={cellBodyPStyle}>
主文本,文本较多换行时,列表高度相应增高,文本与列表上下间距不变
</p>
<CellBodyExplan>此处是辅助说明文体,说明文本</CellBodyExplan>
</CellBody>
<CellFooter>
<img src={iconBase64} alt="" style={cellFooterStyle} />
</CellFooter>
</Cell>
<Cell list>
<CellBody>
主文本
<CellBodyExplan>
此处是辅助说明文体,说明文本,文本较多换行时,列表高度相应增高,文本与列表上下间距不变
</CellBodyExplan>
</CellBody>
<CellFooter>
<img src={iconBase64} alt="" style={cellFooterStyle} />
</CellFooter>
</Cell>
</Cells>
</section>
);
export default ListDemo;
- 点赞
- 收藏
- 关注作者
评论(0)