$vmSelect.select2({
data: source,
templateResult: formatState,
multiple: true,
theme: "bootstrap",
closeOnSelect: false
}).on('select2:select', function (evt) {
if (!evt) {
} else {
vm_name = evt.params.data.id;
getVmInfo(url, vir_uuid, vm_name);
}
});
on()事件中的'select2:select'是什么意思呀,请大神赐教
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
Select2是一个bootstrap的扩展插件。
这个Select2:select应该就指的是这个插件在替代原生的Select以后的选择事件。
文档见:http://select2.github.io/opti...