This commit is contained in:
zzzisfunnyboy
2025-06-16 21:39:44 +08:00
parent 3c69d0117d
commit 4dbfd25f3f
9 changed files with 44 additions and 20 deletions

10
3Resources/Unity/MVVM.md Normal file
View File

@@ -0,0 +1,10 @@
结论比一般的在属性中直接设置Text文本更复杂小型项目没有必要
需要一个View一个ViewModel
绑定使用表达式树封装成Action
- 需要定义数据到UI显示的格式化
- bindingSet.For(view=>view.SetText)
- 需要定义绑定哪个字段
- bindingSet.To(viewModel=>viewModel.XXX)