From 3cef197e65fe84b4b09e5f5dec26015b5f69bad3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E5=92=B2=E6=99=BA=E5=AD=90?= Date: Wed, 19 Jan 2022 11:37:11 +0800 Subject: [PATCH] refactor(components): [badge] add namespace & instance type (#5473) --- packages/components/badge/src/badge.ts | 4 +++- packages/components/badge/src/badge.vue | 16 +++++++++------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/packages/components/badge/src/badge.ts b/packages/components/badge/src/badge.ts index 0ecbc16e61..7fc69c1e83 100644 --- a/packages/components/badge/src/badge.ts +++ b/packages/components/badge/src/badge.ts @@ -1,6 +1,6 @@ import { buildProps } from '@element-plus/utils/props' - import type { ExtractPropTypes } from 'vue' +import type Badge from './badge.vue' export const badgeProps = buildProps({ value: { @@ -20,3 +20,5 @@ export const badgeProps = buildProps({ }, } as const) export type BadgeProps = ExtractPropTypes + +export type BadgeInstance = InstanceType diff --git a/packages/components/badge/src/badge.vue b/packages/components/badge/src/badge.vue index f0314c0608..d78acbc8f9 100644 --- a/packages/components/badge/src/badge.vue +++ b/packages/components/badge/src/badge.vue @@ -1,16 +1,14 @@