mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-14 09:20:51 +08:00
de0696b4f6
* bumping version * build(core): bumping vue version - Bumping up vue version from ^3.0.0 to ^3.0.3 due to the change of `emitOptions` * Remove transition mock/Add before-enter and before-leave hook emitter for popper
20 lines
380 B
TypeScript
20 lines
380 B
TypeScript
import { nextTick } from 'vue'
|
|
|
|
const tick = async (times: number) => {
|
|
while (times--) {
|
|
await nextTick()
|
|
}
|
|
}
|
|
|
|
export default tick
|
|
|
|
// in order to test transitions, we need to use
|
|
// await rAF() after firing transition events.
|
|
export const rAF = async () => {
|
|
return new Promise(res => {
|
|
requestAnimationFrame(() => {
|
|
requestAnimationFrame(res)
|
|
})
|
|
})
|
|
}
|