1
This commit is contained in:
@@ -51,7 +51,12 @@ namespace BITKit.UX
|
||||
)
|
||||
{
|
||||
var bindPathAtt = fieldInfo.GetCustomAttribute<UXBindPathAttribute>();
|
||||
var ve = document.rootVisualElement.Q(bindPathAtt.Path);
|
||||
VisualElement ve = document.rootVisualElement;
|
||||
foreach (var path in bindPathAtt.Path.Split("."))
|
||||
{
|
||||
ve = ve.Q(path);
|
||||
}
|
||||
//ve = document.rootVisualElement.Q(bindPathAtt.Path);
|
||||
if(bindPathAtt.CanBeNull is false && ve is null)
|
||||
BIT4Log.LogException(new NullReferenceException($"未找到{bindPathAtt.Path}"));
|
||||
fieldInfo.SetValue(self,ve);
|
||||
|
Reference in New Issue
Block a user