| @@ -46,7 +46,7 @@ function KFEmpty({ | |||||
| return ( | return ( | ||||
| <div className={classNames('kf-empty', className)} style={style}> | <div className={classNames('kf-empty', className)} style={style}> | ||||
| <img className="kf-empty__image" src={image} /> | |||||
| <img className="kf-empty__image" src={image} draggable={false} alt="" /> | |||||
| <div className="kf-empty__title">{title}</div> | <div className="kf-empty__title">{title}</div> | ||||
| <div className="kf-empty__content">{content}</div> | <div className="kf-empty__content">{content}</div> | ||||
| {hasFooter && ( | {hasFooter && ( | ||||
| @@ -18,7 +18,7 @@ type ModalTitleProps = { | |||||
| function ModalTitle({ title, image, style, className }: ModalTitleProps) { | function ModalTitle({ title, image, style, className }: ModalTitleProps) { | ||||
| return ( | return ( | ||||
| <div className={classNames('kf-modal-title', className)} style={style}> | <div className={classNames('kf-modal-title', className)} style={style}> | ||||
| {image && <img className={'kf-modal-title__image'} src={image} alt="" />} | |||||
| {image && <img className={'kf-modal-title__image'} src={image} draggable={false} alt="" />} | |||||
| {title} | {title} | ||||
| </div> | </div> | ||||
| ); | ); | ||||
| @@ -17,7 +17,7 @@ type SubAreaTitleProps = { | |||||
| function SubAreaTitle({ title, image, style, className }: SubAreaTitleProps) { | function SubAreaTitle({ title, image, style, className }: SubAreaTitleProps) { | ||||
| return ( | return ( | ||||
| <div className={classNames('kf-subarea-title', className)} style={style}> | <div className={classNames('kf-subarea-title', className)} style={style}> | ||||
| <img src={image} width={14} /> | |||||
| <img src={image} width={14} draggable={false} alt="" /> | |||||
| <span style={{ marginLeft: '8px' }}>{title}</span> | <span style={{ marginLeft: '8px' }}>{title}</span> | ||||
| </div> | </div> | ||||
| ); | ); | ||||
| @@ -63,11 +63,16 @@ function CodeConfigItem({ item, onClick, onEdit, onRemove }: CodeConfigItemProps | |||||
| </div> | </div> | ||||
| <Flex justify="space-between"> | <Flex justify="space-between"> | ||||
| <div className={styles['code-config-item__time']}> | <div className={styles['code-config-item__time']}> | ||||
| <img style={{ width: '17px', marginRight: '6px' }} src={creatByImg} alt="" /> | |||||
| <img | |||||
| style={{ width: '17px', marginRight: '6px' }} | |||||
| src={creatByImg} | |||||
| alt="" | |||||
| draggable={false} | |||||
| /> | |||||
| <span>{item.create_by}</span> | <span>{item.create_by}</span> | ||||
| </div> | </div> | ||||
| <div className={styles['code-config-item__time']}> | <div className={styles['code-config-item__time']}> | ||||
| <img style={{ width: '12px', marginRight: '5px' }} src={clock} alt="" /> | |||||
| <img style={{ width: '12px', marginRight: '5px' }} src={clock} alt="" draggable={false} /> | |||||
| <span>最近更新: {formatDate(item.update_time, 'YYYY-MM-DD')}</span> | <span>最近更新: {formatDate(item.update_time, 'YYYY-MM-DD')}</span> | ||||
| </div> | </div> | ||||
| </Flex> | </Flex> | ||||
| @@ -23,12 +23,14 @@ function CategoryItem({ resourceType, item, isSelected, onClick }: CategoryItemP | |||||
| style={{ width: '22px' }} | style={{ width: '22px' }} | ||||
| src={`/assets/images/${config.prefix}/${item.path}.png`} | src={`/assets/images/${config.prefix}/${item.path}.png`} | ||||
| alt="" | alt="" | ||||
| draggable={false} | |||||
| /> | /> | ||||
| <img | <img | ||||
| className={styles['category-item__active-icon']} | className={styles['category-item__active-icon']} | ||||
| style={{ width: '22px' }} | style={{ width: '22px' }} | ||||
| src={`/assets/images/${config.prefix}/${item.path}-hover.png`} | src={`/assets/images/${config.prefix}/${item.path}-hover.png`} | ||||
| alt="" | alt="" | ||||
| draggable={false} | |||||
| /> | /> | ||||
| <span className={styles['category-item__name']}>{item.name}</span> | <span className={styles['category-item__name']}>{item.name}</span> | ||||
| </div> | </div> | ||||
| @@ -39,11 +39,16 @@ function ResourceItem({ item, isPublic, onClick, onRemove }: ResourceItemProps) | |||||
| <div className={styles['resource-item__description']}>{item.description}</div> | <div className={styles['resource-item__description']}>{item.description}</div> | ||||
| <Flex justify="space-between"> | <Flex justify="space-between"> | ||||
| <div className={styles['resource-item__time']}> | <div className={styles['resource-item__time']}> | ||||
| <img style={{ width: '17px', marginRight: '6px' }} src={creatByImg} alt="" /> | |||||
| <img | |||||
| style={{ width: '17px', marginRight: '6px' }} | |||||
| src={creatByImg} | |||||
| draggable={false} | |||||
| alt="" | |||||
| /> | |||||
| <span>{item.create_by ?? ''}</span> | <span>{item.create_by ?? ''}</span> | ||||
| </div> | </div> | ||||
| <div className={styles['resource-item__time']}> | <div className={styles['resource-item__time']}> | ||||
| <img style={{ width: '12px', marginRight: '5px' }} src={clock} alt="" /> | |||||
| <img style={{ width: '12px', marginRight: '5px' }} src={clock} draggable={false} alt="" /> | |||||
| <span> | <span> | ||||
| {'最近更新: '} | {'最近更新: '} | ||||
| {item.update_time ? formatDate(item.update_time, 'YYYY-MM-DD') : item.time_ago ?? ''} | {item.update_time ? formatDate(item.update_time, 'YYYY-MM-DD') : item.time_ago ?? ''} | ||||
| @@ -18,8 +18,8 @@ function ResourcePage({ resourceType }: ResourcePageProps) { | |||||
| const [activeTab, setActiveTab] = useState<string>(cacheState?.activeTab ?? CommonTabKeys.Public); | const [activeTab, setActiveTab] = useState<string>(cacheState?.activeTab ?? CommonTabKeys.Public); | ||||
| const [typeList, setTypeList] = useState<CategoryData[]>([]); | const [typeList, setTypeList] = useState<CategoryData[]>([]); | ||||
| const [tagList, setTagList] = useState<CategoryData[]>([]); | const [tagList, setTagList] = useState<CategoryData[]>([]); | ||||
| const [activeType, setActiveType] = useState<number | undefined>(cacheState?.activeType); | |||||
| const [activeTag, setActiveTag] = useState<number | undefined>(cacheState?.activeTag); | |||||
| const [activeType, setActiveType] = useState<string | undefined>(cacheState?.activeType); | |||||
| const [activeTag, setActiveTag] = useState<string | undefined>(cacheState?.activeTag); | |||||
| const dataListRef = useRef<ResourceListRef>(null); | const dataListRef = useRef<ResourceListRef>(null); | ||||
| const config = resourceConfig[resourceType]; | const config = resourceConfig[resourceType]; | ||||
| @@ -34,12 +34,12 @@ function ResourcePage({ resourceType }: ResourcePageProps) { | |||||
| // 选择类型 | // 选择类型 | ||||
| const chooseType = (record: CategoryData) => { | const chooseType = (record: CategoryData) => { | ||||
| setActiveType((prev) => (prev === record.id ? undefined : record.id)); | |||||
| setActiveType((prev) => (prev === record.name ? undefined : record.name)); | |||||
| }; | }; | ||||
| // 选择 Tag | // 选择 Tag | ||||
| const chooseTag = (record: CategoryData) => { | const chooseTag = (record: CategoryData) => { | ||||
| setActiveTag((prev) => (prev === record.id ? undefined : record.id)); | |||||
| setActiveTag((prev) => (prev === record.name ? undefined : record.name)); | |||||
| }; | }; | ||||
| // 获取分类 | // 获取分类 | ||||
| @@ -116,6 +116,8 @@ function ExperimentInstanceComponent({ | |||||
| <img | <img | ||||
| style={{ width: '17px', marginRight: '7px' }} | style={{ width: '17px', marginRight: '7px' }} | ||||
| src={experimentStatusInfo[item.status as ExperimentStatus]?.icon} | src={experimentStatusInfo[item.status as ExperimentStatus]?.icon} | ||||
| draggable={false} | |||||
| alt="" | |||||
| /> | /> | ||||
| <span | <span | ||||
| style={{ color: experimentStatusInfo[item.status as ExperimentStatus]?.color }} | style={{ color: experimentStatusInfo[item.status as ExperimentStatus]?.color }} | ||||
| @@ -14,7 +14,12 @@ function ExperimentStatusCell(status?: ExperimentStatus | null) { | |||||
| } | } | ||||
| return ( | return ( | ||||
| <div className={styles['experiment-status-cell']}> | <div className={styles['experiment-status-cell']}> | ||||
| <img style={{ width: '17px', marginRight: '7px' }} src={statusInfo[status]?.icon} /> | |||||
| <img | |||||
| style={{ width: '17px', marginRight: '7px' }} | |||||
| src={statusInfo[status]?.icon} | |||||
| draggable={false} | |||||
| alt="" | |||||
| /> | |||||
| <span | <span | ||||
| style={{ color: statusInfo[status]?.color }} | style={{ color: statusInfo[status]?.color }} | ||||
| className={styles['experiment-status-cell__label']} | className={styles['experiment-status-cell__label']} | ||||
| @@ -70,6 +70,8 @@ function TensorBoardStatusCell({ | |||||
| className={styles['tensorBoard-status__icon']} | className={styles['tensorBoard-status__icon']} | ||||
| src={statusConfig[status].icon} | src={statusConfig[status].icon} | ||||
| onClick={onClick} | onClick={onClick} | ||||
| draggable={false} | |||||
| alt="" | |||||
| /> | /> | ||||
| )} | )} | ||||
| </> | </> | ||||
| @@ -385,6 +385,8 @@ function Experiment() { | |||||
| style={{ width: '17px', marginRight: '6px' }} | style={{ width: '17px', marginRight: '6px' }} | ||||
| key={index} | key={index} | ||||
| src={experimentStatusInfo[item].icon} | src={experimentStatusInfo[item].icon} | ||||
| draggable={false} | |||||
| alt="" | |||||
| /> | /> | ||||
| ); | ); | ||||
| }) | }) | ||||
| @@ -48,6 +48,7 @@ const ModelMenu = ({ onComponentDragEnd }: ModelMenuProps) => { | |||||
| <img | <img | ||||
| style={{ height: '16px', marginRight: '15px' }} | style={{ height: '16px', marginRight: '15px' }} | ||||
| src={`/assets/images/${ele.icon_path}.png`} | src={`/assets/images/${ele.icon_path}.png`} | ||||
| draggable={false} | |||||
| alt="" | alt="" | ||||
| /> | /> | ||||
| )} | )} | ||||
| @@ -116,7 +116,12 @@ const AvatarCropperForm: React.FC<AvatarCropperProps> = (props) => { | |||||
| </Col> | </Col> | ||||
| <Col span={12} order={2}> | <Col span={12} order={2}> | ||||
| <div className={styles.avatarPreview}> | <div className={styles.avatarPreview}> | ||||
| <img src={previewData} style={{ height: '100%', width: '100%' }} /> | |||||
| <img | |||||
| src={previewData} | |||||
| style={{ height: '100%', width: '100%' }} | |||||
| draggable={false} | |||||
| alt="" | |||||
| /> | |||||
| </div> | </div> | ||||
| </Col> | </Col> | ||||
| </Row> | </Row> | ||||
| @@ -141,7 +141,7 @@ const Center: React.FC = () => { | |||||
| setCropperModalOpen(true); | setCropperModalOpen(true); | ||||
| }} | }} | ||||
| > | > | ||||
| <img alt="" src={currentUser.avatar} /> | |||||
| <img src={currentUser.avatar} draggable={false} alt="" /> | |||||
| </div> | </div> | ||||
| {renderUserInfo(currentUser)} | {renderUserInfo(currentUser)} | ||||
| <Divider dashed /> | <Divider dashed /> | ||||
| @@ -11,7 +11,7 @@ import styles from './login.less'; | |||||
| const LoginInputPrefix = ({ icon }: { icon: string }) => { | const LoginInputPrefix = ({ icon }: { icon: string }) => { | ||||
| return ( | return ( | ||||
| <div className={styles['login-input-prefix']}> | <div className={styles['login-input-prefix']}> | ||||
| <img className={styles['login-input-prefix__icon']} src={icon} alt="" /> | |||||
| <img className={styles['login-input-prefix__icon']} src={icon} alt="" draggable={false} /> | |||||
| <div className={styles['login-input-prefix__line']}></div> | <div className={styles['login-input-prefix__line']}></div> | ||||
| </div> | </div> | ||||
| ); | ); | ||||
| @@ -98,6 +98,7 @@ const Login = () => { | |||||
| <img | <img | ||||
| src={require('@/assets/img/logo.png')} | src={require('@/assets/img/logo.png')} | ||||
| style={{ width: '32px', marginRight: '12px' }} | style={{ width: '32px', marginRight: '12px' }} | ||||
| draggable={false} | |||||
| alt="" | alt="" | ||||
| /> | /> | ||||
| 智能材料科研平台 | 智能材料科研平台 | ||||
| @@ -107,6 +108,7 @@ const Login = () => { | |||||
| <img | <img | ||||
| src={require('@/assets/img/login-ai-logo.png')} | src={require('@/assets/img/login-ai-logo.png')} | ||||
| className={styles['user-login__left__title__img']} | className={styles['user-login__left__title__img']} | ||||
| draggable={false} | |||||
| alt="" | alt="" | ||||
| /> | /> | ||||
| </div> | </div> | ||||
| @@ -116,6 +118,7 @@ const Login = () => { | |||||
| <img | <img | ||||
| className={styles['user-login__left__bottom-img']} | className={styles['user-login__left__bottom-img']} | ||||
| src={require('@/assets/img/login-left-image.png')} | src={require('@/assets/img/login-left-image.png')} | ||||
| draggable={false} | |||||
| alt="" | alt="" | ||||
| /> | /> | ||||
| </div> | </div> | ||||
| @@ -31,6 +31,8 @@ function ExperimentTable({ tableData = [], style }: ExperimentTableProps) { | |||||
| src={experimentStatusInfo[item.status as ExperimentStatus]?.icon} | src={experimentStatusInfo[item.status as ExperimentStatus]?.icon} | ||||
| width={17} | width={17} | ||||
| height={17} | height={17} | ||||
| draggable={false} | |||||
| alt="" | |||||
| /> | /> | ||||
| </div> | </div> | ||||
| <div className={styles['experiment-table__duration']}> | <div className={styles['experiment-table__duration']}> | ||||
| @@ -44,6 +44,7 @@ function WorkArrow({ | |||||
| <img | <img | ||||
| className={styles['work-arrow__img']} | className={styles['work-arrow__img']} | ||||
| src={require('@/assets/img/blue-triangle.png')} | src={require('@/assets/img/blue-triangle.png')} | ||||
| draggable={false} | |||||
| alt="" | alt="" | ||||
| width={10} | width={10} | ||||
| height={9} | height={9} | ||||
| @@ -10,7 +10,7 @@ type TotalStatisticsProps = { | |||||
| function TotalStatistics({ icon = '', title = '', count = 0, style }: TotalStatisticsProps) { | function TotalStatistics({ icon = '', title = '', count = 0, style }: TotalStatisticsProps) { | ||||
| return ( | return ( | ||||
| <div className={styles['total-statistics']} style={style}> | <div className={styles['total-statistics']} style={style}> | ||||
| <img className={styles['total-statistics__icon']} src={icon} /> | |||||
| <img className={styles['total-statistics__icon']} src={icon} draggable={false} alt="" /> | |||||
| <div> | <div> | ||||
| <div className={styles['total-statistics__title']}> | <div className={styles['total-statistics__title']}> | ||||
| <span>{title}</span> | <span>{title}</span> | ||||
| @@ -20,7 +20,15 @@ function UserSpace({ users = [] }: UserSpaceProps) { | |||||
| className={styles['user-space__avatar']} | className={styles['user-space__avatar']} | ||||
| src={currentUser?.avatar} | src={currentUser?.avatar} | ||||
| alt="" | alt="" | ||||
| icon={<img src={require('@/assets/img/avatar-default.png')} width={56} height={56} />} | |||||
| icon={ | |||||
| <img | |||||
| src={require('@/assets/img/avatar-default.png')} | |||||
| width={56} | |||||
| height={56} | |||||
| draggable={false} | |||||
| alt="" | |||||
| /> | |||||
| } | |||||
| ></Avatar> | ></Avatar> | ||||
| <div className={styles['user-space__name']}>{currentUser?.nickName}</div> | <div className={styles['user-space__name']}>{currentUser?.nickName}</div> | ||||
| <div className={styles['user-space__role']}>{currentUser?.roleNames?.[0]?.roleName}</div> | <div className={styles['user-space__role']}>{currentUser?.roleNames?.[0]?.roleName}</div> | ||||
| @@ -34,7 +42,7 @@ function UserSpace({ users = [] }: UserSpaceProps) { | |||||
| <div className={styles['user-space__participant__count']}>8</div> | <div className={styles['user-space__participant__count']}>8</div> | ||||
| </Space> | </Space> | ||||
| <Flex align="center" gap={12} wrap="wrap"> | <Flex align="center" gap={12} wrap="wrap"> | ||||
| {users?.map((item, index) => { | |||||
| {users?.map((_item, index) => { | |||||
| return ( | return ( | ||||
| <Avatar | <Avatar | ||||
| key={index} | key={index} | ||||
| @@ -42,7 +50,13 @@ function UserSpace({ users = [] }: UserSpaceProps) { | |||||
| src={require(`@/assets/img/user-avatar/${index + 1}.png`)} | src={require(`@/assets/img/user-avatar/${index + 1}.png`)} | ||||
| alt="" | alt="" | ||||
| icon={ | icon={ | ||||
| <img src={require('@/assets/img/avatar-default.png')} width={36} height={36} /> | |||||
| <img | |||||
| src={require('@/assets/img/avatar-default.png')} | |||||
| width={36} | |||||
| height={36} | |||||
| draggable={false} | |||||
| alt="" | |||||
| /> | |||||
| } | } | ||||
| ></Avatar> | ></Avatar> | ||||
| ); | ); | ||||
| @@ -15,7 +15,13 @@ function WorkspaceIntro() { | |||||
| type="primary" | type="primary" | ||||
| style={{ marginRight: '20px' }} | style={{ marginRight: '20px' }} | ||||
| icon={ | icon={ | ||||
| <img src={require('@/assets/img/functional-material.png')} width={19} height={19} /> | |||||
| <img | |||||
| src={require('@/assets/img/functional-material.png')} | |||||
| width={19} | |||||
| height={19} | |||||
| draggable={false} | |||||
| alt="" | |||||
| /> | |||||
| } | } | ||||
| > | > | ||||
| 功能材料自主实验系统 | 功能材料自主实验系统 | ||||
| @@ -23,7 +29,13 @@ function WorkspaceIntro() { | |||||
| <Button | <Button | ||||
| type="default" | type="default" | ||||
| icon={ | icon={ | ||||
| <img src={require('@/assets/img/molecular-material.png')} width={19} height={19} /> | |||||
| <img | |||||
| src={require('@/assets/img/molecular-material.png')} | |||||
| width={19} | |||||
| height={19} | |||||
| draggable={false} | |||||
| alt="" | |||||
| /> | |||||
| } | } | ||||
| > | > | ||||
| 分子材料自主实验系统 | 分子材料自主实验系统 | ||||
| @@ -34,6 +46,8 @@ function WorkspaceIntro() { | |||||
| <img | <img | ||||
| className={styles['workspace-intro__icon']} | className={styles['workspace-intro__icon']} | ||||
| src={require('@/assets/img/workspace-intro-icon.png')} | src={require('@/assets/img/workspace-intro-icon.png')} | ||||
| draggable={false} | |||||
| alt="" | |||||
| /> | /> | ||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| @@ -53,6 +53,7 @@ | |||||
| width: 64px; | width: 64px; | ||||
| height: 64px; | height: 64px; | ||||
| background-color: white; | background-color: white; | ||||
| border-radius: 10px; | |||||
| cursor: pointer; | cursor: pointer; | ||||
| } | } | ||||
| } | } | ||||
| @@ -76,7 +76,8 @@ function Workspace() { | |||||
| className={styles['workspace__robot-img']} | className={styles['workspace__robot-img']} | ||||
| src={require('@/assets/img/robot.png')} | src={require('@/assets/img/robot.png')} | ||||
| onClick={handleClick} | onClick={handleClick} | ||||
| onDragStart={(e) => e.preventDefault()} | |||||
| draggable={false} | |||||
| alt="" | |||||
| ></img> | ></img> | ||||
| </Draggable> | </Draggable> | ||||
| @@ -21,6 +21,7 @@ export function modalConfirm({ title, content, onOk, ...rest }: ModalFuncProps) | |||||
| <img | <img | ||||
| src={require('@/assets/img/delete-icon.png')} | src={require('@/assets/img/delete-icon.png')} | ||||
| style={{ width: '120px', marginBottom: '24px' }} | style={{ width: '120px', marginBottom: '24px' }} | ||||
| draggable={false} | |||||
| alt="" | alt="" | ||||
| /> | /> | ||||
| <div style={{ color: themes.textColor, fontSize: '16px', fontWeight: 500 }}>{title}</div> | <div style={{ color: themes.textColor, fontSize: '16px', fontWeight: 500 }}>{title}</div> | ||||