mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-04 20:27:44 +08:00
fix(components): [pagination] delete input value display empty string (#12134)
This commit is contained in:
parent
d85ed0f6fa
commit
128fe7026a
@ -35,16 +35,16 @@ defineProps(paginationJumperProps)
|
||||
const { t } = useLocale()
|
||||
const ns = useNamespace('pagination')
|
||||
const { pageCount, disabled, currentPage, changeEvent } = usePagination()
|
||||
const userInput = ref<number>()
|
||||
const userInput = ref<number | string>()
|
||||
const innerValue = computed(() => userInput.value ?? currentPage?.value)
|
||||
|
||||
function handleInput(val: number | string) {
|
||||
userInput.value = +val
|
||||
userInput.value = val ? +val : ''
|
||||
}
|
||||
|
||||
function handleChange(val: number | string) {
|
||||
val = Math.trunc(+val)
|
||||
changeEvent?.(+val)
|
||||
changeEvent?.(val)
|
||||
userInput.value = undefined
|
||||
}
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user