* upgrade: fix js error on click btn to loadCurrentPage.

This commit is contained in:
sunhao
2024-04-19 10:14:02 +08:00
parent 5266f70619
commit 38ba05d091
3 changed files with 7 additions and 2 deletions
+1 -1
View File
@@ -48,7 +48,7 @@ div
setClass('text-center'),
btn
(
on::click('loadCurrentPage'),
on::click('loadCurrentPage()'),
set::type('primary'),
setClass('px-10'),
$lang->refresh
+1 -1
View File
@@ -87,7 +87,7 @@ div
$lang->upgrade->moveEXTFileFail,
btn
(
on::click('loadCurrentPage'),
on::click('loadCurrentPage()'),
setClass('px-6 ml-4'),
set::text($lang->refresh)
)
+5
View File
@@ -897,6 +897,11 @@
function loadCurrentPage(options)
{
if(options instanceof Event || options instanceof HTMLElement)
{
options = {};
if(DEBUG) console.warn('[APP] ', 'loadCurrentPage() should not be called with an event or element.');
}
if(typeof options === 'string') options = {selector: options};
return loadPage(options);
}