vue 点击按钮弹窗,点击关闭按钮关闭弹窗。

<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的功能热更新哦!

猜你喜欢

转载自www.cnblogs.com/chen527/p/9639927.html