图片会无法显示,要在图片之前加上require

    1. <img :src="isPlay?require('@/assets/images/play.png'):require('@/assets/images/pause.png')"
    2. @click="handlePlay" alt="">
    3. <script>
    4. import Fade from "../components/Fade"
    5. export default {
    6. components:{
    7. Fade
    8. },
    9. data(){
    10. return{
    11. isShow:true,
    12. isPlay:true
    13. }
    14. },
    15. methods:{
    16. handlePlay(){
    17. this.isPlay=!this.isPlay
    18. }
    19. }
    20. }