diff --git a/code/fms/fms-vue/src/App.vue b/code/fms/fms-vue/src/App.vue index 33928c69..731a7104 100644 --- a/code/fms/fms-vue/src/App.vue +++ b/code/fms/fms-vue/src/App.vue @@ -2,34 +2,38 @@ import zhCN from "antdv-next/locale/zh_CN"; const themeConfig = { - // token: { - // controlHeight: 26, - // }, - // components: { - // Splitter: { - // splitBarSize: 1, - // }, - // Button: { - // contentFontSize: 12, - // paddingInline: 10, - // }, - // Form: { - // labelFontSize: 12, - // verticalLabelMargin: "0 0 2px", - // itemMarginBottom: 8, - // }, - // Collapse: { - // headerBg: "#ffffff", - // contentBg: "#ffffff", - // borderlessContentBg: "#ffffff", - // }, - // }, + token: { + controlHeight: 32, + borderRadius: 6, + colorPrimary: '#0a0a0a', + colorBgContainer: '#ffffff', + colorBgLayout: '#fafafa', + colorBorder: '#e4e4e7', + colorText: '#0a0a0a', + colorTextSecondary: '#71717a', + fontSize: 14, + }, + components: { + Splitter: { + splitBarSize: 1, + }, + Button: { + contentFontSize: 14, + }, + Tree: { + nodeSelectedBg: '#0a0a0a', + nodeSelectedColor: '#fafafa', + }, + }, }; + + const timePickerLocale = { ...zhCN.TimePicker, placeholder: "", rangePlaceholder: ["", ""], }; + const datePickerLocale = { ...zhCN.DatePicker, lang: { @@ -70,7 +74,7 @@ const locale = { diff --git a/code/fms/fms-vue/src/layouts/components/AppTabs.vue b/code/fms/fms-vue/src/layouts/components/AppTabs.vue index 8ad5ddf2..03e5d32b 100644 --- a/code/fms/fms-vue/src/layouts/components/AppTabs.vue +++ b/code/fms/fms-vue/src/layouts/components/AppTabs.vue @@ -1,17 +1,7 @@ @@ -292,16 +220,53 @@ function toggleMaximize() { align-items: center; gap: 4px; padding: 3px 8px; - background: var(--fms-surface); + background: #ffffff; } +/* ---- 通用小按钮 ---- */ +.tab-btn { + display: grid; + flex: none; + width: 28px; + height: 28px; + padding: 0; + place-items: center; + border: 0; + border-radius: 6px; + color: #71717a; + background: transparent; + cursor: pointer; + transition: + color 0.15s ease, + background-color 0.15s ease; + + &:hover:not(:disabled) { + color: #3f3f46; + background: #f4f4f5; + } + + &:disabled { + cursor: default; + opacity: 0.35; + } + + .lucide { + width: 14px; + height: 14px; + stroke-width: 1.8; + } +} + +/* ---- 标签轨道 ---- */ .tab-track { display: flex; flex: 1; min-width: 0; gap: 6px; + padding: 2px 0; + margin: -2px 0; overflow-x: auto; - overflow-y: hidden; + overflow-y: visible; overscroll-behavior-inline: contain; scrollbar-width: none; @@ -310,6 +275,7 @@ function toggleMaximize() { } } +/* ---- 标签项 ---- */ .tab-item { display: flex; flex: none; @@ -317,17 +283,28 @@ function toggleMaximize() { height: 28px; align-items: center; overflow: hidden; - border-radius: 4px; - background: var(--tabs-idle-bg); - color: var(--fms-text-secondary); + border-radius: 6px; + background: #f4f4f5; + color: #71717a; + transition: + background-color 0.15s ease, + color 0.15s ease; &:hover { - color: var(--tabs-active-color); + background: #f4f4f5; + color: #3f3f46; } &--active { - background: var(--tabs-active-bg); - color: var(--tabs-active-color); + background: #f4f4f5; + color: #3f3f46; + font-weight: 500; + box-shadow: 0 1px 3px rgb(0 0 0 / 6%), 0 1px 2px rgb(0 0 0 / 4%); + + &:hover { + background: #f4f4f5; + color: #3f3f46; + } } &__select, @@ -345,8 +322,8 @@ function toggleMaximize() { flex: 1; align-items: center; justify-content: center; - padding: 0 7px; - font-size: 12px; + padding: 0 8px; + font-size: 13px; span { white-space: nowrap; @@ -359,6 +336,7 @@ function toggleMaximize() { flex: none; padding: 0; place-items: center; + border-radius: 4px; &:hover { background: rgb(0 0 0 / 6%); @@ -367,70 +345,8 @@ function toggleMaximize() { .lucide { width: 10px; height: 10px; + stroke-width: 2; } } } - -.tab-nav-button { - display: grid; - flex: none; - width: 28px; - height: 28px; - padding: 0; - place-items: center; - border: 0; - border-radius: 4px; - color: var(--fms-text-secondary); - background: var(--tabs-idle-bg); - cursor: pointer; - - &:hover:not(:disabled) { - color: var(--tabs-active-color); - background: var(--tabs-active-bg); - } - - &:disabled { - cursor: default; - opacity: 0.35; - } - - .lucide { - width: 14px; - height: 14px; - } -} - -.tab-actions { - display: flex; - flex: none; - align-items: center; - gap: 4px; -} - -.tab-action { - display: grid; - flex: none; - width: 28px; - height: 28px; - padding: 0; - place-items: center; - border: 0; - border-radius: 4px; - color: var(--fms-text-secondary); - background: var(--tabs-idle-bg); - cursor: pointer; - transition: - color 0.15s ease, - background-color 0.15s ease; - - &:hover:not(:disabled) { - color: var(--tabs-active-color); - background: var(--tabs-active-bg); - } - - .lucide { - width: 14px; - height: 14px; - } -} diff --git a/code/fms/fms-vue/src/layouts/components/AppToolbar.vue b/code/fms/fms-vue/src/layouts/components/AppToolbar.vue index 43606828..69903e16 100644 --- a/code/fms/fms-vue/src/layouts/components/AppToolbar.vue +++ b/code/fms/fms-vue/src/layouts/components/AppToolbar.vue @@ -1,8 +1,8 @@ + + + + diff --git a/code/fms/fms-vue/src/styles/main.scss b/code/fms/fms-vue/src/styles/main.scss index c1019c3b..a2161d71 100644 --- a/code/fms/fms-vue/src/styles/main.scss +++ b/code/fms/fms-vue/src/styles/main.scss @@ -2,26 +2,27 @@ * 基础重置 / Base Reset * ============================================================ */ :root { - color: #1f2329; - background: #f5f7fa; + color: #0a0a0a; + background: #fafafa; font-synthesis: none; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; /* 设计令牌:提升到 :root,确保 teleport 到 的模态框(如附件管理)也能继承, - 否则模态框内 var(--fms-border) 等全部未定义,导致报错且边框/颜色失效。 */ - --fms-bg: #f5f7fa; + 否则模态框内 var(--fms-border) 等全部未定义,导致报错且边框/颜色失效。 + shadcn 黑白极简风,对齐 antdv themeConfig */ + --fms-bg: #fafafa; --fms-surface: #ffffff; - --fms-border: #e5e8eb; - --fms-hover: #f2f3f5; - --fms-text: #1f2329; - --fms-text-secondary: #646a73; - --fms-disabled: #c9cdd4; - --fms-shadow: 0 4px 12px rgb(31 35 41 / 6%); - --fms-primary: #1677ff; - --fms-danger: #ff4d4f; - --fms-warning: #fa8c16; + --fms-border: #e4e4e7; + --fms-hover: #f4f4f5; + --fms-text: #0a0a0a; + --fms-text-secondary: #71717a; + --fms-disabled: #d4d4d8; + --fms-shadow: 0 4px 12px rgb(10 10 10 / 6%); + --fms-primary: #0a0a0a; + --fms-danger: #ef4444; + --fms-warning: #f59e0b; } * { diff --git a/code/fms/fms-vue/src/styles/tailwind.css b/code/fms/fms-vue/src/styles/tailwind.css index b7daa069..69dbfe8a 100644 --- a/code/fms/fms-vue/src/styles/tailwind.css +++ b/code/fms/fms-vue/src/styles/tailwind.css @@ -1,2 +1,71 @@ @import "tailwindcss"; @import "@antdv-next/tailwind/compat.css"; + +/* ============================================================ + * shadcn 风格主题令牌(仅亮色模式) + * 对齐 antdv themeConfig:colorPrimary=#0a0a0a, borderRadius=6 + * ============================================================ */ + +/* 圆角比例体系:--radius 为基准 (≈6px) */ +:root { + --radius: 0.5rem; +} + +@theme inline { + --color-background: var(--background); + --color-foreground: var(--foreground); + --color-card: var(--card); + --color-card-foreground: var(--card-foreground); + --color-popover: var(--popover); + --color-popover-foreground: var(--popover-foreground); + --color-primary: var(--primary); + --color-primary-foreground: var(--primary-foreground); + --color-secondary: var(--secondary); + --color-secondary-foreground: var(--secondary-foreground); + --color-muted: var(--muted); + --color-muted-foreground: var(--muted-foreground); + --color-accent: var(--accent); + --color-accent-foreground: var(--accent-foreground); + --color-destructive: var(--destructive); + --color-destructive-foreground: var(--destructive-foreground); + --color-border: var(--border); + --color-input: var(--input); + --color-ring: var(--ring); + + --radius-sm: calc(var(--radius) - 2px); + --radius-md: calc(var(--radius) - 1px); + --radius-lg: var(--radius); + --radius-xl: calc(var(--radius) + 2px); +} + +:root { + --background: #fafafa; + --foreground: #0a0a0a; + --card: #ffffff; + --card-foreground: #0a0a0a; + --popover: #ffffff; + --popover-foreground: #0a0a0a; + --primary: #0a0a0a; + --primary-foreground: #fafafa; + --secondary: #f4f4f5; + --secondary-foreground: #0a0a0a; + --muted: #f4f4f5; + --muted-foreground: #71717a; + --accent: #f4f4f5; + --accent-foreground: #0a0a0a; + --destructive: #ef4444; + --destructive-foreground: #fafafa; + --border: #e4e4e7; + --input: #e4e4e7; + --ring: #0a0a0a; +} + +@layer base { + * { + border-color: var(--border); + } + body { + background-color: var(--background); + color: var(--foreground); + } +} diff --git a/code/fms/fms-vue/src/views/base/contact/detail.vue b/code/fms/fms-vue/src/views/base/contact/detail.vue index 241d94f7..fb8a2630 100644 --- a/code/fms/fms-vue/src/views/base/contact/detail.vue +++ b/code/fms/fms-vue/src/views/base/contact/detail.vue @@ -35,9 +35,6 @@ function goBack() { display: flex; flex-direction: column; overflow: hidden; - background: var(--fms-surface); - border: 1px solid var(--fms-border); - border-radius: 6px; } .detail-header { diff --git a/code/fms/fms-vue/src/views/base/contact/index.vue b/code/fms/fms-vue/src/views/base/contact/index.vue index 4369aade..2e71bcf4 100644 --- a/code/fms/fms-vue/src/views/base/contact/index.vue +++ b/code/fms/fms-vue/src/views/base/contact/index.vue @@ -85,9 +85,6 @@ function confirmBatchDelete() { width: 100%; height: 100%; overflow: hidden; - border: 1px solid var(--fms-border); - border-radius: 6px; - background: var(--fms-surface); } .contact-page :deep(.fms-module-list-page) { diff --git a/code/fms/fms-vue/src/views/base/othercompany/index.vue b/code/fms/fms-vue/src/views/base/othercompany/index.vue index f9112722..44d7bda8 100644 --- a/code/fms/fms-vue/src/views/base/othercompany/index.vue +++ b/code/fms/fms-vue/src/views/base/othercompany/index.vue @@ -503,9 +503,6 @@ onMounted(() => { .othercompany-page { overflow: hidden; - border: 1px solid var(--fms-border); - border-radius: 6px; - background: var(--fms-surface); } .category-panel, diff --git a/code/fms/fms-vue/src/views/base/otherdata/index.vue b/code/fms/fms-vue/src/views/base/otherdata/index.vue index 5054dc83..f04862ad 100644 --- a/code/fms/fms-vue/src/views/base/otherdata/index.vue +++ b/code/fms/fms-vue/src/views/base/otherdata/index.vue @@ -520,9 +520,6 @@ onMounted(loadCategories); } .otherdata-page { overflow: hidden; - border: 1px solid var(--fms-border); - border-radius: 6px; - background: var(--fms-surface); } .category-panel, .data-panel { diff --git a/code/fms/fms-vue/src/views/dashboard/demo.vue b/code/fms/fms-vue/src/views/dashboard/demo.vue index 0d3b7b26..c7a9339b 100644 --- a/code/fms/fms-vue/src/views/dashboard/demo.vue +++ b/code/fms/fms-vue/src/views/dashboard/demo.vue @@ -240,7 +240,6 @@ function onLocaleChange(record) { height: 100%; min-height: 0; color: var(--fms-text); - background: var(--fms-surface); } .table-demo__toolbar { diff --git a/code/fms/fms-vue/src/views/system/user/index.vue b/code/fms/fms-vue/src/views/system/user/index.vue index bcc3e7b6..4b4d5c46 100644 --- a/code/fms/fms-vue/src/views/system/user/index.vue +++ b/code/fms/fms-vue/src/views/system/user/index.vue @@ -432,9 +432,6 @@ async function handleSave() { width: 100%; height: 100%; overflow: hidden; - border: 1px solid var(--fms-border); - border-radius: 6px; - background: var(--fms-surface); } .user-page :deep(.fms-module-list-page) {