Skip to content

Commit

Permalink
refactor: 简化operations空判断代码
Browse files Browse the repository at this point in the history
  • Loading branch information
gargameljyh committed Nov 25, 2023
1 parent c407f2c commit 664cb87
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions packages/canvas/src/components/container/CanvasMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -108,16 +108,10 @@ export default {
const operations = {
del() {
const currentSchemaId = getCurrent().schema?.id
if (currentSchemaId) {
removeNodeById(currentSchemaId)
}
removeNodeById(getCurrent().schema?.id)
},
copy() {
const currentSchemaId = getCurrent().schema?.id
if (currentSchemaId) {
copyNode(currentSchemaId)
}
copyNode(getCurrent().schema?.id)
},
config() {
useLayout().activeSetting('props')
Expand Down

0 comments on commit 664cb87

Please sign in to comment.