diff --git a/js/jquery.cxselect.js b/js/jquery.cxselect.js index 18aaddd..87ac1a3 100644 --- a/js/jquery.cxselect.js +++ b/js/jquery.cxselect.js @@ -333,10 +333,13 @@ }; }; - _select.html(_html).prop('disabled', false).css({ - 'display': '', - 'visibility': '' - }); + _select.html(_html); + if (data.length) { + _select.prop('disabled', false).css({ + 'display': '', + 'visibility': '' + }); + } // 初次加载设置默认值 if (typeof _select.attr('data-value') === 'string') {