Vue动态绑定内联样式( v-bind:style )

  1. <button @click="change" type="button">改变Box大小

data(){
    return {
        imgStyle:{

        }
    }
},
computed:{
    imgStyle(){
        return {
           paddingBottom:(this.singleItemObj.height/this.singleItemObj.width).toFixed(2)*100+'%'

        }

    }
},

vue 3 获取proxy 对象的值需序列化

 this.nftInfo=JSON.parse(JSON.stringify(data))
posted @ 2023-02-08 18:48  我是个假前端~~~  阅读(121)  评论(0)    收藏  举报