From 52954f156308494ac99b2d6111d3bc9a2cc45f4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=A6=E6=B3=BD=E6=97=BA?= <2413898818@qq.com> Date: Mon, 16 Dec 2024 17:03:15 +0800 Subject: [PATCH] Default Changelist --- frontend/src/components/MultiTab/MultiTab.vue | 62 ++++++++++---- frontend/src/components/MultiTab/index.js | 11 ++- frontend/src/components/MultiTab/index.less | 25 ++++-- .../src/components/NoticeIcon/NoticeIcon.vue | 56 +++++++++---- frontend/src/components/NoticeIcon/index.js | 10 ++- .../src/components/PageHeader/PageHeader.vue | 84 ++++++++++++++++++- frontend/src/components/PageHeader/index.js | 7 +- 7 files changed, 208 insertions(+), 47 deletions(-) diff --git a/frontend/src/components/MultiTab/MultiTab.vue b/frontend/src/components/MultiTab/MultiTab.vue index c586b84..ba6495a 100644 --- a/frontend/src/components/MultiTab/MultiTab.vue +++ b/frontend/src/components/MultiTab/MultiTab.vue @@ -24,43 +24,58 @@ --> - + \ No newline at end of file diff --git a/frontend/src/components/MultiTab/index.js b/frontend/src/components/MultiTab/index.js index ca2a216..56c4a64 100644 --- a/frontend/src/components/MultiTab/index.js +++ b/frontend/src/components/MultiTab/index.js @@ -1,4 +1,9 @@ -import MultiTab from './MultiTab' -import './index.less' +// 导入名为 MultiTab 的Vue组件,该组件定义在当前目录下的 MultiTab.vue 文件中 +import MultiTab from './MultiTab'; -export default MultiTab +// 导入index.less样式表文件,用于为MultiTab组件提供样式定义 +import './index.less'; + +// 将导入的 MultiTab 组件设置为默认导出 +// 这样其他文件就可以通过 import MultiTab 来使用这个组件 +export default MultiTab; \ No newline at end of file diff --git a/frontend/src/components/MultiTab/index.less b/frontend/src/components/MultiTab/index.less index 773e3af..17f5f3c 100644 --- a/frontend/src/components/MultiTab/index.less +++ b/frontend/src/components/MultiTab/index.less @@ -1,25 +1,34 @@ +// 导入外部样式表,可能是包含通用样式或变量定义的文件 @import '../index'; +// 定义多标签组件的前缀类,用于构建CSS选择器 @multi-tab-prefix-cls: ~"@{ant-pro-prefix}-multi-tab"; @multi-tab-wrapper-prefix-cls: ~"@{ant-pro-prefix}-multi-tab-wrapper"; /* + * 定义多标签组件在.topmenu类下的样式 + * 设置最大宽度为1200px + * 设置左右边距,左边距为-23px,右边距为24px,自动居中 + */ .topmenu .@{multi-tab-prefix-cls} { max-width: 1200px; margin: -23px auto 24px auto; } -*/ + +// 为多标签组件设置通用样式 .@{multi-tab-prefix-cls} { - margin: -23px -24px 24px -24px; - background: #fff; + margin: -23px -24px 24px -24px; // 设置四个方向的边距 + background: #fff; // 背景颜色为白色 } +// 定义多标签组件在.topmenu类下的多标签包装器的样式 .topmenu .@{multi-tab-wrapper-prefix-cls} { - max-width: 1200px; - margin: 0 auto; + max-width: 1200px; // 最大宽度为1200px + margin: 0 auto; // 水平居中对齐 } +// 当内容宽度是流体布局时,设置多标签包装器的最大宽度为100% .topmenu.content-width-Fluid .@{multi-tab-wrapper-prefix-cls} { - max-width: 100%; - margin: 0 auto; -} + max-width: 100%; // 最大宽度为100% + margin: 0 auto; // 水平居中对齐 +} \ No newline at end of file diff --git a/frontend/src/components/NoticeIcon/NoticeIcon.vue b/frontend/src/components/NoticeIcon/NoticeIcon.vue index bc849b6..77f1514 100644 --- a/frontend/src/components/NoticeIcon/NoticeIcon.vue +++ b/frontend/src/components/NoticeIcon/NoticeIcon.vue @@ -1,4 +1,5 @@