Files
qhmes/yy-admin-master/YY.Admin/Module/TabSource.cs

69 lines
1.5 KiB
C#
Raw Normal View History

using System.Windows.Input;
using YY.Admin.Core;
namespace YY.Admin.Module
{
public class TabSource : BindableBase
{
2026-05-14 16:05:22 +08:00
private string? _name;
/// <summary>
/// 名称
/// </summary>
2026-05-14 16:05:22 +08:00
public virtual string? Name
{
get => _name;
set => SetProperty(ref _name, value);
}
private string? _icon;
/// <summary>
/// 图标
/// </summary>
2026-05-14 16:05:22 +08:00
public virtual string? Icon
{
get => _icon;
set => SetProperty(ref _icon, value);
}
/// <summary>
/// 图标类型
/// </summary>
public virtual IconTypeEnum IconType { get; set; } = IconTypeEnum.AntDesign;
/// <summary>
/// 视图
/// </summary>
public virtual string? ViewName { get; set; }
/// <summary>
/// 视图的导航参数
/// </summary>
public INavigationParameters? NavigationParameter { get; set; }
/// <summary>
/// 是否选中
/// </summary>
private bool _isSelected;
public virtual bool IsSelected
{
get => _isSelected;
set => SetProperty(ref _isSelected, value);
}
/// <summary>
/// Tab是否允许关闭
/// </summary>
private bool _isClosable = true;
public bool IsClosable
{
get => _isClosable;
set => SetProperty(ref _isClosable, value);
}
public ICommand? Command { get; set; }
}
}