关于清空cookie遇到的问题

       logout() {
            this.$axios.get('/media/logout').then(() => {
                  this.delCookie();
location.reload();
              
            })
        },

为啥会点击两次才会退出

将位置互换之后就点击一次退出登录就行

 logout() {
            this.$axios.get('/media/logout').then(() => {
                location.reload();
                this.delCookie();}
原文地址:https://www.cnblogs.com/zaco/p/13365160.html