位置:电子教程 > 小程序Weui在线教程 (如果看不到内容请使用360浏览器) 推荐学习资源
WEUI在微信小程序中的使用
项目框架的制作
栏目首页
weui基础组件
weui表单
weui 操作反馈相关
weui 导航 navbar 切换(类tab)使用教程
weui 搜索searchbar使用教程
当前阅读教程:小程序Weui在线教程 > weui Badge徽章使用教程
阅读(22555525)      收藏       赞(5685)      分享
上一篇: weui article文章使用指南教程 下一篇: weui flex的布局和样式教程

效果图

小白教程网www.2d5.net

image.png

wxml代码如下

<view class="page">
    <view class="page__hd">
        <view class="page__title">Badge</view>
        <view class="page__desc">徽章</view>
    </view>
    <view class="page__bd">
        <view class="weui-cells__title">新消息提示跟摘要信息后,统一在列表右侧</view>
        <view class="weui-cells weui-cells_after-title">
            <view class="weui-cell weui-cell_access">
                <view class="weui-cell__bd">单行列表</view>
                <view class="weui-cell__ft weui-cell__ft_in-access" style="font-size: 0">
                    <view style="display: inline-block;vertical-align:middle; font-size: 17px;">详细信息</view>
                    <view class="weui-badge weui-badge_dot" style="margin-left: 5px;margin-right: 5px;"></view>
                </view>
            </view>
        </view>
        <view class="weui-cells__title">未读数红点跟在主题信息后,统一在列表左侧</view>
        <view class="weui-cells weui-cells_after-title">
            <view class="weui-cell">
                <view class="weui-cell__hd" style="position: relative;margin-right: 10px;">
                    <image src="/images/pic_160.png" style="width: 50px; height: 50px; display: block"/>
                    <view class="weui-badge" style="position: absolute;top: -.4em;right: -.4em;">8</view>
                </view>
                <view class="weui-cell__bd">
                    <view>联系人名称</view>
                    <view style="font-size: 13px;color: #888888;">摘要信息</view>
                </view>
            </view>
            <view class="weui-cell weui-cell_access">
                <view class="weui-cell__bd">
                    <view style="display: inline-block; vertical-align: middle">单行列表</view>
                    <view class="weui-badge" style="margin-left: 5px;">8</view>
                </view>
                <view class="weui-cell__ft weui-cell__ft_in-access"></view>
            </view>
            <view class="weui-cell weui-cell_access">
                <view class="weui-cell__bd">
                    <view style="display: inline-block; vertical-align: middle">单行列表</view>
                    <view class="weui-badge" style="margin-left: 5px;">8</view>
                </view>
                <view class="weui-cell__ft weui-cell__ft_in-access">详细信息</view>
            </view>
            <view class="weui-cell weui-cell_access">
                <view class="weui-cell__bd">
                    <view style="display: inline-block; vertical-align: middle">单行列表</view>
                    <view class="weui-badge" style="margin-left: 5px;">New</view>
                </view>
                <view class="weui-cell__ft weui-cell__ft_in-access"></view>
            </view>
            
        </view>
    </view>
</view>


上一篇: weui article文章使用指南教程 下一篇: weui flex的布局和样式教程
毕业设计网             广告联系QQ:45157718(微信同号)