摘要:
let data = item.status == 0 ? '内容1' : item.status == 1 ? '内容2' : '其他的内容' 阅读全文
摘要:
// 定义一个数组 let arr = [[1, 2, 3], [7, 0, 5], [6, 9, 8]]; // 输出结果 console.log([...new Set(arr.flat(Infinity))].sort()) // [0, 1, 2, 3, 5, 6, 7, 8, 9] // 阅读全文
摘要:
在控制台输入: document.designMode = "on" 可直接编写当前网页。 阅读全文
摘要:
encodeURI方法不会对下列字符编码 ASCII字母、数字、~!@#$&*()=:/,;?+' encodeURIComponent方法不会对下列字符编码 ASCII字母、数字、~!*()' 所以encodeURIComponent比encodeURI编码的范围更大。 实际例子来说,encodeURIComponent会把 http:// 编码成 http%3A%2F%2F 而enco... 阅读全文
摘要:
<script> function Rem() { var docEl = document.documentElement, oSize = docEl.clientWidth / 7.5; if (oSize > 100) { oSize = 100; // 限制rem值 640 / 6.4 = 阅读全文
摘要:
<head> <script src="path/to/vconsole.min.js"></script> <script> var vConsole = new VConsole(); </script> </head> CDN地址:https://www.bootcdn.cn/vConsole 阅读全文
摘要:
使用vue-video-player在移动端微信内置浏览器打开,点击视频自动全屏问题。 参考官方 API 是 H5 同层浏览器的原因,可通过设置video属性来处理。 阅读全文
摘要:
记录,方便以后工作查阅 作者:左手121 来源:CSDN 原文: https://blog.csdn.net/qq_20282263/article/details/80859589 基本配置 git config --global user.name "name" : 配置用户名git confi 阅读全文
摘要:
阻止事件冒泡 window.enent ? window.enent.cancelBubble = true : e.stopPropagation() function stopBubble(event){ if(window.event){//兼容IE window.event.cancelBubble=true; }else{ event.stopPropagation(); } ... 阅读全文