HTML代码
<div class="cpw-hd " style="width: 55px;">
<button @click="showInput()">
<i class="el-icon-caret-right"></i>
<div class="desclass">项目描述</div>
</button>
</div>
<div class="cpw-bd " id="pro_des" style="display:none;">
<textarea placeholder="请输入描述的内容" ></textarea>
</div>
js代码
showInput() {
if (document.getElementById("pro_des").style.display != "none") {
document.getElementById("pro_des").style.display = "none";
} else {
document.getElementById("pro_des").style.display = "block";
}
},