feat: add tags

This commit is contained in:
xiaoxian521
2021-04-08 17:44:23 +08:00
parent 651ac333ee
commit 1eed20ebce
8 changed files with 199 additions and 41 deletions

View File

@@ -60,11 +60,11 @@ export default defineComponent({
() => getBreadcrumb()
);
const pathCompile = (path: string): string | Object => {
const { params } = route;
var toPath = pathToRegexp.compile(path);
return toPath(params);
};
// const pathCompile = (path: string): string | Object => {
// const { params } = route;
// var toPath = pathToRegexp.compile(path);
// return toPath(params);
// };
const handleLink = (item: RouteLocationMatched): any => {
const { redirect, path } = item;
@@ -72,7 +72,7 @@ export default defineComponent({
router.push(redirect.toString());
return;
}
router.push(pathCompile(path));
router.push(path);
};
return { levelList, handleLink };