feat: add property deletable
This commit is contained in:
parent
2c91afe162
commit
0a447a21f9
1 changed files with 3 additions and 1 deletions
|
|
@ -24,6 +24,7 @@ type Props = {
|
|||
expandable?: boolean;
|
||||
selectable?: boolean;
|
||||
deleteable?: boolean;
|
||||
deleteableDeep?: boolean;
|
||||
movable?: boolean;
|
||||
|
||||
selectedNode?: Node[];
|
||||
|
|
@ -212,7 +213,7 @@ function toggleExpand(node: Node, ancestor?: []) {
|
|||
</div>
|
||||
|
||||
<DeleteButton
|
||||
v-if="!level"
|
||||
v-if="deleteable"
|
||||
class="q-ml-auto"
|
||||
icon-only
|
||||
@click.stop="$emit('delete', node)"
|
||||
|
|
@ -231,6 +232,7 @@ function toggleExpand(node: Node, ancestor?: []) {
|
|||
:hideCheckBox
|
||||
:selectable
|
||||
:selectedNode
|
||||
:deleteable="deleteableDeep"
|
||||
class="item__children"
|
||||
v-if="node.children"
|
||||
v-model:nodes="node.children"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue