mirror of
https://github.com/docusealco/docuseal
synced 2026-11-04 22:42:32 -05:00
simplify dynamic editor code
This commit is contained in:
1 parent
4f5e72f983
commit
a70ac571e3
3 files changed
+34
-57
No files matched your search
@@ -43,7 +43,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
v-if="size && coords.type === 'table'"
|
||||
v-if="size"
|
||||
class="absolute top-0 left-0 border border-dashed border-blue-500"
|
||||
:style="{ width: size.width + 'px', height: size.height + 'px' }"
|
||||
/>
|
||||
@@ -114,8 +114,8 @@ export default {
|
||||
],
|
||||
[
|
||||
[
|
||||
{ command: 'mergeTableCells', icon: IconMergeCells, title: 'merge_cells', structural: true, enabled: 'canMerge' },
|
||||
{ command: 'splitTableCell', icon: IconSplitCell, title: 'split_cell', structural: true, enabled: 'canSplit' }
|
||||
{ command: 'mergeTableCells', icon: IconMergeCells, title: 'merge_cells', structural: true, disabled: !this.coords.canMerge },
|
||||
{ command: 'splitTableCell', icon: IconSplitCell, title: 'split_cell', structural: true, disabled: !this.coords.canSplit }
|
||||
],
|
||||
[
|
||||
{ command: 'deleteTableRow', icon: IconRowRemove, title: 'delete_row', danger: true, structural: true },
|
||||
@@ -138,7 +138,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
isDisabled (action) {
|
||||
return (action.structural && !this.coords.isRegular) || (action.enabled && !this.coords[action.enabled])
|
||||
return (action.structural && !this.coords.isRegular) || action.disabled
|
||||
},
|
||||
startResize (event) {
|
||||
this.resizeStart = { x: event.clientX, y: event.clientY, width: this.coords.width, height: this.coords.height }
|
||||
|
||||
Reference in new issue
Block a user