perf: optimization menu
parent
e1b126cbdd
commit
af666b8bce
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue