原因是vue2和vue3写法不对
正确是
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<script type="text/javascript" src="https://unpkg.com/vue@next"></script>
</head>
<body>
<div id="app">
{{message}}
</div>
<script>
Vue.createApp({
data() {
return {
message:'dadas'
}
}
}).mount('#app')
</script>
</body>
</html>
文章来自 www.96net.com.cn
- constructor TypeError Uncaught 错误 vueconstructor typeerror uncaught错误 properties typeerror undefined uncaught addeventlistener typeerror uncaught property typeerror undefined uncaught property javascript typeerror uncaught function typeerror countable uncaught argument emitsoptions properties typeerror uncaught insertadjacenthtml typeerror uncaught property uncaught错误runtime项目 typeerror callable错误object