This commit is contained in:
toly
2023-12-22 10:01:10 +08:00
parent 2f4e8d3564
commit bde7cad11d
22 changed files with 2223 additions and 12 deletions

View File

@@ -62,6 +62,8 @@ class MenuStore with ChangeNotifier {
?.label;
void selectMenuPath(String path) {
MenuNode root = MenuNode(
path: '',
label: '',
@@ -83,7 +85,7 @@ class MenuStore with ChangeNotifier {
}else{
_shouldAddHistory = true;
}
print("=====selectMenuPath: ${result.last.path}===============");
_state = state.copyWith(
activeMenu: result.last.path, expandMenus: expandMenus);
}
@@ -160,10 +162,10 @@ class MenuStore with ChangeNotifier {
void select(MenuNode menu) {
bool hasHistory = _history.where((e) => e.menuPath==menu.path).isNotEmpty;
print("=====select: ${hasHistory}===============");
if(hasHistory){
_shouldAddHistory = false;
selectMenuPath(menu.path);
notifyListeners();
goRouter.go(menu.path);
return;
}

View File

@@ -63,6 +63,15 @@ final RouteBase drawRouters = GoRoute(
case '18':
child = const P18Page();
break;
case '19':
child = const P19Page();
break;
case '20':
child = const P20Page();
break;
case '21':
child = const P21Page();
break;
}
return CustomTransitionPage(

View File

@@ -117,9 +117,6 @@ class _RouterIndicatorState extends State<RouterIndicator> {
if(matches.isEmpty) return const SizedBox();
RouteMatch match = _delegate.currentConfiguration.matches.last;
print(
"=========_RouterIndicatorState:build==${match.matchedLocation}========");
return TolyBreadcrumb(
fontSize: 12,
items: pathToBreadcrumbItems(context, match.matchedLocation),