随笔分类 - Vue
摘要:创建实例 实例相关配置 常用参数配置具体使用方法 拦截器 错误处理 取消请求
阅读全文
摘要:<template> <div class="home"> </div> </template> <script> // @ is an alias to /src import axios from 'axios'; export default { // 并发请求:同时多个请求,并统一处理返回值 name: 'axios2-3', created() { //axios.all()数组 //a
阅读全文
摘要:<template> <div class="home"> </div> </template> <script> // @ is an alias to /src /* get,post,put,patch,delete get:获取数据 post:新建,提交数据(表单提交,文件上传) put:更新数据(所有数据推送到后端) patch:更新数据(只将修改的数据推送到后端) delete:删除数
阅读全文
摘要:<template> <div class="main-content-container container-fluid h-100 px-4"> <d-row no-gutters class="h-100"> <d-col lg="3" md="5" class="auth-form mx-auto my-auto"> <d-card> <d-card-body> <!-- Logo -->
阅读全文
摘要:问题描述: 请求后端接口,返回验证码图片乱码。 根据乱字符+JFIF标记,确定是个JPEG文件的二进制流,而不是base64。 解决方法:
阅读全文
摘要:错误如图: 原因:ESLint推荐用ES6的Template String来拼接字符串,而不能用+号。 解决方法: 官方文档:https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/template_strings
阅读全文
摘要:点击一下 export default{ data(){ flag:true }, methods:{ edit(){ this.flag=false; }, input(){ this.flag=true; }, ...
阅读全文
摘要:原串:20052018 截取分割: 20/05/2018 slice()第一个参数代表开始位置,第二个参数代表结束位置的下一个位置,截取出来的字符串的长度为第二个参数与第一个参数之间的差;若参数值为负数,则将该值加上字符串长度后转为正值;若第一个参数等于大于第二个参数,则返回空字符串.
阅读全文
摘要:删除“node_modules”文件夹,删除package-lock.json,依次运行命令:npm install和npm run build,最后运行npm run dev。
阅读全文
摘要:A页面传递 B页面接收 修改router的index.js 如果还看不明白,参考:https://www.cnblogs.com/WQLong/p/7804215.html、https://blog.csdn.net/qq_15646957/article/details/78070862 反正我是
阅读全文
摘要:一个vue文件可以写多个<style></style>, 如果在style加上socped代表本组件的样式,不污染全局。 如果需要覆盖第三方组件样式,则不能加scoped,因此需要另写一个<style>.xxx-component{...}</style>,这里用一个大类包裹防止污染全局。 接着,用
阅读全文
摘要:1.打开cmd,在当前目录中运行: 2.src/main.js(红色的) 3.然后在.vue文件里就直接可以用了 样式请参考:http://element-cn.eleme.io/#/zh-CN/component/installation
阅读全文
摘要:错误提示: [vue-language-server] Elements in iteration expect to have 'v-bind:key' directives.Renders the element or template block multiple times based on
阅读全文

浙公网安备 33010602011771号