-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- 修改标签页逻辑 - 路由添加隐藏标签页选项 - 添加标签详情页hooks
- Loading branch information
Showing
20 changed files
with
125 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// 按需element样式 | ||
import ElementPlus from 'unplugin-element-plus/vite'; | ||
|
||
export function configAutoElementStylePlugin() { | ||
return ElementPlus({ | ||
useSource: true, | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { useRouter } from 'vue-router'; | ||
import type { LocationQuery } from 'vue-router'; | ||
import { usePermissionStoreHook } from '@/store/modules/permission'; | ||
import type { Meta } from '@/router/type'; | ||
|
||
export interface DetailsNavigationOption { | ||
path: string; | ||
name: string; | ||
title: Meta['title']; | ||
query?: LocationQuery; | ||
} | ||
|
||
export const useDetailsNavigation = () => { | ||
const router = useRouter(); | ||
|
||
const openDetails = (options: DetailsNavigationOption) => { | ||
const { title, ...res } = options; | ||
usePermissionStoreHook().handleMultiTabs('add', { | ||
...res, | ||
meta: { | ||
title, | ||
}, | ||
}); | ||
try { | ||
router.push({ path: res.path, query: res.query }); | ||
} catch (e) { | ||
console.log(e); | ||
} | ||
}; | ||
|
||
return { | ||
openDetails, | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.