nuke-list-view
Advanced tools
Comparing version 2.2.29 to 2.3.0
@@ -6,2 +6,18 @@ # Change Log | ||
# [2.3.0](https://gitlab.alibaba-inc.com/nuke/list-view/compare/v2.2.29...v2.3.0) (2018-11-14) | ||
### Bug Fixes | ||
* liscene fix ([ff9b7fd](https://gitlab.alibaba-inc.com/nuke/list-view/commit/ff9b7fd)) | ||
### Features | ||
* 将UI组件与功能库拆分 ([f5d0a2c](https://gitlab.alibaba-inc.com/nuke/list-view/commit/f5d0a2c)) | ||
## [2.2.29](https://gitlab.alibaba-inc.com/nuke/list-view/compare/v2.2.28...v2.2.29) (2018-10-09) | ||
@@ -8,0 +24,0 @@ |
@@ -1,10 +0,24 @@ | ||
# ListView demo | ||
# ListView 基本使用 | ||
- order: 0 | ||
- title_en: ListView usage | ||
包含无限下拉,resetLoadmore等 | ||
--- | ||
```js | ||
<NukePlayGround> | ||
<ListView | ||
renderHeader={func} | ||
renderFooter={func} | ||
renderRow={func} | ||
dataSource={[dataArray]} | ||
style={style} | ||
onEndReached={LoadMore func} | ||
/> | ||
</NukePlayGround> | ||
``` | ||
--- | ||
````js | ||
```js | ||
/** @jsx createElement */ | ||
@@ -32,5 +46,6 @@ import { createElement, PureComponent, Component, render } from 'rax'; | ||
onPress(id); | ||
}} | ||
> | ||
<Text style={styles.itemTextList}>{text}-{id}</Text> | ||
}}> | ||
<Text style={styles.itemTextList}> | ||
{text}-{id} | ||
</Text> | ||
</Touchable> | ||
@@ -48,3 +63,3 @@ ); | ||
showLoading: true, | ||
refreshText: '↓ 下拉刷新', | ||
refreshText: '↓ 下拉刷新' | ||
}; | ||
@@ -64,3 +79,3 @@ this.onRefresh = this.onRefresh.bind(this); | ||
isRefreshing: true, | ||
refreshText: '加载中', | ||
refreshText: '加载中' | ||
}); | ||
@@ -71,3 +86,3 @@ setTimeout(() => { | ||
data: [...originalData], | ||
refreshText: '↓ 下拉刷新', | ||
refreshText: '↓ 下拉刷新' | ||
}); | ||
@@ -82,6 +97,6 @@ }, 1000); | ||
id: 'b100', | ||
text: '新数据', | ||
text: '新数据' | ||
}); | ||
this.setState({ | ||
data: this.state.data, | ||
data: this.state.data | ||
}); | ||
@@ -92,7 +107,3 @@ }, 300); | ||
return ( | ||
<RefreshControl | ||
style={styles.refresh} | ||
refreshing={this.state.isRefreshing} | ||
onRefresh={this.onRefresh} | ||
> | ||
<RefreshControl style={styles.refresh} refreshing={this.state.isRefreshing} onRefresh={this.onRefresh}> | ||
<Text style={styles.loadingText}>{this.state.refreshText}</Text> | ||
@@ -103,5 +114,3 @@ </RefreshControl> | ||
renderItem(item, index) { | ||
return ( | ||
<ListItem id={item.id} text={item.text} onPress={this.onItemPress} /> | ||
); | ||
return <ListItem id={item.id} text={item.text} onPress={this.onItemPress} />; | ||
} | ||
@@ -131,3 +140,3 @@ renderFooter() { | ||
listContainer: { | ||
flex: 1, | ||
flex: 1 | ||
}, | ||
@@ -140,10 +149,10 @@ cellItem: { | ||
alignItems: 'center', | ||
justifyContent:'center', | ||
justifyContent: 'center', | ||
borderBottomWidth: 1, | ||
borderBottomStyle: 'solid', | ||
borderBottomColor: '#e6e7eb', | ||
borderBottomColor: '#e6e7eb' | ||
}, | ||
itemTextList: { | ||
fontSize: 32, | ||
color: '#5F646E', | ||
color: '#5F646E' | ||
}, | ||
@@ -155,3 +164,3 @@ refresh: { | ||
justifyContent: 'center', | ||
alignItems: 'center', | ||
alignItems: 'center' | ||
}, | ||
@@ -164,11 +173,10 @@ loading: { | ||
alignItems: 'center', | ||
justifyContent: 'center', | ||
justifyContent: 'center' | ||
}, | ||
loadingText: { | ||
color: '#666666', | ||
}, | ||
color: '#666666' | ||
} | ||
}; | ||
render(<ListViewDemo />); | ||
```` | ||
``` |
# github trends list | ||
* order: 1 | ||
- order: 1 | ||
@@ -29,4 +29,3 @@ 从 github 拉取热门趋势,演示网络请求与 ListView 综合使用。 | ||
Navigator.push(url); | ||
}} | ||
> | ||
}}> | ||
<Text style={styles.repo}>{repo}</Text> | ||
@@ -75,3 +74,3 @@ <Text style={styles.desc}>{description}</Text> | ||
}); | ||
this.fetchData().then(data => { | ||
this.fetchData().then((data) => { | ||
this.page = this.page + 1; | ||
@@ -94,3 +93,3 @@ this.setState({ | ||
} | ||
).then(response => { | ||
).then((response) => { | ||
return response.json(); | ||
@@ -123,3 +122,3 @@ }); | ||
this.fetchData().then( | ||
data => { | ||
(data) => { | ||
this.page = this.page + 1; | ||
@@ -132,3 +131,3 @@ this.setState({ | ||
}, | ||
error => {} | ||
(error) => {} | ||
); | ||
@@ -138,3 +137,3 @@ } | ||
onLoadMore() { | ||
this.fetchData().then(data => { | ||
this.fetchData().then((data) => { | ||
this.page = this.page + 1; | ||
@@ -150,7 +149,3 @@ let newdata = this.formatData(data.items); | ||
return ( | ||
<RefreshControl | ||
style={styles.refresh} | ||
refreshing={this.state.isRefreshing} | ||
onRefresh={this.onRefresh} | ||
> | ||
<RefreshControl style={styles.refresh} refreshing={this.state.isRefreshing} onRefresh={this.onRefresh}> | ||
<Text style={styles.loadingText}>{this.state.refreshText}</Text> | ||
@@ -157,0 +152,0 @@ </RefreshControl> |
{ | ||
"name": "nuke-list-view", | ||
"version": "2.2.29", | ||
"version": "2.3.0", | ||
"description": "列表", | ||
@@ -28,18 +28,18 @@ "main": "lib/index", | ||
"dependencies": { | ||
"nuke-cell": "^2.2.29", | ||
"nuke-env": "^2.2.29", | ||
"nuke-header": "^2.2.29", | ||
"nuke-refresh-control": "^2.2.29", | ||
"nuke-scroll-view": "^2.2.29" | ||
"nuke-cell": "^2.3.0", | ||
"nuke-env": "^2.3.0", | ||
"nuke-header": "^2.3.0", | ||
"nuke-refresh-control": "^2.3.0", | ||
"nuke-scroll-view": "^2.3.0" | ||
}, | ||
"devDependencies": { | ||
"nuke-button": "^2.2.29", | ||
"nuke-iconfont": "^2.2.29", | ||
"nuke-image": "^2.2.29", | ||
"nuke-modal": "^2.2.29", | ||
"nuke-navigator": "^2.2.29", | ||
"nuke-page": "^2.2.29", | ||
"nuke-text": "^2.2.29", | ||
"nuke-touchable": "^2.2.29", | ||
"nuke-view": "^2.2.29" | ||
"nuke-button": "^2.3.0", | ||
"nuke-iconfont": "^2.3.0", | ||
"nuke-image": "^2.3.0", | ||
"nuke-modal": "^2.3.0", | ||
"nuke-navigator": "^2.3.0", | ||
"nuke-page": "^2.3.0", | ||
"nuke-text": "^2.3.0", | ||
"nuke-touchable": "^2.3.0", | ||
"nuke-view": "^2.3.0" | ||
}, | ||
@@ -49,4 +49,4 @@ "publishConfig": { | ||
}, | ||
"license": "Apache", | ||
"gitHead": "0375bb11b20b155440e12aa572843944be7d8760" | ||
"license": "Apache-2.0", | ||
"gitHead": "454e1430a04b6e345edb1d2632b1e051408d070d" | ||
} |
@@ -17,12 +17,12 @@ # Listview | ||
Attribute | Explanation | Type | Default | ||
-----|-----|-----|------ | ||
renderHeader | header | function | null | ||
renderFooter | footer | function | null | ||
renderRow | render single row | function | null | ||
dataSource | data source |array |null | ||
onEndReached | The event that was triggered when the unit was loaded | onloadmore event |null | ||
onEndReachedThreshold | load more displacement | string | 500 | ||
showScrollbar | show the scroll bar | bool | null | ||
resetLoadmore | reset the loadmore count(explanation following) | function | null | ||
| Attribute | Description | Type | Default | | ||
| --------------------- | ----------------------------------------------------- | ---------------- | ------- | | ||
| renderHeader | header | function | null | | ||
| renderFooter | footer | function | null | | ||
| renderRow | render single row | function | null | | ||
| dataSource | data source | array | null | | ||
| onEndReached | The event that was triggered when the unit was loaded | onloadmore event | null | | ||
| onEndReachedThreshold | load more displacement | string | 500 | | ||
| showScrollbar | show the scroll bar | bool | null | | ||
| resetLoadmore | reset the loadmore count(explanation following) | function | null | | ||
@@ -29,0 +29,0 @@ |
@@ -50,1 +50,8 @@ # Listview | ||
``` | ||
## 其他 | ||
- bug、建议联系 <a href="dingtalk://dingtalkclient/action/sendmsg?dingtalk_id=kjwo3w5">@翊晨</a> | ||
- 钉钉交流群 | ||
<img src="https://img.alicdn.com/tfs/TB101EESpXXXXXFXpXXXXXXXXXX-1122-1362.jpg" width="260" /> |
Misc. License Issues
License(Experimental) A package's licensing information has fine-grained problems.
Found 1 instance in 1 package
63462
0
56
Updatednuke-cell@^2.3.0
Updatednuke-env@^2.3.0
Updatednuke-header@^2.3.0
Updatednuke-refresh-control@^2.3.0
Updatednuke-scroll-view@^2.3.0