美文网首页
Bootstrap Multiselect 自用API文档

Bootstrap Multiselect 自用API文档

作者: duadu | 来源:发表于2018-05-31 17:02 被阅读98次

    multiselect是一个基于bootstrap的下拉框插件,基本可以满足一般需求(全选,模糊搜索),很好用~

    API

    buttonWidth: '300px',   //按钮宽度
    buttonHeight: '30px',   //按钮高度
    maxHeight: 400,  //下拉框的最大高度
    enableFiltering:  true,  //过滤
    selectAllText:  '全部',  //全选的checkbox名称
    nonSelectedText:  '请选择',  //未选择情况下的提示
    includeSelectAllOption:  true,  // 全选
    enableCaseInsensitiveFiltering: true,  //不区分大小写
    disableIfEmpty: true,//没有选项时readonly  
    disabledText: 'Disabled ...',//disabled时显示的文字说明 
    //初始化  
     onInitialized: function(select, container) {  
       alert('Initialized.');  
    },  
    onChange: function (option, checked) {//change事件改变   
      console.log(option.length + ' options ' + (checked ? 'selected' : 'deselected'));  
    },  
    //下拉回调函数  
    onDropdownShow: function (event) {  
      alert('Dropdown shown.');  
    },  
    //下拉框关闭回调函数  
    onDropdownHide: function (event) {  
      alert('Dropdown closed.');  
    },  
    //点击select调用,然后显示出下拉框  
    onDropdownHidden: function (event) {  
      alert('Dropdown closed.');  
    },  
    

    暂时就这些,以后用到了在补充

    相关文章

      网友评论

          本文标题:Bootstrap Multiselect 自用API文档

          本文链接:https://www.haomeiwen.com/subject/udgqsftx.html