修复在使用了select2插件时select内容不会重置的问题

This commit is contained in:
青衫 2020-07-29 15:28:01 +08:00
parent 31c3d4021e
commit 5048bb9aee
1 changed files with 2 additions and 1 deletions

View File

@ -622,7 +622,8 @@ var table = {
table.set(tableId); table.set(tableId);
var currentId = $.common.isEmpty(formId) ? $('form').attr('id') : formId; var currentId = $.common.isEmpty(formId) ? $('form').attr('id') : formId;
$("#" + currentId)[0].reset(); $("#" + currentId)[0].reset();
if (table.options.type == table_type.bootstrapTable) { $("#" + currentId).find('select').val('').trigger('change');
if (table.options.type == table_type.bootstrapTable) {
if($.common.isEmpty(tableId)){ if($.common.isEmpty(tableId)){
$("#" + table.options.id).bootstrapTable('refresh'); $("#" + table.options.id).bootstrapTable('refresh');
} else{ } else{