* [bug #53888, done, 1h] fix search-form not reload on page load.

This commit is contained in:
sunhao
2024-08-16 08:38:37 +08:00
committed by 孙广明
parent 96042ee4eb
commit cdea75adbe
+17 -1
View File
@@ -51,6 +51,22 @@ class searchForm extends wg
if(!$this->hasProp('url')) $this->setProp('url', createLink('search', 'buildZinForm', 'module=' . $this->prop('module')));
if(!$this->hasProp('searchUrl')) $this->setProp('searchUrl', createLink('search', 'buildZinQuery'));
}
return zui::searchForm(inherit($this));
return zui::searchForm
(
inherit($this),
set::_children
(
on::init()->do('$element.attr("data-last-url", $.apps.getAppUrl())'),
on::skipMorph()
->beginIf('$.apps.getAppUrl() !== $element.attr("data-last-url")')
->do
(
'$element.attr("data-last-url", $.apps.getAppUrl())',
'zui.SearchForm.get($element).$.load(true)',
'console.log("skip morph", event);'
)
->endIf()
)
);
}
}