An electronic device, comprising: a body, wherein the body has a first installation space, and a second limiting portion is disposed in the first installation space; and a functional module, wherein the functional module comprises a charging battery, a functional component and a drive apparatus, the drive apparatus is connected to the functional component, the drive apparatus comprises an output shaft, the output shaft is connected to a first limiting portion, and the output shaft drives the first limiting portion to rotate between a first position and a second position, wherein the electronic device is characterized in that in a case that the first limiting portion is in the first position, the first limiting portion is fitted with the second limiting portion to restrict detachment of the functional module from the first installation space; and in a case that the first limiting portion is in the second position, fitting between the first limiting portion and the second limiting portion is released, and the functional module can be detached from the body; and in a case that the functional module is detached from the body, the functional module is configured to communicate with the body in a wired or wireless manner; and the output shaft is a threaded shaft, the output shaft is connected to the first limiting portion through a threaded sleeve rod, the threaded sleeve rod is sleeved on the output shaft and is in threaded fitting with the output shaft, the first limiting portion is connected to the threaded sleeve rod, the body is provided with a first opening communicated with the first installation space, and in a case that the first limiting portion is in the first position, the functional component moves in an axial direction of the output shaft with rotation of the output shaft, so that at least a portion of the functional component is protruded out of the first installation space through the first opening. a body, wherein the body has a first installation space, and a second limiting portion is disposed in the first installation space; and a functional module, wherein the functional module comprises a charging battery, a functional component and a drive apparatus, the drive apparatus is connected to the functional component, the drive apparatus comprises an output shaft, the output shaft is connected to a first limiting portion, and the output shaft drives the first limiting portion to rotate between a first position and a second position, wherein the electronic device is characterized in that in a case that the first limiting portion is in the first position, the first limiting portion is fitted with the second limiting portion to restrict detachment of the functional module from the first installation space; and in a case that the first limiting portion is in the second position, fitting between the first limiting portion and the second limiting portion is released, and the functional module can be detached from the body; and in a case that the functional module is detached from the body, the functional module is configured to communicate with the body in a wired or wireless manner; and the output shaft is a threaded shaft, the output shaft is connected to the first limiting portion through a threaded sleeve rod, the threaded sleeve rod is sleeved on the output shaft and is in threaded fitting with the output shaft, the first limiting portion is connected to the threaded sleeve rod, the body is provided with a first opening communicated with the first installation space, and in a case that the first limiting portion is in the first position, the functional component moves in an axial direction of the output shaft with rotation of the output shaft, so that at least a portion of the functional component is protruded out of the first installation space through the first opening.