v4
This commit is contained in:
@@ -95,10 +95,3 @@ class BreadcrumbItem {
|
||||
|
||||
BreadcrumbItem( {this.to, required this.label,this.active=false,});
|
||||
}
|
||||
|
||||
//<el-breadcrumb separator="/">
|
||||
// <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
|
||||
// <el-breadcrumb-item><a href="/">活动管理</a></el-breadcrumb-item>
|
||||
// <el-breadcrumb-item>活动列表</el-breadcrumb-item>
|
||||
// <el-breadcrumb-item>活动详情</el-breadcrumb-item>
|
||||
// </el-breadcrumb>
|
||||
|
||||
@@ -2,37 +2,20 @@ import 'package:flutter/material.dart';
|
||||
|
||||
import 'menu_meta.dart';
|
||||
|
||||
// final List<NavigationRailDestination> destinations = const [
|
||||
// NavigationRailDestination(icon: Icon(Icons.color_lens_outlined), label: Text("颜色板")),
|
||||
// NavigationRailDestination(icon: Icon(Icons.add_chart), label: Text("计数器")),
|
||||
// NavigationRailDestination(icon: Icon(Icons.person), label: Text("我的")),
|
||||
// NavigationRailDestination(icon: Icon(Icons.settings), label: Text("设置")),
|
||||
// ];
|
||||
|
||||
const List<MenuMeta> kDeskNavBarMenus = [
|
||||
MenuMeta(label: '颜色板', icon: Icons.color_lens_outlined),
|
||||
MenuMeta(
|
||||
label: '计数器',
|
||||
icon: Icons.add_chart,
|
||||
),
|
||||
MenuMeta(
|
||||
label: '我的',
|
||||
icon: Icons.person,
|
||||
),
|
||||
MenuMeta(label: '设置', icon: Icons.settings),
|
||||
];
|
||||
|
||||
class TolyNavigationRail extends StatelessWidget {
|
||||
final ValueChanged<int> onDestinationSelected;
|
||||
final Color backgroundColor;
|
||||
final int? selectedIndex;
|
||||
final Widget? leading;
|
||||
|
||||
final Widget? tail;
|
||||
final List<MenuMeta> items;
|
||||
const TolyNavigationRail({
|
||||
Key? key,
|
||||
required this.onDestinationSelected,
|
||||
required this.selectedIndex,
|
||||
required this.items,
|
||||
this.leading,
|
||||
this.tail,
|
||||
required this.backgroundColor,
|
||||
}) : super(key: key);
|
||||
|
||||
@@ -46,11 +29,11 @@ class TolyNavigationRail extends StatelessWidget {
|
||||
if(leading!=null) leading!,
|
||||
Expanded(
|
||||
child: LeftNavigationMenu(
|
||||
items: kDeskNavBarMenus,
|
||||
items: items,
|
||||
selectedIndex: selectedIndex,
|
||||
onTapItem: onDestinationSelected,
|
||||
)),
|
||||
// if (selectedIndex == 0) HelpButton()
|
||||
if(tail!=null) tail!,
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user