Skip to content

Commit

Permalink
fix(modal): 修复 content 中包含 \n 而无法换行的问题 #1617
Browse files Browse the repository at this point in the history
  • Loading branch information
robinv8 committed Jun 17, 2023
1 parent 33954c5 commit b404c6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/taro-ui/src/components/modal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export default class AtModal extends React.Component<
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore
dangerouslySetInnerHTML={{
__html: content.replace(/\n/g, '<br/>')
__html: content.replace(/\\n/g, '<br/>')
}}
></Text>
) : (
Expand Down

0 comments on commit b404c6b

Please sign in to comment.