Problems to be paid attention to in the vue project on the IE browser

1. Dynamically set the background image
code that does not display the image

<div class="photoBox" v-show="!ifCircle" :style="{backgroundImage:'url('+ info.avatar}"></div>

The code that can be displayed normally after modification, as for the reason, I don’t know

<div class="photoBox" :style="note"></div>

data () {
    
    
    return {
    
    
      note:{
    
    
        backgroundImage: "url(" + Cookies.get('webuseravatar') + ")",
      }
    }
  1. The imported external fonts report an error on IE, because IE9 and above only support eot fonts, so when importing fonts, you need to introduce multiple URLs
@font-face {
    
     
  font-family: 'DIN-Bold'; 
  src:url('DIN-Condensed-Bold.ttf'); 
  src:url('DIN-Condensed-Bold.eot?#iefix') format('DIN-Condensed-Bold.woff') format('woff'),
      url('DIN-Condensed-Bold.ttf') format('truetype'),
      url('DIN-Condensed-Bold.svg#webfontOTINA1xY') format('svg');
  font-weight: normal; 
  font-style: normal; 
}

Guess you like

Origin blog.csdn.net/weixin_44994372/article/details/102853957