iotgateway/WalkingTec.Mvvm/WalkingTec.Mvvm.Mvc/Model/Menu.cs
2021-12-14 14:10:44 +08:00

64 lines
1.4 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System;
using System.Collections.Generic;
using System.Text.Json.Serialization;
namespace WalkingTec.Mvvm.Mvc.Model
{
/// <summary>
/// Menu
/// </summary>
public class Menu
{
[JsonIgnore]
public Guid Id { get; set; }
/// <summary>
/// Name
/// 默认用不上name但是 v1.2.1 有问题:“默认展开了所有节点,并将所有子节点标蓝”
/// </summary>
/// <value></value>
[JsonPropertyName("name")]
public string Name => Title;
/// <summary>
/// Title
/// </summary>
/// <value></value>
[JsonPropertyName("title")]
public string Title { get; set; }
/// <summary>
/// 图标
/// </summary>
/// <value></value>
[JsonPropertyName("icon")]
public string Icon { get; set; }
/// <summary>
/// 是否展开节点
/// </summary>
/// <value></value>
[JsonPropertyName("spread")]
public bool? Expand { get; set; }
/// <summary>
/// Url
/// </summary>
/// <value></value>
[JsonPropertyName("jump")]
public string Url { get; set; }
[JsonPropertyName("list")]
public List<Menu> Children { get; set; }
/// <summary>
/// order
/// </summary>
/// <value></value>
[JsonIgnore]
public int? Order { get; set; }
}
}