Import Picture2019-07-20 21:11

VueJS: Import Picture

引用图片

<script>
var logo = require('../assets/logo.png')
 
export default {
  data() {
    return {
      logo,
    };
  },
};
</script>
<el-col :span="12"  tag="img" :src="logo"  >
</el-col>

或者 

<img :src="logo">

这里用了 v-bind 因此直接写变量名就行

Powered by Remix
|
Designed by szhshp
|
Copyright © szhshp 2022