0

我有这个react-native-paper按钮:

      <Button
        disabled={loading}
        icon="refresh"
        mode="contained"
        onPress={this.refreshData.bind(this)}
      >
        Refresh
      </Button>

我怎样才能让图标在什么时候旋转loading=true

4

1 回答 1

1

对于旋转图标,请执行此操作。

refreshing当数据刷新值设置为真并且图标旋转开始时,声明一个变量任何布尔值。

      <Button
        loading={loading}
        disabled={loading}
        icon="refresh"
        mode="contained"
        onPress={this.refreshData.bind(this)}
      >
        Refresh
      </Button>

react-native-paper 按钮有类似的道具..加载它只是旋转图标

这里小吃链接

于 2020-02-18T11:05:54.617 回答