* zin: preserve nested state for moduleMenu.

This commit is contained in:
sunhao
2023-09-26 16:43:02 +08:00
parent 8b8eab602f
commit d50fe2d9aa
+4 -2
View File
@@ -147,10 +147,12 @@ class moduleMenu extends wg
protected function build(): wg
{
global $app;
$this->setMenuTreeProps();
$title = $this->getTitle();
$title = $this->getTitle();
$treeProps = $this->props->pick(array('items', 'activeClass', 'activeIcon', 'activeKey', 'onClickItem', 'defaultNestedShow', 'changeActiveKey', 'isDropdownMenu'));
$preserve = $app->getModuleName() . '-' . $app->getMethodName();
return div
(
@@ -171,7 +173,7 @@ class moduleMenu extends wg
set::_class('col flex-auto scrollbar-hover overflow-y-auto overflow-x-hidden pl-4 pr-1'),
set::defaultNestedShow(true),
set::hover(true),
set::preserve(true),
set::preserve($preserve),
set($treeProps)
),
$this->buildActions(),