Skip to content

Commit

Permalink
feat(treeNode): add select type node
Browse files Browse the repository at this point in the history
  • Loading branch information
hcfw007 committed Mar 26, 2019
1 parent 579339c commit f4c7090
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/lib/treeNode.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
<div :class="['level-' + String(level), treeData.id]" class="node-input" v-if="treeData.type === 'input'">
<input type="text" v-model="treeData.value">
</div>
<div :class="['level-' + String(level), treeData.id]" class="node-select" v-if="treeData.type === 'select'">
<select name="" id="">
<option v-for="option in treeData.options" :value="option.value" v-bind:key="option.value">{{ option.label }}</option>
</select>
</div>
</div>
<div class="line-1" :class="treeData.id" v-if="treeData.children && treeData.children.length > 0" />
<div class="child-nodes" v-if="treeData.children && treeData.children.length > 0">
Expand Down Expand Up @@ -169,7 +174,7 @@ export default {
line-height: 40px;
}
input {
input, select {
border: none;
margin: 0 5px;
}
Expand Down

0 comments on commit f4c7090

Please sign in to comment.