You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.1 KiB
39 lines
1.1 KiB
using AIK.Common.Enum;
|
|
using CommunityToolkit.Mvvm.ComponentModel;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Collections.ObjectModel;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Controls;
|
|
|
|
namespace AIK.Models.Menus
|
|
{
|
|
public partial class MenuModel : ObservableObject
|
|
{
|
|
[ObservableProperty]
|
|
private bool _isSelected;
|
|
public int Key { get; set; }
|
|
private string _menuHeader;
|
|
public string MenuHeader
|
|
{
|
|
get => _menuHeader;
|
|
set => SetProperty(ref _menuHeader, value);
|
|
}
|
|
public string TargetView { get; set; }
|
|
public string MenuIcon { get; set; }
|
|
public string ResourceKey { get; set; }
|
|
[ObservableProperty]
|
|
private bool _isAuthorized = false;
|
|
[ObservableProperty]
|
|
private bool _isShow = true;
|
|
|
|
// 添加子菜单集合
|
|
public ObservableCollection<MenuModel> SubItems { get; set; } = new ObservableCollection<MenuModel>();
|
|
|
|
[ObservableProperty]
|
|
private bool _isExpanded;
|
|
public bool HasSubItems => SubItems.Any();
|
|
}
|
|
}
|
|
|