The present disclosure provides a sliding-mode triboelectric generator and a method of power generation. The sliding-mode triboelectric generator comprises: a friction layer (100) and an electrode layer (200), wherein the electrode layer (200) is electrically connected to an isopotential (300). An electrical signal is outputted between the electrode layer and the isopotential when a relative sliding occurs, under the action of an external force, between the upper surface of the electrode layer and the lower surface of the friction layer while a friction area changes in the course of the sliding. Correspondingly, the present disclosure provides a vector displacement sensor where the sliding-mode triboelectric generator is applied, wherein the electrode layer is formed of a plurality of sub-electrodes (231, 232, 233, 234). When a moving object (140) slides on the electrode layer, a position, a moving direction and a moving distance of the moving object is detectable in accordance with the electrical signal outp