Merge branch 'main' of https://github.com/vbenjs/vue-vben-admin
This commit is contained in:
commit
8c67f21837
@ -2,7 +2,7 @@ import type { UserConfig } from 'vite';
|
|||||||
|
|
||||||
import type { DefineApplicationOptions } from '../typing';
|
import type { DefineApplicationOptions } from '../typing';
|
||||||
|
|
||||||
import { relative } from 'node:path';
|
import path, { relative } from 'node:path';
|
||||||
|
|
||||||
import { findMonorepoRoot } from '@vben/node-utils';
|
import { findMonorepoRoot } from '@vben/node-utils';
|
||||||
|
|
||||||
@ -101,7 +101,7 @@ function createCssOptions(injectGlobalScss = true) {
|
|||||||
additionalData: (content: string, filepath: string) => {
|
additionalData: (content: string, filepath: string) => {
|
||||||
const relativePath = relative(root, filepath);
|
const relativePath = relative(root, filepath);
|
||||||
// apps下的包注入全局样式
|
// apps下的包注入全局样式
|
||||||
if (relativePath.startsWith('apps/')) {
|
if (relativePath.startsWith(`apps${path.sep}`)) {
|
||||||
return `@import "@vben/styles/global";\n${content}`;
|
return `@import "@vben/styles/global";\n${content}`;
|
||||||
}
|
}
|
||||||
return content;
|
return content;
|
||||||
|
@ -104,9 +104,10 @@ export function useTabbar() {
|
|||||||
const routes = router.getRoutes();
|
const routes = router.getRoutes();
|
||||||
const currentRoute = routes.find((item) => item.path === route.path);
|
const currentRoute = routes.find((item) => item.path === route.path);
|
||||||
if (currentRoute) {
|
if (currentRoute) {
|
||||||
tabbarStore.addTab(
|
tabbarStore.addTab({
|
||||||
currentRoute as unknown as RouteLocationNormalizedGeneric,
|
...route,
|
||||||
);
|
meta: currentRoute.meta,
|
||||||
|
} as unknown as RouteLocationNormalizedGeneric);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ immediate: true },
|
{ immediate: true },
|
||||||
|
@ -271,7 +271,7 @@ export const useTabbarStore = defineStore('core-tabbar', {
|
|||||||
*/
|
*/
|
||||||
async openTabInNewWindow(tab: TabDefinition) {
|
async openTabInNewWindow(tab: TabDefinition) {
|
||||||
const { hash, origin } = location;
|
const { hash, origin } = location;
|
||||||
const path = tab.fullPath;
|
const path = tab.fullPath || tab.path;
|
||||||
const fullPath = path.startsWith('/') ? path : `/${path}`;
|
const fullPath = path.startsWith('/') ? path : `/${path}`;
|
||||||
const url = `${origin}${hash ? '/#' : ''}${fullPath}`;
|
const url = `${origin}${hash ? '/#' : ''}${fullPath}`;
|
||||||
openWindow(url, { target: '_blank' });
|
openWindow(url, { target: '_blank' });
|
||||||
|
Loading…
Reference in New Issue
Block a user