VUE将字符串当成函数来执行

2021-08-19
const methods = this.$options.methods
let methodName = 'func'
// call中this是vue的this,否则会有this指向问题,其他为函数的参数
methods[methodName].call(this, item)

文章来源于:https://blog.csdn.net/zlw_spider/article/details/109236006

{/if}