perf: optimization menu

This commit is contained in:
tanjinzhou 2019-10-30 16:34:41 +08:00
parent e1b126cbdd
commit af666b8bce

View File

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