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]
|
radius: [20,20,20,20]
|
||||||
Image{
|
Image{
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
source: {
|
source: options && options.avatar ? options.avatar : ""
|
||||||
if(options && options.avatar){
|
|
||||||
return options.avatar
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
sourceSize: Qt.size(80,80)
|
sourceSize: Qt.size(80,80)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user