Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(props) {
super(props)
this.props = props
const ds = new ListView.DataSource({
rowHasChanged: (r1, r2) => { return r1 !== r2 }
})
this._footer = this._footer.bind(this)
this._row = this._row.bind(this)
this._onRefresh = this._onRefresh.bind(this)
this.ds = ds
this.state = {
_data: [],
// refresh: false
}
}
import React from 'react';
import { connect } from 'dva';
import styles from './IndexPage.less';
import { NavBar, Icon, SearchBar, Tabs, WhiteSpace, Badge, List, ListView } from 'antd-mobile';
const tabs = [
{ title: First Tab },
{ title: Second Tab },
];
const Item = List.Item;
const Brief = Item.Brief;
const DS = new ListView.DataSource({ rowHasChanged: (r1, r2) => r1 !== r2 });
const dataSource = DS.cloneWithRows([1111, 222, 3333, 4444, 55555, 6, 7, 8, 9, 90, 100, 234])
function IndexPage() {
return (
<div>
<div>
} mode="dark">微信浏览器禁止页面下拉查看网址
</div>
<div>
<div>
<div style="{{" id="LIST">
{ console.log('onChange', index, tab); }}</div></div></div></div>
createDataSource({ employees }) {
const ds = new ListView.DataSource({
rowHasChanged: (r1, r2) => r1 !== r2
});
this.dataSource = ds.cloneWithRows(employees);
}
formatDataSource() {
const data = new ListView.DataSource({
rowHasChanged: (row1, row2) => row1 !== row2
});
return data.cloneWithRows(this.props.data);
}
import React from 'react';
import { PullToRefresh, ListView, ActivityIndicator } from 'antd-mobile';
import HouseItem from './Item';
import Empty from '../Empty';
const NoMoreText = '没有更多了哦~';
const ds = new ListView.DataSource({
rowHasChanged: (r1, r2) => r1 !== r2
});
const row = rowData => ;
const EmptyHandle = list =>
list && list.length === 0 ? (
) : null;
export default props => {
const { list, height } = props;
return list && list.length ? (
<div>
</div>
render() {
const dataSource = new ListView.DataSource({
rowHasChanged: (row1, row2) => row1 !== row2
}).cloneWithRows(this.props.resumeOrder.list)
const separator = (sectionID, rowID) =>
const row = (rowData, sectionID, rowID) => {
return (
<div>
<button> {
this.props.navigateTo(
'/account/resumeorders/edit/' + rowData.objectId</button></div>
render() {
const dataSource = new ListView.DataSource({
rowHasChanged: (row1, row2) => row1 !== row2
}).cloneWithRows(this.props.recruitOrder.list)
const separator = (sectionID, rowID) =>
const row = (rowData, sectionID, rowID) => {
return (
<div>
<button> {
this.props.navigateTo(
'/account/recruitorders/edit/' + rowData.objectId</button></div>
constructor() {
super();
const dataSource = new ListView.DataSource({
rowHasChanged: (row1, row2) => row1 !== row2
});
this.state = {
pageSize: 10,
category: [],
categoryIndex: 0,
categorySub: [],
active: 0,
loading: false,
finished: false,
isRefresh: false,
page: 1,
goodList: [],
categorySubId: "",
errorImg:
'this.src="' + require("../../resource/images/errorImg.jpg") + '"',
componentWillReceiveProps (newProps) {
let dataSource = new ListView.DataSource({
rowHasChanged: (r1, r2) => r1 !== r2
});
this.setState({
dataSource: dataSource.cloneWithRows(newProps.data.slice())
});
}