China has warned it will hit back at countries that make deals with the US that hurt Beijing's interests, as the trade war between the world's two biggest economies threatens to drag in other nations.