上一页 1 2 3 4 5 6 7 8 ··· 41 下一页

2021年12月26日

vs code 配置git path

摘要: "git.path": "D:/dev/git/bin/git.exe", "terminal.integrated.shell.windows": "D:/dev/git/bin/bash.exe", "git.autofetch": true, 阅读全文

posted @ 2021-12-26 14:46 水行者 阅读(275) 评论(0) 推荐(0) 编辑

2021年12月12日

axios解决跨域问题(vue-cli3.0)

摘要: axios解决跨域问题(vue-cli3.0) 阅读目录 一、什么是跨域 1、跨域 2、同源策略 3、跨域问题怎么出现的 二、使用 axios 演示并解决跨域问题(vue-cli3.0) 1、项目创建、与 axios 的使用 2、跨域问题重现 3、解决跨域问题 回到顶部 一、什么是跨域 1、跨域 指 阅读全文

posted @ 2021-12-12 15:26 水行者 阅读(3666) 评论(0) 推荐(0) 编辑

[Vue warn]: Error in render: "TypeError: Cannot read properties of undefined (reading 'state')"

摘要: 异常:[Vue warn]: Error in render: "TypeError: Cannot read properties of undefined (reading 'state')" 出现这个bug的原因是没在main.js中引入store.js并挂载在vue实例上 import Vu 阅读全文

posted @ 2021-12-12 10:46 水行者 阅读(18435) 评论(0) 推荐(1) 编辑

2021年12月11日

vue router-view 添加选中样式

摘要: 通过router的linkExactActiveClass 属性进行css样式绑定。 const router = createRouter({ history: createWebHashHistory(), routes, linkExactActiveClass:'active' }); 阅读全文

posted @ 2021-12-11 18:18 水行者 阅读(339) 评论(0) 推荐(0) 编辑

vs code vue扩展工具

摘要: Vue VSCode Snippets -快速生成代码 阅读全文

posted @ 2021-12-11 18:08 水行者 阅读(132) 评论(0) 推荐(0) 编辑

2021年12月3日

rem自适应

摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="wi 阅读全文

posted @ 2021-12-03 23:53 水行者 阅读(24) 评论(0) 推荐(0) 编辑

2021年11月25日

js 图片和文件 下载功能

摘要: download(src, fileName) { // //下载图片地址和图片名 // var image = new Image(); // // 解决跨域 Canvas 污染问题 // image.setAttribute("crossOrigin", "anonymous"); // ima 阅读全文

posted @ 2021-11-25 13:49 水行者 阅读(586) 评论(0) 推荐(0) 编辑

2021年10月28日

给定一个数组,将数组中的元素向右移动 k 个位置,其中 k 是非负数。

摘要: function arrayRight(arr, k) { k %= arr.length; while(k>0){ let tmp=arr[arr.length-1]; for(let i=arr.length-1;i>0;i--){ arr[i]=arr[i-1]; } arr[0]=tmp; 阅读全文

posted @ 2021-10-28 15:32 水行者 阅读(208) 评论(0) 推荐(0) 编辑

js 中怎么使 if(a?==1 && a== 2 && ?a==3) 返回 true?

摘要: toString / valueOf : 最直接的方案 let a = { i: 1, toString: function () { return a.i++; } } getter : 新式 var i = 0; with({ get a() { return ++i; } }) { if (a 阅读全文

posted @ 2021-10-28 14:54 水行者 阅读(235) 评论(0) 推荐(0) 编辑

2021年10月12日

vue input中on-blur赋值没有反应

摘要: vue input中on-blur赋值没有反应,并且再次输入时,显示上次输入的值,打印了一下数据显示已经赋值成功,但是没有显示,考虑应该是赋值没有刷新的问题,直接强制刷新:this.$forceUpdate() 一下就好了 阅读全文

posted @ 2021-10-12 11:34 水行者 阅读(412) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 8 ··· 41 下一页