---
nav:
  title: 指南
  order: 1
title: 安装使用
order: 1
---

### 📦 安装

 ```
$ npm install fan-standard-comp --save
 ```
或
 ```
$ yarn add fan-standard-comp
 ```

当前 `fan-standard-comp@6.x` 基于 React 18 和 Ant Design 6。公共 API 应从 `fan-standard-comp` 包根路径导入。

组件与 AI 资料优先读取当前安装版本中的 `llms.txt`、`ai/component-index.json`、`llms-full.txt` 和 `docs/`。无法访问 npm 包内文件时，可使用 [6.x 在线文档](http://47.113.227.251:1203/doc-v6/)；若在线文档与安装版本不一致，以本地 npm 包的文档和 TypeScript 类型声明为准。

# v6.x
* [文档](http://47.113.227.251:1203/doc-v6/)。

# v4.x
* [文档](http://47.113.227.251:1203/doc-v4/)。



# v1.x
* [文档](http://47.113.227.251:1203/doc-v1)。

# v2.x(暂停更新)
* [文档](http://47.113.227.251:1203/doc-v2)。

# v3.x
* [文档](http://47.113.227.251:1203/doc-v3)。


官方antd很多个组件使用过程中会出现`findDOMNode is deprecated and will be removed in the next major release. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: `的报错只能等官方处理。
- 暂时将react替换到18.2.0则会正常，使用18.3.1则不正常。先降版本，(如果未生效，执行下命令`npm ls react`)

```bash
yarn add react@18.2.0 react-dom@18.2.0

// 如果未生效执行下命令
npm ls react
```
