Sfoglia il codice sorgente

Tree: try to fix ie10 transition error.

Furybean 8 anni fa
parent
commit
ca1bdd43bd
1 ha cambiato i file con 2 aggiunte e 0 eliminazioni
  1. 2 0
      packages/tree/src/transition.js

+ 2 - 0
packages/tree/src/transition.js

@@ -1,5 +1,6 @@
 class Transition {
   beforeEnter(el) {
+    if (!el.dataset) el.dataset = {};
     el.dataset.oldPaddingTop = el.style.paddingTop;
     el.dataset.oldPaddingBottom = el.style.paddingBottom;
     el.style.height = '0';
@@ -31,6 +32,7 @@ class Transition {
   }
 
   beforeLeave(el) {
+    if (!el.dataset) el.dataset = {};
     el.dataset.oldPaddingTop = el.style.paddingTop;
     el.dataset.oldPaddingBottom = el.style.paddingBottom;
     el.dataset.oldOverflow = el.style.overflow;