摘要: 调整图片组件封装: import './index.scss' const ZoomImage = (props) => { const imageStyle = { backgroundImage: `url(${props.url})` } return ( <> <div className= 阅读全文
posted @ 2021-02-05 16:06 Nyan 阅读(189) 评论(0) 推荐(0) 编辑
摘要: npm i sass-resources-loader --save-dev webpack.config.js添加配置: __dirname:当前文件路径 { test: sassRegex, exclude: sassModuleRegex, use: [...getStyleLoaders( 阅读全文
posted @ 2021-02-05 11:42 Nyan 阅读(238) 评论(0) 推荐(0) 编辑
摘要: npm install -g create-react-app npx create-react-app my-app 1.npm run eject 2.html计算 <script> !(function (win, doc) { function setFontSize() { var bas 阅读全文
posted @ 2021-02-05 08:58 Nyan 阅读(117) 评论(0) 推荐(0) 编辑