To efficiently solve the nonsmooth distributed optimization with both local constraints and coupled constraints, we propose a distributed continuous-time algorithm based on the mirror descent (MD) method. We introduce the Bregman damping into distributed MD-based dynamics, which not only successfully applies the MD idea to the distributed primal-dual framework, but also ensures the boundedness of all variables and the convergence of the entire dynamics. Our approach generalizes the classic distributed projection-based dynamics, and establishes a connection between the MD methods and the distributed Euclidean-projected approaches. Also, we prove the convergence of the proposed distributed dynamics with an <inline-formula xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink"><tex-math notation="LaTeX">$ \mathcal {O}(1/t)$</tex-math></inline-formula> rate. For practical implementation, we further give a discrete-time algorithm based on the proposed dynamics with an <inline-formula xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink"><tex-math notation="LaTeX">$ \mathcal {O}(1/\sqrt{k})$</tex-math></inline-formula> convergence rate.