Sfoglia il codice sorgente

chore(styles): 添加紧凑按钮风格 Tabs 的全局样式

wangcong 2 mesi fa
parent
commit
5bfcf036b4
1 ha cambiato i file con 47 aggiunte e 0 eliminazioni
  1. 47 0
      src/styles/global.scss

+ 47 - 0
src/styles/global.scss

@@ -131,6 +131,53 @@
   }
 }
 
+.button-tabs-compact {
+  line-height: 22px;
+
+  &.ant-tabs-card > div.ant-tabs-nav {
+    /* stylelint-disable-next-line no-descending-specificity */
+    .ant-tabs-tab {
+      padding: 8px 16px;
+      font-size: 16px;
+      font-weight: 500;
+      color: var(--antd-color-primary);
+      background: rgb(255 255 255 / 15%);
+      border-color: var(--antd-color-primary);
+      border-right: none;
+      border-radius: 0;
+      transition: background 0.3s;
+
+      + .ant-tabs-tab {
+        margin-left: 0;
+      }
+
+      &:first-child {
+        border-top-left-radius: 8px;
+        border-bottom-left-radius: 8px;
+      }
+    }
+
+    .ant-tabs-nav-list :nth-last-child(2) {
+      border-right: 1px solid var(--antd-color-primary);
+      border-top-right-radius: 8px;
+      border-bottom-right-radius: 8px;
+    }
+
+    .ant-tabs-tab-active {
+      background: var(--antd-color-primary);
+
+      .ant-tabs-tab-btn {
+        color: #fff;
+        text-shadow: none;
+      }
+    }
+
+    &::before {
+      border: none;
+    }
+  }
+}
+
 .status-dot {
   // 定义控制变量 (可外部覆盖)
   --status-dot-rgb: 103, 194, 58; // RGB 颜色分量 (绿色)