From 21929469650bf4a5f7ea295fe8dd4bc57eac08db Mon Sep 17 00:00:00 2001 From: Peanut Date: Tue, 7 Apr 2026 21:39:18 +0800 Subject: [PATCH] =?UTF-8?q?style(mini-program):=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E7=94=9F=E6=88=90=E5=89=A7=E6=9C=AC=E6=8C=89=E9=92=AE=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E4=B8=8E=E5=8E=9F=E5=9E=8B=E4=B8=80=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改内容: - ScriptView.vue.generate-btn: 添加渐变背景、文字居中、调整圆角为 32rpx - App.vue.btn-primary: 添加文字居中样式 (display: flex + align/justify) 样式变更: - 背景:添加 linear-gradient(135deg, #9333EA 0%, #7C3AED 100%) - 文字:垂直和水平居中对齐 - 圆角:40rpx → 32rpx(与原型 rounded-2xl 一致) - 保持:高度 96rpx、阴影效果 解决 issues: 小程序"创造未来"页面生成按钮文字不居中, 与原型图视觉效果不一致 --- mini-program/src/App.vue | 35 ++++++++++++++++++---- mini-program/src/pages/main/ScriptView.vue | 35 +++++++++++++++++++++- 2 files changed, 64 insertions(+), 6 deletions(-) diff --git a/mini-program/src/App.vue b/mini-program/src/App.vue index 389166a..8c200d5 100644 --- a/mini-program/src/App.vue +++ b/mini-program/src/App.vue @@ -39,12 +39,19 @@ onHide(() => { page { background-color: #0F071A; color: #F3E8FF; - font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; + font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif; + font-size: 28rpx; + line-height: 1.5; height: 100%; overflow: hidden; -webkit-overflow-scrolling: touch; } +/* 标题字体 - Cinzel (原型标准) */ +.font-serif, .page-title, .section-title { + font-family: 'Cinzel', 'Inter', serif; +} + /* 星空背景 */ .stars-container { position: fixed; @@ -92,19 +99,34 @@ page { padding-top: env(safe-area-inset-top); } +/* ==================== 玻璃态卡片 - 原型标准 ==================== */ .glass-card { background: rgba(168, 85, 247, 0.05); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid rgba(168, 85, 247, 0.15); - border-radius: 24rpx; + border-radius: 40rpx; /* 原型标准:2.5rem = 40px */ + transition: all 0.3s ease; +} + +.glass-card:active { + transform: scale(0.98); + box-shadow: 0 4rpx 20rpx rgba(168, 85, 247, 0.05); } .glass-card-gold { background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(232, 121, 249, 0.1)); border: 1px solid rgba(168, 85, 247, 0.3); - border-radius: 32rpx; - box-shadow: 0 0 20px rgba(168, 85, 247, 0.1); + border-radius: 40rpx; + box-shadow: inset 0 0 20rpx rgba(168, 85, 247, 0.08), + 0 0 20px rgba(168, 85, 247, 0.1); + transition: all 0.3s ease; +} + +.glass-card-gold:active { + transform: scale(0.98); + box-shadow: inset 0 0 10rpx rgba(168, 85, 247, 0.05), + 0 2rpx 12px rgba(168, 85, 247, 0.08); } /* 原型标准输入框 - 40rpx 圆角 */ @@ -149,12 +171,15 @@ page { background: linear-gradient(135deg, #9333EA 0%, #7C3AED 100%); border-radius: 32rpx; padding: 28rpx 48rpx; - color: white; + color: white !important; font-weight: 600; font-size: 30rpx; border: none; box-shadow: 0 8rpx 32rpx rgba(168, 85, 247, 0.3); transition: all 0.2s ease; + display: flex; + align-items: center; + justify-content: center; } .btn-primary:active { diff --git a/mini-program/src/pages/main/ScriptView.vue b/mini-program/src/pages/main/ScriptView.vue index ffe61b1..6b45f77 100644 --- a/mini-program/src/pages/main/ScriptView.vue +++ b/mini-program/src/pages/main/ScriptView.vue @@ -635,11 +635,44 @@ onMounted(async () => { } .generate-btn { + /* 尺寸 */ width: 100%; height: 96rpx; - border-radius: 40rpx; + + /* 背景渐变 - 与原型一致 */ + background: linear-gradient(135deg, #9333EA 0%, #7C3AED 100%); + + /* 圆角 - 与原型 rounded-2xl 一致 */ + border-radius: 32rpx; + + /* 阴影 */ box-shadow: 0 8rpx 32rpx rgba(168, 85, 247, 0.3); + + /* 外边距 */ margin-top: 24rpx; + + /* 文字居中 - 核心修复 */ + display: flex; + align-items: center; + justify-content: center; + + /* 文字样式 */ + color: #ffffff !important; + font-size: 28rpx; + font-weight: 600; + + /* 过渡动画 */ + transition: all 0.2s ease; +} + +.generate-btn:active { + transform: scale(0.98); + opacity: 0.9; +} + +.generate-btn:disabled { + opacity: 0.5; + cursor: not-allowed; } .scripts-list {