Vue element-ui tree rendering issu

problem description

I"m going to use element-ui to render such a tree structure, with word folders and individual test questions under the parent file, and grandson folders and grandson test questions under the child file


elemtn-ui

.

related codes

/ / Please paste the code text below (do not replace the code with pictures)

        <el-tree
          :data="catalogList"
          :props="{
            label: "Name"
          }"
          show-checkbox
          accordion
          node-key="id">
            <span class="custom-tree-node" slot-scope="{ node, data }">
              <span>{{ node.label }}</span>
            </span>
        </el-tree>

I can successfully render the folder with the above code, but I don"t know how to render the question

.
Feb.26,2022

you need to assemble the test questions and folders into children before you can render them side by side.
otherwise, it would not be difficult to write your own tree component.

Menu