using System;
using System.Collections.Generic;
namespace Znyc.Cloudcar.Admin.Commons.Tree
{
///
/// Vuex菜单模型
///
[Serializable]
public class VueRouterModel
{
///
/// 设定路由的名字,一定要填写不然使用keep-alive时会出现各种问题
///
public string name { get; set; }
///
/// 路由地址,对应当前路由的路径,总是解析为绝对路径
///
public string path { get; set; }
///
/// 是否隐藏路由,当设置 true 的时候该路由不会再侧边栏出现
///
public bool hidden { get; set; }
///
/// 命名视图组件,组件地址
///
public string component { get; set; }
///
/// 重定向地址,当设置 noRedirect 的时候该路由在面包屑导航中不可被点击
///
public string redirect { get; set; }
///
/// 当你一个路由下面的 children 声明的路由大于1个时,自动会变成嵌套的模式--如组件页面
///
public bool alwaysShow { get; set; }
///
/// 在根路由设置权限,这样它下面所以的子路由都继承了这个权限
///
public Meta meta { get; set; }
///
/// 子路由,子菜单
///
public List children { get; set; }
}
///
/// 路由元信息模型
///
[Serializable]
public class Meta
{
///
/// 构造函数
///
///
///
///
public Meta(string title, string icon, bool noCache)
{
this.title = title;
this.icon = icon;
this.noCache = noCache;
}
///
/// 设置该路由在侧边栏和面包屑中展示的名字
///
public string title { get; set; }
///
/// 设置该路由的图标
///
public string icon { get; set; }
///
/// 设置为true,则不会被keep-alive缓存
///
public bool noCache { get; set; }
///
/// 当路由设置了该属性,则会高亮相对应的侧边栏。
/// 这在某些场景非常有用,比如:一个文章的列表页路由为:/article/list
/// 点击文章进入文章详情页,这时候路由为/article/1,但你想在侧边栏高亮文章列表的路由,就可以进行如下设置
/// activeMenu: '/article/list'
///
public string activeMenu { get; set; }
}
}