|
@@ -51,6 +51,7 @@ const {
|
|
|
title = "无标题",
|
|
|
zIndex = 1020,
|
|
|
enableResize = true,
|
|
|
+ fixedWidth = false,
|
|
|
} = defineProps<{
|
|
|
title: string;
|
|
|
top?: string;
|
|
@@ -58,6 +59,7 @@ const {
|
|
|
height?: string;
|
|
|
zIndex?: number;
|
|
|
enableResize?: boolean;
|
|
|
+ fixedWidth?: boolean;
|
|
|
}>();
|
|
|
|
|
|
defineEmits(["close"]);
|
|
@@ -139,7 +141,9 @@ const handleResizeMouseMove = (e: MouseEvent) => {
|
|
|
const { clientX, clientY } = e;
|
|
|
const newXRatio = clientX - mousePosition.offsetX;
|
|
|
const newYRatio = clientY - mousePosition.offsetY;
|
|
|
- positionStyle.width = parseFloat(positionStyle.width) + newXRatio + "px";
|
|
|
+ positionStyle.width = fixedWidth
|
|
|
+ ? width
|
|
|
+ : parseFloat(positionStyle.width) + newXRatio + "px";
|
|
|
positionStyle.height = parseFloat(positionStyle.height) + newYRatio + "px";
|
|
|
|
|
|
mousePosition.offsetX = clientX;
|