zoukankan      html  css  js  c++  java
  • 微信小程序

     

     

     

    配置项(关于使用组件)

    index.wxml

    <!-- 
      tabBar:tabBar配置
      activeIndex: 激活页面下标
      slots: 多插槽配置(需与页面一致)
    -->
    
    <tabbar data="{{tabBar}}" activeIndex="0" solts="{{solts}}">
      <view slot="index">index1...</view>
      <view slot="other">other2...</view>
      <view slot="my">my3....</view>
      <view slot="hello">hello...4</view>
      <view slot="bat">bat...5</view>
    </tabbar>

     

    index.js(data

      tabBar: {
          "selectedColor": "#5DBCFF",
          "normalColor": "#333",
          "backgroundColor": "#fff",
          "selectedBackgroundColor": "#fff",
          "list": [{
            "pagePath": "market/index/index",
            "iconPath": "images/icon_home.png",
            "selectedIconPath": "images/icon_home_selected.png",
            "text": "首页"
          }, {
            "pagePath": "tools/index/index",
            "iconPath": "images/icon_cate.png",
            "selectedIconPath": "images/icon_cate_selected.png",
            "text": "分类"
          }, {
            "pagePath": "viewing/index/index",
            "iconPath": "images/icon_member.png",
            "selectedIconPath": "images/icon_member_selected.png",
            "text": "我"
          }, {
            "pagePath": "viewing/index/index",
            "iconPath": "images/icon_member.png",
            "selectedIconPath": "images/icon_member_selected.png",
            "text": "Hello"
          }, {
            "pagePath": "viewing/index/index",
            "iconPath": "images/icon_member.png",
            "selectedIconPath": "images/icon_member_selected.png",
            "text": "Bat"
          }]
        },
        solts: [{
          name: 'index'
        }, {
          name: 'other'
        }, {
          name: 'my'
        }, {
          name: 'hello'
        }, {
          name: 'bat'
        }]
    

      

    示例:点击下载

  • 相关阅读:
    浏览器 显示flash问题
    类型参数的约束
    C# FUNC 应用
    c#抽奖系统
    3D基础数学小结
    google应用之字体引用
    MYSQL启动参数
    chrome中你不知道的快捷方式
    SQL Server 2008在添加用户时弹出15195错误
    Hibernate Maven Missing artifact javax.transaction:jta:jar:1.0.1B
  • 原文地址:https://www.cnblogs.com/cisum/p/10286794.html
Copyright © 2011-2022 走看看