欢迎来到尧图网

客户服务 关于我们

您的位置:首页 > 教育 > 幼教 > layui xm-select的使用

layui xm-select的使用

2025/11/12 10:10:44 来源:https://blog.csdn.net/u010865136/article/details/143527121  浏览:    关键词:layui xm-select的使用

一、文档

xm-select

二、使用

<div id="js-form-tags{$ke}{$index++}" val="{$ke}"></div>
<input type="hidden" class="selectkey" name="selectkey[]" value="{$ke}" />
function initSelect(id,init){xmSelect.render({el: '#'+id, model: { label: { type: 'text' } },tree: {show: true,showFolderIcon: true,showLine: true,indent: 20,expandedKeys: [ -3 ],strict: false,// 严格父子结构,true时,父级选中和取消选中其子级同步取消和选中;false时,父级不会影响子级的选中,注意位置在内层},radio: true,//控制单选和多选expandedKeys: [],clickClose: true,language: 'zn',size: 'mini',single: true,style:{width:'215px',border: '1px solid #468',minHeight:'22px'},theme: {color: '#1E9FFF',},show(){console.log('show')},on(data){console.log(data)console.log('on')console.log($(this))$("#"+id).siblings('input').val(data.change[0].value)},hide(){console.log('hide')setTimeout(() => {$("#"+id).find('xm-select').css('border','1px solid #468')}, 1);},initValue: [init],// 下拉框需要有初始选中值时,赋值此项height: '200px',searchTips: '搜索',// 是否显示搜索框filterable: true,// 是否显示搜索框toolbar: {show: false,list: ['ALL','CLEAR']},// 是否显示清空和全选data: JSON.parse(tags)})}

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

热搜词