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;
    }
  • 相关阅读:
    layui日历控件设置选择日期不能超过当前日期
    layui表格工具条,如何动态控制按钮的展示?
    celery定时任务
    redis的安装(windows+linux)
    redis常用操作
    mac通过virtualbox安装win10
    制作U盘启动盘
    k8s报错: * spec.template.spec.volumes[0].name: Invalid value: "nfs_pvc001": must match the regex [a-z0-9]([-a-z0-9]*[a-z0-9])? (e.g. 'my-name' or '123-abc')
    k8s的容器的端口暴露
    k8s中pod文件的定义格式
  • 原文地址:https://www.cnblogs.com/dianzan/p/7645299.html
Copyright © 2011-2022 走看看