摘要:
/** * 文件流转换为url * @param {blob} data //文件流 */ export function getObjectURL(data) { var url = null if (window.createObjectURL !== undefined) { // basic 阅读全文
摘要:
/** * 判断数据是否是数组 返回true或false * @param {obj,array} data //obj or array */ export function isTypeof(data) { if (typeof Array.isArray 'function') { retur 阅读全文
摘要:
/** * 文件转为文件流 * @param {file} file //文件 */ export function getFileBlob(file) { var dataUrl var reader = new FileReader() reader.readAsDataURL(file) // 阅读全文