element-plus/docs/examples/tooltip/controlled.vue
kooriookami 7032e75721
style&doc(components): [el-tooltip] improve style and doc (#5598)
* style: change style

* style: remove useless style

* style: update

* docs: update
2022-01-25 16:10:49 +08:00

17 lines
344 B
Vue

<template>
<el-tooltip v-model:visible="visible">
<template #content>
<span>Content</span>
</template>
<el-button @mouseenter="visible = true" @mouseleave="visible = false">
Hover me
</el-button>
</el-tooltip>
</template>
<script setup lang="ts">
import { ref } from 'vue'
const visible = ref(false)
</script>