* zin: remove old search form on init.

This commit is contained in:
sunhao
2024-04-10 12:09:50 +08:00
parent e304652f60
commit c68b4204fc
+1 -1
View File
@@ -47,7 +47,7 @@ class searchToggle extends wg
set::active($open),
set::text($lang->searchAB),
toggle::searchform(array('module' => $module, 'target' => $target, 'url' => $url, 'searchUrl' => $searchUrl)),
$open ? on::inited()->call('zui.toggleSearchForm', array('module' => $module, 'target' => $target, 'show' => $open, 'url' => $url, 'searchUrl' => $searchUrl)) : null
$open ? on::init()->call('zui.toggleSearchForm', array('module' => $module, 'target' => $target, 'show' => $open, 'url' => $url, 'searchUrl' => $searchUrl)) : on::init()->do('$element.closest(".show-search-form").removeClass("show-search-form").find(".search-form[data-module=' . $module . ']").remove()')
);
}
}