fix: outline view display bug when no h1

fix: #959
This commit is contained in:
windingwind 2024-04-22 09:10:09 +08:00
parent ef6ad2c312
commit 8e5cb1c104

View File

@ -361,7 +361,7 @@
cachedNodes = nodes;
console.log(expandedStatus);
const treeData = [];
nodes.map((node) => {
nodes.forEach((node) => {
treeData.push({
id: String(node.model.id),
name: node.model.name,
@ -375,7 +375,9 @@
? expandedStatus[node.model.name]
: node.model.level < expandLevel,
parentId:
node.model.level > 1 ? String(node.parent.model.id) : undefined,
node.parent.model.id > 0
? String(node.parent.model.id)
: undefined,
});
});
$(() => {