feat: add config and page

This commit is contained in:
2024-11-30 00:10:51 +08:00
parent f62254af26
commit ebf0b230b1
8 changed files with 231 additions and 8 deletions

7
src/utils/path-key.ts Normal file
View File

@@ -0,0 +1,7 @@
export const getPathKey = () => {
// 从localtion.href的路径中/a/b 中 a为pathb为key
const pathname = location.pathname;
const paths = pathname.split('/');
const [path, key] = paths.slice(1);
return { path, key, id: path + '---' + key, prefix: `/${path}/${key}` };
};