const moudule = {};
import baseAttachment from '../../components/baseAttachment/index.vue';
import uploadDialog from "../../components/baseAttachment/uploadDialog";

// 定义插件对象
// vue的install方法，用于定义vue插件
moudule.install = function (Vue) {
  Vue.component(baseAttachment.name, baseAttachment);
  Vue.prototype.$baseFileDialog = function (options) {
    let a = Vue.extend(uploadDialog);
    let instance = new a({
      propsData: {
        ...options
      }
    });
    let dom = instance.$mount().$el;
    document.body.append(dom);
  }
};

export default moudule;
