How does vue get the height of the loaded picture?

<div class="file-wrapper">
    <img class="file-position" src="1.jpg" alt="" ref="imgSize" @onload="imgload">
</div>
mounted(){
    this.fileUrl = this.$route.query.file || ""
    //
    let clientHeight = document.documentElement.clientHeight || document.body.clientHeight;
    console.log(clientHeight);
    this.imgload();
},
        
methods:{
    imgload(){
        let imgSize = this.$refs["imgSize"].offsetHeight;
        console.log(imgSize);
    }
}

how do I get the height of the loaded picture (the width and height of the picture is unknown) the value obtained by imgSize is different from the real one?

Apr.07,2022

get the height of the picture after the page has been rendered


mounted(){
    this.$nextTick(() => {
        this.imgload();
    })
}

modify
although the dom above has been loaded, the request for image resources may not have been returned

mounted(){
    doucment.querySelector('flie-position').addEventListener('load', function () {
        this.imgload();
    })
}

I used js to modify the style to implement it. Thank you

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3615e-4d683.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3615e-4d683.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?