A foldable electronic device, comprising: a shaft cap, a body, a swing arm, a first cam component, a second cam component, and an elastomer, wherein the first cam component and the second cam component are coaxially arranged in the shaft cap; the first cam component is connected to the body through the swing arm and is configured to be rotatable around a central shaft of the first cam component, so that the body is folded or unfolded around the central shaft under the action of an external force; the first cam component comprises a first end surface facing the second cam component, the second cam component comprises a second end surface facing the first cam component, and the first end surface and the second end surface each comprise at least one cam surface; the second cam component is configured to be slidable along a direction of the central shaft; the elastomer is connected to the second cam component and is configured to apply an elastic force to the second cam component, so that the first end surface of the first cam component maintains in contact with the second end surface of the second cam component under the action of the elastic force; and in a case that the body is unfolded or folded to a position between fully unfolded and fully folded, the first cam component and the second cam component are in contact with a locking section of the cam surface, and an angle between a normal direction of the locking section and the central shaft is less than or equal to arctan μ, wherein μ is a friction coefficient between the first cam component and the second cam component, wherein the cam surface comprises a rise travel section and a return travel section, and the locking section is a part of the rise travel section; characterised in that the locking section comprises a plurality of locking planes along a lifting direction of the rise travel section, and an angle between a normal direction of any of the plurality of locking planes and the central shaft is less than or equal to arctan μ. a shaft cap, a body, a swing arm, a first cam component, a second cam component, and an elastomer, wherein the first cam component and the second cam component are coaxially arranged in the shaft cap; the first cam component is connected to the body through the swing arm and is configured to be rotatable around a central shaft of the first cam component, so that the body is folded or unfolded around the central shaft under the action of an external force; the first cam component comprises a first end surface facing the second cam component, the second cam component comprises a second end surface facing the first cam component, and the first end surface and the second end surface each comprise at least one cam surface; the second cam component is configured to be slidable along a direction of the central shaft; the elastomer is connected to the second cam component and is configured to apply an elastic force to the second cam component, so that the first end surface of the first cam component maintains in contact with the second end surface of the second cam component under the action of the elastic force; and in a case that the body is unfolded or folded to a position between fully unfolded and fully folded, the first cam component and the second cam component are in contact with a locking section of the cam surface, and an angle between a normal direction of the locking section and the central shaft is less than or equal to arctan μ, wherein μ is a friction coefficient between the first cam component and the second cam component, wherein the cam surface comprises a rise travel section and a return travel section, and the locking section is a part of the rise travel section; characterised in that the locking section comprises a plurality of locking planes along a lifting direction of the rise travel section, and an angle between a normal direction of any of the plurality of locking planes and the central shaft is less than or equal to arctan μ.