Skip to content

希望将 mode 加入 RouteGroup的环境变量 #1

@JinghuiS

Description

@JinghuiS

当使用 hash 路由时,如果嵌套路由子级的RouteGroupmode 也应该是 hash,现在需要手动再重复声明有点奇怪🤔

现在的代码

RouteGroup().mode("hash"); {
  Route("admin"); {
    h1("Admin")
    RouteGroup().mode("hash"); {
      Route("user"); {
        h1("User")
      }
      Route("role"); {
        h1("Role")
      }
    }
  }
}

希望的代码

RouteGroup().mode("hash"); {
  Route("admin"); {
    h1("Admin")
    RouteGroup(); {
      Route("user"); {
        h1("User")
      }
      Route("role"); {
        h1("Role")
      }
    }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions