关于vue过滤不能使用this的解决方法

84 阅读1分钟

在import 下写入

 let that;
  beforeCreate: function () {
  that = this;
},

这样就能在filter内以that访问到this了