fastadmin 通用搜索中select设置多选、build_select设置多选、全选、取消权限

一、对应的js文件设置可以多选

{ field: 'source_id', title:'客户来源',addClass:"selectpicker", operate:"IN",data:"multiple", 
            formatter: function (v, r, index) {
return Config.channel_source_map[v]; }, searchList: Config.channel_source_map },

重要的几个属性设置

addClass:"selectpicker", 
operate:"IN",
data:"multiple",

 二、模板中build_select,可以设置多选,并且全选、取消权限

{:build_select('row[customer_status]', $customer_status_map, 0, ['class'=>'form-control selectpicker','id' => 'customer_status','lay-filter'=>'customer_status_selectfilter','multiple'=>'','data-actions-box'=>'true'],true)}

主要两个属性

'multiple'=>'','data-actions-box'=>'true'

 

posted @ 2023-07-25 07:04  温柔的风  阅读(4894)  评论(0编辑  收藏  举报