<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<style>
.active {
color: red;
}
</style>

<body>
<!-- 数据渲染界面 -->
<!-- 绑定表单元素 -->
<div id="abc">
<p :class="{active:isActive}">歌谣</p>
<button @click="isActive=!isActive">按钮</button>
</div>
<script src="./js/vue.js"></script>
<script>
var vm = new Vue({
//v-on里面的methods方法

el: '#abc',
//模板ajax返回的数据
data: {
isActive: true
},

methods: {


}
})
</script>
<!-- 列表渲染 -->
<!-- 1渲染数组 -->
<!-- 2c处理无数据的时候 -->
</body>

</html>

vue再读26-v-blink切换class练习_vue.js