其他分享
首页 > 其他分享> > filter中的this

filter中的this

作者:互联网

项目中遇到 后端返回属性  而我需要根据属性 转换成对应的常量的功能  常量存于js文件中

想要使用 filter   return  this.$constant.XXX[属性名] 来进行转换  发现提示  $constant of undefined

filter 中不存在 this  想要用this 可以用 mehods 或 computed 方法

标签:存于,常量,filter,constant,想要,属性
来源: https://www.cnblogs.com/shirunfeng/p/15184608.html