From f245986996fef4e924c02309c03027b087ac44ea Mon Sep 17 00:00:00 2001 From: Anas Boudih Date: Thu, 19 May 2022 15:21:09 +0100 Subject: [PATCH] refactor(components): [pagination/next] switch to script-setup syntax (#7748) * refactor(components): [pagination/next] switch to script-setup syntax * fix(components): [pagination/next] move emits Co-authored-by: metanas --- .../pagination/src/components/next.ts | 22 ++++++++ .../pagination/src/components/next.vue | 54 ++++++------------- 2 files changed, 37 insertions(+), 39 deletions(-) create mode 100644 packages/components/pagination/src/components/next.ts diff --git a/packages/components/pagination/src/components/next.ts b/packages/components/pagination/src/components/next.ts new file mode 100644 index 0000000000..eee895d7a5 --- /dev/null +++ b/packages/components/pagination/src/components/next.ts @@ -0,0 +1,22 @@ +import { buildProps } from '@element-plus/utils' +import type { ExtractPropTypes } from 'vue' +import type Next from './next.vue' + +export const paginationNextProps = buildProps({ + disabled: Boolean, + currentPage: { + type: Number, + default: 1, + }, + pageCount: { + type: Number, + default: 50, + }, + nextText: { + type: String, + }, +} as const) + +export type PaginationNextProps = ExtractPropTypes + +export type NextInstance = InstanceType diff --git a/packages/components/pagination/src/components/next.vue b/packages/components/pagination/src/components/next.vue index c2a1aea97d..da4ddd7518 100644 --- a/packages/components/pagination/src/components/next.vue +++ b/packages/components/pagination/src/components/next.vue @@ -11,48 +11,24 @@ -