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: {
|
model: {
|
||||||
prop: 'current',
|
prop: 'current',
|
||||||
},
|
},
|
||||||
data () {
|
|
||||||
const { current } = this
|
|
||||||
return {
|
|
||||||
stateCurrent: +current,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
renderPagination (locale) {
|
renderPagination (locale) {
|
||||||
const { buildOptionText, size, ...restProps } = getOptionProps(this)
|
const { buildOptionText, size, ...restProps } = getOptionProps(this)
|
||||||
|
@ -101,7 +101,7 @@ export default {
|
|||||||
gotoButton = (
|
gotoButton = (
|
||||||
<span
|
<span
|
||||||
onClick={this.go}
|
onClick={this.go}
|
||||||
onKeyUp={this.go}
|
onKeyup={this.go}
|
||||||
>{goButton}</span>
|
>{goButton}</span>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -22,9 +22,6 @@ export default {
|
|||||||
if (this.active) {
|
if (this.active) {
|
||||||
cls = `${cls} ${prefixCls}-active`
|
cls = `${cls} ${prefixCls}-active`
|
||||||
}
|
}
|
||||||
if (this.className) {
|
|
||||||
cls = `${cls} ${this.className}`
|
|
||||||
}
|
|
||||||
return cls
|
return cls
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -33,7 +30,7 @@ export default {
|
|||||||
this.$emit('click', this.page)
|
this.$emit('click', this.page)
|
||||||
},
|
},
|
||||||
handleKeyPress (event) {
|
handleKeyPress (event) {
|
||||||
this.$emit('keyPress', event, this.handleClick, this.page)
|
this.$emit('keypress', event, this.handleClick, this.page)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
render () {
|
render () {
|
||||||
|
@ -84,7 +84,7 @@ export default {
|
|||||||
let current = this.current
|
let current = this.current
|
||||||
const newCurrent = this.calculatePage(val)
|
const newCurrent = this.calculatePage(val)
|
||||||
current = current > newCurrent ? newCurrent : current
|
current = current > newCurrent ? newCurrent : current
|
||||||
if (hasProp(this, 'current')) {
|
if (!hasProp(this, 'current')) {
|
||||||
newState.stateCurrent = current
|
newState.stateCurrent = current
|
||||||
newState.stateCurrentInputValue = current
|
newState.stateCurrentInputValue = current
|
||||||
}
|
}
|
||||||
@ -188,7 +188,7 @@ export default {
|
|||||||
stateCurrentInputValue: page,
|
stateCurrentInputValue: page,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
this.$emit('input', page)
|
// this.$emit('input', page)
|
||||||
this.$emit('change', page, this.statePageSize)
|
this.$emit('change', page, this.statePageSize)
|
||||||
return page
|
return page
|
||||||
}
|
}
|
||||||
@ -254,7 +254,7 @@ export default {
|
|||||||
<button
|
<button
|
||||||
type='button'
|
type='button'
|
||||||
onClick={this.handleGoTO}
|
onClick={this.handleGoTO}
|
||||||
onKeyUp={this.handleGoTO}
|
onKeyup={this.handleGoTO}
|
||||||
>
|
>
|
||||||
{locale.jump_to_confirm}
|
{locale.jump_to_confirm}
|
||||||
</button>
|
</button>
|
||||||
@ -263,7 +263,7 @@ export default {
|
|||||||
gotoButton = (
|
gotoButton = (
|
||||||
<span
|
<span
|
||||||
onClick={this.handleGoTO}
|
onClick={this.handleGoTO}
|
||||||
onKeyUp={this.handleGoTO}
|
onKeyup={this.handleGoTO}
|
||||||
>{goButton}</span>
|
>{goButton}</span>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user