AMSTERDAM — If anyone in the Netherlands is happy about Britain jilting the European Union, they keep that sentiment to themselves. The country has been built on trade, with huge volumes of goods flowing from its ports across the English Channel. Brexit, as the divorce is known, has proved disruptive.

But if Brexit is going to happen, the graceful, canal-lined city of Amsterdam is intent on exploiting what opportunities present themselves. The deputy mayor has been leading a team that is courting global companies abandoning Britain.

“I’m very sad about Brexit, but I’m happy about how things are going for Amsterdam,” said the deputy mayor, Udo Kock, adding that at least 30 companies had already chosen to relocate. “It is such a nice city to live in. Who wouldn’t want to live in Amsterdam for a few years?”

As Britain slides toward a tumultuous exit from the European bloc, cities on the Continent are looking on with a mixture of opportunism and dread. From Amsterdam to Paris to Frankfurt, officials have been wooing companies seeking refuge from an increasingly uncertain United Kingdom. Yet many are bracing for Brexit-related chaos at ports.

Communities on both sides of the channel are already contending with economic weakness as the prospect of a no-deal Brexit discourages investment. Britain’s economy expanded just 1.4 percent last year — the slowest pace since 2012 — and actually contracted in December, according to data released on Monday.

Above all, a sense of resignation has taken hold that even before Brexit begins, it has delivered changes that are almost certainly permanent. Companies have moved jobs from Britain to the Continent while applying for local licenses to prevent ruptures to their businesses. The European Medicines Agency, which regulates pharmaceuticals, is in the final stages of closing its London headquarters and moving to Amsterdam. Bankers and traders have shifted parts of their operations.