Przeglądaj źródła

[显示][修改]:封装代码更新显示页面

tags/jenkins-front-end-screenad-111-v77^0
hupeng 6 lat temu
rodzic
commit
ccf9eec973
1 zmienionych plików z 14 dodań i 11 usunięć
  1. +14
    -11
      App.js

+ 14
- 11
App.js Wyświetl plik

@@ -424,21 +424,24 @@ getContentView() {
}
}

render() {

if (this.state.progress) {
if (this.state.progress.totalBytes > 0)
return (
<Text style={styles.updatePage}>{this.state.syncMessage}{'\n'}
{this.state.progress.receivedBytes} of {this.state.progress.totalBytes} bytes received{'\n'}
</Text>
);
getUpdateView() {
if (this.state.progress.totalBytes > 0)
return (
<Text style={styles.updatePage}>{this.state.syncMessage}
<Text style={styles.updatePage}>{this.state.syncMessage}{'\n'}
{this.state.progress.receivedBytes} of {this.state.progress.totalBytes} bytes received{'\n'}
</Text>
);
}
return (
<Text style={styles.updatePage}>{this.state.syncMessage}
</Text>
);
}

render() {

if (this.state.progress) {
this.getUpdateView();
}

return (
<ImageBackground style={styles.background} resizeMode='center' source={require('./image/background.png')}>


Ładowanie…
Anuluj
Zapisz