(vue)src根据条件绑定图片地址

(vue)src根据条件绑定图片地址


<el-image :src="dynamics==false ? leftImg1 : leftImg2" :fit="fit" class="leftImg1"></el-image>


data(){
	return {
		dynamics: false,
		leftImg1: require("@/assets/images/left/noSpeak.gif"),
        leftImg2: require("@/assets/images/left/screen.gif"),
	}
}

你可能感兴趣的:(VUE,CSS,vue.js,前端,javascript)