Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ feat: 文档更新 #69

Merged
merged 1 commit into from
Aug 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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