diff --git a/components/button/index.en-US.md b/components/button/index.en-US.md index 2fdaf6ce480188285a7b050265a6b660bd900333..e1479359e800bc4948b4da8510479a35eda5cc90 100644 --- a/components/button/index.en-US.md +++ b/components/button/index.en-US.md @@ -23,7 +23,7 @@ And 4 other properties additionally. - `danger`: used for actions of risk, like deletion or authorization. - `ghost`: used in situations with complex background, home pages usually. -- `disabled`: when actions is not available. +- `disabled`: when actions are not available. - `loading`: add loading spinner in button, avoiding multiple submits too. ## API diff --git a/components/empty/index.tsx b/components/empty/index.tsx index 4562fa214233cdbac4762110bac17cc4bd745bc8..cb220cfcb55929731c4a61b4649f13327b6d2245 100644 --- a/components/empty/index.tsx +++ b/components/empty/index.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import classNames from 'classnames'; -import { ConfigConsumer, ConfigConsumerProps } from '../config-provider'; +import { ConfigContext } from '../config-provider'; import LocaleReceiver from '../locale-provider/LocaleReceiver'; import DefaultEmptyImg from './empty'; import SimpleEmptyImg from './simple'; @@ -30,59 +30,55 @@ interface EmptyType extends React.FC { PRESENTED_IMAGE_SIMPLE: React.ReactNode; } -const Empty: EmptyType = (props: EmptyProps) => ( - - {({ getPrefixCls, direction }: ConfigConsumerProps) => { - const { - className, - prefixCls: customizePrefixCls, - image = defaultEmptyImg, - description, - children, - imageStyle, - ...restProps - } = props; +const Empty: EmptyType = ({ + className, + prefixCls: customizePrefixCls, + image = defaultEmptyImg, + description, + children, + imageStyle, + ...restProps +}) => { + const { getPrefixCls, direction } = React.useContext(ConfigContext); - return ( - - {(locale: TransferLocale) => { - const prefixCls = getPrefixCls('empty', customizePrefixCls); - const des = typeof description !== 'undefined' ? description : locale.description; - const alt = typeof des === 'string' ? des : 'empty'; + return ( + + {(locale: TransferLocale) => { + const prefixCls = getPrefixCls('empty', customizePrefixCls); + const des = typeof description !== 'undefined' ? description : locale.description; + const alt = typeof des === 'string' ? des : 'empty'; - let imageNode: React.ReactNode = null; + let imageNode: React.ReactNode = null; - if (typeof image === 'string') { - imageNode = {alt}; - } else { - imageNode = image; - } + if (typeof image === 'string') { + imageNode = {alt}; + } else { + imageNode = image; + } - return ( -
-
- {imageNode} -
- {des &&

{des}

} - {children &&
{children}
} -
- ); - }} -
- ); - }} -
-); + return ( +
+
+ {imageNode} +
+ {des &&

{des}

} + {children &&
{children}
} +
+ ); + }} + + ); +}; Empty.PRESENTED_IMAGE_DEFAULT = defaultEmptyImg; Empty.PRESENTED_IMAGE_SIMPLE = simpleEmptyImg; diff --git a/components/image/__tests__/__snapshots__/demo.test.js.snap b/components/image/__tests__/__snapshots__/demo.test.js.snap index 0ad0c48e314d11cc5850941472e0f8496980f2f9..c42564d32b3c879b6ebb6b793b89eb325b839604 100644 --- a/components/image/__tests__/__snapshots__/demo.test.js.snap +++ b/components/image/__tests__/__snapshots__/demo.test.js.snap @@ -26,38 +26,48 @@ exports[`renders ./components/image/demo/fallback.md correctly 1`] = ` `; exports[`renders ./components/image/demo/placeholder.md correctly 1`] = ` -Array [ +
- -
, - , -] + +
+ `; diff --git a/components/image/demo/placeholder.md b/components/image/demo/placeholder.md index 98f744d3ddc9c19cf47e9827dca4eee0270d0c80..e5a83f611ee3aa1457586f2667a2b65956a66520 100644 --- a/components/image/demo/placeholder.md +++ b/components/image/demo/placeholder.md @@ -15,12 +15,12 @@ Progressive when large image loading. ```jsx import React from 'react'; -import { Image, Button } from 'antd'; +import { Image, Button, Space } from 'antd'; function ImageDemo() { const [random, setRandom] = React.useState(); return ( - <> + - + ); } diff --git a/components/input/index.zh-CN.md b/components/input/index.zh-CN.md index 7ca6687841d56453103d898d15182ade2f7b3ed2..063625b694d9b0b0e20eab83ba5bcac546a5149b 100644 --- a/components/input/index.zh-CN.md +++ b/components/input/index.zh-CN.md @@ -58,7 +58,7 @@ Input 的其他属性和 React 自带的 [input](https://facebook.github.io/reac | 参数 | 说明 | 类型 | 默认值 | | --- | --- | --- | --- | | enterButton | 是否有确认按钮,可设为按钮文字。该属性会与 `addonAfter` 冲突。 | boolean \| ReactNode | false | -| onSearch | 点击搜索或按下回车键时的回调 | function(value, event) | - | +| onSearch | 点击搜索图标、清除图标,或按下回车键时的回调 | function(value, event) | - | | loading | 搜索 loading | boolean | false | 其余属性和 Input 一致。 diff --git a/components/list/style/rtl.less b/components/list/style/rtl.less index d3bccec49b94c0bece74b24cf0e7c16659e78819..429969c68ca98363821b28e0742cea60991ee513 100644 --- a/components/list/style/rtl.less +++ b/components/list/style/rtl.less @@ -38,9 +38,9 @@ } & > li:first-child { - .@{list-prefix-cls}-rtl & { + .@{list-prefix-cls}.@{list-prefix-cls}-rtl & { padding-right: 0; - padding-left: @padding-xs; + padding-left: @padding-md; } } diff --git a/components/slider/__tests__/index.test.js b/components/slider/__tests__/index.test.js index 56533d36334b3e42863285d0516db6484ddfa6ed..4b965e4d38e9a3e20aa2aef64fb55a9e43acdade 100644 --- a/components/slider/__tests__/index.test.js +++ b/components/slider/__tests__/index.test.js @@ -40,6 +40,44 @@ describe('Slider', () => { expect(wrapper.find('.ant-tooltip-content').length).toBe(0); }); + it('when step is null, thumb can only be slided to the specific mark', () => { + const intentionallyWrongValue = 40; + const marks = { + 0: '0', + 48: '48', + 100: '100', + }; + + const wrapper = mount( + , + ); + expect(wrapper.find('.ant-slider-handle').get(0).props).toHaveProperty('value', 48); + }); + + it('when step is not null, thumb can be slided to the multiples of step', () => { + const marks = { + 0: '0', + 48: '48', + 100: '100', + }; + + const wrapper = mount(); + expect(wrapper.find('.ant-slider-handle').get(0).props).toHaveProperty('value', 49); + }); + + it('when step is undefined, thumb can be slided to the multiples of step', () => { + const marks = { + 0: '0', + 48: '48', + 100: '100', + }; + + const wrapper = mount( + , + ); + expect(wrapper.find('.ant-slider-handle').get(0).props).toHaveProperty('value', 49); + }); + it('should render in RTL direction', () => { const wrapper = mount( @@ -70,4 +108,9 @@ describe('Slider', () => { mount(); }); }); + it('step should not crash with undefined value', () => { + [undefined, null].forEach(value => { + mount(); + }); + }); }); diff --git a/components/slider/__tests__/type.test.tsx b/components/slider/__tests__/type.test.tsx index 7535b42e1e4602a887897977a1c0891e8ef73baa..b72270ead8f9da40e1b4afe9f0eff9226c766b28 100644 --- a/components/slider/__tests__/type.test.tsx +++ b/components/slider/__tests__/type.test.tsx @@ -29,4 +29,21 @@ describe('Slider.typescript', () => { ); expect(result).toBeTruthy(); }); + + it('step can be null value', () => { + const value = 0; + function onChange(v: number) { + return v; + } + const result = ( + + ); + expect(result).toBeTruthy(); + }); }); diff --git a/components/slider/index.tsx b/components/slider/index.tsx index a8363f2824e102878a3e7c50a3de75395ec5e534..1c06ce49c8b4dca51f8ce33f9502152f8b3eaf07 100644 --- a/components/slider/index.tsx +++ b/components/slider/index.tsx @@ -32,7 +32,7 @@ export interface SliderBaseProps { reverse?: boolean; min?: number; max?: number; - step?: number; + step?: null | number; marks?: SliderMarks; dots?: boolean; included?: boolean; @@ -47,6 +47,7 @@ export interface SliderBaseProps { tooltipVisible?: boolean; tooltipPlacement?: TooltipPlacement; getTooltipPopupContainer?: (triggerNode: HTMLElement) => HTMLElement; + autoFocus?: boolean; } export interface SliderSingleProps extends SliderBaseProps { @@ -143,6 +144,7 @@ const Slider = React.forwardRef( return ( @@ -159,6 +161,7 @@ const Slider = React.forwardRef( return ( diff --git a/components/tabs/__tests__/__snapshots__/demo.test.js.snap b/components/tabs/__tests__/__snapshots__/demo.test.js.snap index 06c8f9fdde617fe9f0d84a613508f470341d9594..ba383ca028e4eec50128a91860ec4dcb91d0b025 100644 --- a/components/tabs/__tests__/__snapshots__/demo.test.js.snap +++ b/components/tabs/__tests__/__snapshots__/demo.test.js.snap @@ -1519,8 +1519,7 @@ Array [ class="ant-tabs-extra-content" > ; const OperationsSlot = { - left: , + left: , right: , }; @@ -85,3 +85,14 @@ const Demo = () => { ReactDOM.render(, mountNode); ``` + +```css +.tabs-extra-demo-button { + margin-right: 16px; +} + +.ant-row-rtl .tabs-extra-demo-button { + margin-right: 0; + margin-left: 16px; +} +``` diff --git a/components/tag/__tests__/__snapshots__/demo.test.js.snap b/components/tag/__tests__/__snapshots__/demo.test.js.snap index 9ad2ce6325ec51a2dbe0572f0026809b85390cd6..3dc2002e044965fb090313ff62ea8b15f7f34dbb 100644 --- a/components/tag/__tests__/__snapshots__/demo.test.js.snap +++ b/components/tag/__tests__/__snapshots__/demo.test.js.snap @@ -642,10 +642,17 @@ Array [ exports[`renders ./components/tag/demo/status.md correctly 1`] = ` Array [ -
-

+

+ +
, +
@@ -672,10 +679,17 @@ Array [ default
, -
-

+

+ +
, +
diff --git a/components/tag/demo/status.md b/components/tag/demo/status.md index 95669813438e73aabed984e28058e2e0f59378a8..3bf589192552542235d78ad8bcc62b730cf6ab8a 100644 --- a/components/tag/demo/status.md +++ b/components/tag/demo/status.md @@ -14,7 +14,7 @@ title: We preset five different colors, you can set color property such as `success`,`processing`,`error`,`default` and `warning` to indicate specific status. ```jsx -import { Tag } from 'antd'; +import { Tag, Divider } from 'antd'; import { CheckCircleOutlined, SyncOutlined, @@ -26,17 +26,16 @@ import { ReactDOM.render( <> + Without icon
-

Without icon

success processing error warning default
- + With icon
-

With icon

} color="success"> success diff --git a/components/tag/index.tsx b/components/tag/index.tsx index def8dfd440d44534fcaa224e51bcc26af05368e3..674c8cf07f582ecf00f89ff7706400e68eee2c66 100644 --- a/components/tag/index.tsx +++ b/components/tag/index.tsx @@ -23,7 +23,7 @@ export interface TagProps extends React.HTMLAttributes { closable?: boolean; closeIcon?: React.ReactNode; visible?: boolean; - onClose?: Function; + onClose?: (e: React.MouseEvent) => void; style?: React.CSSProperties; icon?: React.ReactNode; } diff --git a/components/tag/style/rtl.less b/components/tag/style/rtl.less index 46d128babf32baf3e9b77dc041e6149ced6d2573..af7d0dfc5003bc05de76dd5025c317c1e1981da7 100644 --- a/components/tag/style/rtl.less +++ b/components/tag/style/rtl.less @@ -4,7 +4,7 @@ @tag-prefix-cls: ~'@{ant-prefix}-tag'; .@{tag-prefix-cls} { - &-rtl { + &&-rtl { margin-right: 0; margin-left: 8px; direction: rtl; diff --git a/components/transfer/style/rtl.less b/components/transfer/style/rtl.less index 6798f615957d3318c86fb5584aacb720e9c63cb7..88562310c276fe8600cb9bb3e0636327c4624e68 100644 --- a/components/transfer/style/rtl.less +++ b/components/transfer/style/rtl.less @@ -53,6 +53,12 @@ } } + &-pagination { + .@{transfer-prefix-cls}-rtl & { + text-align: left; + } + } + &-footer { .@{transfer-prefix-cls}-rtl & { right: 0; diff --git a/components/upload/style/rtl.less b/components/upload/style/rtl.less index 27abfe9d2d3f447ddd1f67da97196ab6c3b065f7..d615c330d7f1a9101a9b2cb683f8abe4ae831700 100644 --- a/components/upload/style/rtl.less +++ b/components/upload/style/rtl.less @@ -11,8 +11,7 @@ &&-select-picture-card { .@{upload-prefix-cls}-rtl& { - float: right; - margin-right: 0; + margin-right: auto; margin-left: 8px; } } @@ -97,6 +96,10 @@ &-picture, &-picture-card { + .@{upload-item}-info { + padding: 0; + } + .@{upload-item}-thumbnail { .@{upload-prefix-cls}-list-rtl& { right: 8px; @@ -136,7 +139,7 @@ .@{upload-item}-progress { .@{upload-prefix-cls}-list-rtl& { - padding-right: 56px; + padding-right: 0; padding-left: 0; } } @@ -152,15 +155,7 @@ &-picture-card { &-container { .@{upload-prefix-cls}-list-rtl & { - float: right; - margin: 0 0 8px 8px; - } - } - - .@{upload-item} { - .@{upload-prefix-cls}-list-rtl& { - float: right; - margin: 0 0 8px 8px; + margin: 0 0 @margin-xs @margin-xs; } } @@ -178,11 +173,5 @@ padding: 0; } } - - .@{upload-item}-info { - .@{upload-prefix-cls}-list-rtl& { - padding: 0; - } - } } } diff --git a/docs/spec/data-format.en-US.md b/docs/spec/data-format.en-US.md index c098bca8511853842092d183682f647a8ed3d0d3..f16e70fdc7dece9d070763e2fbfbd0bd3ce16044 100644 --- a/docs/spec/data-format.en-US.md +++ b/docs/spec/data-format.en-US.md @@ -36,8 +36,8 @@ The numerical value is used to indicate the measurement size, it can be used alo | Currency Symbol | How and When to Use | Example | | --- | --- | --- | -| Character | Take RMB as example, its character symbol is "¥", placed in front of the amount. | ¥123.00 | -| Letter | Take RMB as example, it is recommended to use CNY, which is the international currency code. | CNY123.00 | +| Character | Take RMB as example, its character symbol is `¥`, placed in front of the amount. | ¥123.00 | +| Letter | Take RMB as example, it is recommended to use `CNY`, which is the international currency code. | CNY123.00 | Large amount: If an amount is large, "M/Mill." (abbreviation of million) and "B/Bill." (abbreviation of billion) can be used. @@ -53,16 +53,16 @@ We suggest the following formats: | Format | How and when to use | Examples | | --- | --- | --- | -| Year, month, day | In China「YYYY-MM-DD」format is used by default. | `2019-12-08` | -| Terms | When a special term containing a date expressed with numbers,display a "." between the month and the day, and quotation marks should be added before and after the term. | `6.1 children's day` | -| Date range | Put "~" or "-" between the date or time range (space is required before and after). | `2018-12-08 ~ 2019-12-07` | +| Year, month, day | In China `YYYY-MM-DD` format is used by default. | 2019-12-08 | +| Terms | When a special term containing a date expressed with numbers,display a `.` between the month and the day, and quotation marks should be added before and after the term. | 6.1 children's day | +| Date range | Put `~` or `-` between the date or time range (space is required before and after). | 2018-12-08 ~ 2019-12-07 | **Time Format:** | Time System | How and when to use | Examples | | --- | --- | --- | -| 24-hour clock | The format is HH:MM:SS. Omit hours or second if not apply. Use the 24-hour clock by default. | `14:08:00` | -| 12-hour clock | Use the format H:MM:SS AM/PM (or am/pm).  | `2:08:00 PM ~ 2:08:00 AM` | +| 24-hour clock | The format is `HH:MM:SS`. Omit hours or second if not apply. Use the 24-hour clock by default. | 14:08:00 | +| 12-hour clock | Use the format `H:MM:SS AM/PM` (or am/pm).  | 2:08:00 PM ~ 2:08:00 AM | **Standard format**: When put a date and a time together, show a space between them, e.g. "2019-12-08 06:00:00". @@ -75,8 +75,8 @@ To the users, the accuracy of time is not so important as the immediacy of the i | Less than 1 minute | just now | | Less than 1 hour | N minutes ago | | Within 24 hours | N hours ago | -| Longer than 24 hours | MM-DD HH:MM, e.g. "12-08 08:00" | -| Longer than one year | YYYY-MM-DD HH:MM,e.g. "2019-12-08 08:00" | +| Longer than 24 hours | `MM-DD HH:MM`, e.g. "12-08 08:00" | +| Longer than one year | `YYYY-MM-DD HH:MM`,e.g. "2019-12-08 08:00" | ### Data Redaction @@ -87,21 +87,21 @@ Data redaction refers to representing truncated data to protect sensitive privac Do Don't -Generally used for particularly important and sensitive information such as amount and time. All the numbers need to be hidden. And the data is replaced by "\*\*\*". +Generally used for particularly important and sensitive information such as amount and time. All the numbers need to be hidden. And the data is replaced by `***`. #### Partial Redaction -Generally used for situations that require partial information for identification. In such cases, some part of the information is truncated, but the numerical digits of the numbers need to retain. The truncated data is replaced by "\*". +Generally used for situations that require partial information for identification. In such cases, some part of the information is truncated, but the numerical digits of the numbers need to retain. The truncated data is replaced by `*`. | Data Type | How and When to Use | Example | | --- | --- | --- | -| Name | Two-character name: display the first character, followed by a "\*". | 仲\* | -| | Names with three characters or more: display the first character and the last character, replace the middle character(s) with "\*". | 仲\*妮
仲\*\*妮 | +| Name | Two-character name: display the first character, followed by a `*`. | 仲\* | +| | Names with three characters or more: display the first character and the last character, replace the middle character(s) with `*`. | 仲\*妮
仲\*\*妮 | | Mobile number | Keep the first three and the last four digits of the mobile number. | 186\*\*\*\*1402 | -| ID number | The Chinese citizenship number consists of six address codes, eight birthdate codes, three sequential codes and one check code.

Redaction rules are classified into high, medium and low levels:
**High**: Show the first and last digits, and replace the others with `_`.
**Medium**: Show the first three and the last three. Replace the others with `_`.
**Low**: Show the first six and the last four. Replace the others with `*`. | High:
`6*************2`
Medium:
`213***********203`
Low:
`212912******2233` | -| Address | Keep the provinces, cities and district information, followed by several "\*". | 浙江省杭州市 西湖区 \***\*\*\*\*** | -| Email | Keep the host name of the mail and the first three characters, indicate the rest information with "\*". | 123\***\*\*\*\*\*\***@163.com | -| Bank card number | The bank card number consists of the issuing bank identification code (ranging from 6 to 12 digits), personal account identification (ranging from 6 to 12 digits), and a check code.

Redaction rules are classified into high, medium and low levels:
**High**: Display the last four digits, and replace the others with `_`.
**Medium**: Display the first six and the last four digits, replace the others with `_`. 
**Low**: Display the first six and the last six digits, display the remaining digits with `*`. | \***\*\*\*\*\*\*\***1208
620121**\*\***1208
620121\*\*\*\*111208 | +| ID number | The Chinese citizenship number consists of six address codes, eight birthdate codes, three sequential codes and one check code.

Redaction rules are classified into high, medium and low levels:
**High**: Show the first and last digits, and replace the others with `*`.
**Medium**: Show the first three and the last three. Replace the others with `*`.
**Low**: Show the first six and the last four. Replace the others with `*`. | 6\*\*\*\*\*\*\*\*\*\*\*\*\*2
213\*\*\*\*\*\*\*\*\*\*\*203
212912\*\*\*\*\*\*2233 | +| Address | Keep the provinces, cities and district information, followed by several `*`. | 浙江省杭州市 西湖区 \***\*\*\*\*** | +| Email | Keep the host name of the mail and the first three characters, indicate the rest information with `*`. | 123\***\*\*\*\*\*\***@163.com | +| Bank card number | The bank card number consists of the issuing bank identification code (ranging from 6 to 12 digits), personal account identification (ranging from 6 to 12 digits), and a check code.

Redaction rules are classified into high, medium and low levels:
**High**: Display the last four digits, and replace the others with `*`.
**Medium**: Display the first six and the last four digits, replace the others with `*`. 
**Low**: Display the first six and the last six digits, display the remaining digits with `*`. | \*\*\*\*\*\*\*\*1208
620121\*\*1208
620121\*\*\*\*111208 | ### Data Status diff --git a/docs/spec/data-format.zh-CN.md b/docs/spec/data-format.zh-CN.md index 9f31d19b1b3b6f2dbc4776fcb724861a39ea2b35..4ae05ca83bbdc761fd0c6335714521170ad82629 100644 --- a/docs/spec/data-format.zh-CN.md +++ b/docs/spec/data-format.zh-CN.md @@ -43,8 +43,8 @@ title: 数据格式 | 货币符号 | 如何使用及何时使用 | 例子 | | -------- | -------------------------------------------------------- | --------- | -| 字符 | 以人民币为例,金额前带货币单位标志「¥」 | ¥123.00 | -| 字母 | 以人民币为例,推荐使用 CNY,CNY 为国际上通用的货币代码。 | CNY123.00 | +| 字符 | 以人民币为例,金额前带货币单位标志`¥` | ¥123.00 | +| 字母 | 以人民币为例,推荐使用 `CNY`,`CNY` 为国际上通用的货币代码。 | CNY123.00 |
@@ -71,16 +71,16 @@ title: 数据格式 | 格式 | 如何使用及何时使用 | 例子 | | --- | --- | --- | -| 年、月、日 | 中国默认使用「yyyy-mm-dd」格式。([其它国家参考链接)](https://zh.wikipedia.org/wiki/%E5%90%84%E5%9C%B0%E6%97%A5%E6%9C%9F%E5%92%8C%E6%97%B6%E9%97%B4%E8%A1%A8%E7%A4%BA%E6%B3%95)。 | 2019-12-08 | -| 专用名词 | 含有月日的专用名词采用阿拉伯数字表示时,应采用间隔号「·」将月、日分开,并在数字前后加引号。 | “6.1 儿童节” | +| 年、月、日 | 中国默认使用 `yyyy-mm-dd` 格式。([其它国家参考链接)](https://zh.wikipedia.org/wiki/%E5%90%84%E5%9C%B0%E6%97%A5%E6%9C%9F%E5%92%8C%E6%97%B6%E9%97%B4%E8%A1%A8%E7%A4%BA%E6%B3%95)。 | 2019-12-08 | +| 专用名词 | 含有月日的专用名词采用阿拉伯数字表示时,应采用间隔号 `·` 将月、日分开,并在数字前后加引号。 | 6.1 儿童节 | | 日期范围 | 在日期或时间范围之间显示一个波浪号 (前后需要空格)。 | 2018-12-08 ~ 2019-12-07 | **时间格式**:默认使用二十四小时制: | 时间制 | 如何使用及何时使用 | 例子 | | ------------ | ------------------------------- | ------------------------ | -| 二十四小时制 | 二十四小时时间格式  HH:mm:ss 。 | 14:08:00 | -| 十二小时制 | 十二小时时间格式 h:mm:ss 。 | 2:08:00 PM \| 2:08:00 AM | +| 二十四小时制 | 二十四小时时间格式  `HH:mm:ss` 。 | 14:08:00 | +| 十二小时制 | 十二小时时间格式 `h:mm:ss` 。 | 2:08:00 PM \| 2:08:00 AM | **标准格式**:日期与时间连在一起时,两者之间用「空格」隔开,如“2019-12-08 06:00:00”。 @@ -93,8 +93,8 @@ title: 数据格式 | 1 分钟以内的时间 | 刚刚 | | 1 小时以内的时间 | N 分钟前 | | 24 小时以内的时间 | N 小时前 | -| 24 小时以外的时间 | 用 mm-dd HH:mm 的形式表示,即「12-08 08:00」 | -| 超过一年的时间 | 用 yyyy-mm-dd HH:mm 的形式表示,即「2019-12-08 08:00」 | +| 24 小时以外的时间 | 用 `mm-dd HH:mm` 的形式表示,即 12-08 08:00 | +| 超过一年的时间 | 用 `yyyy-mm-dd HH:mm` 的形式表示,即 2019-12-08 08:00 | ### 数字脱敏 @@ -105,21 +105,21 @@ title: 数据格式 推荐示例 不推荐示例 -一般用于金额、时间等特别重要敏感的信息,需要对所有数字进行脱敏。数据用一个「\*\*\*」代替。 +一般用于金额、时间等特别重要敏感的信息,需要对所有数字进行脱敏。数据用一个 `***` 代替。 #### 部分脱敏 -一般用于需要部分信息进行识别的状况,只需要对部分信息进行脱敏处理,但数字真实位数保留。数据脱敏部分用「\*」代替。 +一般用于需要部分信息进行识别的状况,只需要对部分信息进行脱敏处理,但数字真实位数保留。数据脱敏部分用 `*` 代替。 | 脱敏类型 | 如何使用 | 例子 | | --- | --- | --- | -| 姓名 | 两个字的姓名:显示第一个字符,后面的隐藏为「\*」。 | 仲\* | -| | 三个字及三个字以上的姓名:显示第一个字符和最后一个字符,中间字符为「\*」。 | 仲\*妮
仲\*\*妮 | +| 姓名 | 两个字的姓名:显示第一个字符,后面的隐藏为 `*`。 | 仲\* | +| | 三个字及三个字以上的姓名:显示第一个字符和最后一个字符,中间字符为 `*`。 | 仲\*妮
仲\*\*妮 | | 手机号码 | 保留手机号码前 3 位与后 4 位。 | 186 \*\*\*\* 1402 | -| 身份证号码 | 公民身份号码由六位地址码,八位出生日期码,三位顺序码和一位校验码组成。脱敏规则分为高、中、低级:
高级:保留前一位与后一位,其余「_」表示,仅能识别该人属于哪个地区。
中级:保留前三位与后三位,其余「_」表示,仅能识别该人的省市与是男是女。
低级:保留前六位与后四位,其余「\*」表示,仅能识别该人的省市区与是男是女。 | 6\*\*\*\*\*\*\*\*\*\*\*\*\*2
213\*\*\*\*\*\*\*\*\*\*\*203
212912\*\*\*\*\*\*2233 | -| 联系地址 | 保留省市区,后面的用「\*」表述。 | 浙江省杭州市 西湖区 \***\*\*\*\*** | -| 邮箱 | 保留邮箱主机名与前三位字符,其余「\*」表示。 | 123\***\*\*\*\*\*\***@163.com | -| 银行卡号码 | 银行卡号码由发卡行标识代码(六到十二位不等),个人账号标识(六到十二位不等),一位校验码组成。脱敏规则分为高、中、低级:高级:保留后四位,其余「_」表示,仅能识别部份个人账号标识。中级:保留前六位与后位,其余「_」表示,仅能识别发卡行与小部份个人账号标识。低级:保留前四位与后六位,其余「\*」表示。仅能识别发卡行与大部份个人账号标识。 | \***\*\*\*\*\*\*\***1208
620121**\*\***1208
620121\*\*\*\*111208 | +| 身份证号码 | 公民身份号码由六位地址码,八位出生日期码,三位顺序码和一位校验码组成。脱敏规则分为高、中、低级:
**高级**:保留前一位与后一位,其余 `*` 表示,仅能识别该人属于哪个地区。
**中级**:保留前三位与后三位,其余 `*` 表示,仅能识别该人的省市与是男是女。
**低级**:保留前六位与后四位,其余 `*` 表示,仅能识别该人的省市区与是男是女。 | 6\*\*\*\*\*\*\*\*\*\*\*\*\*2
213\*\*\*\*\*\*\*\*\*\*\*203
212912\*\*\*\*\*\*2233 | +| 联系地址 | 保留省市区,后面的用 `*` 表述。 | 浙江省杭州市 西湖区 \***\*\*\*\*** | +| 邮箱 | 保留邮箱主机名与前三位字符,其余 `*` 表示。 | 123\***\*\*\*\*\*\***@163.com | +| 银行卡号码 | 银行卡号码由发卡行标识代码(六到十二位不等),个人账号标识(六到十二位不等),一位校验码组成。脱敏规则分为高、中、低级:
**高级**:保留后四位,其余 `*` 表示,仅能识别部份个人账号标识。
**中级**:保留前六位与后位,其余 `*` 表示,仅能识别发卡行与小部份个人账号标识。
**低级**:保留前四位与后六位,其余 `*` 表示。仅能识别发卡行与大部份个人账号标识。 | \***\*\*\*\*\*\*\***1208
620121**\*\***1208
620121\*\*\*\*111208 | ### 数据状态 diff --git a/site/theme/static/dark.less b/site/theme/static/dark.less index 6351c826707e269ece5e3d67342b68ca53e4659a..3b560c695194fc02e69d094864eb0676115a28d6 100644 --- a/site/theme/static/dark.less +++ b/site/theme/static/dark.less @@ -93,6 +93,10 @@ } } + a[disabled] { + color: rgba(255, 255, 255, 0.25); + } + h1, h2, h3,