mounted() {
    let self = this;
    this.screenWidth = document.body.clientWidth; //767
    this.screenHeight = document.body.clientHeight;//350
    window.onresize = () => {
        return (() => {
            this.screenWidth = document.body.clientWidth;
            this.screenHeight = document.body.clientHeight;
            if(this.screenWidth<=767 & this.screenHeight<=350) {
               self.seen = true;
               self.peen = false;
                $(document).ready(function(){
                    $(".homeMenu").click(function(){
                        $(".panel").slideToggle("fast")
                    });
                });
            }else{
                self.seen = false;
                self.peen = true;
            }
        })();
    };
}
Logo

前往低代码交流专区

更多推荐