feat: 颜色样式调整

This commit is contained in:
2026-06-05 16:48:05 +08:00
parent c5d3bf5dbb
commit 0df94a8a63
2 changed files with 11 additions and 11 deletions

View File

@@ -102,7 +102,7 @@
<template v-else-if="shouldRenderAigcComponet"> <template v-else-if="shouldRenderAigcComponet">
<view class="detail-action-zone detail-action-zone-no-divider"> <view class="detail-action-zone detail-action-zone-no-divider">
<view v-if="aigcComponetValue.title" class="detail-action-label mt-12"> <view v-if="aigcComponetValue.title" class="detail-action-label">
{{ aigcComponetValue.title }} {{ aigcComponetValue.title }}
</view> </view>
<view class="detail-action-card"> <view class="detail-action-card">

View File

@@ -5,11 +5,11 @@ export const TAG_TONE_COLORS_500 = [
"#3b82f6", // Blue 500 "#3b82f6", // Blue 500
"#8b5cf6", // Violet 500 "#8b5cf6", // Violet 500
]; ];
export const TAG_TONE_COLORS_800 = [ export const TAG_TONE_COLORS_600 = [
"#92400e", // Amber 800 "#d97706", // Amber 600
"#065f46", // Emerald 800 "#059669", // Emerald 600
"#1e40af", // Blue 800 "#2563eb", // Blue 600
"#5b21b6", // Violet 800 "#7c3aed", // Violet 600
]; ];
export const TAG_TONE_COLORS = TAG_TONE_COLORS_500; export const TAG_TONE_COLORS = TAG_TONE_COLORS_500;
@@ -50,15 +50,15 @@ export const pickRandomTagToneColor = (colors = TAG_TONE_COLORS) => {
export const getTagToneTextColor = ( export const getTagToneTextColor = (
color, color,
colors500 = TAG_TONE_COLORS_500, colors500 = TAG_TONE_COLORS_500,
colors800 = TAG_TONE_COLORS_800 colors600 = TAG_TONE_COLORS_600
) => { ) => {
const normalizedColor = normalizeHex(color).toLowerCase(); const normalizedColor = normalizeHex(color).toLowerCase();
const toneIndex = colors500.findIndex( const toneIndex = colors500.findIndex(
(item) => normalizeHex(item).toLowerCase() === normalizedColor (item) => normalizeHex(item).toLowerCase() === normalizedColor
); );
return toneIndex >= 0 && colors800[toneIndex] return toneIndex >= 0 && colors600[toneIndex]
? colors800[toneIndex] ? colors600[toneIndex]
: color; : color;
}; };
@@ -69,11 +69,11 @@ export const buildTagToneStyle = (
backgroundAlpha = 0.08, backgroundAlpha = 0.08,
borderWidth = 1, borderWidth = 1,
colors500 = TAG_TONE_COLORS_500, colors500 = TAG_TONE_COLORS_500,
colors800 = TAG_TONE_COLORS_800, colors600 = TAG_TONE_COLORS_600,
} = {} } = {}
) => { ) => {
const toneColor = color || colors500[0] || TAG_TONE_COLORS_500[0]; const toneColor = color || colors500[0] || TAG_TONE_COLORS_500[0];
const textColor = getTagToneTextColor(toneColor, colors500, colors800); const textColor = getTagToneTextColor(toneColor, colors500, colors600);
return { return {
border: `${borderWidth}px solid ${hexToRgba(toneColor, borderAlpha)}`, border: `${borderWidth}px solid ${hexToRgba(toneColor, borderAlpha)}`,