摘要:
npm yarn pnpm 安装依赖 npm install yarn pnpm install npm install xx --save-dev yarn add xx --dev / -D pnpm add xx --dev / -D npm install xx --save yarn ad 阅读全文
摘要:
全局安装next.js npm install -g create-next-app 创建项目 npx create-next-app “项目名称“ 引入.css文件 可引入.css文件 安装 yarn add @zeit/next-css 配置文件 next.config.js const wit 阅读全文
摘要:
首先图片为什么 会变形 图片变形是因为 ctx.drawImage() 绘画图片的时候 给死了宽和高,所以不同尺寸的图片会因为 自己写死的宽高 而拉伸或者压缩,因此图片才会变形。 我的解决方案 重要属性 ctx.clip() 从原始画布中剪切任意形状和尺寸 之前画用户圆形头像用到了clip裁剪。 了 阅读全文
摘要:
安装 amfe-flexible cnpm install amfe-flexible -S 安装 px2rem-loader cnpm install px2rem-loader -D 在mian.js中引入 import 'amfe-flexible' 在vue.config.js中配置 mod 阅读全文
摘要:
项目中用到做进度条,参考 <view style="background: linear-gradient(45deg,#F9C058 25%,#FA7560 0,#FA7560 50%,#F9C058 0,#F9C058 75%,#FA7560 0);width: 100%;height: 200 阅读全文
摘要:
npm ls -g --depth=0 阅读全文
摘要:
准备 安装React npm install -g create-react-app 创建项目 脚手架 create-react-app demo 安装路由 react-router npm install --save react-router-dom 安装 redux react-redux r 阅读全文
摘要:
路由传参 带参的方式 第一种方式 通过 params 带参 刷新页面消失 这种方式传递过去的参数 刷新后容易消失 第二种方式 通过 query 带参 刷新页面不消失 阅读全文
摘要:
设置滚动条样式 ::-webkit-scrollbar { width: 3px; height: 3px; } ::-webkit-scrollbar-track { background: #f1f1f1; } ::-webkit-scrollbar-track:hover { backgrou 阅读全文