您的位置:首页 > Web前端

一言不合就动手系列篇一-仿电商平台前端搜索插件(filterMore)

2016-09-30 08:07 393 查看
  话说某年某月某日,后台系统需要重构,当时公司还没有专业前端,由我负责前台页面框架搭建,做过后台系统的都知道,传统的管理系统大部分都是列表界面和编辑界面。列表界面又由表格和搜索框组成,

var options = {
//查询事件
"search": function (paramList) {
},
//默认展开条件数
"expandRow": 1,
//展开更多条件触发事件
"expandEvent": function (state) {
//展开更多条件触发事件 参数:state  true表示展开  false 收缩
$("#expandEvent_searchbox_param").html("是否展开条件:"+state);
},
//查询条件
"searchBoxs": [
{
"id": "Status_ExpandEvent",
"title": "任务状态",
"isMultiple":true,
"data": [
{ "value": "0", "text": "运行" },
{ "value": "1", "text": "停止" }
]
},
{
"id": "Createor_ExpandEvent",
"title": "创建人",
"data": [
{ "value": "admin", "text": "系统管理员" },
{ "value": "zhangsan", "text": "张三" }
]
}
]
};
$("#expandEvent_searchbox").fiterMore(options);


View Code



演示地址:https://crazyjson.github.io/filterMore/demo/index.html#expandEvent

默认值



演示地址:https://crazyjson.github.io/filterMore/demo/index.html#defaultValue

数据源格式自定义



演示地址:https://crazyjson.github.io/filterMore/demo/index.html#customData

方法调用




演示地址:https://crazyjson.github.io/filterMore/demo/index.html#functionCall

回到顶部

总结

  开源插件filterMore介绍完成,插件BUG或者建议的可以联系我。

  GitHub地址 : https://github.com/CrazyJson/filterMore

  在线演示地址: https://crazyjson.github.io/filterMore/demo/index.html

如果,您认为阅读这篇博客让您有些收获,不妨点击一下右下角的推荐按钮。

如果,您希望更容易地发现我的新博客,不妨点击一下绿。色通道的关注我

如果,想给予我更多的鼓励,求打


因为,我的写作热情也离不开您的肯定支持。

感谢您的阅读,如果您对我的博客所讲述的内容有兴趣,请继续关注我的后续博客,我是焰尾迭 。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: