pathToBase64
pathToBase64(path)
.then(base64 => {
console.log(base64)
})
.catch(error => {
console.error(error)
})
base64ToPath
base64ToPath(base64)
.then(path => {
console.log(path)
})
.catch(error => {
console.error(error)
})
首先将插件引入项目。按照image-tools - DCloud 插件市场上面的操作即可;