Provided is a compound of formula I or a pharmaceutically acceptable salt, enantiomer, diastereomer, tautomer, solvate, isotopic substituent, polymorph, prodrug, or metabolite thereof. Also provided is a method for preparing the compound of formula I. The compound of formula I has higher inhibitory activity against SHP2, and thus can be used to prevent or treat a disease related to SHP2.