b3的 bsSuggest 方法怎样能传两个参数?
素霓煊 2017-10-16 09:56:31 规范是只能传递一个关键字的参数用来类似百度的提示查询,但我需要用此插件传递两个参数。请大神指教。
$("#serachCommunity").bsSuggest('init', {
/*url: "/rest/sys/getuserlist?keyword=",
effectiveFields: ["userName", "email"],
searchFields: [ "shortAccount"],
effectiveFieldsAlias:{userName: "姓名"},*/
clearable: false,
allowNoKeyword: false, // 是否允许无关键字时请求数据
ignorecase: true,//忽略大小写
url: "../../rest/house/serachCommunity?key=",
type: "post",
getDataMethod: "url",
effectiveFields:['COMMUNITYNAME'],
searchFields: ['COMMUNITYNAME', 'PIN_YIN'],
idField: "COMMUNITY_ID",
listStyle: {"max-width":"254px","text-indent":"36px"},
listHoverStyle: 'background: #f3f3f3; cursor:pointer; color:#69a7f7', //提示框列表鼠标悬浮的样式
//keyField: "COMMUNITY_ID"
}).on('onDataRequestSuccess', function (e, result) {
//console.log('onDataRequestSuccess: ', result);
}).on('onSetSelectValue', function (e, keyword, data) {
//console.log('onSetSelectValue: ', keyword, data);
communityId = keyword.id;
reloadtj();
reloadIframe();
//重新按小区条件加载
}).on('onUnsetSelectValue', function () {
//console.log('onUnsetSelectValue');
});