我想用ant-design这个组件,但编写如下代码,浏览看不到效果,求指点。谢谢

M.J. 发布于 2016/05/08 10:10
阅读 5K+
收藏 0
我想用ant-design这个组件,但编写如下代码,浏览看不到效果,求指点。谢谢
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <script src="React/react.js"></script>
    <script src="React/react-dom.js"></script>
    <script src="React/JSXTransformer.js"></script>
    <title>Title</title>
</head>
<body>
<div id="ant-div"></div>

<script type="text/jsx">
    import { Button } from 'antd';

    ReactDOM.render(<div>
                <Button type="primary" size="large">大号按钮</Button>
                <Button type="primary">中号按钮(默认)</Button>
                <Button type="primary" size="small">小号按钮</Button>
            </div>
            ,document.getElementById('ant-div'));

</script>
</body>
</html>
加载中
0
A
Ahaddsfgsdf

引入样式:

import 'antd/dist/antd.css'; // or 'antd/dist/antd.less'
返回顶部
顶部