mirror of
https://github.com/element-plus/element-plus.git
synced 2025-01-18 10:59:10 +08:00
fix: replenish popover missing types (#5958)
* fix: replenish popover missing types * fix: update
This commit is contained in:
parent
fa54266588
commit
dafc701af8
@ -11,3 +11,5 @@ export const ElDropdown = withInstall(Dropdown, {
|
||||
export default ElDropdown
|
||||
export const ElDropdownItem = withNoopInstall(DropdownItem)
|
||||
export const ElDropdownMenu = withNoopInstall(DropdownMenu)
|
||||
export * from './src/dropdown'
|
||||
export * from './src/tokens'
|
||||
|
@ -79,7 +79,7 @@ describe('Popover.vue', () => {
|
||||
wrapper = makeMount(Popover, {
|
||||
props: {
|
||||
content,
|
||||
appendToBody: false,
|
||||
teleported: false,
|
||||
virtualRef,
|
||||
virtualTriggering: true,
|
||||
},
|
||||
|
@ -2,6 +2,20 @@
|
||||
<el-tooltip
|
||||
ref="tooltipRef"
|
||||
v-bind="$attrs"
|
||||
:trigger="trigger"
|
||||
:placement="placement"
|
||||
:disabled="disabled"
|
||||
:visible="visible"
|
||||
:transition="transition"
|
||||
:popper-options="popperOptions"
|
||||
:tabindex="tabindex"
|
||||
:append-to-body="appendToBody"
|
||||
:content="content"
|
||||
:offset="offset"
|
||||
:show-after="showAfter"
|
||||
:hide-after="hideAfter"
|
||||
:auto-close="autoClose"
|
||||
:show-arrow="showArrow"
|
||||
:aria-label="title"
|
||||
:effect="effect"
|
||||
:enterable="enterable"
|
||||
|
@ -1,11 +1,19 @@
|
||||
import { buildProps } from '@element-plus/utils'
|
||||
import { useTooltipContentProps } from '@element-plus/components/tooltip'
|
||||
import {
|
||||
useTooltipContentProps,
|
||||
useTooltipTriggerProps,
|
||||
} from '@element-plus/components/tooltip'
|
||||
import { dropdownProps } from '@element-plus/components/dropdown'
|
||||
|
||||
export const usePopoverProps = buildProps({
|
||||
appendToBody: {
|
||||
type: Boolean,
|
||||
default: undefined,
|
||||
},
|
||||
trigger: useTooltipTriggerProps.trigger,
|
||||
placement: dropdownProps.placement,
|
||||
disabled: useTooltipTriggerProps.disabled,
|
||||
visible: useTooltipContentProps.visible,
|
||||
transition: useTooltipContentProps.transition,
|
||||
popperOptions: dropdownProps.popperOptions,
|
||||
tabindex: dropdownProps.tabindex,
|
||||
appendToBody: { type: Boolean, default: undefined },
|
||||
content: useTooltipContentProps.content,
|
||||
popperStyle: useTooltipContentProps.popperStyle,
|
||||
popperClass: useTooltipContentProps.popperClass,
|
||||
@ -24,4 +32,24 @@ export const usePopoverProps = buildProps({
|
||||
type: [String, Number],
|
||||
default: 150,
|
||||
},
|
||||
offset: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
showAfter: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
hideAfter: {
|
||||
type: Number,
|
||||
default: 200,
|
||||
},
|
||||
autoClose: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
showArrow: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
} as const)
|
||||
|
Loading…
Reference in New Issue
Block a user