Vue中如何绑定img的src
2018-11-12 本文已影响68人
陈怀哲
<div id='three_dot_view'>
<img class="dot_img " :src="circle_url_1">
<img class="dot_img " :src="circle_url_2">
<img class="dot_img " :src="circle_url_3">
</div>
<script>
export default {
name: "Login",
data() {
return {
circle_url_1: require("../../assets/login/正在进行_1.png"),
circle_url_2: require("../../assets/login/未进行.png"),
circle_url_3: require("../../assets/login/未进行.png"),
};
},
methods: {
sendCodeBtnAction: function() {
this.circle_url_1 = require("../../assets/login/正在进行_1.png");
this.circle_url_2 = require("../../assets/login/正在进行_1.png");
this.circle_url_3 = require("../../assets/login/未进行.png");
},
}
}
};
</script>