zoukankan      html  css  js  c++  java
  • 微信 小程序组件 分页加强版

    JS
    // 左侧菜单栏焦点控制函数
    keyMenu: function (e) {
    var mlindex = e.currentTarget.dataset.mlindex;
    this.setData({
    curNav: mlindex,
    })
    },
    //数据
    curNav: 0,
    mrlist:[
    [
    { list: "现货/期货" },
    { list: "期货" },
    { list: "现货/期货" },
    { list: "现货" },
    { list: "现货/期货" }
    ],
    [
    { list: "现货" },
    { list: "期货" },
    { list: "现货" },
    { list: "现货" },
    { list: "现货" }
    ],
    [
    { list: "期货" },
    { list: "期货" },
    { list: "期货" },
    { list: "现货" },
    { list: "期货" }
    ],
    [
    { list: "现货/期货" },
    { list: "期货" },
    { list: "现货/期货" },
    { list: "现货" },
    { list: "现货/期货" }
    ],
     
    ]
     
    //HTML、
    <view class='m-f-left'>
    <block wx:key="mleft" wx:for="{{mlmenu}}" wx:for-item="mlitem" wx:for-index="mlindex">
    <view class="left-item flexca {{curNav == mlindex?'menuctive':''}}" data-mlindex='{{mlindex}}' bindtap='keyMenu'>
    <text>{{mlitem.menu}}</text>
    </view>
    </block>
    </view>
    <view class='m-f-right'>
    <block wx:key="mright" wx:for="{{mrlist[curNav]}}" wx:for-item="mritsm" wx:for-index="mrindex">
    <view class="right-item flexca">
    <text>{{mritsm.list}}</text>
    </view>
    </block>
    </view>
     
     
    //wxcss
    .classify-content{
    flex: 1;
    }
    .classify-m,.classify-f{
    100%;
    height: 100%;
    display: flex;
    }
    .m-f-left{
    174rpx;
    height: 100%;
    ">white;
    overflow: hidden;
    font-size: 30rpx;
    color: #333333;
    }
    .m-f-left .left-item{
    height: 88rpx;
    border-bottom: 1px solid #F7f7f7;
    border-left: 8rpx solid transparent;
    }
    .m-f-left>view:first-child{
    border-top: 1px solid #F7f7f7;
    }
    .m-f-left .menuctive{
    ">#f7f7f7;
    border-left: 8rpx solid #839aaf;
    color: #839aaf;
    }
    .m-f-right{
    padding: 40rpx 20rpx 40rpx 40rpx;
    576rpx;
    box-sizing: border-box;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    overflow: hidden;
     
    }
    .m-f-right .right-item{
    152rpx;
    height: 60rpx;
    padding: 0 10rpx;
    ">white;
    border-radius: 10rpx;
    font-size: 26rpx;
    margin: 0 20rpx 20rpx 0;
    color: #666666;
    box-sizing: border-box;
    overflow: hidden;
    }
    .m-f-right .right-item text{
    font-size: 24rpx;
    max- 142rpx;
    white-space: nowrap;
    overflow: hidden;
    text-overflow:ellipsis;
    }
  • 相关阅读:
    IIS10保存配置文件及导入、导出、备份、还原
    centos7 根分区扩容
    mssqlserver2014安装步骤
    error:class 'socket.error' [Errno 2] No such file or directory: file: /usr/lib64/python2.7/socket.py line: 224
    Centos7安装Redis-5.0.3
    Aspose 学习笔记
    Maven学习笔记
    【web性能测试随笔】一、项目介绍及工具
    【Python学习笔记】python开发环境安装部署
    微信小程序中遮罩层滚动穿透问题(view增加一个属性解决)
  • 原文地址:https://www.cnblogs.com/dianzan/p/7645299.html
Copyright © 2011-2022 走看看