diff --git a/src/components/Trend/demo/basic.md b/src/components/Trend/demo/basic.md index 82afcdabe3437e437036b1aa57a6f2c84ced0b31..63c415dcc862c27b105b29d5319ca6a021916fd1 100644 --- a/src/components/Trend/demo/basic.md +++ b/src/components/Trend/demo/basic.md @@ -10,7 +10,7 @@ import Trend from 'ant-design-pro/lib/Trend'; ReactDOM.render(
- 12% + 12% 11%
, mountNode); diff --git a/src/components/Trend/demo/reverse.md b/src/components/Trend/demo/reverse.md new file mode 100644 index 0000000000000000000000000000000000000000..143ed023b7756ebffa0e69b75fe3a0bfec22dc38 --- /dev/null +++ b/src/components/Trend/demo/reverse.md @@ -0,0 +1,17 @@ +--- +order: 0 +title: 颜色反转 +--- + +在数值背后添加一个小图标来标识涨跌情况。 + +````jsx +import Trend from 'ant-design-pro/lib/Trend'; + +ReactDOM.render( +
+ 12% + 11% +
+, mountNode); +```` diff --git a/src/components/Trend/index.d.ts b/src/components/Trend/index.d.ts index fafcb05f6ae46fb53fcfbd08a64776443e43c511..7dc02010301cb3194c41d91b6bf01ac1dbdce1b8 100644 --- a/src/components/Trend/index.d.ts +++ b/src/components/Trend/index.d.ts @@ -4,6 +4,7 @@ export interface ITrendProps { colorful?: boolean; flag: 'up' | 'down'; style?: React.CSSProperties; + reverseColor?: boolean; } export default class Trend extends React.Component {} diff --git a/src/components/Trend/index.md b/src/components/Trend/index.md index 683ed6199b4554c447c379335dd5f9ba7575cdc1..eb78b96e2969e885412d0b14782e5ac03b19b8a1 100644 --- a/src/components/Trend/index.md +++ b/src/components/Trend/index.md @@ -19,3 +19,4 @@ order: 14 |----------|------------------------------------------|-------------|-------| | colorful | 是否彩色标记 | Boolean | true | | flag | 上升下降标识:`up|down` | string | - | +| reverseColor | 颜色反转 | Boolean | true |