How to realize cropping and proportional scaling of pictures in Vue

the company needs to rewrite Mini Program into H5, and one problem it encounters is the adaptation of img pictures.

  :
  

clipboard.png


clipboard.png


clipboard.png
https://developers.weixin.qq....


clipboard.png

  
   
  VUE?

Mar.28,2022

img {object-fit: cover;}


.image{
    background-size: cover;
    background-position: center 0;
}

cosnt image = new Image();
image.onload = ()=>{
  //   
  // overflow:hidden
};
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-1b3d187-413a9.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-1b3d187-413a9.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?