Commit 95e1d5e2f3e7221e45ade216c4f3eaa91e162bd9
1 parent
b8f89c86
clear editing element after delete it
Showing
1 changed file
with
5 additions
and
3 deletions
front-end/h5/src/store/modules/element.js
| @@ -58,10 +58,12 @@ export const mutations = { | @@ -58,10 +58,12 @@ export const mutations = { | ||
| 58 | { | 58 | { |
| 59 | const index = elements.findIndex(e => e.uuid === editingElement.uuid) | 59 | const index = elements.findIndex(e => e.uuid === editingElement.uuid) |
| 60 | if (index !== -1) { | 60 | if (index !== -1) { |
| 61 | - let newElements = elements.slice() | ||
| 62 | - newElements.splice(index, 1) | ||
| 63 | - state.editingPage.elements = newElements | 61 | + // let newElements = elements.slice() |
| 62 | + // newElements.splice(index, 1) | ||
| 63 | + // state.editingPage.elements = newElements | ||
| 64 | + state.editingPage.elements.splice(index, 1) | ||
| 64 | } | 65 | } |
| 66 | + state.editingElement = null | ||
| 65 | } | 67 | } |
| 66 | break | 68 | break |
| 67 | case 'move2Top': | 69 | case 'move2Top': |