Skip to content
This repository was archived by the owner on Sep 17, 2020. It is now read-only.

Files

Latest commit

246e9d6 · Nov 21, 2019

History

History

search

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Nov 20, 2019
Nov 20, 2019
Nov 20, 2019
Nov 20, 2019
Nov 21, 2019

搜索

  • .json中引用
{
  "usingComponents": {
    "search": "/components/search/index"
  }
}
  • .wxml页面中引用
<!-- bind:组件中的事件名称:组件之间通信从父级传递数据 -->
<search id="search" bind:searchList="searchList" bind:endsearchList="endsearchList" bind:cancelsearch="cancelsearch" bind:activity_clear="activity_clear"></search>
  • 在js中加入函数
//搜索框输入时触发
searchList(e) {
  console.log('搜索框输入', e)
},
//搜索回调
endsearchList(e) {
  console.log('查询数据',e)
},
// 取消搜索
cancelsearch() {
  
},