mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
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:
@@ -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
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
<div v-if="title" :class="ns.e('title')" role="title">
|
||||
{{ title }}
|
||||
</div>
|
||||
<slot>
|
||||
<slot :hide="hide">
|
||||
{{ content }}
|
||||
</slot>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user