Skip to content

Commit fa2f32b

Browse files
committed
aa
1 parent 19d018b commit fa2f32b

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

packages/react/README.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,13 @@ pnpm add @cs-open/react-fabric
6565

6666
```tsx
6767
import React from 'react'
68-
import { ReactFabric, Rect, Text, Circle } from '@cs-open/react-fabric'
68+
import { ReactFabric, Rect, Text, } from '@cs-open/react-fabric'
6969

7070
function App() {
7171
return (
7272
<div style={{ width: '100%', height: '500px' }}>
7373
<ReactFabric>
7474
<Rect left={100} top={100} width={200} height={100} fill="red" stroke="blue" strokeWidth={2} />
75-
<Circle left={300} top={150} radius={50} fill="green" />
7675
<Text left={150} top={250} text="Hello Fabric!" fontSize={20} fill="white" />
7776
</ReactFabric>
7877
</div>
@@ -113,7 +112,6 @@ function CanvasWithControls() {
113112

114113
```tsx
115114
import { ReactFabric, PluginPinch } from '@cs-open/react-fabric'
116-
import { PluginPinch } from '@cs-open/react-fabric/plugins'
117115

118116
function TouchCanvas() {
119117
return (
@@ -150,14 +148,13 @@ function CanvasWithBackground() {
150148
| `PluginFreeDraw` | 自由绘制 | 手绘路径和涂鸦功能 |
151149
| `PluginFreeRect` | 矩形绘制 | 交互式矩形绘制工具 |
152150
| `PluginFreeText` | 文本工具 | 点击添加可编辑文本 |
153-
| `PluginGridLine` | 网格辅助 | 显示网格线辅助对齐 |
151+
| `PluginGrid` | 网格辅助 | 显示网格线辅助对齐 |
154152
| `PluginMask` | 遮罩效果 | 创建遮罩和裁剪效果 |
155153

156154
### 使用插件
157155

158156
```tsx
159-
import { ReactFabric } from '@cs-open/react-fabric'
160-
import { PluginPinch, PluginFreeDraw, PluginFreeRect, PluginGridLine } from '@cs-open/react-fabric/plugins'
157+
import { ReactFabric,PluginPinch, PluginFreeDraw, PluginFreeRect, PluginGrid } from '@cs-open/react-fabric'
161158

162159
function AdvancedCanvas() {
163160
return (
@@ -181,7 +178,7 @@ function AdvancedCanvas() {
181178
/>
182179

183180
{/* 网格线 */}
184-
<PluginGridLine />
181+
<PluginGrid />
185182
</ReactFabric>
186183
)
187184
}

0 commit comments

Comments
 (0)