router没有提供清空数据的方法。我们可以这样写

    1. this.$router.replace({path: '/login'});
    2. location.reload();