mirror of
https://github.com/labring/FastGPT.git
synced 2025-10-18 17:51:24 +00:00
feat: get node variables in prompt editor (#2087)
* feat: get node variables in prompt editor * fix * fix build * merge * fix build * delete default parent * fix * fix
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import { Image } from '@chakra-ui/react';
|
||||
import { Box, Flex, Image } from '@chakra-ui/react';
|
||||
import type { ImageProps } from '@chakra-ui/react';
|
||||
import { LOGO_ICON } from '@fastgpt/global/common/system/constants';
|
||||
import MyIcon from '../Icon';
|
||||
@@ -10,12 +10,13 @@ const Avatar = ({ w = '30px', src, ...props }: ImageProps) => {
|
||||
const isIcon = !!iconPaths[src as any];
|
||||
|
||||
return isIcon ? (
|
||||
<MyIcon name={src as any} w={w} borderRadius={props.borderRadius} />
|
||||
<Box {...props}>
|
||||
<MyIcon name={src as any} w={w} borderRadius={props.borderRadius} />
|
||||
</Box>
|
||||
) : (
|
||||
<Image
|
||||
fallbackSrc={LOGO_ICON}
|
||||
fallbackStrategy={'onError'}
|
||||
// borderRadius={'md'}
|
||||
objectFit={'contain'}
|
||||
alt=""
|
||||
w={w}
|
||||
|
Reference in New Issue
Block a user