Skip to content

Commit

Permalink
📝 docs: 添加案例与工具方法文档 (#60)
Browse files Browse the repository at this point in the history
* 📝 chore: 去掉轻量级

* 📝 docs: add showcase 案例文档

* 📝 chore: add utils md
  • Loading branch information
rdmclin2 authored Aug 18, 2023
1 parent 4419d30 commit 6e14a2e
Show file tree
Hide file tree
Showing 6 changed files with 89 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .dumirc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default defineConfig({
hero: {
'zh-CN': {
title: 'ProEditor',
description: '🌟 轻量级编辑器 UI 框架',
description: '🌟 通用编辑器 UI 框架',
actions: [
{
text: '快速开始 →',
Expand All @@ -33,7 +33,7 @@ export default defineConfig({
},
'en-US': {
title: 'ProEditor',
description: '🌟 Lightweight Editor UI Framework',
description: '🌟 A General Editor UI Framework',
actions: [
{
text: 'Quick Start →',
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ nav:

# 快速开始

ProEditor 定位轻量级编辑器 UI 框架,期望为「编辑」场景提供丰富、易用的基础组件与原子能力。
ProEditor 定位编辑器 UI 框架,期望为「编辑」场景提供丰富、易用的基础组件与原子能力。

## 安装

Expand Down
48 changes: 48 additions & 0 deletions docs/pro-editor/utils.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
title: C2D2C 辅助函数
group:
title: 工具类库
order: 99
---

# generateJSXCode

该方法用于将组件属性配置拼接生成 jsx 代码。

```jsx | pure
import { generateJSXCode } from '@ant-design/pro-editor';

const config = {
children: '默认按钮',
target: '_blank',
type: 'default',
htmlType: 'button',
danger: false,
icon: '',
size: 'middle',
loading: true,
disabled: false,
ghost: false,
block: false,
};

const code = generateJSXCode('Button', config);
```

结果为:

```jsx | pure
<Button
target="_blank"
type="default"
htmlType="button"
danger={false}
size="middle"
loading
disabled={false}
ghost={false}
block={false}
>
默认按钮
</Button>
```
13 changes: 13 additions & 0 deletions docs/showcase/flow-editor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: Flow Editor 节点编辑器
---

# 简介

Flow Editor 是一套节点式运行大模型的编辑工具。

![](https://mdn.alipayobjects.com/huamei_rusp7w/afts/img/A*8TzqSK8jnhAAAAAAAAAAAAAADmB6AQ/original)

## 访问地址

https://github.com/ant-design/pro-flow-editor
12 changes: 12 additions & 0 deletions docs/showcase/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: 欢迎 PR
nav:
title: 使用案例
order: 999
---

# 使用案例

如您的项目使用到了 ProEditor,可以提交 PR 添加到我们的案例库中来。

![](https://mdn.alipayobjects.com/huamei_re70wt/afts/img/A*688cTLS47_QAAAAAAAAAAAAADmuEAQ/original)
13 changes: 13 additions & 0 deletions docs/showcase/kitchen-color-studio.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: kitchen Color Studio 颜色系统编辑器
---

# 简介

kitchen Color Studio 是一套开源的颜色系统编辑器。

![](https://raw.githubusercontent.com/ant-design/kitchen-color-studio/master/public/preview1.webp)

## 访问地址

https://github.com/ant-design/antd-color-editor

0 comments on commit 6e14a2e

Please sign in to comment.