码迷,mamicode.com
首页 > 其他好文 > 详细

v-bind指令

时间:2018-01-30 19:49:24      阅读:107      评论:0      收藏:0      [点我收藏+]

标签:pos   pre   src   class   rip   bin   btn   tle   main   

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .btn{
            color: red;
        }
    </style>
</head>
<body>
<div id="app">
    <a v-bind:href="url" v-bind:class="{btn:isactive}">点我吧</a>

</div>

<script src="../lib/vue.js"></script>
<script src="js/main.js"></script>
</body>
</html>
var app = new Vue({
    el:"#app",
    data:{
        url:"http:baidu.com",
        isactive:true,
    }
})

 

v-bind指令

标签:pos   pre   src   class   rip   bin   btn   tle   main   

原文地址:https://www.cnblogs.com/52-qq/p/8386255.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!