Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21,294 changes: 21,294 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue3-treeview",
"version": "0.4.1",
"name": "@employee87/vue3-treeview",
"version": "0.4.9",
"private": false,
"library": "vue3-treeview",
"license": "MIT",
Expand Down
7 changes: 7 additions & 0 deletions src/components/Tree.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@
/>
</template>

<template #input="props">
<slot
name="input"
:node="props.node"
/>
</template>

<template #after-input="props">
<slot
name="after-input"
Expand Down
7 changes: 7 additions & 0 deletions src/components/TreeLevel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@
/>
</template>

<template #input="props">
<slot
name="input"
:node="props.node"
/>
</template>

<template #after-input="props">
<slot
name="after-input"
Expand Down
26 changes: 19 additions & 7 deletions src/components/TreeNode.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,18 @@
@blur="blur"
>

<span
v-else
class="node-text"
@dblclick="focusInput"
>
{{ text }}
</span>
<div v-else @dblclick="focusInput">
<slot
name="input"
:node="node"
>
<span
class="node-text"
>
{{ text }}
</span>
</slot>
</div>
</div>

<slot
Expand Down Expand Up @@ -114,6 +119,13 @@
/>
</template>

<template #input="props">
<slot
name="input"
:node="props.node"
/>
</template>

<template #after-input="props">
<slot
name="after-input"
Expand Down
15 changes: 11 additions & 4 deletions src/css/material.css
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@
}

.input-wrapper {
margin-left: 0.75em;
/*margin-left: 0.75em;*/
flex:1;
}
.input-wrapper > div {
flex:1;
}

.icon-wrapper svg {
Expand Down Expand Up @@ -126,13 +130,14 @@
}

.input-wrapper {
display: flex;
align-items: center;
}
.node-text {
font-size: 14px;
position: relative;
color: #000000;
display: flex;
align-items: center;
}

.node-input, .node-text {
font-family: 'Roboto', sans-serif;
}
Expand All @@ -145,6 +150,7 @@
padding-top: 5px;
}

/*
.input-wrapper input{
padding: 4px 0 4px 0;
display: block;
Expand All @@ -165,3 +171,4 @@
border-bottom-width: 3px;
border-bottom-color: #3f51b5;
}
*/
4 changes: 4 additions & 0 deletions src/dev.vue
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@
<span> {{ props.node.text }} </span>
</template>

<template #input="props">
<span> {{ props.node.text }} </span>
</template>

<template #after-input="props">
<span> {{ props.node.text }} </span>
</template!-->
Expand Down
Loading