uniapp 级联菜单
时间: 2023-08-19 08:06:45 浏览: 170
级联菜单的实现
5星 · 资源好评率100%
在uniapp中实现级联菜单的效果可以通过监听整个页面的滚动事件和点击事件来实现。首先,你可以使用锚点链接来实现点击左侧目录后右侧内容滚动到相应位置的效果。但由于内容是循环出来的,所以需要动态设置每个目录的id。可以通过遍历数据来设置每个目录的id,然后在点击事件中获取目录的index,并将其与相应内容的index关联起来进行跳转。<span class="em">1</span><span class="em">2</span>
#### 引用[.reference_title]
- *1* [uniapp自定义级联多选下拉框](https://blog.csdn.net/weixin_44941683/article/details/127083975)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* [uniapp中菜单双联动效果](https://blog.csdn.net/qq_57305148/article/details/120712504)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文