1. vue-search

vue-search

vue-search

一款基于 vuejs & weui 的全屏搜索组件

功能

  • 根据配置的数据列表提供关键字过滤搜索功能
  • 显示字段可配置

安装

npm install --save vue-search

options

  • show 组件显示条件
  • items 待搜索的数据数组
  • displaykey 显示对象的属性名称,默认text
  • limit 最大显示条数,默认5
  • label 搜索框标签提示文字,默认搜索
  • inputholder 搜索框提示文字,默认搜索
  • transtionModel 过渡动画切换模式,需要在CSS中实现对应的样式定义,默认实现slide

在你的vue项目中进行使用(with ES6)

   import search from 'vue-search';
  export default {
     components:{
       	search
     },
     events:{
        	fullscreensearch:function(item){    //响应用户选择搜索项事件
        		console.log(item);
        		this.showSearch=false;
        	}
       }
  }
     <search :show="showSearch" :items="items"></search>

Dependencies