let counnt = [
{
title: 6,
key: '/g',
},
{
title: 1,
key: '/a',
subs: [
{
title: 2,
key: '/a/b',
sybs: [
{
title: 3,
key: '/a/b/c',
},
],
},
],
},
{
title: 4,
key: '/d',
subs: [
{
title: 5,
key: '/d/e',
},
],
},
]
加入当前值是/a/b/c,需要拿到从父级到子级的title,/a/b/c,对应的就是[1,2,3]
/d/e 就是【4,5】 /g 就是【6】