1.vue如果引用本地的vue.min.js 无效
<!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>vue实例</title>
<script src="/js/vue.min.js"></script>
</head>
<body>
<div id="root">
{{message}}
</div>
</body>
<script>
const app = Vue.createApp({
data(){
return {
message:'hello world'
}
},
methods:{
}
});
const vm = app.mount("#root");
</script>
</html>
2.template标签无效
<!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@next"></script>
</head>
<body>
<template id="item2">
<div>
<h1>template属性绑定元素去修改元素:{{message}}</h1>
</div>
</template>
</body>
<script>
window.getComputedStyle(template).display;
</script>
</html>