index.js 465 B

123456789101112131415161718192021
  1. import Vue from 'vue';
  2. import component from './detail.vue'
  3. const detailElement = (reportid, reporttitle) => {
  4. return new Promise(() => {
  5. let custom = Vue.extend(component);
  6. let instance = new custom({
  7. data: {
  8. reportid: reportid,
  9. reporttitle: reporttitle
  10. }
  11. });
  12. instance.$mount();
  13. document.body.appendChild(instance.$el);
  14. })
  15. };
  16. export default detailElement