提交 e92bbf82 编写于 作者: fxy060608's avatar fxy060608

fix(h5): remove KeepAlive max warning

上级 2abdf026
......@@ -3439,7 +3439,7 @@ const KeepAliveImpl = {
if (!sharedContext.renderer) {
return () => slots.default && slots.default()[0]; // fixed by xxxxxx
}
if (props.cache && shared.hasOwn(props, 'max')) {
if (props.cache && props.max) { // fixed by xxxxxx
warn('The `max` prop will be ignored if you provide a custom caching strategy');
}
const cache = props.cache || new Cache(props.max);
......
......@@ -3431,7 +3431,7 @@ const KeepAliveImpl = {
if (!sharedContext.renderer) {
return () => slots.default && slots.default()[0]; // fixed by xxxxxx
}
if ((process.env.NODE_ENV !== 'production') && props.cache && hasOwn(props, 'max')) {
if ((process.env.NODE_ENV !== 'production') && props.cache && props.max) { // fixed by xxxxxx
warn('The `max` prop will be ignored if you provide a custom caching strategy');
}
const cache = props.cache || new Cache(props.max);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册