Skip to content

Commit

Permalink
Merge branch 'fixture/issue-4138' of https://github.com/vbenjs/vue-vb…
Browse files Browse the repository at this point in the history
…en-admin into fixture/issue-4138
  • Loading branch information
likui628 committed Aug 13, 2024
2 parents c119802 + 9e39624 commit af2b0cb
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 29 deletions.
10 changes: 5 additions & 5 deletions docs/src/guide/essentials/route.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ outline: deep

```ts
// 有需要可以自行打开注释,并创建文件夹
// const staticRouteFiles = import.meta.glob('./static/**/*.ts', { eager: true }); // [!code --]
// const externalRouteFiles = import.meta.glob('./external/**/*.ts', { eager: true }); // [!code --]
const staticRouteFiles = import.meta.glob('./static/**/*.ts', { eager: true }); // [!code ++]
/** 动态路由 */
const dynamicRoutes: RouteRecordRaw[] = mergeRouteModules(dynamicRouteFiles);

/** 静态路由列表,访问这些页面可以不需要权限 */
// const staticRoutes: RouteRecordRaw[] = mergeRouteModules(staticRouteFiles); // [!code --]
const staticRoutes: RouteRecordRaw[] = []; // [!code --]
const staticRoutes: RouteRecordRaw[] = mergeRouteModules(staticRouteFiles); // [!code ++]
/** 外部路由列表,访问这些页面可以不需要Layout,可能用于内嵌在别的系统 */
// const externalRoutes: RouteRecordRaw[] = mergeRouteModules(externalRouteFiles) // [!code --]
const externalRoutes: RouteRecordRaw[] = []; // [!code --]
const externalRoutes: RouteRecordRaw[] = mergeRouteModules(externalRouteFiles); // [!code ++]
```

### 动态路由
Expand Down
12 changes: 7 additions & 5 deletions packages/@core/ui-kit/layout-ui/src/vben-layout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,19 @@ const sidebarExtraCollapse = defineModel<boolean>('sidebarExtraCollapse');
const sidebarExpandOnHover = defineModel<boolean>('sidebarExpandOnHover');
const sidebarEnable = defineModel<boolean>('sidebarEnable', { default: true });
// side是否处于hover状态展开菜单中
const sidebarExpandOnHovering = ref(false);
const headerIsHidden = ref(false);
const contentRef = ref();
const {
arrivedState,
directions,
isScrolling,
y: scrollY,
} = useScroll(document);
const { y: mouseY } = useMouse({ type: 'client' });
// side是否处于hover状态展开菜单中
const sidebarExpandOnHovering = ref(false);
const headerIsHidden = ref(false);
const { y: mouseY } = useMouse({ target: contentRef, type: 'client' });
const realLayout = computed(() =>
props.isMobile ? 'sidebar-nav' : props.layout,
Expand Down Expand Up @@ -507,6 +508,7 @@ function handleOpenMenu() {
</LayoutSidebar>

<div
ref="contentRef"
class="flex flex-1 flex-col overflow-hidden transition-all duration-300 ease-in"
>
<div
Expand Down
13 changes: 0 additions & 13 deletions packages/@core/ui-kit/menu-ui/src/components/menu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -542,15 +542,6 @@ $namespace: vben;
}
& > .#{$namespace}-sub-menu {
// .#{$namespace}-menu {
// background: var(--menu-submenu-opened-background-color);
// .#{$namespace}-sub-menu,
// .#{$namespace}-menu-item:not(.is-active),
// .#{$namespace}-sub-menu-content:not(.is-active) {
// background: var(--menu-submenu-opened-background-color);
// }
// }
& > .#{$namespace}-menu {
& > .#{$namespace}-menu-item {
padding-left: calc(
Expand Down Expand Up @@ -713,13 +704,11 @@ $namespace: vben;
.#{$namespace}-menu-item {
fill: var(--menu-item-color);
stroke: var(--menu-item-color);
@include menu-item;
&.is-active {
fill: var(--menu-item-active-color);
stroke: var(--menu-item-active-color);
@include menu-item-active;
}
Expand Down Expand Up @@ -783,7 +772,6 @@ $namespace: vben;
list-style: none;
background: var(--menu-submenu-background-color);
fill: var(--menu-item-color);
stroke: var(--menu-item-color);
&.is-active {
div[data-state='open'] > .#{$namespace}-sub-menu-content,
Expand All @@ -794,7 +782,6 @@ $namespace: vben;
cursor: pointer;
background: var(--menu-submenu-active-background-color);
fill: var(--menu-submenu-active-color);
stroke: var(--menu-submenu-active-color);
}
}
}
Expand Down
6 changes: 0 additions & 6 deletions packages/@core/ui-kit/tabs-ui/src/components/tabs/tabs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,6 @@ function scrollIntoView() {
<div
class="absolute right-1.5 top-1/2 z-[3] translate-y-[-50%] overflow-hidden"
>
<!-- <div
class="absolute right-1.5 top-1/2 z-[3] translate-y-[-50%] overflow-hidden opacity-0 transition-opacity group-hover:opacity-100 group-[.is-active]:opacity-100"
> -->
<!-- close-icon -->
<X
v-show="
Expand All @@ -130,9 +127,6 @@ function scrollIntoView() {
<div
class="text-accent-foreground group-[.is-active]:text-primary dark:group-[.is-active]:text-accent-foreground mx-3 mr-4 flex h-full items-center overflow-hidden rounded-tl-[5px] rounded-tr-[5px] pr-3 transition-all duration-300"
>
<!-- <div
class="mx-3 ml-3 mr-2 flex h-full items-center overflow-hidden rounded-tl-[5px] rounded-tr-[5px] transition-all duration-300 group-hover:mr-2 group-hover:pr-4 group-[.is-active]:pr-4"
> -->
<VbenIcon
v-if="showIcon"
:icon="tab.icon"
Expand Down

0 comments on commit af2b0cb

Please sign in to comment.