HTML
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>vuedemo</title>
</head>
<body>
<div id="app"></div>
</body>
</html>
VUE
<template>
<div :title="hello">
{{ hello }}//渲染文本
<p v-html="hello"></p> //渲染文本
<p v-text="hello"></p> //渲染文本
{{ num + 1 }} //数字渲染
{{ status ? "成功" : "失败"}}//渲染数据
</div>
</template>
<script>
export default{
data (){
return{
hello:"<span>我是vue哥</span>",
num:1,
status:true
}
}
}
</script>
JS
//引入vue框架
import Vue from 'vue'
import App from './App'
new Vue({
el:'#app',
render: function (h){
return h(App)
}
})