diff --git a/src/layout/Layout.vue b/src/layout/Layout.vue index af51970..6d52e6c 100644 --- a/src/layout/Layout.vue +++ b/src/layout/Layout.vue @@ -38,6 +38,9 @@ const renderLayout = () => { case 'cutMenu': const { renderCutMenu } = useRenderLayout() return renderCutMenu() + case 'leftTop': + const { NewTopLeft } = useRenderLayout() + return NewTopLeft() default: break } diff --git a/src/layout/components/AppView.vue b/src/layout/components/AppView.vue index 4434187..d8ff9e1 100644 --- a/src/layout/components/AppView.vue +++ b/src/layout/components/AppView.vue @@ -40,14 +40,14 @@ provide('reload', reload) { '!min-h-[calc(100%-var(--app-content-padding)-var(--app-content-padding)-var(--app-footer-height))]': (fixedHeader && - (layout === 'classic' || layout === 'topLeft' || layout === 'top') && + (layout === 'classic' || layout === 'topLeft' || layout === 'top'|| layout === 'leftTop') && footer) || (!tagsView && layout === 'top' && footer), '!min-h-[calc(100%-var(--app-content-padding)-var(--app-content-padding)-var(--app-footer-height)-var(--tags-view-height))]': tagsView && layout === 'top' && footer, '!min-h-[calc(100%-var(--tags-view-height)-var(--app-content-padding)-var(--app-content-padding)-var(--top-tool-height)-var(--app-footer-height))]': - !fixedHeader && layout === 'classic' && footer, + !fixedHeader && (layout === 'classic'|| layout === 'leftTop') && footer, '!min-h-[calc(100%-var(--tags-view-height)-var(--app-content-padding)-var(--app-content-padding)-var(--app-footer-height))]': !fixedHeader && layout === 'topLeft' && footer, diff --git a/src/layout/components/Logo/src/Logo.vue b/src/layout/components/Logo/src/Logo.vue index d241130..1b77d32 100644 --- a/src/layout/components/Logo/src/Logo.vue +++ b/src/layout/components/Logo/src/Logo.vue @@ -75,7 +75,7 @@ watch( :class="[ 'ml-10px text-16px font-700', { - 'text-[var(--logo-title-text-color)]': layout === 'classic', + 'text-[var(--logo-title-text-color)]': layout === 'classic' || layout === 'leftTop', 'text-[var(--top-header-text-color)]': layout === 'topLeft' || layout === 'top' || layout === 'cutMenu' } diff --git a/src/layout/components/Menu/src/Menu.vue b/src/layout/components/Menu/src/Menu.vue index 466cca5..6df2b8d 100644 --- a/src/layout/components/Menu/src/Menu.vue +++ b/src/layout/components/Menu/src/Menu.vue @@ -32,7 +32,7 @@ export default defineComponent({ const menuMode = computed((): 'vertical' | 'horizontal' => { // 竖 - const vertical: LayoutType[] = ['classic', 'topLeft', 'cutMenu'] + const vertical: LayoutType[] = ['classic', 'topLeft', 'cutMenu', 'leftTop'] if (vertical.includes(unref(layout))) { return 'vertical' @@ -42,7 +42,7 @@ export default defineComponent({ }) const routers = computed(() => - unref(layout) === 'cutMenu' ? permissionStore.getMenuTabRouters : permissionStore.getRouters + (unref(layout) === 'cutMenu' || unref(layout) === 'leftTop') ? permissionStore.getMenuTabRouters : permissionStore.getRouters ) const collapse = computed(() => appStore.getCollapse) diff --git a/src/layout/components/Setting/src/components/LayoutRadioPicker.vue b/src/layout/components/Setting/src/components/LayoutRadioPicker.vue index 801686c..43433cd 100644 --- a/src/layout/components/Setting/src/components/LayoutRadioPicker.vue +++ b/src/layout/components/Setting/src/components/LayoutRadioPicker.vue @@ -30,10 +30,10 @@ const layout = computed(() => appStore.getLayout) `${prefixCls}__top-left`, 'relative w-56px h-48px cursor-pointer bg-gray-300', { - 'is-acitve': layout === 'topLeft' + 'is-acitve': layout === 'leftTop' } ]" - @click="appStore.setLayout('topLeft')" + @click="appStore.setLayout('leftTop')" >
-
+
{() => { return unref(tabRouters).map((v) => { const item = ( @@ -163,52 +167,37 @@ export default defineComponent({
{ tabClick(item) }} > -
- +
+ +

{t(item.meta?.title)}

+
- {!unref(showTitle) ? undefined : ( -

{t(item.meta?.title)}

- )}
) }) }}
-
- -
-
) } }) +// {!unref(showTitle) ? undefined : ( +// )} diff --git a/src/layout/components/ToolHeader.vue b/src/layout/components/ToolHeader.vue index 0b8d00d..0ed3327 100644 --- a/src/layout/components/ToolHeader.vue +++ b/src/layout/components/ToolHeader.vue @@ -58,7 +58,7 @@ export default defineComponent({ {hamburger.value && layout.value !== 'cutMenu' ? ( ) : undefined} - {breadcrumb.value ? : undefined} + {breadcrumb.value && layout.value !== 'leftTop' ? : undefined}
) : undefined}
diff --git a/src/layout/components/useRenderLayout.tsx b/src/layout/components/useRenderLayout.tsx index 5217264..48a644a 100644 --- a/src/layout/components/useRenderLayout.tsx +++ b/src/layout/components/useRenderLayout.tsx @@ -1,7 +1,7 @@ import { computed } from 'vue' import { useAppStore } from '@/store/modules/app' import { Menu } from '@/layout/components/Menu' -import { TabMenu } from '@/layout/components/TabMenu' +import { TabMenu, TabMenu2 } from '@/layout/components/TabMenu' import { TagsView } from '@/layout/components/TagsView' import { Logo } from '@/layout/components/Logo' import AppView from './AppView.vue' @@ -297,72 +297,92 @@ export const useRenderLayout = () => { ) } - const NewTopLeft = () => { - return ( - <> -
- {logo.value ? : undefined} - - -
-
- + const NewTopLeft = () => { + return ( + <> +
+ {logo.value ? ( + + ) : undefined} + +
+
+
- - {tagsView.value ? ( - - ) : undefined} +
+ + +
- -
+ {tagsView.value ? ( + + ) : undefined}
-
- - ) - } + + + +
+ + ) + } return { renderClassic, diff --git a/src/types/layout.d.ts b/src/types/layout.d.ts index cad3e2a..11f2ff7 100644 --- a/src/types/layout.d.ts +++ b/src/types/layout.d.ts @@ -1 +1 @@ -export type LayoutType = 'classic' | 'topLeft' | 'top' | 'cutMenu' +export type LayoutType = 'classic' | 'topLeft' | 'top' | 'cutMenu' | 'leftTop'