深拷贝
摘要:export const deepClone = (source)=>{ if (!source && typeof source !== 'object') { throw new Error('error arguments', 'deepClone') } const targetObj =
阅读全文
posted @
2022-07-28 14:05
dandanyajin
阅读(9)
推荐(0) 编辑
vue 实现点击全屏和退出全屏
摘要:1 mounted() { 2 // 监听窗口大小改变,this.isScreenFull的值为是否全屏,若是则true,反之false 3 window.onresize = () => { 4 this.isScreenFull = document.fullscreenElement || d
阅读全文
posted @
2022-07-27 10:52
dandanyajin
阅读(728)
推荐(0) 编辑
大数计算 BigInt()
摘要:当数据超过 Number.MAX_SAFE_INTEGER (2 ^ 53 - 1) 时的计算都是不精确的 例如: Math.pow(2, 53) Math.pow(2, 53) + 1 // true 这个时候就可以使用 BigInt() BigInt(Math.pow(2, 53)) BigIn
阅读全文
posted @
2022-07-26 11:38
dandanyajin
阅读(125)
推荐(0) 编辑
Object 方法整理
摘要:1 const information = { 2 3 name: "花花", 4 age: "32" 5 6 } 1 // 获取对象中所有key 2 Object.keys(information) //["name","age"] 不包含原型链 3 Object.getOwnPropertyNa
阅读全文
posted @
2022-07-26 11:14
dandanyajin
阅读(15)
推荐(0) 编辑
快速删除 大内存文件
摘要:1、文件地址栏输入cmd,然后回车键,打开cmd命令窗口 2、输入命令 :rmdir 输出文件地址 /s /q
阅读全文
posted @
2022-07-25 10:06
dandanyajin
阅读(580)
推荐(0) 编辑
滚动条样式
摘要:在全局设置一个类名 ,谁用谁加这个类名 .specialScrollBar{ // /滚动条样式/ ::-webkit-scrollbar {///滚动条整体样式/ width: 100%; ///高宽分别对应横竖滚动条的尺寸/ height: 10px; } ::-webkit-scrollbar
阅读全文
posted @
2022-07-09 16:59
dandanyajin
阅读(67)
推荐(0) 编辑
属性show-overflow-tooltip内容过多时,如何设置tooltip的宽度,让其多行显示
摘要:只能加在全局 <style lang="css"> .el-tooltip__popper{ max-width:50% } </style>
阅读全文
posted @
2022-07-09 16:56
dandanyajin
阅读(1991)
推荐(0) 编辑