Przeglądaj źródła

fix(v-show): ensure v-show conflict with inline string style binding

fix #2583
Evan You 5 lat temu
rodzic
commit
3cd30c5245
1 zmienionych plików z 1 dodań i 2 usunięć
  1. 1 2
      packages/runtime-dom/src/directives/vShow.ts

+ 1 - 2
packages/runtime-dom/src/directives/vShow.ts

@@ -20,8 +20,7 @@ export const vShow: ObjectDirective<VShowElement> = {
     }
   },
   updated(el, { value, oldValue }, { transition }) {
-    if (!value === !oldValue) return
-    if (transition) {
+    if (transition && value !== oldValue) {
       if (value) {
         transition.beforeEnter(el)
         setDisplay(el, true)