Explorar el Código

style: format code

nian hace 2 meses
padre
commit
60366b3ed1

+ 6 - 6
src/layout/component/Tabs.vue

@@ -315,13 +315,13 @@ onMounted(() => {
 </script>
 <template>
   <div
-    class="flex min-h-0 overflow-hidden border-b border-naive-border bg-naive-card transition-[background-color,border-color] duration-300 ease-naive-bezier"
+    class="flex min-h-0 overflow-hidden border-b border-naive-border bg-naive-card transition-[background-color,border-color] duration-300 ease-naive-bezier select-none"
   >
     <div class="flex shrink-0">
       <div
         v-for="tab in tabPinnedList"
         :key="tab.key"
-        class="relative max-w-40 overflow-hidden border-r border-r-naive-border transition-[border-color,max-width] duration-300 ease-naive-bezier select-none"
+        class="relative max-w-40 overflow-hidden border-r border-r-naive-border transition-[background-color,border-color,max-width] duration-300 ease-naive-bezier hover:bg-primary/6"
         :class="[
           isTabDragging ? 'cursor-move' : 'cursor-pointer',
           {
@@ -380,7 +380,7 @@ onMounted(() => {
           <div
             v-for="tab in tabList"
             :key="tab.key"
-            class="relative overflow-hidden border-r border-r-naive-border transition-[border-color,max-width] duration-300 ease-naive-bezier select-none [&:not(.max-w-0)]:max-w-40"
+            class="relative overflow-hidden border-r border-r-naive-border transition-[background-color,border-color,max-width] duration-300 ease-naive-bezier hover:bg-primary/6 [&:not(.max-w-0)]:max-w-40"
             :class="[
               isTabDragging ? 'cursor-move' : 'cursor-pointer',
               {
@@ -404,7 +404,7 @@ onMounted(() => {
               />
             </Transition>
             <div
-              class="flex items-center gap-x-1 py-2.5 pl-4"
+              class="flex items-center py-2.5 pl-4"
               :class="tab.pinned ? 'pr-4' : 'pr-2.5'"
             >
               <div
@@ -431,7 +431,7 @@ onMounted(() => {
               </div>
 
               <div
-                class="flex transition-[opacity,scale] duration-300 ease-naive-bezier"
+                class="ml-1 flex transition-[opacity,scale] duration-300 ease-naive-bezier"
                 :class="{
                   'scale-0 opacity-0': tab.locked || !configureStore.configure.showTabClose,
                   'group-hover:scale-100 group-hover:opacity-100':
@@ -456,7 +456,7 @@ onMounted(() => {
         </TransitionGroup>
       </VueDraggable>
     </NScrollbar>
-    <div class="flex items-center gap-x-2 px-3.5">
+    <div class="flex items-center px-3">
       <ButtonAnimation
         title="刷新"
         @click="tabsInject?.doRefresh(true)"

+ 13 - 15
src/layout/header/Actions/index.vue

@@ -11,20 +11,18 @@ defineOptions({
 })
 </script>
 <template>
-  <div class="flex items-center gap-x-4">
-    <div class="flex items-center gap-x-3">
-      <ButtonAnimation
-        :animation="false"
-        tag="a"
-        href="https://github.com/tenianon/lithe-admin"
-        target="_blank"
-      >
-        <span class="iconify-[mdi--github] size-5" />
-      </ButtonAnimation>
-      <FullScreen />
-      <ThemeDropdown />
-      <ConfigureDrawer />
-      <Signout />
-    </div>
+  <div class="flex items-center gap-x-3">
+    <ButtonAnimation
+      :animation="false"
+      tag="a"
+      href="https://github.com/tenianon/lithe-admin"
+      target="_blank"
+    >
+      <span class="iconify-[mdi--github] size-5" />
+    </ButtonAnimation>
+    <FullScreen />
+    <ThemeDropdown />
+    <ConfigureDrawer />
+    <Signout />
   </div>
 </template>

+ 1 - 1
src/layout/header/Logo.vue

@@ -24,7 +24,7 @@ const collapseWidth = computed(() => {
     }"
   >
     <div
-      class="flex items-center justify-center py-4 transition-[opacity,padding] duration-300 ease-naive-bezier"
+      class="flex h-full items-center justify-center transition-[opacity,padding] duration-300 ease-naive-bezier"
       :class="[
         configureStore.configure.menuCollapsed ? 'px-0' : 'px-4',
         {

+ 2 - 2
src/layout/main/index.vue

@@ -40,12 +40,12 @@ function createTab(route: RouteLocationNormalizedLoaded) {
     componentName,
     icon = 'iconify ph--browser',
     label: defaultLabel = '未命名标签',
-    renderTabLabel: tabLabel,
+    renderTabLabel,
   } = route.meta
 
   const { fullPath, name, params } = route
 
-  const label = tabLabel ? tabLabel(params) : defaultLabel
+  const label = renderTabLabel ? renderTabLabel(params) : defaultLabel
 
   create({
     componentName,

+ 3 - 3
src/theme/dark.ts

@@ -13,7 +13,7 @@ const dark = {
   borderColor: cdh(twc.neutral[750], 0.22),
 }
 
-const compCloseIcon = (primaryColor: string) => {
+const closeIcon = (primaryColor: string) => {
   return {
     closeIconColorSuccess: twc.lime[600],
     closeIconColorInfo: twc.sky[600],
@@ -102,7 +102,7 @@ export function baseDarkThemeOverrides(primaryColor = ''): GlobalThemeOverrides
       errorColorSuppl: twc.red[650],
     },
     Alert: {
-      ...compCloseIcon(primaryColor),
+      ...closeIcon(primaryColor),
     },
     Button: {
       textColorSuccess: twc.lime[50],
@@ -152,7 +152,7 @@ export function baseDarkThemeOverrides(primaryColor = ''): GlobalThemeOverrides
       colorError: cmh(twc.neutral[750], twc.red[950], 0.06),
       colorLoading: cmh(twc.neutral[750], primaryColor, 0.01),
 
-      ...compCloseIcon(primaryColor),
+      ...closeIcon(primaryColor),
     },
 
     Modal: {

+ 3 - 3
src/theme/light.ts

@@ -12,7 +12,7 @@ const light = {
   borderColor: twc.neutral[200],
 }
 
-const compCloseIcon = (primaryColor: string) => {
+const closeIcon = (primaryColor: string) => {
   return {
     closeIconColorSuccess: twc.lime[500],
     closeIconColorInfo: twc.sky[500],
@@ -99,7 +99,7 @@ export function baseLightThemeOverrides(primaryColor = ''): GlobalThemeOverrides
       errorColorSuppl: twc.red[500],
     },
     Alert: {
-      ...compCloseIcon(primaryColor),
+      ...closeIcon(primaryColor),
     },
     Button: {
       textColorSuccess: twc.lime[25],
@@ -148,7 +148,7 @@ export function baseLightThemeOverrides(primaryColor = ''): GlobalThemeOverrides
       colorError: cbh(twc.red[25], 0.3),
       colorLoading: cmh(twc.neutral[25], primaryColor, 0.01),
 
-      ...compCloseIcon(primaryColor),
+      ...closeIcon(primaryColor),
     },
     Modal: {
       peers: {