From 65fd6ce23df173778bc997a20bdc8e3b62918d2f Mon Sep 17 00:00:00 2001 From: claw_bot Date: Fri, 13 Mar 2026 05:52:42 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=BE=AE=E4=BF=A1=E5=B0=8F=E7=A8=8B?= =?UTF-8?q?=E5=BA=8F=E5=85=BC=E5=AE=B9=E6=80=A7=E4=BF=AE=E5=A4=8D=20-=20u-?= =?UTF-8?q?button=E6=9B=BF=E6=8D=A2=E4=B8=BA=E5=8E=9F=E7=94=9Fbutton?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 微信小程序对uview-plus的u-button组件有依赖分析问题,导致运行报错。 将所有u-button替换为原生button并添加对应样式: - detail.vue: 底部操作按钮、弹窗确认/取消按钮 - config.vue: 创建组合按钮 - strategies/edit.vue: 保存/删除策略按钮 --- pages/config/config.vue | 20 +++--- pages/detail/detail.vue | 117 +++++++++++++++++++++++---------- pages/strategies/edit/edit.vue | 47 ++++++------- 3 files changed, 110 insertions(+), 74 deletions(-) diff --git a/pages/config/config.vue b/pages/config/config.vue index b06bf2f..6522b62 100755 --- a/pages/config/config.vue +++ b/pages/config/config.vue @@ -132,12 +132,7 @@ 预计初始投入 ¥ {{ totalInvestment }} - + @@ -697,18 +692,19 @@ onShow(async () => { font-family: 'DIN Alternate'; } -.submit-btn { +.btn-submit { background-color: #064E3B; color: #fff; font-weight: 700; border-radius: 24rpx; height: 96rpx; - line-height: 96rpx; font-size: 30rpx; width: 100%; + border: none; + display: flex; + align-items: center; + justify-content: center; } - -.submit-btn:active { - opacity: 0.9; -} +.btn-submit::after { border: none; } +.btn-submit:active { opacity: 0.9; } \ No newline at end of file diff --git a/pages/detail/detail.vue b/pages/detail/detail.vue index 346018c..60339f7 100755 --- a/pages/detail/detail.vue +++ b/pages/detail/detail.vue @@ -170,28 +170,17 @@ - - - + + + @@ -286,18 +275,8 @@ - - + + @@ -738,6 +717,52 @@ const deletePortfolio = async () => { z-index: 999; } +.btn-delete { + flex: 0 0 96rpx; + width: 96rpx; + height: 96rpx; + border-radius: 24rpx; + background-color: #FEE2E2; + border: none; + display: flex; + align-items: center; + justify-content: center; + padding: 0; +} +.btn-delete::after { border: none; } +.btn-buy { + flex: 1; + height: 96rpx; + border-radius: 24rpx; + background-color: #064E3B; + border: none; + display: flex; + align-items: center; + justify-content: center; + gap: 8rpx; + color: #FFFFFF; + font-size: 30rpx; + font-weight: 700; + padding: 0; +} +.btn-buy::after { border: none; } +.btn-sell { + flex: 1; + height: 96rpx; + border-radius: 24rpx; + background-color: #FFFFFF; + border: 2rpx solid #064E3B; + display: flex; + align-items: center; + justify-content: center; + gap: 8rpx; + color: #064E3B; + font-size: 30rpx; + font-weight: 700; + padding: 0; +} +.btn-sell::after { border: none; } + .transaction-modal { position: fixed; top: 0; @@ -818,6 +843,30 @@ const deletePortfolio = async () => { gap: 16rpx; } +.btn-cancel, +.btn-confirm { + flex: 1; + height: 80rpx; + border-radius: 12rpx; + font-size: 26rpx; + font-weight: 600; + display: flex; + align-items: center; + justify-content: center; + border: none; + padding: 0; +} +.btn-cancel { + background-color: #F3F4F6; + color: #6B7280; +} +.btn-cancel::after { border: none; } +.btn-confirm { + background-color: #064E3B; + color: #fff; +} +.btn-confirm::after { border: none; } + .relative { position: relative; } .search-dropdown { diff --git a/pages/strategies/edit/edit.vue b/pages/strategies/edit/edit.vue index 835d7c8..4c65edf 100755 --- a/pages/strategies/edit/edit.vue +++ b/pages/strategies/edit/edit.vue @@ -233,27 +233,10 @@ - - + + - + @@ -936,7 +919,7 @@ onMounted(() => { left: 0; right: 0; background-color: #fff; - padding: 20rpx 32rpx 50rpx 32rpx; /* 适配底部安全区 */ + padding: 20rpx 32rpx 50rpx 32rpx; box-shadow: 0 -4rpx 16rpx rgba(0,0,0,0.05); z-index: 99; } @@ -944,27 +927,35 @@ onMounted(() => { display: flex; gap: 16rpx; } -.submit-btn { +.btn-save { flex: 1; background-color: #064E3B; color: #fff; font-weight: 700; border-radius: 24rpx; height: 96rpx; - line-height: 96rpx; font-size: 30rpx; + border: none; + display: flex; + align-items: center; + justify-content: center; } -.submit-btn:active { opacity: 0.9; } -.delete-btn { - flex: 0 0 120rpx; +.btn-save::after { border: none; } +.btn-save:active { opacity: 0.9; } +.btn-full { width: 100%; } +.btn-delete { + flex: 0 0 180rpx; background-color: #FEE2E2; color: #DC2626; font-weight: 700; border-radius: 24rpx; height: 96rpx; - line-height: 96rpx; font-size: 24rpx; border: none; + display: flex; + align-items: center; + justify-content: center; } -.delete-btn:active { background-color: #FECACA; } +.btn-delete::after { border: none; } +.btn-delete:active { background-color: #FECACA; } \ No newline at end of file