feat(components): [popover] expose hide() through slot (#23694)

* feat(components): [popover] expose hide() through slot

* docs(components): [popover] update slots section

* Update docs/en-US/component/popover.md

Co-authored-by: btea <2356281422@qq.com>

* style(docs): [popover] formatted descriptions

* Update docs/en-US/component/popover.md

Co-authored-by: keeplearning66 <1256734885@qq.com>

---------

Co-authored-by: btea <2356281422@qq.com>
Co-authored-by: keeplearning66 <1256734885@qq.com>
This commit is contained in:
Zachary Bear
2026-03-06 12:29:08 +08:00
committed by GitHub
parent 2e05c91335
commit ada3b2a206
2 changed files with 5 additions and 5 deletions

View File

@@ -106,10 +106,10 @@ popover/directive-usage
### Slots
| Name | Description |
| --------- | -------------------------------------------------------------------------- |
| default | text content of popover |
| reference | HTML element that triggers popover, only a single root element is accepted |
| Name | Description | Type |
| --------- | ------------------------------------------------------------------------------- | ----------------------------- |
| default | content of popover, version ^(2.13.4) and later can receive the hide parameter. | ^[object]`{hide: () => void}` |
| reference | HTML element that triggers popover, only a single root element is accepted | - |
### Events

View File

@@ -39,7 +39,7 @@
<div v-if="title" :class="ns.e('title')" role="title">
{{ title }}
</div>
<slot>
<slot :hide="hide">
{{ content }}
</slot>
</template>