Provided herein are heteroaryl compounds of formula (I) having activity on a receptor protein tyrosine kinase, wherein R 1, R 2, R 3, A, Q, Z, X and W are set forth in the description, as well as solvates, hydrates, tautomers or pharmaceutically acceptable salts thereof.