提交 6fadc260 编写于 作者: Q qiang

Revert "fix: 修复 text 组件首尾换行解析"

This reverts commit 2b65398b.
上级 7ec337e6
......@@ -42,9 +42,9 @@ export default {
if (vnode.text) {
// 处理可能出现的多余的转义字符
const nodeText = vnode.text.replace(/\\n/g, '\n')
const texts = this._decodeHtml(nodeText).trim().split('\n')
const texts = nodeText.split('\n')
texts.forEach((text, index) => {
nodeList.push(text)
nodeList.push(this._decodeHtml(text))
if (index !== (texts.length - 1)) {
nodeList.push(createElement('br'))
}
......@@ -73,4 +73,4 @@ export default {
user-select: text;
-webkit-user-select: text;
}
</style>
</style>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册