<!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="../js/vue.js"></script>
<style>
[v-cloak] {
color:red;
}
</style>
</head>
<body>
<div id="app">
<h1>{{message=='Mr.Door'}}</h1>
<h1 v-once>{{message=='Mr.Door'}}</h1>
<h1 v-text="message">haha</h1>
<div v-html="url">haha</div>
<h1 v-pre>{{message=='Mr.Door'}}</h1>
<h1 v-cloak>hi</h1>
</div>
<script>
setTimeout(()=>{
const app = Vue.createApp({
data() {
return {
message: 'Mr.Door',
url: '<a href="http://www.baidu.com">点击百度</a>'
}
},
methods: {
}
}).mount('#app')
},1000)
</script>
</body>
</html>