项目中遇到 后端返回属性 而我需要根据属性 转换成对应的常量的功能 常量存于js文件中
想要使用 filter return this.$constant.XXX[属性名] 来进行转换 发现提示 $constant of undefined
filter 中不存在 this 想要用this 可以用 methods 或 computed 方法
项目中遇到 后端返回属性 而我需要根据属性 转换成对应的常量的功能 常量存于js文件中
想要使用 filter return this.$constant.XXX[属性名] 来进行转换 发现提示 $constant of undefined
filter 中不存在 this 想要用this 可以用 methods 或 computed 方法
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。