@cainiaofe/cn-ui-m
Version:
51 lines (50 loc) • 1.52 kB
JavaScript
import React from 'react';
import { CnMiniTable, CnCard, CnDemoPage, CnButton, CnButtonGroup, } from "../../..";
export var 基本 = function () {
var columns = [
{
title: '排名',
dataIndex: 'index',
width: 50,
fixed: 'left',
align: 'left',
},
{
title: '姓名',
dataIndex: 'name',
width: 50,
fixed: 'left',
align: 'left',
},
{
title: '年龄',
dataIndex: 'age',
width: 100,
align: 'left',
},
{
title: '地址',
dataIndex: 'address',
width: 100,
align: 'left',
},
{
title: '操作列',
dataIndex: 'operate',
align: 'left',
width: 100,
render: function () {
return (React.createElement(CnButtonGroup, null,
React.createElement(CnButton, { text: true }, "\u8BE6\u60C5")));
},
},
];
var data = [
{ index: 1, name: 'Jack', age: 28, address: 'some where' },
{ index: 2, name: 'Rose', age: 36, address: 'some where' },
];
return (React.createElement(CnDemoPage, { title: "\u57FA\u672C" },
React.createElement(CnCard, null,
React.createElement(CnMiniTable, { scroll: { x: 0 }, data: data, columns: columns }))));
};
export default { title: 'demo/CnMiniTable' };