mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
docs(components): [popover] update examples (#21785)
* docs(components): [popover] remove `delayHide` * docs: update * docs: update --------- Co-authored-by: warmthsea <2586244885@qq.com>
This commit is contained in:
@@ -15,11 +15,13 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, unref } from 'vue'
|
||||
import { ref } from 'vue'
|
||||
import { ClickOutside as vClickOutside } from 'element-plus'
|
||||
|
||||
const popoverRef = ref()
|
||||
import type { PopoverInstance } from 'element-plus'
|
||||
|
||||
const popoverRef = ref<PopoverInstance>()
|
||||
const onClickOutside = () => {
|
||||
unref(popoverRef).popperRef?.delayHide?.()
|
||||
popoverRef.value?.hide()
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -15,12 +15,14 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, unref } from 'vue'
|
||||
import { ref } from 'vue'
|
||||
import { ClickOutside as vClickOutside } from 'element-plus'
|
||||
|
||||
import type { PopoverInstance } from 'element-plus'
|
||||
|
||||
const buttonRef = ref()
|
||||
const popoverRef = ref()
|
||||
const popoverRef = ref<PopoverInstance>()
|
||||
const onClickOutside = () => {
|
||||
unref(popoverRef).popperRef?.delayHide?.()
|
||||
popoverRef.value?.hide()
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user