上一页 1 2 3 4 5 6 ··· 13 下一页
摘要: filenameHashing用来配置打包生成的文件是否带hash值后缀,该值默认为true,在模式为production的时候,打包出的js和css文件会自动添加hash值后缀。但是在当前模式为development的时候,就算该值为true,打包出的js文件不带hash值(css文件仍然受该值控 阅读全文
posted @ 2022-07-04 20:40 ZJTL 阅读(1162) 评论(0) 推荐(0) 编辑
摘要: 面试中经常被问到的知识点! function foo(){ var local = 1 function bar(){ local++ return local } return bar } var func = foo() func() 这就是闭包,“定义在一个函数内部的函数” 先看这篇,简单易懂 阅读全文
posted @ 2022-06-27 19:52 ZJTL 阅读(24) 评论(0) 推荐(0) 编辑
摘要: BFC(Block Formatting Context)块格式化上下文 同一BFC的块级元素之间会发生外边距折叠(Margin collapsing) CSS中的BFC是什么?怎么用? 阅读全文
posted @ 2022-06-23 19:50 ZJTL 阅读(13) 评论(0) 推荐(0) 编辑
摘要: 使用terser去除console npm install terser-webpack-plugin -D vue.config.js 文件中加入如下代码 module.export = { configureWebpack: (config)=>{ if(process.env.NODE_ENV 阅读全文
posted @ 2022-06-09 20:19 ZJTL 阅读(279) 评论(0) 推荐(0) 编辑
摘要: 在项目中,经常会在本地编译一些代码,自己还在编译的代码并不想提交,此时,你可以利用git这些指令来提交指定文件的代码 1. git status -s 查看仓库状态 2. git add src/pages/文件名 添加需要提交的文件名(加路径,参考git status 打印出来的文件路径) 3. 阅读全文
posted @ 2022-06-06 10:15 ZJTL 阅读(1762) 评论(0) 推荐(0) 编辑
摘要: 一、逻辑运算符 &&(短路与) 特点:只要碰到了false或者等价于false的就短路,只要短路了就不会继续往后执行了。如果短路了,得到造成短路的这个值,如果不短路,得到的是第二个值 console.log( true && true ); // true console.log( 123 && ' 阅读全文
posted @ 2022-05-26 20:30 ZJTL 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 1.先检查node版本 2.卸载vue-cli2,安装vue-cli3 npm uninstall vue-cli -g // 卸载1.x 或 2.x版本 npm install -g @vue/cli // vue-cli3需要nodeJs ≥ 8.9 vue -V // 检查vue版本号 3.新 阅读全文
posted @ 2022-05-18 20:11 ZJTL 阅读(62) 评论(0) 推荐(0) 编辑
摘要: 手机号码格式校验 reg = /^(13[0-9]|14[0-9]|15[0-9]|16[0-9]|17[0-9]|18[0-9]|19[0-9])\d{8}$/ 手机号加密 telEncrypt(val){ let phone = String(val) let reg = /(\d{3})\d{ 阅读全文
posted @ 2022-05-17 20:22 ZJTL 阅读(273) 评论(0) 推荐(0) 编辑
摘要: vue跳转外部链接 // 这个方法会新打开一个页面窗口 window.open(routeUrl, '_blank') // 这个只能在原来页面跳转。不会新开窗口 window.location.href = routeUrl window.location.replace(routeUrl) 阅读全文
posted @ 2022-05-16 15:45 ZJTL 阅读(1397) 评论(0) 推荐(0) 编辑
摘要: vue框架提供了自身的状态管理工具vuex 1.入口文件main.js,引入store vue实例中 2.store文件夹下的目录 3.store文件下index.js的内容 4.getters里的内容,可以数据处理 5.user.js里的内容 6.once值的使用 this.$store.stat 阅读全文
posted @ 2022-04-26 20:55 ZJTL 阅读(410) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 13 下一页