摘要:
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,height=device-height,initial-scale=1.0, 阅读全文
摘要:
/** * 全屏Hooks * @param {*} fullScreenEle 全屏的元素 * @returns */ export const useFullScreen = ({ fullScreenEle = document.documentElement }) => { /** * 遍历 阅读全文
摘要:
// 获取上传图片的宽高 function getUploadImgInfo(file) { return new Promise((resolve, reject) => { let fileReader = new FileReader() fileReader.readAsDataURL(fi 阅读全文
摘要:
1.彩带特效 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <title>Title</title> </head> <body></body> <script async="" type="text/javascr 阅读全文
摘要:
字符串转16进制 function strToHexCharCode(str) { if(str "") return ""; var hexCharCode = []; hexCharCode.push("0x"); for(var i = 0; i < str.length; i++) { he 阅读全文
摘要:
/* 自定义promise 1. 执行MyPromise构造函数,要立即执行executor 2. promise实例对象,内部有三种状态 初始化 pending 成功 resolved 失败 rejected 注意:状态只能修改一次 如果executor内部出错了,promise状态改成rejec 阅读全文
摘要:
var isWx = function () { return navigator.userAgent.toLowerCase().indexOf('micromessenger') !== -1; }; var isIos = function () { return /(iPhone|iPad| 阅读全文
摘要:
function blobToDataURL (blob) { return new Promise((resolve, reject) => { let reader = new FileReader() reader.addEventListener('load', () => { resolv 阅读全文
摘要:
export modifyImageSize = (path, maxWidth, maxHeight, callback) => { /* * @param path 【图片路径】 * @param maxWidth 【允许缩放的最大宽度】 * @param maxHeight 【 允许缩放的最大 阅读全文
摘要:
//下载后台返回的excel文件 export const exportExcel = (url, data = {}, name = 'bill', module = 'pay') => { $.get({ url: UrlPrefix[module] + url, data, xhrFields 阅读全文
摘要:
// 冒泡排序 function bubbleSort(arr) { for (let i = 0; i < arr.length - 1; i++) { for (let j = 0; j < arr.length - 1 - i; j++) { if (arr[j] > arr 阅读全文