From 83f7ac92e848cd697292c3c76880fbb20128b527 Mon Sep 17 00:00:00 2001 From: jkzing Date: Fri, 23 Jun 2017 22:59:27 +0800 Subject: [PATCH] update keep-alive api with array syntax --- src/v2/api/index.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/v2/api/index.md b/src/v2/api/index.md index c3fa02f2fe..e91e1660df 100644 --- a/src/v2/api/index.md +++ b/src/v2/api/index.md @@ -2107,8 +2107,8 @@ All lifecycle hooks automatically have their `this` context bound to the instanc ### keep-alive - **Props:** - - `include` - string or RegExp. Only components matched by this will be cached. - - `exclude` - string or RegExp. Any component matched by this will not be cached. + - `include` - string or RegExp or Array. Only components matched by this will be cached. + - `exclude` - string or RegExp or Array. Any component matched by this will not be cached. - **Usage:** @@ -2147,7 +2147,7 @@ All lifecycle hooks automatically have their `this` context bound to the instanc > New in 2.1.0 - The `include` and `exclude` props allow components to be conditionally cached. Both props can either be a comma-delimited string or a RegExp: + The `include` and `exclude` props allow components to be conditionally cached. Both props can be a comma-delimited string, a RegExp or an Array: ``` html @@ -2159,6 +2159,11 @@ All lifecycle hooks automatically have their `this` context bound to the instanc + + + + + ``` The match is first checked on the component's own `name` option, then its local registration name (the key in the parent's `components` option) if the `name` option is not available. Anonymous components cannot be matched against.