解决办法:(引入如下代码)
<script src="https://cdn.jsdelivr.net/npm/vue@2.5.17/dist/vue.js"></script>
vueIndex.html文件代码:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<script src="https://cdn.jsdelivr.net/npm/vue@2.5.17/dist/vue.js"></script>
</head>
<body>
<div id="app">
<span v-if="seen">Now you see me.</span>
</div>
<script src="vueIndex.js"></script>
</body>
</html>
vueIndex.js文件代码:
var app=new Vue({
el : '#app',
data:{
seen:true
}
})
用浏览器打开vueIndex.html,可以 直接查看效果
将seen:true改成seen:false试试效果