1.0.1-alpha.5 • Published 9 months ago
@xrenders/data-render v1.0.1-alpha.5
中后台详情页解决方案,通过 schema 协议渲染页面
安装
npm i @xrenders/data-render --save
使用方式
函数组件
/**
* transform: true
* defaultShowCode: true
*/
import React from 'react';
import DataView from '@xrenders/data-render';
const data = {
"creator": "清风徐来",
"relevanceCode": "421421",
"desc": "浙江省杭州市工专路",
"create-time": "2019-10-10",
"effective-date": "2019-10-10 ~ 2020-10-31",
"safety": {
"name": "Test demo 001",
"app": "中后台详情页",
"mode": "代码包",
"yum": "244444390482344744484889",
"fore": "23"
},
}
const schema = [
{
"widget": "FDescriptions",
"column": 3,
"items": [
{
"label": "创建人",
"dataKey": "creator"
},
{
"label": "关联单据",
"dataKey": "relevanceCode"
},
{
"label": "单据备注",
"dataKey": "desc"
},
{
"label": "创建时间",
"dataKey": "create-time"
},
{
"label": "生效日期",
"dataKey": "effective-date"
}
]
}
]
export default () => {
return (
<DataView schema={schema} data={data} />
);
}
1.0.0-alpha.9
10 months ago
1.0.0-alpha.8
10 months ago
1.0.1-alpha.2
10 months ago
1.0.1-alpha.1
10 months ago
1.0.0-alpha.10
10 months ago
1.0.1-alpha.5
9 months ago
1.0.1-alpha.4
10 months ago
1.0.1-alpha.3
10 months ago
1.0.0-alpha.11
10 months ago
1.0.0-alpha.7
10 months ago
1.0.0-alpha.6
10 months ago
1.0.0-alpha.5
10 months ago
1.0.0-alpha.4
10 months ago
1.0.0-alpha.3
10 months ago
1.0.0-alpha.2
10 months ago
1.0.0-alpha.1
11 months ago