ldc-doux/resources/js/vuejs.js

24 lines
772 B
JavaScript
Raw Permalink Normal View History

2024-01-23 09:35:41 +01:00
import Vue, { createApp } from "vue";
import ProductsPictos from "./components/backend/ProductsPictos.vue";
2021-12-01 09:01:04 +01:00
2024-01-23 09:35:41 +01:00
const setupApp = (app) => {
app.config.globalProperties.window = window;
app.config.globalProperties.document = document;
};
2021-12-01 09:01:04 +01:00
2022-07-18 10:36:38 +00:00
/**
* Next, we will create a fresh Vue application instance and attach it to
* the page. Then, you may begin adding components to this application
* or customize the JavaScript scaffolding to fit your unique needs.
*/
2024-01-23 09:35:41 +01:00
for (let el of document.getElementsByClassName("products-pictos")) {
const app = createApp(ProductsPictos);
setupApp(app);
app.mount(el);
}
for (let el of document.getElementsByClassName("ranges-sub-ranges")) {
const app = createApp(RangesSubRanges);
setupApp(app);
app.mount(el);
2022-07-18 10:36:38 +00:00
}