-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #103 from ant-design/docs/zh-to-en
📝 docs: add english document
- Loading branch information
Showing
87 changed files
with
2,609 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/** | ||
* @type {import("@lobehub/i18n-cli").Config} | ||
*/ | ||
module.exports = { | ||
markdown: { | ||
entry: ['docs/**/**.md', 'src/**/**.md'], | ||
entryLocale: 'zh-CN', | ||
exclude: ['docs/index.zh-CN.md'], | ||
entryExtension: '.zh-CN.md', | ||
outputLocales: ['en-US'], | ||
}, | ||
modelName: 'gpt-3.5-turbo-1106', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,187 @@ | ||
<a name="readme-top"></a> | ||
|
||
<p align="center"> | ||
<a href="#"> | ||
<img width="200" src="https://gw.alipayobjects.com/zos/antfincdn/upvrAjAPQX/Logo_Tech%252520UI.svg"> | ||
</a> | ||
</p> | ||
|
||
<h1 align="center">Ant Design ProEditor</h1> | ||
|
||
<div align="center"> | ||
|
||
🌟 An Editor UI Framework and Components | ||
|
||
[Changelog](./CHANGELOG.md) · [Report Bug][issues-url] · [Request Feature][issues-url] | ||
|
||
<!-- SHIELD GROUP --> | ||
|
||
[![NPM version][npm-image]][npm-url] [![NPM downloads][download-image]][download-url] [![install size][npm-size]][npm-size-url] | ||
|
||
[![Test CI status][test-ci]][test-ci-url] [![Deploy CI][release-ci]][release-ci-url] [![Coverage][coverage]][codecov-url] | ||
|
||
[![contributors][contributors-shield]][contributors-url] [![forks][forks-shield]][forks-url] [![stargazers][stargazers-shield]][stargazers-url] [![issues][issues-shield]][issues-url] | ||
|
||
[![ docs by dumi][dumi-url]](https://d.umijs.org/) [![Build With father][father-url]](https://github.com/umijs/father/) | ||
|
||
<!-- gitpod url --> | ||
|
||
[gitpod-badge]: https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod | ||
[gitpod-url]: https://gitpod.io/#https://github.com/ant-design/@ant-design/pro-editor | ||
|
||
<!-- umi url --> | ||
|
||
[dumi-url]: https://img.shields.io/badge/docs%20by-dumi-blue | ||
[father-url]: https://img.shields.io/badge/build%20with-father-028fe4.svg | ||
|
||
<!-- npm url --> | ||
|
||
[npm-image]: https://img.shields.io/npm/v/@ant-design/pro-editor.svg?style=flat-square&color=deepgreen&label=latest | ||
[npm-url]: https://npmjs.org/package/@ant-design/pro-editor | ||
[npm-size]: https://img.shields.io/bundlephobia/minzip/@ant-design/pro-editor?color=deepgreen&label=gizpped%20size&style=flat-square | ||
[npm-size-url]: https://packagephobia.com/result?p=@ant-design/pro-editor | ||
|
||
<!-- coverage --> | ||
|
||
[coverage]: https://codecov.io/gh/ant-design/pro-editor/branch/main/graph/badge.svg | ||
[codecov-url]: https://codecov.io/gh/ant-design/pro-editor/branch/main | ||
|
||
<!-- Github CI --> | ||
|
||
[test-ci]: https://github.com/ant-design/pro-editor/actions/workflows/test.yml/badge.svg | ||
[test-ci-url]: https://github.com/ant-design/pro-editor/actions/workflows/test.yml | ||
[release-ci]: https://github.com/ant-design/pro-editor/actions/workflows/release.yml/badge.svg | ||
[release-ci-url]: https://github.com/ant-design/pro-editor/actions/workflows/release.yml/ | ||
[download-image]: https://img.shields.io/npm/dm/@ant-design/pro-editor.svg?style=flat-square | ||
[download-url]: https://npmjs.org/package/@ant-design/pro-editor | ||
|
||
<!-- contributors --> | ||
|
||
[contributors-shield]: https://img.shields.io/github/contributors/ant-design/pro-editor.svg?style=flat | ||
[contributors-url]: https://github.com/ant-design/pro-editor/graphs/contributors | ||
|
||
<!-- forks --> | ||
|
||
[forks-shield]: https://img.shields.io/github/forks/ant-design/pro-editor.svg?style=flat | ||
[forks-url]: https://github.com/ant-design/pro-editor/network/members | ||
|
||
<!-- stargazers --> | ||
|
||
[stargazers-shield]: https://img.shields.io/github/stars/ant-design/pro-editor.svg?style=flat | ||
[stargazers-url]: https://github.com/ant-design/pro-editor/stargazers | ||
|
||
<!-- issues --> | ||
|
||
[issues-shield]: https://img.shields.io/github/issues/ant-design/pro-editor.svg?style=flat | ||
[issues-url]: https://github.com/ant-design/pro-editor/issues/new/choose | ||
|
||
</div> | ||
|
||
## 📦 Install | ||
|
||
本组件库为 [纯 ESM](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c)。 | ||
|
||
使用 npm 安装: | ||
|
||
```bash | ||
$ npm install @ant-design/pro-editor | ||
``` | ||
|
||
使用 pnpm 安装: | ||
|
||
```bash | ||
$ pnpm add @ant-design/pro-editor | ||
``` | ||
|
||
## 🔨 Usage | ||
|
||
```jsx | ||
import { SmileOutlined } from '@ant-design/icons'; | ||
import { ActionIcon } from '@ant-design/pro-editor'; | ||
|
||
export default () => ( | ||
<ActionIcon | ||
title={'功能按钮的说明'} | ||
icon={<SmileOutlined />} | ||
onClick={() => { | ||
alert('触发动作'); | ||
}} | ||
/> | ||
); | ||
``` | ||
|
||
### 适配 NextJS | ||
|
||
为适配 nextjs 的 SSR 模式, 需要将本包的相关依赖添加到 `next.config.js` 的 `transpilePackages` 配置中: | ||
|
||
```js | ||
// next.config.js | ||
const nextConfig = { | ||
// ...other config | ||
transpilePackages: ['@ant-design/pro-editor', 'leva'], | ||
}; | ||
``` | ||
|
||
## ⌨️ Development | ||
|
||
```bash | ||
$ git clone [email protected]:ant-design/pro-editor.git | ||
$ cd pro-editor | ||
$ npm install | ||
$ npm start | ||
``` | ||
|
||
Open your browser and visit http://localhost:8000 | ||
|
||
<div align="right"> | ||
|
||
[![][back-to-top]](#readme-top) | ||
|
||
</div> | ||
|
||
## 🤝 Contributing [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com) | ||
|
||
- [Release Guide](https://github.com/ant-design/pro-editor/wiki/release) | ||
|
||
<!-- CONTRIBUTION GROUP --> | ||
|
||
> 📊 Total: <kbd>**7**</kbd> | ||
<a href="https://github.com/arvinxx" title="arvinxx"> | ||
<img src="https://avatars.githubusercontent.com/u/28616219?v=4" width="50" /> | ||
</a> | ||
<a href="https://github.com/rdmclin2" title="rdmclin2"> | ||
<img src="https://avatars.githubusercontent.com/u/4705237?v=4" width="50" /> | ||
</a> | ||
<a href="https://github.com/ONLY-yours" title="ONLY-yours"> | ||
<img src="https://avatars.githubusercontent.com/u/52664827?v=4" width="50" /> | ||
</a> | ||
<a href="https://github.com/actions-user" title="actions-user"> | ||
<img src="https://avatars.githubusercontent.com/u/65916846?v=4" width="50" /> | ||
</a> | ||
<a href="https://github.com/chenshuai2144" title="chenshuai2144"> | ||
<img src="https://avatars.githubusercontent.com/u/8186664?v=4" width="50" /> | ||
</a> | ||
<a href="https://github.com/meganjohnson96" title="meganjohnson96"> | ||
<img src="https://avatars.githubusercontent.com/u/136729222?v=4" width="50" /> | ||
</a> | ||
<a href="https://github.com/xlkang" title="xlkang"> | ||
<img src="https://avatars.githubusercontent.com/u/36946503?v=4" width="50" /> | ||
</a> | ||
|
||
<!-- CONTRIBUTION END --> | ||
|
||
<div align="right"> | ||
|
||
[![][back-to-top]](#readme-top) | ||
|
||
</div> | ||
|
||
#### 📝 License | ||
|
||
Copyright © 2023 - present AFX & [Ant Digital](antdigital.com) <br /> | ||
This project is [MIT](./LICENSE) licensed. | ||
|
||
<!-- SHIELD LINK GROUP --> | ||
|
||
[back-to-top]: https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square |
Oops, something went wrong.