- writeImage 호출시 await 추가
This commit is contained in:
parent
bed77ba12c
commit
cb9d1128b7
@ -509,7 +509,7 @@ export function useCanvas(id) {
|
|||||||
* @param {string} title - 저장할 이미지 이름
|
* @param {string} title - 저장할 이미지 이름
|
||||||
*/
|
*/
|
||||||
const saveImage = async (title = 'canvas') => {
|
const saveImage = async (title = 'canvas') => {
|
||||||
writeImage('testqq', canvas?.toDataURL('image/png').replace('data:image/png;base64,', '')).then(res => {
|
await writeImage(title, canvas?.toDataURL('image/png').replace('data:image/png;base64,', '')).then(res => {
|
||||||
console.log('success', res)
|
console.log('success', res)
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
console.log('err', err)
|
console.log('err', err)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user