diff --git a/packages/core/plugin/WorkspacePlugin.ts b/packages/core/plugin/WorkspacePlugin.ts index 375132b8..8aa330c4 100644 --- a/packages/core/plugin/WorkspacePlugin.ts +++ b/packages/core/plugin/WorkspacePlugin.ts @@ -79,7 +79,9 @@ class WorkspacePlugin implements IPluginTempl { height, id: 'workspace', strokeWidth: 0, + erasable: false, }); + workspace.set('selectable', false); workspace.set('hasControls', false); workspace.hoverCursor = 'default'; diff --git a/src/components/erase.vue b/src/components/erase.vue new file mode 100644 index 00000000..e10011a4 --- /dev/null +++ b/src/components/erase.vue @@ -0,0 +1,49 @@ + + + + + diff --git a/src/language/zh.json b/src/language/zh.json index a761dda7..4560392d 100644 --- a/src/language/zh.json +++ b/src/language/zh.json @@ -33,6 +33,7 @@ } }, "color": "颜色", + "erase": "橡皮檫", "textFloat": "小数", "templates": "模板", "elements": "元素", @@ -254,4 +255,4 @@ }, "mine": "我的", "batch": "批量" -} \ No newline at end of file +} diff --git a/src/views/home/index.vue b/src/views/home/index.vue index 8d653768..5d47a03d 100644 --- a/src/views/home/index.vue +++ b/src/views/home/index.vue @@ -23,6 +23,8 @@ + + ; } + + export class EraserBrush { + constructor(canvas: Canvas); + } + + export interface IRectOptions { + [key: string]: unknown; + } }