Skip to content

Commit

Permalink
refactor: 使用三元表达式来选择头像的 source
Browse files Browse the repository at this point in the history
  • Loading branch information
ChaXxl committed Aug 11, 2024
1 parent b723cfe commit 4a457e1
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions example/qml/page/T_TableView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down

0 comments on commit 4a457e1

Please sign in to comment.