Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pagination 分页报错 #321

Open
1 of 2 tasks
Zyyao11 opened this issue Dec 7, 2018 · 5 comments
Open
1 of 2 tasks

Pagination 分页报错 #321

Zyyao11 opened this issue Dec 7, 2018 · 5 comments

Comments

@Zyyao11
Copy link

Zyyao11 commented Dec 7, 2018

请按照以下模板填写,不按照标准模板填写的 issue 将降低处理优先级。

这是一个

  • 错误报告
  • 功能需求

SaltUI 版本

4.2.2

浏览器、操作系统等环境信息

chrome 70.0.3538.110(正式版本) (64 位)
macOS 10.13.6

复现步骤

Warning: Invalid argument supplied to oneOf, expected an instance of array.

  • 你可以在这里提交你的 CodePen 链接 以及描述复现的步骤
@eternalsky
Copy link
Contributor

请提供复现 demo。

@Zyyao11
Copy link
Author

Zyyao11 commented Dec 7, 2018

import { Component } from 'refast';

import Storage from '../../app/storage';
import { Pagination } from 'saltui';
import config from "../../app/variables";

export default class PagePayroll extends Component {

constructor(props) {
	super(props);

	this.state = {
        current: 9,
      };

}
componentDidMount() {

}
handleGotoDetail(){
console.log('1>>点击修改当前页面为4,current:'+this.state.current)
let t = this;
t.state.current=4;
t.setState({
current:4
})
console.log('2>>>>>>>点击修改当前页面为4,current:'+this.state.current)

}

render() {
const t = this;

return (
  <div className="page-result-searchBox page-result-search">

  <div  onClick={this.handleGotoDetail.bind(this)}><h5>点击修改当前页面为4</h5></div>
  <br></br>

  此时:{this.state.current}

  <Pagination
      current={this.state.current} total={101} pageSize={10}
      onChange={(current) => {
        console.log(current);
        this.setState({ current });
      }}
    />



  

  </div>
);

}
}

@eternalsky
Copy link
Contributor

请通过 https://codepen.io/eternalsky/pen/WpzYrv 提供一个可以 debug 的版本。

@Zyyao11
Copy link
Author

Zyyao11 commented Dec 11, 2018

https://codepen.io/zyyao11/details/gZOZzy 无法复现,想请问具体的SaltUI版本,本地运行的是4.2.2版本,期间测试过程中,3.1.7版本是可以使用

@Zyyao11
Copy link
Author

Zyyao11 commented Dec 11, 2018

@stale stale bot added the stale label Dec 18, 2018
@eternalsky eternalsky removed the stale label Dec 18, 2018
@stale stale bot added the stale label Dec 25, 2018
@salt-ui salt-ui deleted a comment from stale bot Dec 28, 2018
@salt-ui salt-ui deleted a comment from stale bot Dec 28, 2018
@stale stale bot removed the stale label Dec 28, 2018
@eternalsky eternalsky added the bug label Dec 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants