Skip to content

Commit

Permalink
Merge pull request #545 from ChaXxl/dev
Browse files Browse the repository at this point in the history
refactor: 使用三元表达式来选择头像的 source (#543)
  • Loading branch information
zhuzichu520 authored Aug 11, 2024
2 parents b723cfe + 2ee9bfe commit 13bfae4
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 35 deletions.
28 changes: 14 additions & 14 deletions example/example_en_US.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2092,7 +2092,7 @@ Some contents...</source>
</message>
<message>
<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>
<translation type="unfinished"></translation>
</message>
Expand All @@ -2112,67 +2112,67 @@ Some contents...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_TableView.qml" line="364"/>
<location filename="qml/page/T_TableView.qml" line="359"/>
<source>Age</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_TableView.qml" line="439"/>
<location filename="qml/page/T_TableView.qml" line="434"/>
<source>Clear All</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_TableView.qml" line="446"/>
<location filename="qml/page/T_TableView.qml" line="441"/>
<source>Delete Selection</source>
<translation type="unfinished"></translation>
</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>
<translation type="unfinished"></translation>
</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>
<translation type="unfinished"></translation>
</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>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_TableView.qml" line="513"/>
<location filename="qml/page/T_TableView.qml" line="508"/>
<source>Avatar</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_TableView.qml" line="527"/>
<location filename="qml/page/T_TableView.qml" line="522"/>
<source>Address</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_TableView.qml" line="535"/>
<location filename="qml/page/T_TableView.qml" line="530"/>
<source>Nickname</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_TableView.qml" line="542"/>
<location filename="qml/page/T_TableView.qml" line="537"/>
<source>Long String</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_TableView.qml" line="550"/>
<location filename="qml/page/T_TableView.qml" line="545"/>
<source>Options</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_TableView.qml" line="568"/>
<location filename="qml/page/T_TableView.qml" line="563"/>
<source>&lt;Previous</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_TableView.qml" line="569"/>
<location filename="qml/page/T_TableView.qml" line="564"/>
<source>Next&gt;</source>
<translation type="unfinished"></translation>
</message>
Expand Down
30 changes: 15 additions & 15 deletions example/example_zh_CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1092,7 +1092,7 @@ Updated content:
<message>
<location filename="qml/page/T_Captcha.qml" line="52"/>
<source>The verification code is correct</source>
<translation type="unfinished">验证码错误</translation>
<translation type="unfinished">验证成功</translation>
</message>
<message>
<location filename="qml/page/T_Captcha.qml" line="54"/>
Expand Down Expand Up @@ -2274,7 +2274,7 @@ Some contents...</source>
</message>
<message>
<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>
<translation type="unfinished">名称</translation>
</message>
Expand All @@ -2294,67 +2294,67 @@ Some contents...</source>
<translation type="unfinished">全选</translation>
</message>
<message>
<location filename="qml/page/T_TableView.qml" line="364"/>
<location filename="qml/page/T_TableView.qml" line="359"/>
<source>Age</source>
<translation type="unfinished">年龄</translation>
</message>
<message>
<location filename="qml/page/T_TableView.qml" line="439"/>
<location filename="qml/page/T_TableView.qml" line="434"/>
<source>Clear All</source>
<translation type="unfinished">清除所有</translation>
</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>
<translation type="unfinished">插入一行</translation>
</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>
<translation type="unfinished">焦点未获取:请点击表格中的任意一项,作为插入的靶点!</translation>
</message>
<message>
<location filename="qml/page/T_TableView.qml" line="513"/>
<location filename="qml/page/T_TableView.qml" line="508"/>
<source>Avatar</source>
<translation type="unfinished">头像</translation>
</message>
<message>
<location filename="qml/page/T_TableView.qml" line="527"/>
<location filename="qml/page/T_TableView.qml" line="522"/>
<source>Address</source>
<translation type="unfinished">地址</translation>
</message>
<message>
<location filename="qml/page/T_TableView.qml" line="535"/>
<location filename="qml/page/T_TableView.qml" line="530"/>
<source>Nickname</source>
<translation type="unfinished">昵称</translation>
</message>
<message>
<location filename="qml/page/T_TableView.qml" line="542"/>
<location filename="qml/page/T_TableView.qml" line="537"/>
<source>Long String</source>
<translation type="unfinished">长字符串</translation>
</message>
<message>
<location filename="qml/page/T_TableView.qml" line="550"/>
<location filename="qml/page/T_TableView.qml" line="545"/>
<source>Options</source>
<translation type="unfinished">操作</translation>
</message>
<message>
<location filename="qml/page/T_TableView.qml" line="568"/>
<location filename="qml/page/T_TableView.qml" line="563"/>
<source>&lt;Previous</source>
<translation type="unfinished">&lt;上一页</translation>
</message>
<message>
<location filename="qml/page/T_TableView.qml" line="569"/>
<location filename="qml/page/T_TableView.qml" line="564"/>
<source>Next&gt;</source>
<translation type="unfinished">下一页&gt;</translation>
</message>
<message>
<location filename="qml/page/T_TableView.qml" line="446"/>
<location filename="qml/page/T_TableView.qml" line="441"/>
<source>Delete Selection</source>
<translation type="unfinished">删除选中</translation>
</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>
<translation type="unfinished">添加一行数据</translation>
</message>
Expand Down
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 13bfae4

Please sign in to comment.