Skip to content

Commit

Permalink
Merge pull request #69 from ant-design/docs/add
Browse files Browse the repository at this point in the history
✨ feat: 文档更新
  • Loading branch information
rdmclin2 authored Aug 30, 2023
2 parents 4c1aedb + 01f6325 commit f8d6ca1
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 17 deletions.
3 changes: 3 additions & 0 deletions src/ActionGroup/demos/basic.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**
* title: 基础使用
*/
import { ActionGroup } from '@ant-design/pro-editor';

export default () => {
Expand Down
4 changes: 4 additions & 0 deletions src/ActionGroup/demos/config.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* title: 配置使用
* description: 通过配置 `items` 渲染整个内容
*/
import { CopyOutlined, DragOutlined, ZoomInOutlined, ZoomOutOutlined } from '@ant-design/icons';
import { ActionGroup } from '@ant-design/pro-editor';
import { message } from 'antd';
Expand Down
4 changes: 4 additions & 0 deletions src/ActionGroup/demos/custom.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* title: 自定义
* description: 通过 `render` 可以自定义渲染特殊的操作内容
*/
import { ActionGroup, ActionIcon } from '@ant-design/pro-editor';
import { Card, Input, Rate, Switch } from 'antd';

Expand Down
5 changes: 5 additions & 0 deletions src/ActionGroup/demos/dropMenu.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* title: dropdown
* description: 通过配置 `dropdownMenu` 可以在尾部渲染一个下拉内容
*/

import { CopyOutlined, DragOutlined, ZoomInOutlined, ZoomOutOutlined } from '@ant-design/icons';
import { ActionGroup } from '@ant-design/pro-editor';
import { message } from 'antd';
Expand Down
3 changes: 3 additions & 0 deletions src/ActionGroup/demos/type.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**
* title: 模式配置
*/
import { ActionGroup } from '@ant-design/pro-editor';
import { InputNumber, Segmented, Space } from 'antd';
import { useState } from 'react';
Expand Down
5 changes: 5 additions & 0 deletions src/ActionGroup/demos/withPanel.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* title: 浮动面板中使用
* description: 配合 DraggablePanel 可以使得整个面板可浮动拖拽
*/

import type { Position } from '@ant-design/pro-editor';
import { ActionGroup, DraggablePanel } from '@ant-design/pro-editor';
import { useLocalStorageState } from 'ahooks';
Expand Down
19 changes: 2 additions & 17 deletions src/ActionGroup/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
title: ActionGroup 工具面板
atomId: ActionGroup
group: 基础组件
demo:
cols: 2
---

# ActionGroup 工具面板
Expand All @@ -12,28 +14,11 @@ group: 基础组件

## 代码演示

### 基础

<code src="./demos/basic.tsx" ></code>

### 使用配置

<code src="./demos/config.tsx" ></code>

### 使用 dropdownMenu 扩展更多内容

<code src="./demos/dropMenu.tsx" ></code>

### 类型、大小和方向调整

<code src="./demos/type.tsx" ></code>

### 高度自定义

<code src="./demos/custom.tsx" ></code>

### 使用浮动面板

<code src="./demos/withPanel.tsx" iframe></code>

## API
Expand Down

0 comments on commit f8d6ca1

Please sign in to comment.