using MyAvaloniaApp.ViewModels.Base; using ReactiveUI; namespace MyAvaloniaApp.ViewModels.Pages; /// /// 报表统计页面ViewModel /// public class ReportsPageViewModel : RoutableViewModel { private string _welcomeMessage = "欢迎使用报表统计功能!"; private int _totalReports = 156; private int _monthlyReports = 23; private double _averageScore = 87.5; /// /// 构造函数 /// /// 宿主 Screen public ReportsPageViewModel(IScreen hostScreen) : base(hostScreen, "Reports") { } /// /// 欢迎消息 /// public string WelcomeMessage { get => _welcomeMessage; set => this.RaiseAndSetIfChanged(ref _welcomeMessage, value); } /// /// 总报表数 /// public int TotalReports { get => _totalReports; set => this.RaiseAndSetIfChanged(ref _totalReports, value); } /// /// 月度报表数 /// public int MonthlyReports { get => _monthlyReports; set => this.RaiseAndSetIfChanged(ref _monthlyReports, value); } /// /// 平均评分 /// public double AverageScore { get => _averageScore; set => this.RaiseAndSetIfChanged(ref _averageScore, value); } }