fix pagination

This commit is contained in:
tangjinzhou 2018-03-07 10:48:33 +08:00
parent fab5c432ca
commit 73597a19e5
4 changed files with 6 additions and 15 deletions

View File

@ -40,12 +40,6 @@ export default {
model: {
prop: 'current',
},
data () {
const { current } = this
return {
stateCurrent: +current,
}
},
methods: {
renderPagination (locale) {
const { buildOptionText, size, ...restProps } = getOptionProps(this)

View File

@ -101,7 +101,7 @@ export default {
gotoButton = (
<span
onClick={this.go}
onKeyUp={this.go}
onKeyup={this.go}
>{goButton}</span>
)
}

View File

@ -22,9 +22,6 @@ export default {
if (this.active) {
cls = `${cls} ${prefixCls}-active`
}
if (this.className) {
cls = `${cls} ${this.className}`
}
return cls
},
},
@ -33,7 +30,7 @@ export default {
this.$emit('click', this.page)
},
handleKeyPress (event) {
this.$emit('keyPress', event, this.handleClick, this.page)
this.$emit('keypress', event, this.handleClick, this.page)
},
},
render () {

View File

@ -84,7 +84,7 @@ export default {
let current = this.current
const newCurrent = this.calculatePage(val)
current = current > newCurrent ? newCurrent : current
if (hasProp(this, 'current')) {
if (!hasProp(this, 'current')) {
newState.stateCurrent = current
newState.stateCurrentInputValue = current
}
@ -188,7 +188,7 @@ export default {
stateCurrentInputValue: page,
})
}
this.$emit('input', page)
// this.$emit('input', page)
this.$emit('change', page, this.statePageSize)
return page
}
@ -254,7 +254,7 @@ export default {
<button
type='button'
onClick={this.handleGoTO}
onKeyUp={this.handleGoTO}
onKeyup={this.handleGoTO}
>
{locale.jump_to_confirm}
</button>
@ -263,7 +263,7 @@ export default {
gotoButton = (
<span
onClick={this.handleGoTO}
onKeyUp={this.handleGoTO}
onKeyup={this.handleGoTO}
>{goButton}</span>
)
}