05 2020 档案
摘要:vue生产包: css放在一个文件下,图片在img文件夹下 通常我们使用img标签引入文件,npm run build 打包后 ,因为img为html标签,打包后他的路径是由index.html开始访问的,他走static/img/'图片名'是能正确访问到图片的 而我们写在css backgroun
阅读全文
摘要:1 arr.push() 从后面添加元素,返回值为添加完后的数组的长度 let arr = [1,2,3,4,5] console.log(arr.push(5)) // 6 console.log(arr) // [1,2,3,4,5,5] 2 arr.pop() 从后面删除元素,只能是一个,返回
阅读全文
摘要:在开发中,我们经常会将一些常用的代码块、功能块进行封装,为的是更好的复用。那么,被抽离出来独立完成功能,通过API或配置项和其他部分交互,便形成了插件。 函数库 Lodash https://github.com/lodash/lodash Underscore https://underscore
阅读全文
摘要:编程式导航 // 命名的路由 params 传参 取数据:this.$route.params.type this.$router.push({ name: 'user', params: { userId: '123' }}) // 路径传参,带查询参数,变成 /register?plan=pri
阅读全文