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">
<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 }}
</view>
<view class="detail-action-card">

View File

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