feat(i18n): 支持绑定表达式作为国际化键值
- 将 I18NBinding 构造函数的 key 参数从 string 类型改为 object 类型 - 添加对 BindingBase 类型键值的支持,允许动态绑定国际化键 - 为 I18NExtension 添加多个构造函数重载以支持 BindingBase 键值 - 更新资源文件添加新的测试键值对 - 修改视图模型属性访问修饰符并添加测试属性 - 在主窗口视图中添加绑定表达式的国际化使用示例
This commit is contained in:
@@ -7,7 +7,8 @@ namespace TestMvvm.ViewModels;
|
||||
|
||||
public partial class MainWindowViewModel : ViewModelBase
|
||||
{
|
||||
[ObservableProperty] public string? test = Path.GetRandomFileName();
|
||||
[ObservableProperty] private string? _test = Path.GetRandomFileName();
|
||||
[ObservableProperty] private string _test2 = "Test2";
|
||||
|
||||
[RelayCommand]
|
||||
public void RandomText()
|
||||
|
||||
Reference in New Issue
Block a user