Browse Source

adjust keep-alive name matching priority

dev
Evan You 8 years ago
parent
commit
bb6089c6e1
  1. 2
      src/core/components/keep-alive.js

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

@ -28,7 +28,7 @@ export default {
if (vnode && vnode.componentOptions) { if (vnode && vnode.componentOptions) {
const opts: VNodeComponentOptions = vnode.componentOptions const opts: VNodeComponentOptions = vnode.componentOptions
// check pattern // check pattern
const name = opts.tag || opts.Ctor.options.name const name = opts.Ctor.options.name || opts.tag
if (name && ( if (name && (
(this.include && !matches(this.include, name)) || (this.include && !matches(this.include, name)) ||
(this.exclude && matches(this.exclude, name)) (this.exclude && matches(this.exclude, name))

Loading…
Cancel
Save