mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-23 19:20:59 +08:00
refactor: 使用三元表达式来选择头像的 source
This commit is contained in:
parent
b723cfec4e
commit
4a457e15fa
@ -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)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user