From 1ea86617ca6b012f7d7c719e0dc1cdcaaec07bab Mon Sep 17 00:00:00 2001 From: "Xin Du (Clark)" Date: Fri, 8 Mar 2019 16:43:27 +0000 Subject: [PATCH] fix: keep-alive component data should not be updated (#5188) --- packages/vue-app/template/client.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/vue-app/template/client.js b/packages/vue-app/template/client.js index d093c34c08..0de765de57 100644 --- a/packages/vue-app/template/client.js +++ b/packages/vue-app/template/client.js @@ -491,6 +491,7 @@ function fixPrepatch(to, ___) { if ( instance.constructor._dataRefresh && Components[i] === instance.constructor && + instance.$vnode.data.keepAlive !== true && typeof instance.constructor.options.data === 'function' ) { const newData = instance.constructor.options.data.call(instance)