mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2025-07-03 16:45:24 +08:00
refactor: 使用三元表达式来选择头像的 source
This commit is contained in:
@ -315,12 +315,7 @@ FluContentPage{
|
||||
radius: [20,20,20,20]
|
||||
Image{
|
||||
anchors.fill: parent
|
||||
source: {
|
||||
if(options && options.avatar){
|
||||
return options.avatar
|
||||
}
|
||||
return ""
|
||||
}
|
||||
source: options && options.avatar ? options.avatar : ""
|
||||
sourceSize: Qt.size(80,80)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user