mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
* refactor(tokens): [form] - remove tokens/form * Move content in tokens/form to components/form. * Replace token imports in components/form. * chore: remove form/tokens and replace imports * refactor(components): [form/form-item] * Move `useForm` related hooks to components/form * Replace references to reduce circular dependencies.
46 lines
1.1 KiB
TypeScript
46 lines
1.1 KiB
TypeScript
import { buildProps, definePropType } from '@element-plus/utils'
|
|
import { popperContentProps } from '@element-plus/components/popper'
|
|
import { useDelayedToggleProps } from '@element-plus/hooks'
|
|
import type { ExtractPropTypes } from 'vue'
|
|
|
|
export const useTooltipContentProps = buildProps({
|
|
...useDelayedToggleProps,
|
|
...popperContentProps,
|
|
appendTo: {
|
|
type: definePropType<string | HTMLElement>([String, Object]),
|
|
},
|
|
content: {
|
|
type: String,
|
|
default: '',
|
|
},
|
|
rawContent: {
|
|
type: Boolean,
|
|
default: false,
|
|
},
|
|
persistent: Boolean,
|
|
ariaLabel: String,
|
|
// because model toggle prop is generated dynamically
|
|
// so the typing cannot be evaluated by typescript as type:
|
|
// [name]: { type: Boolean, default: null }
|
|
// so we need to declare that again for type checking.
|
|
visible: {
|
|
type: definePropType<boolean | null>(Boolean),
|
|
default: null,
|
|
},
|
|
transition: {
|
|
type: String,
|
|
default: '',
|
|
},
|
|
teleported: {
|
|
type: Boolean,
|
|
default: true,
|
|
},
|
|
disabled: {
|
|
type: Boolean,
|
|
},
|
|
} as const)
|
|
|
|
export type ElTooltipContentProps = ExtractPropTypes<
|
|
typeof useTooltipContentProps
|
|
>
|