A lock device adapted for a first object and a second object movable relative to the first object , the lock device comprising: a slider ; a driving module configured to drive the slider to move between a locking position (X1) and an unlocking position (X2); a latch movably arranged on the slider ; and a power module configured to provide electricity to the driving module ; wherein when the second object is located at a retracted position (R) relative to the first object , the driving module is configured to drive the slider to move to the locking position (X1), so that the latch is able to block the second object ; wherein when the driving module is not driven by the power module in a situation where there is a power failure or a damage of an electronic component, the latch is able to be driven by a movement of the second object to a predetermined position (Y) in an opening direction (D1) to move from an original state (S1) to a non-original state (S2) for driving the slider to move from the locking position (X1) to the unlocking position (X2); wherein the driving module comprises a magnetic component configured to retain the slider at the unlocking position (X2) when the slider is located at the unlocking position (X2); the lock device is characterized by a resilient component , such that when the slider is retained at the unlocking position (X2) in the situation where there is the power failure or the damage of the electronic component, a movement of the second object from the predetermined position (Y) in a retracted direction (D2) is able to cause the latch to move from the non-original state (S2) to the original state (S1) in response to a resilient force provided by the resilient component for allowing the second object to move to an extended position (E) in the opening direction (D1). a slider ; a driving module configured to drive the slider to move between a locking position (X1) and an unlocking position (X2); a latch movably arranged on the slider ; and a power module configured to provide electricity to the driving module ; wherein when the second object is located at a retracted position (R) relative to the first object , the driving module is configured to drive the slider to move to the locking position (X1), so that the latch is able to block the second object ; wherein when the driving module is not driven by the power module in a situation where there is a power failure or a damage of an electronic component, the latch is able to be driven by a movement of the second object to a predetermined position (Y) in an opening direction (D1) to move from an original state (S1) to a non-original state (S2) for driving the slider to move from the locking position (X1) to the unlocking position (X2); wherein the driving module comprises a magnetic component configured to retain the slider at the unlocking position (X2) when the slider is located at the unlocking position (X2); the lock device is characterized by a resilient component , such that when the slider is retained at the unlocking position (X2) in the situation where there is the power failure or the damage of the electronic component, a movement of the second object from the predetermined position (Y) in a retracted direction (D2) is able to cause the latch to move from the non-original state (S2) to the original state (S1) in response to a resilient force provided by the resilient component for allowing the second object to move to an extended position (E) in the opening direction (D1). <EOS>