Closed RainyNight9 closed 7 hours ago
And added data-tauri-drag-region。
If you set "decorations":true, you can drag it, but I don't want to set decorations
Or what are the requirements for the div page element after setting data-tauri-drag-region? Can't use absolute?
import { useState } from "react";
const TransitionComponent = () => {
const [isTransitioned, setIsTransitioned] = useState(false);
const handleToggle = () => {
setIsTransitioned(!isTransitioned);
};
return (
<div
data-tauri-drag-region
className="w-[680px] h-[600px] mx-auto bg-gray-100 overflow-hidden relative"
>
<div
className={`absolute w-full bg-red-500 text-white flex items-center justify-center transition-all duration-500 ${
isTransitioned ? "top-[510px] h-[90px]" : "top-0 h-[90px]"
}`}
>
<button
className="px-4 py-2 bg-white text-black rounded"
onClick={handleToggle}
>
Toggle
</button>
</div>
<div
className={`absolute w-full bg-green-500 transition-opacity duration-500 ${
isTransitioned ? "opacity-0 pointer-events-none" : "opacity-100"
} bottom-0 h-[500px]`}
></div>
<div
className={`absolute w-full bg-yellow-500 transition-all duration-500 ${
isTransitioned
? "top-0 opacity-100 pointer-events-auto"
: "-top-[510px] opacity-0 pointer-events-none"
} h-[500px]`}
></div>
</div>
);
};
export default TransitionComponent;
Describe the bug
Setting "dragDropEnabled": true, has no effect。
I want my window to be able to be dragged anywhere on the desktop。
src-tauri/tauri.conf.json
src-tauri/capabilities/default.json
Reproduction
No response
Expected behavior
No response
Full
tauri info
outputStack trace
No response
Additional context
No response