diff --git a/src/packages/cell/demo.tsx b/src/packages/cell/demo.tsx index a857615ec172d05f08bacd0676a9771c117f6032..f1a181b087015777063cad8e77c0aaa6df21e523 100644 --- a/src/packages/cell/demo.tsx +++ b/src/packages/cell/demo.tsx @@ -1,6 +1,7 @@ import React, { MouseEvent } from 'react' import { Cell } from './cell' import { CellGroup } from '../cellgroup/cellgroup' +import { Switch } from '../switch/switch' const CellDemo = () => { const testClick = (event: React.MouseEvent) => { @@ -29,7 +30,7 @@ const CellDemo = () => { - 这里是switch组件}> + }>

展示图标

diff --git a/src/packages/cell/doc.md b/src/packages/cell/doc.md index 27291fd28c8b5d30c93e79697858f9b79ea64616..29a3b0f913b95e338b5337345f104a18b8f2fdda 100644 --- a/src/packages/cell/doc.md +++ b/src/packages/cell/doc.md @@ -46,7 +46,7 @@ const testClick = (event: React.MouseEvent - 这里是switch组件}> + }> ``` diff --git a/src/packages/price/demo.tsx b/src/packages/price/demo.tsx index b786cd73df932781df85aeae2ef1843182865244..f09dc1cd03301069dace19c8a16dea5f6bc400d0 100644 --- a/src/packages/price/demo.tsx +++ b/src/packages/price/demo.tsx @@ -17,19 +17,19 @@ const PriceDemo = () => {

基本用法

- +

有人民币符号,无千位分隔

- +

带人民币符号,有千位分隔,保留小数点后三位

- +

异步随机变更

- +
) diff --git a/src/packages/price/doc.md b/src/packages/price/doc.md index 95a08bdad79f0fcf9b43671efdf24c08bf11f5c6..bb4ff1435590d265e5e3afc9e235c674eca89c24 100644 --- a/src/packages/price/doc.md +++ b/src/packages/price/doc.md @@ -11,19 +11,19 @@ ### 基本用法 ```tsx - + ``` ### 有人民币符号,无千位分隔 ```tsx - + ``` ### 带人民币符号,有千位分隔,保留小数点后三位 ```tsx - + ``` ### 异步随机变更 diff --git a/src/packages/price/price.tsx b/src/packages/price/price.tsx index e53d28aca42cd17a2f9529f4cba867128b82c413..e3d76d780a4b9ce70e32a72c253f57796282b721 100644 --- a/src/packages/price/price.tsx +++ b/src/packages/price/price.tsx @@ -20,7 +20,7 @@ export const Price: FunctionComponent> = (props) => { const { price, needSymbol, symbol, decimalDigits, thousands } = { ...defaultProps, ...props } const b = bem('price') const showSymbol = () => { - return { __html: (props.needSymbol ? props.symbol : '') || '' } + return { __html: (needSymbol ? symbol : '') || '' } } const checkPoint = (price: string | number) => { return String(price).indexOf('.') > 0 @@ -35,7 +35,7 @@ export const Price: FunctionComponent> = (props) => { } else { num = num.toString() } - if (props.thousands) { + if (thousands) { return (num || 0).toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,') } else { return num