官网

1
2
3
4
5
6
7
8
9
10
11
<script src="https://unpkg.com/vue@3"></script>
<script>
const { createApp } = Vue
createApp({
data(){
return {
message:'hello'
}
}
}).mount('#app')
</script>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<script type="importmap">
{
"imports":{
"vue":"https://unpkg.com/vue@3/dist/vue.esm-browser.js"
}
}
</script>
<script type="module">
import { createApp } from 'vue';
createApp({
data(){
return {
message:'hello'
}
}
}).mount('#app')
</script>