mirror of https://github.com/layui/layui
fix(dropdown): 重复 render 时未 reload (#2022)
* fix(dropdown): 重复 render 时未 reload * update * updatepull/2034/head
parent
db757c4f77
commit
8ed1ffa8cb
|
@ -137,8 +137,8 @@ layui.define(['jquery', 'laytpl', 'lay', 'util'], function(exports){
|
||||||
$.extend(options, lay.options(elem[0]));
|
$.extend(options, lay.options(elem[0]));
|
||||||
|
|
||||||
// 若重复执行 render,则视为 reload 处理
|
// 若重复执行 render,则视为 reload 处理
|
||||||
if(!rerender && elem[0] && elem.data(MOD_INDEX)){
|
if(!rerender && elem[0] && elem.attr(MOD_ID)){
|
||||||
var newThat = thisModule.getThis(elem.data(MOD_INDEX));
|
var newThat = thisModule.getThis(elem.attr(MOD_ID));
|
||||||
if(!newThat) return;
|
if(!newThat) return;
|
||||||
|
|
||||||
return newThat.reload(options, type);
|
return newThat.reload(options, type);
|
||||||
|
@ -151,9 +151,7 @@ layui.define(['jquery', 'laytpl', 'lay', 'util'], function(exports){
|
||||||
elem.attr('id') || that.index
|
elem.attr('id') || that.index
|
||||||
);
|
);
|
||||||
|
|
||||||
if(!lay.isTopElem(elem[0])){
|
elem.attr(MOD_ID, options.id);
|
||||||
elem.attr(MOD_ID, options.id);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 初始化自定义字段名
|
// 初始化自定义字段名
|
||||||
options.customName = $.extend({}, dropdown.config.customName, options.customName);
|
options.customName = $.extend({}, dropdown.config.customName, options.customName);
|
||||||
|
|
Loading…
Reference in New Issue