| | |
| | | .map(n => n.type === 'ImportDeclaration' ? { start: n.start, end: n.end, text: '' } |
| | | : { start: n.start, end: n.declaration.start, text: 'globalThis.component = ' }) |
| | | for (const edit of edits.sort((a, b) => b.start - a.start)) source = source.slice(0, edit.start) + edit.text + source.slice(edit.end) |
| | | const context = vm.createContext({ vueQr: {}, PrintDialog: {}, limsTable: {}, mapGetters: () => ({}), getFileList }) |
| | | const context = vm.createContext({ vueQr: {}, PrintDialog: {}, ReportPreview: {}, limsTable: {}, mapGetters: () => ({}), getFileList }) |
| | | vm.runInContext(source, context) |
| | | return { ...context.component.data(), ...context.component.methods } |
| | | } |