const moudule = {};
import vue from "vue";
import objView from './index.vue';

let configUtil = {
  vue,
  objView
}

const objInstance = configUtil.vue.extend(configUtil.objView);
const initInstance = (containter) => {
  // 实例化vue实例
  let currentInstance = new objInstance({i18n: window.$vueRoot._i18n});
  let dom = currentInstance.$mount().$el;
  containter.appendChild(dom);
  return currentInstance;
};

export function openObsUploadDialog(options) {
  let containter = document.body;
  let currentInstance = initInstance(containter);
  Object.assign(currentInstance, options);
  return currentInstance.handleShow(options);
};

export function uploadOBS(options) {
  let containter = document.body;
  let currentInstance = initInstance(containter);
  Object.assign(currentInstance, options);
  return currentInstance.singerUpload(options);
};



