mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-23 22:01:20 -08:00
use async/await
This commit is contained in:
1 parent
facf8876b5
commit
e34d09a99c
9 files changed
+86
-102
No files matched your search
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user