fix: 使用内联样式修复 Toast 显示过小问题
- 使用内联样式替代 TailwindCSS 类名 - 设置固定位置在屏幕 30% 高度处 - 字体大小 18px,字重 600 - 背景 rgba(0,0,0,0.9) 深色半透明 - 最小高度 60px,内边距 20px - 圆角 12px,添加阴影效果 Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
3f1f10be49
commit
3eeff10338
|
|
@ -73,12 +73,25 @@ const Toast = (function () {
|
|||
if (renderContent) {
|
||||
return renderContent()
|
||||
}
|
||||
return title && <Text className="text-[18px] font-semibold text-white">{title}</Text>
|
||||
return title && <Text style={{ fontSize: 18, fontWeight: '600', color: 'white' }}>{title}</Text>
|
||||
}
|
||||
|
||||
; (global as any).toast?.show(
|
||||
<Block className="z-[9999] flex items-center justify-center">
|
||||
<Block className="relative mx-[40px] mt-[-80px] rounded-[8px] bg-black/90 px-[24px] py-[16px] shadow-lg">
|
||||
<Block className="z-[9999] flex items-center justify-center" style={{ position: 'fixed', top: '30%', left: 0, right: 0 }}>
|
||||
<Block style={{
|
||||
backgroundColor: 'rgba(0, 0, 0, 0.9)',
|
||||
borderRadius: 12,
|
||||
padding: 20,
|
||||
marginHorizontal: 40,
|
||||
minHeight: 60,
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
shadowColor: '#000',
|
||||
shadowOffset: { width: 0, height: 4 },
|
||||
shadowOpacity: 0.3,
|
||||
shadowRadius: 8,
|
||||
elevation: 8,
|
||||
}}>
|
||||
{renderBody()}
|
||||
</Block>
|
||||
</Block>,
|
||||
|
|
|
|||
Loading…
Reference in New Issue