HTML
<div id="admin_ids" class="xm-select-demo"></div>
<script src="/Public/js/xm-select.js"></script>
<script>
var admin_ids = xmSelect.render({
el: '#admin_ids'
, filterable: true
, theme: { color: '#558ff5' }
, data: []
})
$.getJSON('__MODULE__/Admin/ajax_group_list', function (res) {
admin_ids.update({ data: res.data.list })
})
form.on("submit(*)", function (e) {
var data = e.field
data.admin_ids = admin_ids.getValue().map(i => i.value).join(',')
console.log(data)
table.reload('tb', { where: data })
return false
})
</script>
<style>
.xm-select-demo {
vertical-align: top;
display: inline-block;
width: 300px;
}
</style>
标签:__,xm,admin,一例,ids,data,select
From: https://www.cnblogs.com/sunr/p/16768281.html