vue.extend 构造器怎么引用外部js方法

怎么在vue.extend 构造器中引用外部js 方法,就是 import {getAppFormList} from 'xxxx.js', 现在只能在main 中编写全局方法才可以调用到,见下方代码,button 点击时间无法调用外部 getAppFormList方法

// 创建构造器
var Profile = Vue.extend({
  template: '<button @click="onLoadUserData">加载明细</button><p>{{firstName}} {{lastName}} aka {{alias}}</p>',
  data: function () {
    return {
            id:1,
      firstName: 'Walter',
      lastName: 'White',
      alias: 'Heisenberg'
    }
  }, methods: {
    onLoadUserData() {
      if (this.id > 0)
        getAppFormList(this.id).then(res => {
          const rv = res.data;
          this.listData = rv.data.records;
        });
    }
})
// 创建 Profile 实例,并挂载到一个元素上。
new Profile().$mount('#mount-point')
   let parseStrToFunc = new Function(script)();
    let {test} = require('@/utils/validate');
    // 装载当前方法
    data.test=test
    parseStrToFunc.data = function () {
      return data
    }
    // 装载自定义页面
    parseStrToFunc.template = template;
    let com = Vue.extend(parseStrToFunc)

    //使用
    this.test(111)

https://www.cnblogs.com/sunyang-001/p/11099759.html