您的位置:首页 > 其它

iview Badge组件count传值

2017-06-16 16:37 267 查看

Badge 徽标数

概述

 #
主要用于通知未读数的角标,提醒用户点击。

<style scoped>

    .demo-badge{

        width: 42px;

        height: 42px;

        background: #eee;

        border-radius: 6px;

        display: inline-block;

    }

</style>

<template>

    <Badge count="3">

        <a href="#" class="demo-badge"></a>

    </Badge>

</template>

<script>

    export default {

        

    }

</script>
count是代表个数,如果要动态传值,可以使用:count="value" 

例如 

<ul>

                                        <li v-for="f in friend">

                                        <a href="#">

                                            <div style="float: left">

                                                <img src="../../img/user2.png" alt="">

                                            </div>

                                            <div style="float: left">

                                                <p style="font-size: 14px;color: #333;margin-top: 6px;margin-left: 10px;" >
{{f.displayName}}</p>

                                                <span style="font-size: 12px;color: #a6a6a6;margin-top: 6px;margin-left: 10px;" v-
if="f.signaTure ==null">还没有签名!</span>

                                                <span style="font-size: 12px;color: #a6a6a6;margin-top: 6px;margin-left: 10px;" v-
else="f.signaTure !=null">{{f.signaTure}}</span>

                                            </div>

                                            <div style="float: right;margin-top: 16px;margin-right: 10px;" >

                                                <Badge :count="f.tourNumber">

                                                    <a href="#" class="demo-badge"></a>

                                                </Badge>

                                            </div>

                                        </a>

                                        </li>

                                    </ul>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: