Introduce pictures in the vuecli project

Before :src, you need to add: to bind, and then call
script to import
data to return data
Insert picture description here

<template>
  <div>
    <van-image width="100%" height="100%" fit="contain" :src="somelogo" />
  </div>
</template>

<script>
import logopicture from "@/assets/logo.jpg";
export default {
    
    
    name:"MineLogo",
    data(){
    
    
      return {
    
    
        somelogo:logopicture,
      }
    }


}
</script>

<style>

</style>

Guess you like

Origin blog.csdn.net/weixin_47021806/article/details/110960443