perf: optimization menu

pull/1370/head
tanjinzhou 2019-10-30 16:34:41 +08:00
parent e1b126cbdd
commit af666b8bce
1 changed files with 4 additions and 1 deletions

View File

@ -1,5 +1,6 @@
import cssAnimation from './css-animation'; import cssAnimation from './css-animation';
import raf from 'raf'; import raf from 'raf';
import Vue from 'vue';
function animate(node, show, done) { function animate(node, show, done) {
let height; let height;
@ -54,7 +55,9 @@ function animate(node, show, done) {
const animation = { const animation = {
enter(node, done) { enter(node, done) {
return animate(node, true, done); Vue.nextTick(() => {
animate(node, true, done);
});
}, },
leave(node, done) { leave(node, done) {
return animate(node, false, done); return animate(node, false, done);