use async/await

This commit is contained in:
Harvey committed 2022-04-29 18:04:50 +08:00
1 parent facf8876b5
commit e34d09a99c
9 files changed
+86 -102

No files matched your search

+4 -5
View File
@@ -37,13 +37,12 @@ export default function thumbnails(options) {
}
}
proxy($progress, 'mousemove', (event) => {
proxy($progress, 'mousemove', async (event) => {
if (!loading) {
loading = true;
loadImg(option.thumbnails.url).then((img) => {
image = img;
isLoad = true;
});
const img = await loadImg(option.thumbnails.url);
image = img;
isLoad = true;
}
if (isLoad) {