Commit 054cb74b authored by 王炽's avatar 王炽

666666

parent dd8e5425
...@@ -222,11 +222,11 @@ ...@@ -222,11 +222,11 @@
width: item.textWidth + 'rpx', width: item.textWidth + 'rpx',
bottom: item.bottom + 'rpx', bottom: item.bottom + 'rpx',
...(index === 1 && { ...(index === 1 && {
textAlign: 'center', 'text-align': 'center',
whiteSpace: 'pre-line' 'white-space': 'pre-line'
}) })
}" }"
>{{ item.desc }}</text> >{{ formatText(item.desc, index) }}</text>
</view> </view>
</view> </view>
</view> </view>
...@@ -1420,6 +1420,13 @@ ...@@ -1420,6 +1420,13 @@
}); });
const formatText = (text, index) => {
if (index === 1) {
// 将 \n 替换为真实换行
return text.replace(/\\n/g, '\n')
}
return text
}
// 首页组件逻辑 // 首页组件逻辑
const backHandler = () => { const backHandler = () => {
uni.navigateBack(); uni.navigateBack();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment