index.vue

import { jsmethod } from 'test.js'
methods: {
    qwe(){}asd(){
       jsmethod(this.qwe)
    }
}

test.js

export function jsmethod(qwe){
    if (qwe) {
        qwe();
    }
}
Logo

Vue社区为您提供最前沿的新闻资讯和知识内容

更多推荐