The mouse itself needs to be powered from the connected computer to allow the circuit on the mouse to work, and the computer needs to be powered by the switching power supply, if the computer is not connected to the power supply, the computer itself can not work properly, not to mention the mouse.
If a computer can work without electricity, then a mouse can work without electricity, because they don't use electricity.