mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
fix(pagination): Fix that current-page and page-size do not support hyphen style when using v-model (#2884)
* fix(pagination): Fix that current-page and page-size do not support hyphen style when using v-model * fix(pagination): Fix the bug that the value of hasCurrentPageListener is always true
This commit is contained in:
@@ -122,8 +122,8 @@ export default defineComponent({
|
||||
const { t } = useLocaleInject()
|
||||
const vnodeProps = getCurrentInstance().vnode.props || {}
|
||||
// we can find @xxx="xxx" props on `vnodeProps` to check if user bind corresponding events
|
||||
const hasCurrentPageListener = 'onUpdate:currentPage' in vnodeProps || 'onCurrentChange' in vnodeProps
|
||||
const hasPageSizeListener = 'onUpdate:pageSize' in vnodeProps || 'onSizeChange' in vnodeProps
|
||||
const hasCurrentPageListener = 'onUpdate:currentPage' in vnodeProps || 'onUpdate:current-page' in vnodeProps || 'onCurrentChange' in vnodeProps
|
||||
const hasPageSizeListener = 'onUpdate:pageSize' in vnodeProps || 'onUpdate:page-size' in vnodeProps || 'onSizeChange' in vnodeProps
|
||||
const assertValidUsage = computed(() => {
|
||||
// Users have to set either one, otherwise count of pages cannot be determined
|
||||
if (isAbsent(props.total) && isAbsent(props.pageCount)) return false
|
||||
|
||||
Reference in New Issue
Block a user