Vue filters获取data中的数据

Vue filters获取data中的数据

beforeCreate(){
   _that = this;
},

在filters里就可以使用 _that

filters: {
   pathFilter: function (path) {
       if(_that.nickname==''){
           //昵称为空
       }
   }
}