摘要: 1.安装脚手架 npm install -g create-react-app (全局安装时应在cmd下执行命令) 2.创建项目 create-react-app myapp 3.启动 npm start 4.元素渲染 let h1 = <h1>hellow</h1> 使用jsx语法创建js元素对象 阅读全文
posted @ 2020-09-22 23:39 PiPai 阅读(812) 评论(0) 推荐(0) 编辑
摘要: 1.初始化 npm init(使用默认配置就行) npm i webpack webpack-cli -g npm install webpack webpack-cli -D 2.打包文件 开发环境:webpack ./src/index.js -o ./build/build.js --mode 阅读全文
posted @ 2020-09-07 00:27 PiPai 阅读(102) 评论(0) 推荐(0) 编辑
摘要: vue 1.static和assets的区别 assets和static两个都是用于存放静态资源文件。 放在static中的文件不会进行构建编译处理,也就不会压缩体积,在打包时效率会更高,但体积更大在服务器中就会占据更大的空间。 放在assets中的文件会进行压缩体积、代码格式化,压缩后会放置在st 阅读全文
posted @ 2020-07-10 23:39 PiPai 阅读(186) 评论(0) 推荐(0) 编辑
摘要: 1.键盘 (_ => [..."`1234567890-=~~QWERTYUIOP[]\\~ASDFGHJKL;'~~ZXCVBNM,./~"].map(x => (o += `/${b='_'.repeat(w=x<y?2:' 667699'[x=["BS","TAB","CAPS","ENTER 阅读全文
posted @ 2020-06-15 15:45 PiPai 阅读(201) 评论(0) 推荐(0) 编辑
摘要: 1.每个js文件视为一个模块 导出: let study = { name: 'jj', age: 18 } module.exports = study (也可直接exports = study) 导入: let study= require('./index.js') 2.文件模块 2.1.文件 阅读全文
posted @ 2020-06-14 23:55 PiPai 阅读(186) 评论(0) 推荐(0) 编辑
摘要: input[type=number] { &::-webkit-outer-spin-button, &::-webkit-inner-spin-button { -webkit-appearance: none; } -moz-appearance: textfield; } 阅读全文
posted @ 2020-05-29 10:42 PiPai 阅读(4945) 评论(0) 推荐(2) 编辑
摘要: 1.在vscode里面用右键复制代码然后粘贴到博客园编辑器里可以保留代码样式; 阅读全文
posted @ 2020-05-22 23:45 PiPai 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 1.安装 npm install -g @vue/cli 2.查看版本 vue -V 3.创建项目 vue create test创建时遇到一个脚本不能运行的问题:https://www.jianshu.com/p/9eb3cf854aa8 4.选择配置项(默认和手动) 这里对选择手动配置的一些说明 阅读全文
posted @ 2020-05-14 09:43 PiPai 阅读(292) 评论(0) 推荐(0) 编辑
摘要: 1.单行文本溢出 overflow: hidden; text-overflow:ellipsis; white-space: nowrap; 2.多行文本溢出 display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clam 阅读全文
posted @ 2019-12-05 15:44 PiPai 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 内容取自:https://www.cnblogs.com/lulushow/p/6873278.html 为行内元素画长宽可变化的居中分隔线 1、采用display:inline-block样式 这个属性通俗一点的解释就是让块级元素可以在一行显示。既是块级元素又可以在同一行显示就可以设置displa 阅读全文
posted @ 2019-12-04 17:35 PiPai 阅读(472) 评论(0) 推荐(0) 编辑