The Wayback Machine - https://web.archive.org/web/20230220145721/https://github.com/yang720/dropDownMenu-wechat
Skip to content

yang720/dropDownMenu-wechat

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code
This branch is up to date with ZBK1nger/dropDownMenu-wechat:master.

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

dropDownMenu-wechat

微信小程序下拉菜单自定义组件

  • 级联选择器,例如xx区-xx街道
  • 下拉列表,例如排序,筛选等

img

如何使用

  • 支持动态修改Navgation上的Item数量和显示隐藏等
/*
dropDownMenuTitle:导航标题数组,按顺序填写
dropDownMenuDistrictData:区域数组
--- 以下三种样式一样,按需求添加即可 ---
dropDownMenuSourceData:来源
dropDownMenuStyleData:租售
dropDownMenuFilterData:排序
*/
<dropdownmenu dropDownMenuTitle='{{dropDownMenuTitle}}' dropDownMenuDistrictData='{{dropDownMenuFirstData}}' dropDownMenuSourceData='{{dropDownMenuSecondData}}' dropDownMenuStyleData='{{dropDownMenuThirdData}}' dropDownMenuFilterData='{{dropDownMenuFourthData}}'
  bind:selectedItem='selectedItem' />
  • 将项目中component文件夹拖入项目中
  • 在将要使用的该组件的.json文件中引入

{
  "usingComponents": {
    "dropdownmenu": "/component/dropdownmenu/dropdownmenu"
  }
}

  • 在.wxml文件中引用即可
详情代码以及使用参照示例,如果对你有所帮助的请给个Star~

About

微信小程序下拉列表组件,原文:https://www.jianshu.com/p/d0b067e68c8e

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%