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;
    }
  • 相关阅读:
    uva------(11464)Even Parity
    java SE学习之线程同步(详细介绍)
    MFC学习之窗口基础
    java多线程的常用方法(以及注意事项)
    java多线程下如何调用一个共同的内存单元(调用同一个对象)
    java之多线程(Thread)
    HDUOJ------3336 Count the string(kmp)
    hduoj------2594 Simpsons’ Hidden Talents
    POJ--2158--------------Milking Grid(最小覆盖字符矩阵)---(开二维kmp)
    poj-------------(2752)Seek the Name, Seek the Fame(kmp)
  • 原文地址:https://www.cnblogs.com/dianzan/p/7645299.html
Copyright © 2011-2022 走看看