<div id="app">
<h1 v-text="name"></h1>
</div>
Vue2
const app = new Vue({
el: '#app',
data() {
return {
name: '沐颖汐',
}
},
})
Vue3
const App = {
data() {
return {
name: '沐颖汐',
}
},
}
Vue.createApp(App).mount('#app')