久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長(zhǎng)資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      vue.js怎么改變樣式

      vue.js改變樣式的方法:首先給元素定義ref屬性;然后通過(guò)js方法修改元素的樣式,代碼為【'background-color:#1F2429;width:66px'】;最后修改單一樣式時(shí)可直接使用樣式名稱(chēng)。

      vue.js怎么改變樣式

      【相關(guān)文章推薦:vue.js】

      • 該方法適用于所有品牌電腦

      vue.js改變樣式的方法:

      1、給元素定義ref屬性

       <el-button ref="btnClick" class="list_button" " @click="openClose"></el-button>

      2、通過(guò)js 方法修改元素的樣式 修改較多樣式時(shí)可使用cssText

      function openClose() {         this.isCollapse = !this.isCollapse           if (this.isCollapse) {             this.$refs.btnClick.$el.style.cssText =                 'background-color:#1F2429;width:66px';                     } else {             this.$refs.btnClick.$el.style.cssText =                 'background-color:#1F2429;width:140px';         }     }

      3、修改單一樣式時(shí)可直接使用樣式名稱(chēng)

      function openClose() {         this.isCollapse = !this.isCollapse           if (this.isCollapse) {             this.$refs.btnClick.$el.style.color = 'red';                     } else {             this.$refs.btnClick.$el.style.color = 'blue';         }     }

      相關(guān)學(xué)習(xí)推薦:javascript學(xué)習(xí)教程

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號(hào)-2    滬公網(wǎng)安備31011702889846號(hào)