mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-12 06:47:15 +08:00
14 lines
533 B
JavaScript
14 lines
533 B
JavaScript
import { createApp } from 'vue/dist/vue.esm-bundler.js';
|
|
import NativeTableRenderer from '../../../vue/reports/native_table_renderer.vue';
|
|
import { mountWithTurbolinks } from '../helpers/turbolinks.js';
|
|
|
|
window.initReportNativeTableRenderer = (id) => {
|
|
const app = createApp({});
|
|
app.component('NativeTableRenderer', NativeTableRenderer);
|
|
mountWithTurbolinks(app, id);
|
|
};
|
|
|
|
const tables = document.querySelectorAll('.report-native-table');
|
|
tables.forEach((table) => {
|
|
window.initReportNativeTableRenderer(`#${table.id}`);
|
|
});
|