From d8a3031c8d799f2cb9e8155a703ff20be8eb80c8 Mon Sep 17 00:00:00 2001 From: Shen Chang Date: Wed, 25 Sep 2019 14:05:28 +0800 Subject: [PATCH] feat: Added Component 'max' prop --- LICENSE.996ICU | 46 ---------------------------------------------- README.md | 2 +- README.zh-CN.md | 4 ++-- 3 files changed, 3 insertions(+), 49 deletions(-) delete mode 100644 LICENSE.996ICU diff --git a/LICENSE.996ICU b/LICENSE.996ICU deleted file mode 100644 index 7165cee..0000000 --- a/LICENSE.996ICU +++ /dev/null @@ -1,46 +0,0 @@ -Copyright (c) 2019-2020 Shen Chang - -Anti 996 License Version 1.0 (Draft) - -Permission is hereby granted to any individual or legal entity -obtaining a copy of this licensed work (including the source code, -documentation and/or related items, hereinafter collectively referred -to as the "licensed work"), free of charge, to deal with the licensed -work for any purpose, including without limitation, the rights to use, -reproduce, modify, prepare derivative works of, distribute, publish -and sublicense the licensed work, subject to the following conditions: - -1. The individual or the legal entity must conspicuously display, -without modification, this License and the notice on each redistributed -or derivative copy of the Licensed Work. - -2. The individual or the legal entity must strictly comply with all -applicable laws, regulations, rules and standards of the jurisdiction -relating to labor and employment where the individual is physically -located or where the individual was born or naturalized; or where the -legal entity is registered or is operating (whichever is stricter). In -case that the jurisdiction has no such laws, regulations, rules and -standards or its laws, regulations, rules and standards are -unenforceable, the individual or the legal entity are required to -comply with Core International Labor Standards. - -3. The individual or the legal entity shall not induce or force its -employee(s), whether full-time or part-time, or its independent -contractor(s), in any methods, to agree in oral or written form, to -directly or indirectly restrict, weaken or relinquish his or her -rights or remedies under such laws, regulations, rules and standards -relating to labor and employment as mentioned above, no matter whether -such written or oral agreement are enforceable under the laws of the -said jurisdiction, nor shall such individual or the legal entity -limit, in any methods, the rights of its employee(s) or independent -contractor(s) from reporting or complaining to the copyright holder or -relevant authorities monitoring the compliance of the license about -its violation(s) of the said license. - -THE LICENSED WORK IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN ANY WAY CONNECTION WITH THE -LICENSED WORK OR THE USE OR OTHER DEALINGS IN THE LICENSED WORK. diff --git a/README.md b/README.md index d092b8e..ab3964e 100644 --- a/README.md +++ b/README.md @@ -87,7 +87,7 @@ Since the cached components need to be stored, the `` must be rendered `exclude`: Any component that matches key will not be cached. It can be a string, an array of strings, or a regular expression. -`max`: If the maximum value is set, the value in the cache is deleted after it goes out. +`max`(`v2.5.2+`): If the maximum value is set, the value in the cache is deleted after it goes out. #### Example In the example below, the component is our root-level component. This means it’s at the very top of our component hierarchy. diff --git a/README.zh-CN.md b/README.zh-CN.md index 6e93e10..b8ded2b 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -7,7 +7,7 @@

React Keep Alive

-[![npm](https://img.shields.io/npm/v/react-keep-alive.svg?style=for-the-badge)](https://www.npmjs.com/package/react-keep-alive) [![Travis (.org)](https://img.shields.io/travis/Sam618/react-keep-alive.svg?style=for-the-badge)](https://travis-ci.org/Sam618/react-keep-alive.svg?branch=master) [![LICENSE](https://img.shields.io/npm/l/react-keep-alive.svg?style=for-the-badge)](https://github.com/Sam618/react-keep-alive/blob/master/LICENSE.MIT) [![LICENSE](https://img.shields.io/badge/license-Anti%20996-blue.svg?style=for-the-badge)](https://github.com/Sam618/react-keep-alive/blob/master/LICENSE.996ICU) [![npm bundle size (minified + gzip)](https://img.shields.io/bundlephobia/minzip/react-keep-alive.svg?style=for-the-badge)](https://www.npmjs.com/package/react-keep-alive) [![downloads](https://img.shields.io/npm/dm/react-keep-alive.svg?style=for-the-badge)](https://www.npmjs.com/package/react-keep-alive) [![typescript](https://img.shields.io/badge/language-typescript-blue.svg?style=for-the-badge)](https://www.typescriptlang.org/) [![996.icu](https://img.shields.io/badge/link-996.icu-red.svg?style=for-the-badge)](https://996.icu) +[![npm](https://img.shields.io/npm/v/react-keep-alive.svg?style=for-the-badge)](https://www.npmjs.com/package/react-keep-alive) [![Travis (.org)](https://img.shields.io/travis/Sam618/react-keep-alive.svg?style=for-the-badge)](https://travis-ci.org/Sam618/react-keep-alive.svg?branch=master) [![LICENSE](https://img.shields.io/npm/l/react-keep-alive.svg?style=for-the-badge)](https://github.com/Sam618/react-keep-alive/blob/master/LICENSE.MIT) [![npm bundle size (minified + gzip)](https://img.shields.io/bundlephobia/minzip/react-keep-alive.svg?style=for-the-badge)](https://www.npmjs.com/package/react-keep-alive) [![downloads](https://img.shields.io/npm/dm/react-keep-alive.svg?style=for-the-badge)](https://www.npmjs.com/package/react-keep-alive) [![typescript](https://img.shields.io/badge/language-typescript-blue.svg?style=for-the-badge)](https://www.typescriptlang.org/)

@@ -89,7 +89,7 @@ ReactDOM.render( `exclude`:任何匹配 `key` 的组件都不会被缓存。它可以是字符串,字符串数组或正则表达式。 -`max`:如果设置了最大值,那么在超出最大值之后就会删除缓存中的值。 +`max`(`v2.5.2+`):如果设置了最大值,那么在超出最大值之后就会删除缓存中的值。 #### 例子 在下面的示例中,`` 是我们的根组件,这意味着它位于组件层次结构的最顶层。