mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-15 18:01:24 +08:00
29 lines
715 B
TypeScript
29 lines
715 B
TypeScript
import type { TabsProps, TabPaneProps } from '@element-plus/components/tabs'
|
|
import type {
|
|
ComponentInternalInstance,
|
|
ComputedRef,
|
|
Ref,
|
|
InjectionKey,
|
|
UnwrapRef,
|
|
ShallowReactive,
|
|
} from 'vue'
|
|
|
|
export type TabsPaneContext = UnwrapRef<{
|
|
uid: number
|
|
instance: ShallowReactive<ComponentInternalInstance>
|
|
props: TabPaneProps
|
|
paneName: ComputedRef<string | undefined>
|
|
active: ComputedRef<boolean>
|
|
index: Ref<string | undefined>
|
|
isClosable: ComputedRef<boolean>
|
|
}>
|
|
|
|
export interface TabsRootContext {
|
|
props: TabsProps
|
|
currentName: Ref<string>
|
|
updatePaneState: (pane: TabsPaneContext) => void
|
|
}
|
|
|
|
export const tabsRootContextKey: InjectionKey<TabsRootContext> =
|
|
Symbol('tabsRootContextKey')
|