今天编写页面,后台直接返回带有html格式的字符串,包含<br/>,前端直接输出了<br/>页面不换行
解决办法
后台将<br/> 替换为 \n 并在前端添加样式style="white-space:pre-line";
select a.*,b.EngName,b.CnName,(SELECT inst+ ',\n' FROM mi_tls_instruction WITH(NOLOCK) where
pjno = a.MiProject and pono = a.Step for XML Path ('')) as LotInstruction from mi_t_pdrouting a
WITH(NOLOCK) left join mi_t_wc b WITH(NOLOCK) on a.WC = b.WC where
MiProject = 'XXXXXXXXXX-00' order by a.step asc