给div设置一个v-show,当点击叉号按钮时,将v-show控制div显示的属性设置为false即可
<div class="dia" v-show="showDiaBox">
<div class="bigtitle">
<span class="lefttitle">模型基础属性</span>
<span class="closeicon" @click="closeDiaBox">
<i class="el-icon-circle-close" style="font-size: 24px"></i>
</span>
</div>
</div>
export default {
data(){
return{
showDiaBox: true
}
},
methods: {
closeDiaBox() {
this.showDiaBox = false
}
}
}