mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-01 15:32:48 +08:00
feat: 增加select的选中处理
This commit is contained in:
@@ -1969,6 +1969,7 @@
|
||||
|
||||
// 监听原生单选框选中
|
||||
admin.api.nativeRadio();
|
||||
admin.api.nativeSelect();
|
||||
|
||||
// 监听时间控件生成
|
||||
admin.api.date();
|
||||
@@ -2841,6 +2842,17 @@
|
||||
}
|
||||
});
|
||||
},
|
||||
nativeSelect() {
|
||||
$('[value-selected]').each(function (index, elem) {
|
||||
if ($(this).hasClass('selected-rendered')) {
|
||||
return;
|
||||
}
|
||||
$(this).addClass('selected-rendered');
|
||||
if ($(this).attr('value') == $(this).attr('value-selected')) {
|
||||
$(this).prop('selected', true);
|
||||
}
|
||||
});
|
||||
},
|
||||
date: function () {
|
||||
var dateList = document.querySelectorAll("[data-date]");
|
||||
if (dateList.length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user