Merge pull request #869 from SuanmoSuanyangTechnology/fix/v0.3.0_zy

Fix/v0.3.0 zy
This commit is contained in:
yingzhao
2026-04-13 14:05:33 +08:00
committed by GitHub
3 changed files with 28 additions and 24 deletions

View File

@@ -2,7 +2,7 @@
* @Author: ZhaoYing * @Author: ZhaoYing
* @Date: 2026-02-03 18:32:53 * @Date: 2026-02-03 18:32:53
* @Last Modified by: ZhaoYing * @Last Modified by: ZhaoYing
* @Last Modified time: 2026-03-16 14:27:12 * @Last Modified time: 2026-04-13 13:37:43
*/ */
import { useEffect, useState, forwardRef, useImperativeHandle, useRef } from 'react' import { useEffect, useState, forwardRef, useImperativeHandle, useRef } from 'react'
import { useTranslation } from 'react-i18next' import { useTranslation } from 'react-i18next'
@@ -93,7 +93,7 @@ const InterestAreas = forwardRef<{ handleRefresh: () => void; }>((_props, ref) =
ref={chartRef} ref={chartRef}
option={{ option={{
color: Colors, color: Colors,
grid: { top: 8, left: 38, right: 8, bottom: 24 }, grid: { top: 14, left: 38, right: 8, bottom: 24 },
xAxis: { xAxis: {
type: 'category', type: 'category',
data: keys.map(k => t(`implicitDetail.${k}`)), data: keys.map(k => t(`implicitDetail.${k}`)),

View File

@@ -2,7 +2,7 @@
* @Author: ZhaoYing * @Author: ZhaoYing
* @Date: 2025-12-23 16:22:51 * @Date: 2025-12-23 16:22:51
* @Last Modified by: ZhaoYing * @Last Modified by: ZhaoYing
* @Last Modified time: 2026-04-13 11:12:18 * @Last Modified time: 2026-04-13 14:00:07
*/ */
import { useEffect, useLayoutEffect, useState, useRef, type FC } from 'react'; import { useEffect, useLayoutEffect, useState, useRef, type FC } from 'react';
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'; import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
@@ -285,12 +285,13 @@ const AutocompletePlugin: FC<{ options: Suggestion[] }> = ({ options }) => {
ref={popupRef} ref={popupRef}
data-autocomplete-popup="true" data-autocomplete-popup="true"
onMouseDown={(e) => e.preventDefault()} onMouseDown={(e) => e.preventDefault()}
className="rb:min-w-70 rb:max-h-57.5 rb:overflow-y-auto rb:fixed rb:z-1000 rb:bg-white rb:rounded-lg rb:border-[0.5px] rb:border-[#EBEBEB] rb:shadow-[0px_2px_6px_0px_rgba(0,0,0,0.1)] rb:py-3 rb:px-2" className="rb:fixed rb:z-1000 rb:bg-white rb:rounded-lg rb:border-[0.5px] rb:border-[#EBEBEB] rb:shadow-[0px_2px_6px_0px_rgba(0,0,0,0.1)] rb:py-3 rb:px-2"
style={{ style={{
top: popupPosition.top, top: popupPosition.top,
left: popupPosition.left, left: popupPosition.left,
}} }}
> >
<div className="rb:min-w-70 rb:max-h-57.5 rb:overflow-y-auto">
<Flex vertical gap={12}> <Flex vertical gap={12}>
{Object.entries(groupedSuggestions).map(([nodeId, nodeOptions]) => { {Object.entries(groupedSuggestions).map(([nodeId, nodeOptions]) => {
const nodeName = nodeOptions[0]?.nodeData?.name || nodeId; const nodeName = nodeOptions[0]?.nodeData?.name || nodeId;
@@ -344,7 +345,7 @@ const AutocompletePlugin: FC<{ options: Suggestion[] }> = ({ options }) => {
} }
<Space size={2}> <Space size={2}>
{option.dataType && <span>{option.dataType}</span>} {option.dataType && <span>{option.dataType}</span>}
{hasChildren && <div className="rb:size-3 rb:bg-cover rb:bg-[url('src/assets/images/common/arrow_up.svg')] rb:rotate-90"></div>} {hasChildren && <div className="rb:size-3 rb:bg-cover rb:bg-[url('@/assets/images/common/arrow_up.svg')] rb:rotate-90"></div>}
</Space> </Space>
</Flex> </Flex>
); );
@@ -354,10 +355,11 @@ const AutocompletePlugin: FC<{ options: Suggestion[] }> = ({ options }) => {
); );
})} })}
</Flex> </Flex>
</div>
{/* Child variables panel - floats to the left */} {/* Child variables panel - floats to the left */}
{expandedParent?.children?.length && ( {expandedParent?.children?.length && (
<div <div
className="rb:min-w-70 rb:max-h-57.5 rb:overflow-y-auto rb:text-[12px] rb:fixed rb:z-1000 rb:bg-white rb:rounded-lg rb:border-[0.5px] rb:border-[#EBEBEB] rb:shadow-[0px_2px_6px_0px_rgba(0,0,0,0.1)] rb:py-3 rb:px-2" className="rb:absolute rb:min-w-70 rb:max-h-57.5 rb:overflow-y-auto rb:text-[12px] rb:z-1000 rb:bg-white rb:rounded-lg rb:border-[0.5px] rb:border-[#EBEBEB] rb:shadow-[0px_2px_6px_0px_rgba(0,0,0,0.1)] rb:py-3 rb:px-2"
style={{ style={{
top: childPanelTop, top: childPanelTop,
right: 'calc(100% + 8px)', right: 'calc(100% + 8px)',
@@ -387,7 +389,9 @@ const AutocompletePlugin: FC<{ options: Suggestion[] }> = ({ options }) => {
onClick={() => !child.disabled && insertMention(child)} onClick={() => !child.disabled && insertMention(child)}
onMouseEnter={() => setSelectedIndex(childIndex)} onMouseEnter={() => setSelectedIndex(childIndex)}
> >
<span className="rb:font-medium">{child.label}</span> <span className="rb:font-medium">
<span className="rb:text-[#155EEF]">{`{x}`}</span> {child.label}
</span>
{child.dataType && <span>{child.dataType}</span>} {child.dataType && <span>{child.dataType}</span>}
</Flex> </Flex>
); );

View File

@@ -334,7 +334,7 @@ const VariableSelect: FC<VariableSelectProps> = ({
<Space size={2}> <Space size={2}>
{s.dataType && <span>{s.dataType}</span>} {s.dataType && <span>{s.dataType}</span>}
{hasChildren && <div className="rb:size-3 rb:bg-cover rb:bg-[url('src/assets/images/common/arrow_up.svg')] rb:rotate-90"></div>} {hasChildren && <div className="rb:size-3 rb:bg-cover rb:bg-[url('@/assets/images/common/arrow_up.svg')] rb:rotate-90"></div>}
</Space> </Space>
</Flex> </Flex>
); );