mirror of
https://github.com/element-plus/element-plus.git
synced 2025-02-05 11:21:11 +08:00
docs: [tooltip] improve document content and examples (#19204)
docs: [Tooltip] Improve document content and examples
This commit is contained in:
parent
ae22c959ac
commit
d9da5341d2
@ -132,7 +132,13 @@ tooltip/controlled
|
||||
|
||||
## Animations
|
||||
|
||||
Tooltip can be customized animated, you can set the desired animation function as you desired.
|
||||
Tooltip can be customized animated, you can set the desired animation use `transition`.
|
||||
|
||||
:::tip
|
||||
|
||||
Transition Classes, more information can be found at [Vue Transition](https://vuejs.org/guide/built-ins/transition.html#css-based-transitions).
|
||||
|
||||
:::
|
||||
|
||||
:::demo
|
||||
|
||||
|
@ -16,17 +16,3 @@ import { ref } from 'vue'
|
||||
|
||||
const disabled = ref(false)
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.slide-fade-enter-active {
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
.slide-fade-leave-active {
|
||||
transition: all 0.3s cubic-bezier(1, 0.5, 0.8, 1);
|
||||
}
|
||||
.slide-fade-enter,
|
||||
.expand-fade-leave-active {
|
||||
margin-left: 20px;
|
||||
opacity: 0;
|
||||
}
|
||||
</style>
|
||||
|
@ -1,7 +1,22 @@
|
||||
<template>
|
||||
<el-tooltip content="I am an el-tooltip">
|
||||
<el-tooltip content="I am an el-tooltip" transition="slide-fade">
|
||||
<el-button>trigger me</el-button>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup></script>
|
||||
<style>
|
||||
.slide-fade-enter-active {
|
||||
transition: all 0.3s ease-out;
|
||||
}
|
||||
|
||||
.slide-fade-leave-active {
|
||||
transition: all 0.8s cubic-bezier(1, 0.5, 0.8, 1);
|
||||
}
|
||||
|
||||
.slide-fade-enter-from,
|
||||
.slide-fade-leave-to {
|
||||
transform: translateX(120px);
|
||||
opacity: 0;
|
||||
}
|
||||
</style>
|
||||
|
Loading…
Reference in New Issue
Block a user