refactor(components): [tooltip] transition use useNamespace (#7950)

This commit is contained in:
btea 2022-05-29 03:50:01 +08:00 committed by GitHub
parent 6af6ce8e0c
commit 0c2f5bc56f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,12 +6,14 @@ import {
import {
POPPER_CONTAINER_SELECTOR,
useDelayedToggleProps,
useNamespace,
} from '@element-plus/hooks'
import type Tooltip from '../src/tooltip.vue'
import type Tooltip from './tooltip.vue'
import type { ExtractPropTypes } from 'vue'
const triggers = ['hover', 'focus', 'click', 'contextmenu'] as const
const ns = useNamespace('tooltip')
export type Trigger = typeof triggers[number]
@ -42,7 +44,7 @@ export const useTooltipContentProps = buildProps({
},
transition: {
type: String,
default: 'el-fade-in-linear',
default: `${ns.namespace.value}-fade-in-linear`,
},
teleported: {
type: Boolean,