Skip to content

Commit b404c6b

Browse files
committed
fix(modal): 修复 content 中包含 \n 而无法换行的问题 #1617
1 parent 33954c5 commit b404c6b

File tree

1 file changed

+1
-1
lines changed
  • packages/taro-ui/src/components/modal

1 file changed

+1
-1
lines changed

packages/taro-ui/src/components/modal/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export default class AtModal extends React.Component<
107107
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
108108
// @ts-ignore
109109
dangerouslySetInnerHTML={{
110-
__html: content.replace(/\n/g, '<br/>')
110+
__html: content.replace(/\\n/g, '<br/>')
111111
}}
112112
></Text>
113113
) : (

0 commit comments

Comments
 (0)