Ver código fonte

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

tags/jenkins-front-end-screenad-111-v77^0
hupeng 6 anos atrás
pai
commit
ccf9eec973
1 arquivos alterados com 14 adições e 11 exclusões
  1. +14
    -11
      App.js

+ 14
- 11
App.js Ver arquivo

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


Carregando…
Cancelar
Salvar