isPhone() {
            if (document.body.clientWidth < 992) {
                this.isMobileFlag = true;
                this.openedleft = false;
                this.openedcontests = false;
            } else {
                this.isMobileFlag = false;
            }
            let self = this;
            window.addEventListener('resize', () => {
                window.fullWidth = document.documentElement.clientWidth;
                self.windowWidth = window.fullWidth; // 宽
                if (self.windowWidth < 992) {
                    self.isMobileFlag = true;
                    self.openedleft = false;
                    self.openedcontests = false;
                } else {
                    self.isMobileFlag = false;
                }
            });
        },
created() {
        // this.isPhone();
    },

By lxcss

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注