diff --git a/components/tabs/index.ts b/components/tabs/index.ts index 9c34b615fd..7f6e28ba04 100644 --- a/components/tabs/index.ts +++ b/components/tabs/index.ts @@ -2,12 +2,12 @@ import type { App, Plugin } from 'vue'; import Tabs, { TabPane } from './src'; export type { TabsProps, TabPaneProps } from './src'; -Tabs.TabPane = { ...TabPane, name: 'ATabPane', __ANT_TAB_PANE: true }; +Tabs.TabPane = TabPane; /* istanbul ignore next */ Tabs.install = function (app: App) { app.component(Tabs.name, Tabs); - app.component(Tabs.TabPane.name, Tabs.TabPane); + app.component(TabPane.name, TabPane); return app; }; diff --git a/components/tabs/src/TabPanelList/TabPane.tsx b/components/tabs/src/TabPanelList/TabPane.tsx index 86cd5ecd94..35a82c61e3 100644 --- a/components/tabs/src/TabPanelList/TabPane.tsx +++ b/components/tabs/src/TabPanelList/TabPane.tsx @@ -20,8 +20,9 @@ export interface TabPaneProps { } export default defineComponent({ - name: 'TabPane', + name: 'ATabPane', inheritAttrs: false, + __ANT_TAB_PANE: true, props: { tab: PropTypes.any, disabled: { type: Boolean },