div
h2 Base
.base-trees.flex
Tree.base-tree(:value="treeData1" ref="tree1")
//- div(slot-scope="{node, index}") {{node}}
Tree.base-tree.ml(:value="treeData1" ref="tree2")
div(slot-scope="{node, index, path, tree}")
b(v-if="node.children && node.children.length > 0" @click="tree.toggleFold(node, path)") {{node.$folded ? '+' : '-'}}
input(type="checkbox" :checked="node.$checked" @change="tree.toggleCheck(node, path)")
|
span {{node.text}}
.ml
b Fola all after mounted:
Tree.base-tree(:value="treeData2" ref="tree3" foldAllAfterMounted)
div(slot-scope="{node, index, path, tree}")
b(v-if="node.children && node.children.length > 0" @click="tree.toggleFold(node, path)") {{node.$folded ? '+' : '-'}}
input(type="checkbox" :checked="node.$checked" @change="tree.toggleCheck(node, path)")
|
span {{node.text}}
div(style="position: absolute;width: 180px;height: 100px;background: teal;opacity: 0.2;display: flex;justify-content: center;align-items: center;font-size: 40px;color: #fffc;") MASK