refactor
This commit is contained in:
parent
c83c015357
commit
90a3137ed2
|
@ -91,10 +91,6 @@ function waitForDecode() {
|
|||
}
|
||||
}
|
||||
|
||||
watch(() => props.src, () => {
|
||||
waitForDecode();
|
||||
});
|
||||
|
||||
watch([() => props.width, () => props.height, root], () => {
|
||||
const ratio = props.width / props.height;
|
||||
if (ratio > 1) {
|
||||
|
@ -140,6 +136,10 @@ async function draw(transfer: boolean = false) {
|
|||
}
|
||||
}
|
||||
|
||||
watch(() => props.src, () => {
|
||||
waitForDecode();
|
||||
});
|
||||
|
||||
watch(() => props.hash, () => {
|
||||
draw();
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue