We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
想实现导航菜单click时被点击菜单高亮
curNav在click事件中可以被修改,但导航组件没有更新,尝试了trackExpression: '${curNav}'也不行,刚上手,不太熟,请赐教
请粘贴你当前方案的完整 amis schema 代码...
{ type: 'service', data: { curNav: '概览', }, body: [{ type: 'nav', trackExpression: '${curNav}', links: [{ "label": "概览", "activeOn": "${curNav == '概览'}" }, { "label": "门户管理", "children": [{ "label": "栏目管理", "activeOn": "${curNav == '栏目管理'}" }, { "label": "内容管理", "activeOn": "${curNav == '内容管理'}" }, ], }, ], onEvent: { click: { actions: [{ "actionType": "custom", "script": "curNav = event.data.item.label; console.log(curNav);", }], }, }, }, ], },
The text was updated successfully, but these errors were encountered:
很困惑,为什么在click事件中已经更新了curNav,但是组件中的activeOn表达式不重新计算? 是需要trackExpression吗,trackExpression: '${curNav}', 这样写为什么不生效?
Sorry, something went wrong.
坑死了!!已被6.3版本Fix:#9829
qkiroc
No branches or pull requests
实现场景:
想实现导航菜单click时被点击菜单高亮
存在的问题:
curNav在click事件中可以被修改,但导航组件没有更新,尝试了trackExpression: '${curNav}'也不行,刚上手,不太熟,请赐教
当前方案:
请粘贴你当前方案的完整 amis schema 代码...
The text was updated successfully, but these errors were encountered: