mirror of
https://gitee.com/ant-design-vue/ant-design-vue.git
synced 2024-12-04 04:58:16 +08:00
fix pagination
This commit is contained in:
parent
fab5c432ca
commit
73597a19e5
@ -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)
|
||||
|
@ -101,7 +101,7 @@ export default {
|
||||
gotoButton = (
|
||||
<span
|
||||
onClick={this.go}
|
||||
onKeyUp={this.go}
|
||||
onKeyup={this.go}
|
||||
>{goButton}</span>
|
||||
)
|
||||
}
|
||||
|
@ -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 () {
|
||||
|
@ -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>
|
||||
)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user