Provided are an irreversible inhibitor of a fibroblast growth factor receptor (FGFR) as indicated by formula I, a pharmaceutically acceptable salt, a stereoisomer, a pharmaceutical preparation, a pharmaceutical composition and an application thereof. R, R, R, R, ring A, Ar, ring B and warhead are as defined in the specification. The compound has high-efficiency and high-selectivity inhibition of a fibroblast growth factor receptor and can be applied to treatment of abnormal FGF/FGFR-mediated diseases, in particular the treatment of cancers.