當前位置:編程學習大全網 - 網站源碼 - ant.design能不能直接編譯成瀏覽器直接引用便可用

ant.design能不能直接編譯成瀏覽器直接引用便可用

肯定是可以的,但是官方不建議這樣做,但如果題主真想這麽做的話可以按照下面方法:

1. 下載並編譯ant-design

git clone /ant-design/ant-design.git

cd ant-design

npm i --registry=/?component/console-polyfill/0.2.2/index.js,component/es5-shim/4.1.14/es5-shim.min.js,component/es5-shim/4.1.14/es5-sham.min.js,component/html5shiv/3.7.2/html5shiv.min.js,g/component/media-match/2.0.2/media.match.min.js"></script>

<script src="./node_modules/react/dist/react.js"></script>

<script src="./node_modules/react-dom/dist/react-dom.js"></script>

<script src="./dist/antd.js"></script>

</head>

<body>

<div id="components-calendar-demo-basic"></div>

<script>

(function(){

'use strict';

function onPanelChange(value, mode) {

console.log(value, mode);

}

ReactDOM.render(React.createElement(antd.Calendar, {

onPanelChange: onPanelChange

}), document.getElementById('components-calendar-demo-basic'));})();

</script>

</body>

</html>

  • 上一篇:mysql create function作用是什麽?
  • 下一篇:基於小波包的圖像壓縮源碼是什麽
  • copyright 2024編程學習大全網