From 353b56e2c812a27ce4614073c53301900d0b8aba Mon Sep 17 00:00:00 2001 From: Anas Boudih Date: Thu, 19 May 2022 02:18:39 +0100 Subject: [PATCH] refactor(components): [pagination/total] switch to script-setup syntax (#7750) * refactor(components): [pagination/total] switch to script-setup syntax * fix(components): [pagination/total] cast props to const Co-authored-by: metanas --- .../pagination/src/components/total.ts | 14 ++++++++ .../pagination/src/components/total.vue | 32 +++++-------------- 2 files changed, 22 insertions(+), 24 deletions(-) create mode 100644 packages/components/pagination/src/components/total.ts diff --git a/packages/components/pagination/src/components/total.ts b/packages/components/pagination/src/components/total.ts new file mode 100644 index 0000000000..07b8197aa0 --- /dev/null +++ b/packages/components/pagination/src/components/total.ts @@ -0,0 +1,14 @@ +import { buildProps } from '@element-plus/utils' +import type Total from './total.vue' +import type { ExtractPropTypes } from 'vue' + +export const paginationTotalProps = buildProps({ + total: { + type: Number, + default: 1000, + }, +} as const) + +export type PaginationTotalProps = ExtractPropTypes + +export type TotalInstance = InstanceType diff --git a/packages/components/pagination/src/components/total.vue b/packages/components/pagination/src/components/total.vue index 5b91074da1..ba4cdbc1a6 100644 --- a/packages/components/pagination/src/components/total.vue +++ b/packages/components/pagination/src/components/total.vue @@ -8,34 +8,18 @@ -