我需要特定于位置的重新路由。网站结构如下:
家庭(通过传递的城市重定向到activityType)
label.adjustsFontSizeToFitWidth = true
label.minimumScaleFactor = 0.5
label.sizeToFit()
基本上,button.addSubview(myLabelButton)
NSLayoutConstraint.activate([
myLabelButton.centerXAnchor.constraint(button.centerXAnchor),
myLabelButton.centerYAnchor.constraint(button.centerYAnchor),
myLabelButton.widthAnchor.constraint(button.widthAnchor)
])
应该指向/ (root)
|
|__:activityType
|
|____:city
|
|_______ /
|
| _______ /:itemName
并且用户可以在该页面上单击要进一步传递给www.home.com
现在我不确定如何正确构造vue-router,因为除硬编码值外,其他任何东西都会使我返回404错误。
www.home.com/:activityType/:city
有什么主意,我可以通过家庭路线获得所需的行为,并且基本上将我的家庭路线作为后备路线吗?