European leaders have committed to beef up military spending as Ukrainian President Volodymyr Zelenskiy says he can salvage his relationship with Donald Trump.