Merge pull request #545 from ChaXxl/dev

refactor: 使用三元表达式来选择头像的 source (#543)
This commit is contained in:
zhuzichu 2024-08-11 17:37:24 +08:00 committed by GitHub
commit 13bfae4681
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 30 additions and 35 deletions

View File

@ -2092,7 +2092,7 @@ Some contents...</source>
</message> </message>
<message> <message>
<location filename="qml/page/T_TableView.qml" line="176"/> <location filename="qml/page/T_TableView.qml" line="176"/>
<location filename="qml/page/T_TableView.qml" line="508"/> <location filename="qml/page/T_TableView.qml" line="503"/>
<source>Name</source> <source>Name</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -2112,67 +2112,67 @@ Some contents...</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="qml/page/T_TableView.qml" line="364"/> <location filename="qml/page/T_TableView.qml" line="359"/>
<source>Age</source> <source>Age</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="qml/page/T_TableView.qml" line="439"/> <location filename="qml/page/T_TableView.qml" line="434"/>
<source>Clear All</source> <source>Clear All</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="qml/page/T_TableView.qml" line="446"/> <location filename="qml/page/T_TableView.qml" line="441"/>
<source>Delete Selection</source> <source>Delete Selection</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="qml/page/T_TableView.qml" line="469"/> <location filename="qml/page/T_TableView.qml" line="464"/>
<source>Add a row of Data</source> <source>Add a row of Data</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="qml/page/T_TableView.qml" line="475"/> <location filename="qml/page/T_TableView.qml" line="470"/>
<source>Insert a Row</source> <source>Insert a Row</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="qml/page/T_TableView.qml" line="482"/> <location filename="qml/page/T_TableView.qml" line="477"/>
<source>Focus not acquired: Please click any item in the form as the target for insertion!</source> <source>Focus not acquired: Please click any item in the form as the target for insertion!</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="qml/page/T_TableView.qml" line="513"/> <location filename="qml/page/T_TableView.qml" line="508"/>
<source>Avatar</source> <source>Avatar</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="qml/page/T_TableView.qml" line="527"/> <location filename="qml/page/T_TableView.qml" line="522"/>
<source>Address</source> <source>Address</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="qml/page/T_TableView.qml" line="535"/> <location filename="qml/page/T_TableView.qml" line="530"/>
<source>Nickname</source> <source>Nickname</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="qml/page/T_TableView.qml" line="542"/> <location filename="qml/page/T_TableView.qml" line="537"/>
<source>Long String</source> <source>Long String</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="qml/page/T_TableView.qml" line="550"/> <location filename="qml/page/T_TableView.qml" line="545"/>
<source>Options</source> <source>Options</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="qml/page/T_TableView.qml" line="568"/> <location filename="qml/page/T_TableView.qml" line="563"/>
<source>&lt;Previous</source> <source>&lt;Previous</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="qml/page/T_TableView.qml" line="569"/> <location filename="qml/page/T_TableView.qml" line="564"/>
<source>Next&gt;</source> <source>Next&gt;</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>

View File

@ -1092,7 +1092,7 @@ Updated content:
<message> <message>
<location filename="qml/page/T_Captcha.qml" line="52"/> <location filename="qml/page/T_Captcha.qml" line="52"/>
<source>The verification code is correct</source> <source>The verification code is correct</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="qml/page/T_Captcha.qml" line="54"/> <location filename="qml/page/T_Captcha.qml" line="54"/>
@ -2274,7 +2274,7 @@ Some contents...</source>
</message> </message>
<message> <message>
<location filename="qml/page/T_TableView.qml" line="176"/> <location filename="qml/page/T_TableView.qml" line="176"/>
<location filename="qml/page/T_TableView.qml" line="508"/> <location filename="qml/page/T_TableView.qml" line="503"/>
<source>Name</source> <source>Name</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -2294,67 +2294,67 @@ Some contents...</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="qml/page/T_TableView.qml" line="364"/> <location filename="qml/page/T_TableView.qml" line="359"/>
<source>Age</source> <source>Age</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="qml/page/T_TableView.qml" line="439"/> <location filename="qml/page/T_TableView.qml" line="434"/>
<source>Clear All</source> <source>Clear All</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="qml/page/T_TableView.qml" line="475"/> <location filename="qml/page/T_TableView.qml" line="470"/>
<source>Insert a Row</source> <source>Insert a Row</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="qml/page/T_TableView.qml" line="482"/> <location filename="qml/page/T_TableView.qml" line="477"/>
<source>Focus not acquired: Please click any item in the form as the target for insertion!</source> <source>Focus not acquired: Please click any item in the form as the target for insertion!</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="qml/page/T_TableView.qml" line="513"/> <location filename="qml/page/T_TableView.qml" line="508"/>
<source>Avatar</source> <source>Avatar</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="qml/page/T_TableView.qml" line="527"/> <location filename="qml/page/T_TableView.qml" line="522"/>
<source>Address</source> <source>Address</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="qml/page/T_TableView.qml" line="535"/> <location filename="qml/page/T_TableView.qml" line="530"/>
<source>Nickname</source> <source>Nickname</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="qml/page/T_TableView.qml" line="542"/> <location filename="qml/page/T_TableView.qml" line="537"/>
<source>Long String</source> <source>Long String</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="qml/page/T_TableView.qml" line="550"/> <location filename="qml/page/T_TableView.qml" line="545"/>
<source>Options</source> <source>Options</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="qml/page/T_TableView.qml" line="568"/> <location filename="qml/page/T_TableView.qml" line="563"/>
<source>&lt;Previous</source> <source>&lt;Previous</source>
<translation type="unfinished">&lt;</translation> <translation type="unfinished">&lt;</translation>
</message> </message>
<message> <message>
<location filename="qml/page/T_TableView.qml" line="569"/> <location filename="qml/page/T_TableView.qml" line="564"/>
<source>Next&gt;</source> <source>Next&gt;</source>
<translation type="unfinished">&gt;</translation> <translation type="unfinished">&gt;</translation>
</message> </message>
<message> <message>
<location filename="qml/page/T_TableView.qml" line="446"/> <location filename="qml/page/T_TableView.qml" line="441"/>
<source>Delete Selection</source> <source>Delete Selection</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="qml/page/T_TableView.qml" line="469"/> <location filename="qml/page/T_TableView.qml" line="464"/>
<source>Add a row of Data</source> <source>Add a row of Data</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>

View File

@ -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)
} }
} }