@@ -108,16 +108,18 @@ public static class Utility
108108 /// <typeparam name="TResult"></typeparam>
109109 /// <param name="model"></param>
110110 /// <param name="fieldName"></param>
111+ /// <param name="supportComplexProperty"></param>
111112 /// <returns></returns>
112- public static TResult GetPropertyValue < TModel , TResult > ( TModel model , string fieldName ) => CacheManager . GetPropertyValue < TModel , TResult > ( model , fieldName ) ;
113+ public static TResult GetPropertyValue < TModel , TResult > ( TModel model , string fieldName , bool supportComplexProperty = true ) => CacheManager . GetPropertyValue < TModel , TResult > ( model , fieldName , supportComplexProperty ) ;
113114
114115 /// <summary>
115116 /// 获取 指定对象的属性值
116117 /// </summary>
117118 /// <param name="model"></param>
118119 /// <param name="fieldName"></param>
120+ /// <param name="supportComplexProperty"></param>
119121 /// <returns></returns>
120- public static object ? GetPropertyValue ( object model , string fieldName )
122+ public static object ? GetPropertyValue ( object model , string fieldName , bool supportComplexProperty = true )
121123 {
122124 return model . GetType ( ) . Assembly . IsDynamic ? ReflectionInvoke ( ) : LambdaInvoke ( ) ;
123125
@@ -132,7 +134,7 @@ public static class Utility
132134 return ret ;
133135 }
134136
135- object ? LambdaInvoke ( ) => GetPropertyValue < object , object ? > ( model , fieldName ) ;
137+ object ? LambdaInvoke ( ) => GetPropertyValue < object , object ? > ( model , fieldName , supportComplexProperty ) ;
136138 }
137139
138140 /// <summary>
@@ -143,8 +145,9 @@ public static class Utility
143145 /// <param name="model"></param>
144146 /// <param name="fieldName"></param>
145147 /// <param name="value"></param>
148+ /// <param name="supportComplexProperty"></param>
146149 /// <returns></returns>
147- public static void SetPropertyValue < TModel , TValue > ( TModel model , string fieldName , TValue value ) => CacheManager . SetPropertyValue ( model , fieldName , value ) ;
150+ public static void SetPropertyValue < TModel , TValue > ( TModel model , string fieldName , TValue value , bool supportComplexProperty = true ) => CacheManager . SetPropertyValue ( model , fieldName , value , supportComplexProperty ) ;
148151
149152 /// <summary>
150153 /// 获得 排序方法
@@ -866,7 +869,7 @@ static Expression<Func<ComponentBase, object, string, object>> CreateLambda(Type
866869 /// <param name="model"></param>
867870 /// <param name="fieldName"></param>
868871 /// <returns></returns>
869- public static EventCallback < TType > CreateCallback < TType > ( ComponentBase component , object model , string fieldName ) => EventCallback . Factory . Create < TType > ( component , t => CacheManager . SetPropertyValue ( model , fieldName , t ) ) ;
872+ public static EventCallback < TType > CreateCallback < TType > ( ComponentBase component , object model , string fieldName ) => EventCallback . Factory . Create < TType > ( component , t => CacheManager . SetPropertyValue ( model , fieldName , t , true ) ) ;
870873
871874 /// <summary>
872875 /// 获得指定泛型的 IEditorItem 集合
0 commit comments