0

Beginner question here :) I would like to create a stepper with 5 tabs, where you can't navigate to step 3 if you haven't completed step 2 (or step 4 if you haven't completed step 3, etc). If he's in step 4 and wants to come back to step 2, then all the other steps must be deactivated as well.

Also, how can I bind the steps to a specific route instead of putting the content iniside the md-step tags.

Hope my question is clear. Thanks in advance.

4

1 回答 1

0

如果您使用所有的制表符,vue-router您可以构建一个路由器保护,它会消失并检查用户所在的当前状态,这将阻止用户访问该视图。您还需要配置某种禁用状态来显示用户所在的位置,以便可以动态生成选项卡图标。尽管所有这些都是前端,但它仍然不是解决问题的灵丹妙药。

https://router.vuejs.org/guide/advanced/navigation-guards.html#global-guards

于 2018-05-28T13:04:35.953 回答