摘要: <img :src="text" alt="" style="width:40%" @error="imgError"> imgError () { let img = event.srcElement; img.src = require('@/assets/defaultLogo.png'); 阅读全文
posted @ 2021-08-12 11:56 三只小熊sky 阅读(584) 评论(0) 推荐(0)
摘要: 1、Brackets Light Pro 2、One Dark Pro 3、Atom One Dark Theme 4、Atom One Light Theme 5、GitHub Theme 6、Hop Light 7、Monokai Light(个人喜欢的 深色主题) 8、Relax Eyes T 阅读全文
posted @ 2021-07-29 10:30 三只小熊sky 阅读(3660) 评论(0) 推荐(0)
摘要: 1.字符串数字转数字 var arr = [1, 2, 3, 4, 5]; arr.map(String); // ['1', '2', '3', '4', '5'] 2.数字转字符串数字 var arr2 = ['1', '2', '3', '4', '5'] arr2.map(Number); 阅读全文
posted @ 2021-07-28 14:06 三只小熊sky 阅读(94) 评论(0) 推荐(0)
摘要: 注意注意....... 所有的前提是:给添加伪类的元素添加position: relative; 背景色的箭头: content: ''; position: absolute; top: 14px; right: 6px; width: 0; height: 0; border: 8px soli 阅读全文
posted @ 2021-07-17 10:45 三只小熊sky 阅读(526) 评论(0) 推荐(0)
摘要: border: 1px solid #fff; box-shadow: 0 0 1px 1px #aaa, 3px 0 5px 0 #aaa, 0 4px 7px 0 #aaa; 阅读全文
posted @ 2021-07-15 14:15 三只小熊sky 阅读(21) 评论(0) 推荐(0)
摘要: 原始方法: location.reload(); vue自带的路由跳转: this.$router.go(0);用过的人都知道,前两者都是强制刷新页面,会出现短暂的闪烁,用户体验效果不好。所以,我们选择第三种方式: 3. 首先在App里面写下如下代码: <template> <div id="app 阅读全文
posted @ 2021-07-01 11:43 三只小熊sky 阅读(58) 评论(0) 推荐(0)
摘要: 使用菜单栏进行路由跳转有几个注意点: 1. 在el-menu加上router 2. index必须绑定路由的path,参考上面的例子,'/'不能少 3. default-active设为当前路由(this.$route.path),这样在路由变化的时候,对应的menu-item才会高亮。 阅读全文
posted @ 2021-06-26 09:27 三只小熊sky 阅读(1561) 评论(0) 推荐(0)
摘要: 首先,安装插件:Vetur,ESLint,Prettier 然后,打开设置文件:settings.json 设置完后,ctrl+s 自动格式化去掉红线 { "sync.gist": "7f58d878baccb6292df82aaacbe07902", "sync.autoDownload": tr 阅读全文
posted @ 2021-06-19 09:27 三只小熊sky 阅读(4272) 评论(0) 推荐(0)
摘要: let arr = ['1','55','88','4','9']; Math.max.apply(null, arr) Math.min.apply(null, arr) 阅读全文
posted @ 2021-06-08 16:59 三只小熊sky 阅读(57) 评论(0) 推荐(0)
摘要: / //根据id去重 var obj = {}; this.majorCheckbox = this.majorCheckbox.reduce(function (item, next) { obj[next.id] ? '' : obj[next.id] = true && item.push(n 阅读全文
posted @ 2021-06-05 17:31 三只小熊sky 阅读(88) 评论(0) 推荐(0)