start_sf5_project_reboot/app/assets/vue/index.js
2022-10-02 01:30:36 +02:00

17 lines
355 B
JavaScript

import { createApp } from 'vue'
import App from './components/App.vue'
const div = document.querySelector('div#app');
console.log(div);
const vue = createApp({
template: `<app :dataset="this.dataset" ></app>`,
data() {
return {
dataset: JSON.parse(div.dataset.app),
}
},
})
.component('app', App)
.mount('#app');