{textSets.map(textSet => {
const imageElement = document.querySelector('img[alt="Background"]');
const imageRect = imageElement?.getBoundingClientRect();
const imageWidth = imageRect?.width || 0;
// 计算文本的中心字符位置
const text = textSet.text;
const centerIndex = Math.floor(text.length / 2);
const leftPart = text.substring(0, centerIndex);
const centerChar = text.charAt(centerIndex);
const rightPart = text.substring(centerIndex + 1);
return (
{leftPart}
{centerChar}
{rightPart}
);
})}
{removedBgImageUrl && (