17 lines
355 B
JavaScript
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');
|