有没有一种方法可以知道叶子项目的父项目?就像我有一个像这样结构的商店:
root: {
items: [
{
text: 'Parent1',
items: [
{ text: 'Child1', leaf: true },
{ text: 'Child2', leaf: true },
............
Run Code Online (Sandbox Code Playgroud)
当我点击叶子项目时,我需要知道哪个父项具有此叶项目.我找不到任何有关此方法的特殊方法.