账号密码登录
微信安全登录
微信扫描二维码登录

登录后绑定QQ、微信即可实现信息互通

手机验证码登录
找回密码返回
邮箱找回 手机找回
注册账号返回
其他登录方式
分享
  • 收藏
    X
    在线等 vue 控制显示隐藏
    25
    0

    <div class="section_content_coupon_right_btn" :data-id="row1.id" >

                    <span  v-bind:class="{active:arr[index]}" 
                        v-if="!isactive[index]" 
                        @click="getcoupons(index,$event)" 
                        :data-id="row1.id">{{btntext}}</span>
                    <span   v-if="isactive[index]">{{btntext1}}</span>
                </div>
                

    上面是页面代码
    下面是JS 方法

        getcoupons:function(index,event){
            //this.$set(app.isActive[index], index, true);
            console.log(app.isactive)
            console.log(index)
            let e=event;
            console.log(e);
            app.isactive[index]=[];
            app.isactive[index]=true;
            console.log(app.isactive)
            if(app.phone===""||app.email===""){
                app.getzz = true;
                app.getThisPath1 = true;
                let workId = e.currentTarget.dataset.id;
                 app.workId=workId;
                 return;
            }else if(app.phone!==""&&app.email!==""){
                app.getzz = false;
                app.getThisPath1 = false;
                let workId = e.currentTarget.dataset.id;
                 app.workId=workId;
                 /*app.isactive[index]=true;*/
                 app.query1(e);
                 return;
            }
        },

    这样写不行啊 有大神帮改改吗

    0
    打赏
    收藏
    点击回答
        全部回答
    • 0
    更多回答
    扫一扫访问手机版
    • 回到顶部
    • 回到顶部