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:
Zhong
2025-08-18 17:38:35 +08:00
committed by GitHub
parent 1c8c5b52a3
commit cd7bf873d0
2 changed files with 10 additions and 6 deletions

View File

@@ -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>

View File

@@ -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>