From d4d67fde1145e889b1f485c45674699ea73cffb7 Mon Sep 17 00:00:00 2001 From: Zhong Date: Thu, 25 Sep 2025 17:36:53 +0800 Subject: [PATCH] docs(components): [popover/popconfirm] add inherited Tooltip attributes (#22314) docs(components): [poppover/popconfirm] add inherited Tooltip attributes --- docs/en-US/component/popconfirm.md | 33 ++++++++++--------- docs/en-US/component/popover.md | 53 +++++++++++++++--------------- 2 files changed, 44 insertions(+), 42 deletions(-) diff --git a/docs/en-US/component/popconfirm.md b/docs/en-US/component/popconfirm.md index 33450f4908..27d1396721 100644 --- a/docs/en-US/component/popconfirm.md +++ b/docs/en-US/component/popconfirm.md @@ -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 diff --git a/docs/en-US/component/popover.md b/docs/en-US/component/popover.md index b6790b2601..f519f5d1a8 100644 --- a/docs/en-US/component/popover.md +++ b/docs/en-US/component/popover.md @@ -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