摘要: /** * 获取 url 里面的参数 * @param {string} url * @returns {Object} */ export function getQueryObject(url) { url = url == null ? window.location.href : url c 阅读全文
posted @ 2020-11-27 16:30 SaBoo 阅读(78) 评论(0) 推荐(0) 编辑
摘要: /** * 函数防抖 * @param {Function} func * @param {number} wait * @param {boolean} immediate * @return {*} */ export function debounce(func, wait, immediat 阅读全文
posted @ 2020-11-27 16:22 SaBoo 阅读(78) 评论(0) 推荐(0) 编辑
摘要: /** * 获取随机唯一字符串 * @returns {string} */ export function createUniqueString() { const timestamp = +new Date() + '' const randomNum = parseInt((1 + Math. 阅读全文
posted @ 2020-11-27 16:15 SaBoo 阅读(502) 评论(0) 推荐(0) 编辑
摘要: /** * 深拷贝 * @param {Object} source * @returns {Object} */ export function deepClone(source) { if (!source && typeof source !== 'object') { throw new E 阅读全文
posted @ 2020-11-27 16:07 SaBoo 阅读(162) 评论(0) 推荐(0) 编辑