Function: createRoutePattern()
ts
function createRoutePattern(path): string;Converts a react-router style path with :param into a regex pattern segment. 把 react-router 风格的路径参数 :id 转换为正则匹配片段。
Parameters
| Parameter | Type | Description |
|---|---|---|
path | string | Route path / 路由路径 |
Returns
string
Regex-compatible pattern / 正则匹配片段
Since
1.3.0