<div @click="btnfc()">點擊彈窗按鈕</div> <div v-show="show"> <div @click="hiddenShow()">關閉</div> </div>
new Vue({ el: '', data: { show:false, }, mounted: function () { }, methods: { //點擊彈窗 btnfc:function () { var that =this; that.show =true; },
//點擊關閉 hiddenShow:function () { var that = this; that.cshow = false; }, } }); }
樣式自己寫!!!!!!!!!!!!!!!!!!!!
最近在寫vue 項目,一起學習一起進步,我會把我自己工作中vue的功能熱更新哦!