我有这个Vue插件
import Movement from './Movement'
const PolicyCanPlugin = {
install(Vue, {store}) {
Vue.prototype.$policyCan = (model, method) => {
// how can I call Movement.update_user() using the model(Movement) and method(update_user) variables
}
}
}
我想从已经导入(运动)的动态模型中调用动态方法
我想呼叫this.$policyCan('Movement', 'update_user')
并触发Movement.update_user()