start_sf5_project_reboot/app/assets/vue/index.js

17 lines
355 B
JavaScript
Raw Normal View History

2022-10-01 18:53:53 +00:00
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');