Просмотр исходного кода

fix(keep-alive): higher priority for exclude than include (#6905)

lucien 8 лет назад
Родитель
Сommit
604230fe95
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      src/core/components/keep-alive.js

+ 2 - 2
src/core/components/keep-alive.js

@@ -87,8 +87,8 @@ export default {
       // check pattern
       const name: ?string = getComponentName(componentOptions)
       if (name && (
-        (this.include && !matches(this.include, name)) ||
-        (this.exclude && matches(this.exclude, name))
+        (this.exclude && matches(this.exclude, name)) ||
+        (this.include && !matches(this.include, name))
       )) {
         return vnode
       }