摘要: 五大浏览器 1、IE浏览器:Trident内核,也是俗称的IE内核; 2、Chrome浏览器:统称为Chromium内核或Chrome内核,以前是Webkit内核,现在是Blink内核; 3、Firefox浏览器:Gecko内核,俗称Firefox内核; 4、Safari浏览器:Webkit内核; 阅读全文
posted @ 2021-05-13 10:48 black_Crocodile 阅读(1448) 评论(0) 推荐(0)
摘要: npm地址 https://www.npmjs.com/package/qs 概述 将url中的参数转为对象; 将对象转为url参数形式 示例 import qs from 'qs'; 1.转为对象 const url = 'method=query_sql_dataset_data&project 阅读全文
posted @ 2020-10-10 15:34 black_Crocodile 阅读(282) 评论(0) 推荐(0)
摘要: let arr = [] getAllData(data) { for (let i = 0; i < data.length; i++) { arr.push({ departName: data[i].departName, id: data[i].id }) if(data[i].childr 阅读全文
posted @ 2020-09-30 15:38 black_Crocodile 阅读(305) 评论(0) 推荐(0)
摘要: 一、 let arr1 = [1,2,6,8,5,4,3] let arr2 = [6,11,9,10,5,4,3] let newArr = [] for (let i = 0; i < arr1.length; i++) { for (let j = 0; j < arr2.length; j+ 阅读全文
posted @ 2020-09-27 13:36 black_Crocodile 阅读(532) 评论(0) 推荐(0)
摘要: 数组项为简单类型 一、利用ES6 Set去重(ES6中最常用) var arr = [1,1,8,8,12,12,15,15,16,16]; function unique (arr) { return Array.from(new Set(arr)) } console.log(unique(ar 阅读全文
posted @ 2020-09-27 13:25 black_Crocodile 阅读(172) 评论(0) 推荐(0)
摘要: 原生JS实现复制 这种方式主要使用到了几个比较重要的知识点,分别是range、selection、execCommand,主要实现方式是通过range来选中我们需要复制内容的dom元素,然后通过selection来获取选中的范围,最后通过execCommand(‘copy’)来实现复制 Range 阅读全文
posted @ 2020-09-27 12:06 black_Crocodile 阅读(1735) 评论(0) 推荐(0)
摘要: Base64串传到服务器+号被替换,将base64编码后的数据再进行urlencode编码,然后再进行传递就可以了 imageABase64 = encodeURIComponent(imageABase64); 阅读全文
posted @ 2020-09-15 09:09 black_Crocodile 阅读(843) 评论(0) 推荐(0)
摘要: 使用FileReader 对象 1.FileReader 对象允许Web应用程序异步读取存储在用户计算机上的文件(或原始数据缓冲区)的内容,使用 File 或 Blob 对象指定要读取的文件或数据。 2.FileReader.readAsDataURL() 开始读取指定的Blob中的内容。一旦完成, 阅读全文
posted @ 2020-09-14 13:12 black_Crocodile 阅读(907) 评论(0) 推荐(0)
摘要: ##一、用法 document.defaultView.getComputedStyle(element[,pseudo-element]) 或者window.getComputedStyle(element[,pseudo-element]); 首先是有两个参数,元素和伪类。第二个参数不是必须的, 阅读全文
posted @ 2020-09-02 15:05 black_Crocodile 阅读(293) 评论(0) 推荐(0)
摘要: 需求:点击左侧文件夹树,自动勾选表格中的对应项 实现: 使用的API:rowSelection,用于进行选择功能的配置。 使用的参数:selections,自定义选择配置项。 computed: { rowSelection() { const { selectedRowKeys, dataSour 阅读全文
posted @ 2020-07-17 15:26 black_Crocodile 阅读(2581) 评论(0) 推荐(0)