download test
This commit is contained in:
parent
3f97a7179f
commit
a4e53ef9b9
|
@ -12,7 +12,7 @@ const _ = db.command
|
||||||
export async function login() {
|
export async function login() {
|
||||||
await auth.signInAnonymously();
|
await auth.signInAnonymously();
|
||||||
const loginState = await auth.getLoginState();
|
const loginState = await auth.getLoginState();
|
||||||
isLogin = loginState
|
isLogin = loginState;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getDownloadCount(callback) {
|
export function getDownloadCount(callback) {
|
||||||
|
|
|
@ -10,7 +10,7 @@ export function saveSvg(value, content) {
|
||||||
a.href = URL.createObjectURL(bl)
|
a.href = URL.createObjectURL(bl)
|
||||||
a.download = filename
|
a.download = filename
|
||||||
a.hidden = true
|
a.hidden = true
|
||||||
a.click()
|
// a.click()
|
||||||
}
|
}
|
||||||
|
|
||||||
export function saveImg(value, content, width, height) {
|
export function saveImg(value, content, width, height) {
|
||||||
|
@ -51,8 +51,8 @@ export function saveImg(value, content, width, height) {
|
||||||
let data = canvas.toDataURL('image/jpeg', 0.8);
|
let data = canvas.toDataURL('image/jpeg', 0.8);
|
||||||
a.setAttribute('href', data)
|
a.setAttribute('href', data)
|
||||||
a.setAttribute('target', 'download')
|
a.setAttribute('target', 'download')
|
||||||
a.setAttribute('download', filename);
|
// a.setAttribute('download', filename);
|
||||||
a.click();
|
// a.click();
|
||||||
|
|
||||||
resolve(data)
|
resolve(data)
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue