A tilting device for a vehicle, comprising: a main frame; a steering mechanism, disposed on the main frame; a detent mechanism, disposed on the main frame and the steering mechanism and configured to control a tilt angle of the vehicle, wherein the tilt angle is an angle between the vehicle and a first plane; and a control mechanism, disposed on the vehicle and electrically connected to the detent mechanism, the control mechanism being configured to control the tilt angle by controlling the detent mechanism, wherein the detent mechanism comprises an electronically controlled hydraulic rod disposed on each of both sides of the main frame, wherein the electronically controlled hydraulic rod comprises a hydraulic rod body and a micro motor disposed on the hydraulic rod body, wherein the micro motor is configured to control extension and retraction of the hydraulic rod body, wherein the hydraulic rod body comprises a cylinder body and a piston assembly, wherein the piston assembly comprises a piston and a piston rod; the piston is disposed in the cylinder body and comprises a first surface and a second surface opposite to the first surface; the piston divides the cylinder body into a first chamber located on the side of the first surface of the piston and a second chamber located on the side of the second surface of the piston; the piston rod comprises a first end that is fixed to the second surface of the piston and a second end that extends outside the cylinder body; and the cylinder body is hinged to the main frame, and the second end of the piston rod is hinged to the steering mechanism; wherein the electronically controlled hydraulic rod is further provided with a communication passage configured to communicate the first chamber to with the second chamber, and the micro motor is configured to control extension and retraction of the piston rod by controlling the communication passage to open or close; wherein the steering mechanism comprises an upper suspension frame, a lower suspension frame, a damper, and a steering seat; wherein the upper suspension frame and the lower suspension frame are oppositely disposed, a middle portion of the upper suspension frame is fixed to an upper portion of the main frame, and a middle portion of the lower suspension frame is fixed to a lower portion of the main frame; and two ends of the upper suspension frame are hinged to an upper end of the steering seat, and two ends of the lower suspension frame are hinged to a lower end of the steering seat; wherein the cylinder body is hinged to the upper portion of the main frame, and the second end of the piston rod is hinged to the lower suspension frame; and wherein the damper is horizontally disposed through the main frame, wherein both ends of the damper are hinged to the lower suspension frame. a main frame; a steering mechanism, disposed on the main frame; a detent mechanism, disposed on the main frame and the steering mechanism and configured to control a tilt angle of the vehicle, wherein the tilt angle is an angle between the vehicle and a first plane; and a control mechanism, disposed on the vehicle and electrically connected to the detent mechanism, the control mechanism being configured to control the tilt angle by controlling the detent mechanism, wherein the detent mechanism comprises an electronically controlled hydraulic rod disposed on each of both sides of the main frame, wherein the electronically controlled hydraulic rod comprises a hydraulic rod body and a micro motor disposed on the hydraulic rod body, wherein the micro motor is configured to control extension and retraction of the hydraulic rod body, wherein the hydraulic rod body comprises a cylinder body and a piston assembly, wherein the piston assembly comprises a piston and a piston rod; the piston is disposed in the cylinder body and comprises a first surface and a second surface opposite to the first surface; the piston divides the cylinder body into a first chamber located on the side of the first surface of the piston and a second chamber located on the side of the second surface of the piston; the piston rod comprises a first end that is fixed to the second surface of the piston and a second end that extends outside the cylinder body; and the cylinder body is hinged to the main frame, and the second end of the piston rod is hinged to the steering mechanism; wherein the electronically controlled hydraulic rod is further provided with a communication passage configured to communicate the first chamber to with the second chamber, and the micro motor is configured to control extension and retraction of the piston rod by controlling the communication passage to open or close; wherein the steering mechanism comprises an upper suspension frame, a lower suspension frame, a damper, and a steering seat; wherein the upper suspension frame and the lower suspension frame are oppositely disposed, a middle portion of the upper suspension frame is fixed to an upper portion of the main frame, and a middle portion of the lower suspension frame is fixed to a lower portion of the main frame; and two ends of the upper suspension frame are hinged to an upper end of the steering seat, and two ends of the lower suspension frame are hinged to a lower end of the steering seat; wherein the cylinder body is hinged to the upper portion of the main frame, and the second end of the piston rod is hinged to the lower suspension frame; and wherein the damper is horizontally disposed through the main frame, wherein both ends of the damper are hinged to the lower suspension frame.