更新记录

1.0.0(2019-12-17)

1.0.0 初始版本,持续更新。


平台兼容性

参考 底部图标菜单 imagemenu 进行封装.

使用方式

<template>
  <view class="content"><button type="primary" @tap="showMenu">打开</button></view>
</template>

<script>
import BottomImageMenu from '@/components/bottom-image-menu/index.js'
var bottomImageMenu = null
export default {
  computed: {
    menus() {
      return [
        {
          icon: '/static/logo.png',
          label: '测试1',
          onClick() {
            uni.showToast({ title: '点击了:测试1,这是一个写在数据里的回调', icon: 'none' })
          }
        },
        {
          icon: '/static/logo.png',
          label: '测试2'
        },
        {
          icon: '/static/logo.png',
          label: '测试3'
        },
        {
          icon: '/static/logo.png',
          label: '测试4'
        },
        {
          icon: '/static/logo.png',
          label: '测试5'
        },
        {
          icon: '/static/logo.png',
          label: '测试6'
        }
      ]
    }
  },
  methods: {
    showMenu() {
      if (!bottomImageMenu) {
        bottomImageMenu = new BottomImageMenu(this.menus, (menu, index) => {
          uni.showToast({ title: `点击了:${menu.label},索引是${index},这是统一处理的`, icon: 'none' })
        })
      }
      bottomImageMenu.show()
    }
  },
  onLoad() {
    bottomImageMenu = new BottomImageMenu(menus)
  }
}
</script>

隐私、权限声明

1. 本插件需要申请的系统权限列表:

2. 本插件采集的数据、发送的服务器地址、以及数据用途说明:

3. 本插件是否包含广告,如包含需详细说明广告表达方式、展示频率:

许可协议

MIT协议

使用中有什么不明白的地方,就向插件作者提问吧~ 我要提问