<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
</head>
<body>
<div id="app"></div>
<script>
const Root = {
data(){
return{
"message":"Vue好棒"
}
}
template:"<h1>我爱vue,{{message}}</h1>"
}
//创建vue实例
const app = Vue.createApp(Root)
//将实例在页面中挂载
app.mount("#app")
</script>
</body>
</html>
在jQuery项目中使用vue3
于 2022-12-14 10:47:57 首次发布