Luk*_*uke 2 javascript blueprint jsx reactjs react-jsx
我正在尝试使用React和Blueprint UI工具包呈现一个非常简单的表.
相对于组件的文档Table非常简单,但似乎我的代码不起作用.
import React from 'react';
import ReactDOM from 'react-dom';
import * as Blueprint from '@blueprintjs/core';
import { Cell, Column, Table } from '@blueprintjs/table';
const renderCell = (rowIndex: number) => {
return <Cell>{`$${(rowIndex * 10).toFixed(2)}`}</Cell>
};
var myTable = (
<Table numRows={10}>
<Column name="Dollars" renderCell={renderCell}/>
</Table>
);
ReactDOM.render(
myTable,
document.getElementById('myTable')
);
Run Code Online (Sandbox Code Playgroud)
下图显示了我得到的内容.我如何解决它?
小智 6
你包括blueprint.css和blueprint-table.css您的网页上?没有样式表,表格将无法正确呈现!
| 归档时间: |
|
| 查看次数: |
2415 次 |
| 最近记录: |