Function: getParentPaths()
ts
function getParentPaths(pathname): string[];Generates all parent path segments for a pathname, commonly used for menu openKeys. 根据 pathname 生成所有父级路径数组。
Parameters
| Parameter | Type |
|---|---|
pathname | string |
Returns
string[]
Example
ts
getParentPaths('/system/user/list')
// => ['/system', '/system/user']Since
1.3.0