## OPLabel 组件

·API

| 参数             | 说明                          | 类型   | 默认值 |
| ---------------- | ----------------------------- | ------ | ------ |
| label            | 显示文本                      | String | -      |
| highlightLength  | 高亮显示的长度(默认最后 4 位) | Number | -4     |
| copyText?        | 拷贝提示文案                  | String | []     |
| copySuccessText? | 拷贝成功提示文案              | String | []     |
| fontSize?        | 文字大小                      | Number | -      |
| color?           | 文字颜色                      | String | -      |
| maxLength?       | 最大长度                      | Number | -      |

- 参数定义

```
interface labelProps {
  copyText?: string;
  copySuccessText?: string;
  label: string;
  highlightLength?: number;
  fontSize?: number;
  color?: string;
  maxLength?: number;
}


```

```jsx
import React, { useState } from 'react';
import ReactDOM from 'react-dom';
import { OPLabel } from '../src/view';

ReactDOM.render(
  <div>
    <OPLabel label='1298797329479324792'></OPLabel> <br />
    <OPLabel label='1298797329479324792' highlightLength={-2}></OPLabel> <br />
    <OPLabel
      label='不可复制'
      highlightLength={-2}
      maxLength={10}
      copyable={false}
    ></OPLabel> <br />
    <OPLabel
      label='1298797329479324792'
      highlightLength={-2}
      maxLength={10}
      color={'#f03f30'}
      fontSize={24}
    ></OPLabel> <br />
  </div>,
  mountNode,
);
```
