mirror of
https://ghproxy.com/https://github.com/StreakingMan/solvable-sheep-game
synced 2025-05-24 04:28:14 +08:00
fix: 图标路径判断问题
This commit is contained in:
parent
47caa7ccf9
commit
fc7a880607
|
@ -10,7 +10,6 @@ import {
|
||||||
LAST_LEVEL_STORAGE_KEY,
|
LAST_LEVEL_STORAGE_KEY,
|
||||||
LAST_SCORE_STORAGE_KEY,
|
LAST_SCORE_STORAGE_KEY,
|
||||||
LAST_TIME_STORAGE_KEY,
|
LAST_TIME_STORAGE_KEY,
|
||||||
linkReg,
|
|
||||||
randomString,
|
randomString,
|
||||||
waitTimeout,
|
waitTimeout,
|
||||||
} from '../utils';
|
} from '../utils';
|
||||||
|
@ -133,8 +132,9 @@ const Symbol: FC<SymbolProps> = ({ x, y, icon, isCover, status, onClick }) => {
|
||||||
style={{ opacity: isCover ? 0.4 : 1 }}
|
style={{ opacity: isCover ? 0.4 : 1 }}
|
||||||
>
|
>
|
||||||
{typeof icon.content === 'string' ? (
|
{typeof icon.content === 'string' ? (
|
||||||
linkReg.test(icon.content) ||
|
icon.content.startsWith('data:') ||
|
||||||
icon.content.startsWith('/') ? (
|
icon.content.startsWith('/') ||
|
||||||
|
icon.content.startsWith('http') ? (
|
||||||
/*图片地址*/
|
/*图片地址*/
|
||||||
<img src={icon.content} alt="" />
|
<img src={icon.content} alt="" />
|
||||||
) : (
|
) : (
|
||||||
|
|
Loading…
Reference in New Issue
Block a user