-
+
+
versionPopoverVisible = visible">
+
+
+
+
+
+
+
+
+ {{ version }}
+
+
+
+
+
+
+
+
+
+
+ 版本查看
+
+
+
+
+
+
+
+
+
popoverVisible = visible">
+
+
+
+
+
+ {{ repo.name }}
+
+
+
+
+
+
+
+ 项目开源地址
+
+
+
+
+
+
+
@@ -339,50 +292,214 @@ onMounted(() => {
font-size: 20px;
}
-/* 样式兜底:确保每个版本项内部单行,外部纵向排列 */
-:deep(.custom-version-notification) {
- .ant-notification-notice-description {
- white-space: normal !important; /* 允许版本项纵向换行 */
- width: 100% !important;
- height: auto !important;
- overflow: visible !important;
+/* 版本 Popover 样式(纯模板适配) */
+:deep(.version-popover-overlay) {
+ .ant-popover-inner {
+ padding: 16px;
+ border-radius: 8px;
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
+ width: 520px;
}
- .custom-version-item {
- display: flex !important;
- align-items: center !important;
- justify-content: space-between !important;
- white-space: nowrap !important; /* 禁止版本项内部换行 */
- padding: 8px 12px !important; /* 重置内边距,去掉左侧竖线空间 */
-
- &:hover {
- background-color: #f5fafe !important;
- }
-
- &:last-child {
- border-bottom: none !important;
- }
- }
-
- /* 当前版本轻微高亮(可选,可删除) */
- .custom-current-version {
- background-color: rgba(24, 144, 255, 0.05) !important;
-
- &:hover {
- background-color: rgba(24, 144, 255, 0.1) !important;
- }
- }
-
- /* 按钮hover样式 */
- button:hover {
- background-color: rgba(24, 144, 255, 0.1) !important;
- color: #1890ff !important;
+ .ant-popover-arrow-content {
+ background-color: #fff;
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
}
-/* 新增:根容器样式(和原布局保持一致) */
+
+.version-popover-content {
+ width: 100%;
+ box-sizing: border-box;
+}
+
+/* 版本列表(模板对应样式) */
+.custom-version-list {
+ width: 100%;
+ padding: 8px 0;
+ box-sizing: border-box;
+}
+
+.custom-version-item {
+ width: 100%;
+ padding: 8px 12px;
+ border-bottom: 1px solid #f0f0f0;
+ border-radius: 4px;
+ transition: all 0.2s ease;
+ box-sizing: border-box;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ white-space: nowrap;
+ background-color: transparent;
+
+ &:hover {
+ background-color: #f5fafe;
+ }
+
+ &:last-child {
+ border-bottom: none;
+ }
+}
+
+/* 当前版本/最新版本高亮 */
+.custom-current-version {
+ background-color: rgba(24, 144, 255, 0.05) !important;
+
+ &:hover {
+ background-color: rgba(24, 144, 255, 0.1) !important;
+ }
+}
+
+.custom-latest-version {
+ background-color: rgba(46, 125, 50, 0.05) !important;
+
+ &:hover {
+ background-color: rgba(46, 125, 50, 0.1) !important;
+ }
+}
+
+/* 版本文本容器 */
+.version-text {
+ display: flex;
+ align-items: center;
+ maxwidth: calc(100% - 40px);
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+
+/* 版本复制按钮 */
+.version-copy-btn {
+ width: 24px;
+ height: 24px;
+ border: none;
+ border-radius: 4px;
+ background-color: transparent;
+ cursor: pointer;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ padding: 0;
+ margin: 0;
+ flex-shrink: 0;
+ transition: all 0.2s ease;
+
+ &:hover {
+ background-color: rgba(24, 144, 255, 0.1);
+ color: #1890ff !important;
+ }
+
+ &:disabled {
+ cursor: not-allowed;
+ opacity: 0.5;
+ }
+}
+
+/* 暂无版本数据 */
+.no-version-data {
+ text-align: center;
+ color: #999;
+ padding: 20px 0;
+ font-size: 14px;
+ background-color: #f9fafb;
+ border-radius: 8px;
+ margin: 0 12px;
+}
+
+/* Git Popover 样式 */
+:deep(.git-popover-overlay) {
+ .ant-popover-inner {
+ padding: 16px;
+ border-radius: 8px;
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
+ width: 360px;
+ }
+
+ .ant-popover-arrow-content {
+ background-color: #fff;
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
+ }
+}
+
+.git-popover-content {
+ width: 100%;
+ box-sizing: border-box;
+}
+
+.git-repo-item {
+ margin-bottom: 12px;
+
+ &:last-child {
+ margin-bottom: 0;
+ }
+}
+
+.git-repo-name {
+ display: flex;
+ align-items: center;
+ font-size: 14px;
+ font-weight: 500;
+ margin-bottom: 6px;
+}
+
+.git-repo-tag {
+ display: inline-block;
+ width: 8px;
+ height: 8px;
+ border-radius: 50%;
+ margin-right: 6px;
+}
+
+.git-repo-url-wrapper {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ padding: 8px 12px;
+ background-color: #f9fafb;
+ border-radius: 4px;
+ font-size: 13px;
+}
+
+.git-repo-url {
+ flex: 1;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ text-decoration: none;
+
+ &:hover {
+ text-decoration: underline;
+ opacity: 0.8;
+ }
+}
+
+.git-copy-btn {
+ width: 24px;
+ height: 24px;
+ border: none;
+ border-radius: 4px;
+ background-color: transparent;
+ cursor: pointer;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ margin-left: 8px;
+ flex-shrink: 0;
+
+ &:hover {
+ background-color: rgba(0, 0, 0, 0.05);
+ }
+
+ &:disabled {
+ cursor: not-allowed;
+ opacity: 0.5;
+ }
+}
+
+/* 根容器样式 */
.header-actions-root {
display: flex;
align-items: center;
- gap: 8px; // 按钮之间间距,可根据需要调整
+ gap: 8px;
}
\ No newline at end of file
diff --git a/app/src/pages/login/Login.vue b/app/src/pages/login/Login.vue
index a262a85..d5dbfc6 100644
--- a/app/src/pages/login/Login.vue
+++ b/app/src/pages/login/Login.vue
@@ -7,11 +7,121 @@