react.js - Ant-Design的antd.js如何引入浏览器页面(html)使用?
本文介绍了react.js - Ant-Design的antd.js如何引入浏览器页面(html)使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
问 题
-页面已经引入:
<script src="../build/react.js"></script>
<script src="../build/react-dom.js"></script>
<script src="../build/browser.min.js"></script>
<script type="text/javascript" src="../build/antd.js"></script>
<link rel="stylesheet" type="text/css" href="../build/antd.css">
-但是浏览器一直报错:
antd is not undefined!!
-问题:难道页面不能直接引入antd.js使用吗?
如果可以,应该怎么使用?
解决方案
为什么要这样单独一个一个的引入呢,antd不是提供了一个构建工具了吗。https://github.com/ant-design/antd-init
这篇关于react.js - Ant-Design的antd.js如何引入浏览器页面(html)使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文