chore: press enter to submit chat message

This commit is contained in:
jialin
2025-03-09 21:31:58 +08:00
parent a2ef9d781d
commit ab6e98aae2
17 changed files with 76 additions and 65 deletions
+1
View File
@@ -75,6 +75,7 @@
}
.file-name {
margin-bottom: 6px;
line-height: 20px;
height: 20px;
display: flex;
+1 -1
View File
@@ -2,7 +2,7 @@ import { createFromIconfontCN } from '@ant-design/icons';
// import './iconfont/iconfont.js';
const IconFont = createFromIconfontCN({
scriptUrl: '//at.alicdn.com/t/c/font_4613488_d7ffxju7lc6.js'
scriptUrl: '//at.alicdn.com/t/c/font_4613488_yikpvmcl8ag.js'
});
export default IconFont;
+1 -1
View File
@@ -18,7 +18,7 @@
}
.overlay-canvas:hover {
cursor: 'none !important';
cursor: none !important;
}
.upload-mask {
+7 -6
View File
@@ -27,6 +27,7 @@ type Stroke = Point[];
type CanvasImageEditorProps = {
ref?: any;
loading: boolean;
imageSrc: string;
disabled?: boolean;
imguid: string | number;
@@ -48,6 +49,7 @@ const COLOR = 'rgba(0, 0, 255, 0.3)';
const CanvasImageEditor: React.FC<CanvasImageEditorProps> = forwardRef(
(
{
loading,
imageSrc,
disabled: isDisabled,
imageStatus,
@@ -597,7 +599,7 @@ const CanvasImageEditor: React.FC<CanvasImageEditorProps> = forwardRef(
canvas!.height = img.height;
// fit the image to the container
autoScale.current = autoScale.current || 1;
autoScale.current = 1;
updateCanvasSize();
clearCanvas();
@@ -735,12 +737,10 @@ const CanvasImageEditor: React.FC<CanvasImageEditorProps> = forwardRef(
const mouseX = event.clientX - rect.left;
const mouseY = event.clientY - rect.top;
setCanvasTransformOrigin(event);
updateZoom(scaleChange, mouseX, mouseY);
overlayCanvasRef.current!.style.transform = `scale(${autoScale.current})`;
canvasRef.current!.style.transform = `scale(${autoScale.current})`;
setCanvasTransformOrigin(event);
updateZoom(scaleChange, mouseX, mouseY);
};
const updateCursorPosOnZoom = (e: any) => {
@@ -757,6 +757,7 @@ const CanvasImageEditor: React.FC<CanvasImageEditorProps> = forwardRef(
};
const handleFitView = () => {
resetCanvas();
autoScale.current = baseScale.current;
translatePos.current = { x: 0, y: 0 };
setTransform();
@@ -908,7 +909,7 @@ const CanvasImageEditor: React.FC<CanvasImageEditorProps> = forwardRef(
onClick={handleFitView}
size="middle"
type="text"
disabled={isDisabled}
disabled={loading}
>
<ExpandOutlined className="font-size-14" />
</Button>