Beijing is warning of retaliation after President Donald Trump threatened an extra 10 per cent duty on Chinese imports over the flow of fentanyl to the US.