赞
踩
这个插件中有个两种方法:
1. pathToBase64()图像路径转换为base64
2. base64ToPath()图像base64保存为文件
npm i image-tools --save
import { pathToBase64 } from 'image-tools'
let filePath = ''
pathToBase64(需要转的图片地址).then(e=>{
filePath = e
// console.log('base64',filePath);
})
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。