vue-router 可以实现 n 深的、类似目录的结构吗?
我正在尝试使用 Vue Router 建模类似 windows-explorer
的文件系统。它将有文件夹,其中可以有子文件夹和/或子项目。
理想情况下,我想使用路由参数来完成此操作,如下所示:
/projectId/:projectId/items/:folderId/:childFolderId/:childFolderId/.../item/:itemId
其中可能有 n 个 <代码>:childFolderId。如果我可以将这些 :folderId
参数作为数组访问,那么正确设置面包屑就会非常简单,我认为这是其中的关键部分。
这可以用 vue-router 实现吗?我在需要唯一的命名参数方面遇到了限制。
谢谢。
I'm trying to model a windows-explorer
-like filesystem with Vue Router. It will have folders, which can have child folders, and/or child items.
Ideally, I would like to use route params to accomplish this, as in:
/projectId/:projectId/items/:folderId/:childFolderId/:childFolderId/.../item/:itemId
Where there could be n-number of :childFolderId
s. If I could access these :folderId
params as an array, it would be very simple to set up breadcrumbs correctly, which I think is a key part of this.
Is this possible with vue-router? I've run into limitations on requiring unique, named params.
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论