依赖
jq,bootscript
html
js
new WqEmpSearch({
id:'#all',//标识 需符合JQ选择器的语法, 建议传ID
permissions:'admin',//权限 必填
type:string(dep,emp) //搜索类型
event:{ //搜索事件对象
queryEve:'change', //查询事件 默认enter (change 每次输入就查询 ,enter 回车查询)
closeEve:'blur' //关闭列表事件 默认blur (blur input失去焦点触发,click 点击item触发)
},
placeholder:''//input提示文案 字符串
style:{ //ul列表 的CSS 需要符合jq的CSS()语法 默认min-width="400px"
'max-width':'600px',
'min-width':'300px',
'max-height':'600px',
},
callback:function (data) { //data格式就是后端返回的数据 一定有type,did/eid,name
alert(1)
}
})