From d50fe2d9aafc7c823bb292d875dc131a222ca30b Mon Sep 17 00:00:00 2001 From: sunhao Date: Tue, 26 Sep 2023 16:42:59 +0800 Subject: [PATCH] * zin: preserve nested state for moduleMenu. --- lib/zin/wg/modulemenu/v1.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/zin/wg/modulemenu/v1.php b/lib/zin/wg/modulemenu/v1.php index 6c8b5d99c8..21b0656f45 100644 --- a/lib/zin/wg/modulemenu/v1.php +++ b/lib/zin/wg/modulemenu/v1.php @@ -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(),