docs(components): [popover/popconfirm] add inherited Tooltip attributes (#22314)

docs(components): [poppover/popconfirm] add inherited Tooltip attributes
This commit is contained in:
Zhong
2025-09-25 17:36:53 +08:00
committed by GitHub
parent 2f8436571a
commit d4d67fde11
2 changed files with 44 additions and 42 deletions

View File

@@ -51,22 +51,23 @@ popconfirm/trigger-event
### Attributes
| Name | Description | Type | Default |
| ------------------------------- | ----------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -------------- |
| title | Title | ^[string] | — |
| effect ^(2.11.2) | Tooltip theme, built-in theme: `dark` / `light` | ^[enum]`'dark' \| 'light'` / ^[string] | light |
| close-on-press-escape ^(2.11.2) | whether the popConfirm can be closed by pressing ESC | ^[boolean] | true |
| confirm-button-text | Confirm button text | ^[string] | — |
| cancel-button-text | Cancel button text | ^[string] | — |
| confirm-button-type | Confirm button type | ^[enum]`'primary' \| 'success' \| 'warning' \| 'danger' \| 'info' \| 'text'` | primary |
| cancel-button-type | Cancel button type | ^[enum]`'primary' \| 'success' \| 'warning' \| 'danger' \| 'info' \| 'text'` | text |
| icon | Icon Component | ^[string] / ^[Component] | QuestionFilled |
| icon-color | Icon color | ^[string] | #f90 |
| hide-icon | is hide Icon | ^[boolean] | false |
| hide-after | delay of disappear, in millisecond | ^[number] | 200 |
| teleported | whether popconfirm is teleported to the body | ^[boolean] | true |
| persistent | when popconfirm inactive and `persistent` is `false` , popconfirm will be destroyed | ^[boolean] | false |
| width | popconfirm width, min width 150px | ^[string] / ^[number] | 150 |
| Name | Description | Type | Default |
| ---------------------------------- | --------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -------------- |
| title | Title | ^[string] | — |
| effect ^(2.11.2) | Tooltip theme, built-in theme: `dark` / `light` | ^[enum]`'dark' \| 'light'` / ^[string] | light |
| close-on-press-escape ^(2.11.2) | whether the popConfirm can be closed by pressing ESC | ^[boolean] | true |
| confirm-button-text | Confirm button text | ^[string] | — |
| cancel-button-text | Cancel button text | ^[string] | — |
| confirm-button-type | Confirm button type | ^[enum]`'primary' \| 'success' \| 'warning' \| 'danger' \| 'info' \| 'text'` | primary |
| cancel-button-type | Cancel button type | ^[enum]`'primary' \| 'success' \| 'warning' \| 'danger' \| 'info' \| 'text'` | text |
| icon | Icon Component | ^[string] / ^[Component] | QuestionFilled |
| icon-color | Icon color | ^[string] | #f90 |
| hide-icon | is hide Icon | ^[boolean] | false |
| hide-after | delay of disappear, in millisecond | ^[number] | 200 |
| teleported | whether popconfirm is teleported to the body | ^[boolean] | true |
| persistent | when popconfirm inactive and `persistent` is `false` , popconfirm will be destroyed | ^[boolean] | false |
| width | popconfirm width, min width 150px | ^[string] / ^[number] | 150 |
| [tooltip](./tooltip.md#attributes) | Inherits all attributes from Tooltip, except: `popper-class`, `popper-style`, `fallback-placements` | — | — |
### Events

View File

@@ -76,32 +76,33 @@ popover/directive-usage
### Attributes
| Name | Description | Type | Default |
| ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
| trigger | how the popover is triggered | ^[enum]`'click' \| 'focus' \| 'hover' \| 'contextmenu'` | hover |
| trigger-keys ^(2.9.8) | When you click the mouse to focus on the trigger element, you can define a set of keyboard codes to control the display of popover through the keyboard | ^[Array] | ['Enter','Space'] |
| title | popover title | ^[string] | — |
| effect | Tooltip theme, built-in theme: `dark` / `light` | ^[enum]`'dark' \| 'light'` / ^[string] | light |
| content | popover content, can be replaced with a default `slot` | ^[string] | '' |
| width | popover width | ^[string] / ^[number] | 150 |
| placement | popover placement | ^[enum]`'top' \| 'top-start' \| 'top-end' \| 'bottom' \| 'bottom-start' \| 'bottom-end' \| 'left' \| 'left-start' \| 'left-end' \| 'right' \| 'right-start' \| 'right-end'` | bottom |
| disabled | whether Popover is disabled | ^[boolean] | false |
| visible / v-model:visible | whether popover is visible | ^[boolean] / ^[null] | null |
| offset | popover offset, `Popover` is built with `Tooltip`, offset of `Popover` is `undefined`, but offset of `Tooltip` is 12 | ^[number] | undefined |
| transition | popover transition animation, the default is el-fade-in-linear | ^[string] | — |
| show-arrow | whether a tooltip arrow is displayed or not. For more info, please refer to [ElPopper](https://github.com/element-plus/element-plus/tree/dev/packages/components/popper) | ^[boolean] | true |
| popper-options | parameters for [popper.js](https://popper.js.org/docs/v2/) | ^[object] | `{modifiers: [{name: 'computeStyles',options: {gpuAcceleration: false}}]}` |
| popper-class | custom class name for popover | ^[string] | — |
| popper-style | custom style for popover | ^[string] / ^[object] | — |
| show-after | delay of appearance, in millisecond | ^[number] | 0 |
| hide-after | delay of disappear, in millisecond | ^[number] | 200 |
| auto-close | timeout in milliseconds to hide tooltip | ^[number] | 0 |
| tabindex | [tabindex](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) of Popover | ^[number] / ^[string] | 0 |
| teleported | whether popover dropdown is teleported to the body | ^[boolean] | true |
| append-to ^(2.9.10) | which element the popover CONTENT appends to | ^[CSSSelector] / ^[HTMLElement] | body |
| persistent | when popover inactive and `persistent` is `false` , popover will be destroyed | ^[boolean] | true |
| virtual-triggering | Indicates whether virtual triggering is enabled | ^[boolean] | — |
| virtual-ref | Indicates the reference element to which the popover is attached | ^[HTMLElement] | — |
| Name | Description | Type | Default |
| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
| trigger | how the popover is triggered | ^[enum]`'click' \| 'focus' \| 'hover' \| 'contextmenu'` | hover |
| trigger-keys ^(2.9.8) | When you click the mouse to focus on the trigger element, you can define a set of keyboard codes to control the display of popover through the keyboard | ^[Array] | ['Enter','Space'] |
| title | popover title | ^[string] | — |
| effect | Tooltip theme, built-in theme: `dark` / `light` | ^[enum]`'dark' \| 'light'` / ^[string] | light |
| content | popover content, can be replaced with a default `slot` | ^[string] | '' |
| width | popover width | ^[string] / ^[number] | 150 |
| placement | popover placement | ^[enum]`'top' \| 'top-start' \| 'top-end' \| 'bottom' \| 'bottom-start' \| 'bottom-end' \| 'left' \| 'left-start' \| 'left-end' \| 'right' \| 'right-start' \| 'right-end'` | bottom |
| disabled | whether Popover is disabled | ^[boolean] | false |
| visible / v-model:visible | whether popover is visible | ^[boolean] / ^[null] | null |
| offset | popover offset, `Popover` is built with `Tooltip`, offset of `Popover` is `undefined`, but offset of `Tooltip` is 12 | ^[number] | undefined |
| transition | popover transition animation, the default is el-fade-in-linear | ^[string] | — |
| show-arrow | whether a tooltip arrow is displayed or not. For more info, please refer to [ElPopper](https://github.com/element-plus/element-plus/tree/dev/packages/components/popper) | ^[boolean] | true |
| popper-options | parameters for [popper.js](https://popper.js.org/docs/v2/) | ^[object] | `{modifiers: [{name: 'computeStyles',options: {gpuAcceleration: false}}]}` |
| popper-class | custom class name for popover | ^[string] | — |
| popper-style | custom style for popover | ^[string] / ^[object] | — |
| show-after | delay of appearance, in millisecond | ^[number] | 0 |
| hide-after | delay of disappear, in millisecond | ^[number] | 200 |
| auto-close | timeout in milliseconds to hide tooltip | ^[number] | 0 |
| tabindex | [tabindex](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) of Popover | ^[number] / ^[string] | 0 |
| teleported | whether popover dropdown is teleported to the body | ^[boolean] | true |
| append-to ^(2.9.10) | which element the popover CONTENT appends to | ^[CSSSelector] / ^[HTMLElement] | body |
| persistent | when popover inactive and `persistent` is `false` , popover will be destroyed | ^[boolean] | true |
| virtual-triggering | Indicates whether virtual triggering is enabled | ^[boolean] | — |
| virtual-ref | Indicates the reference element to which the popover is attached | ^[HTMLElement] | — |
| [tooltip](./tooltip.md#attributes) | Inherits all attributes from Tooltip | — | — |
### Slots