提交 cdb6d25a 编写于 作者: D DCloud_LXH

fix(App): uniTextElement innerHtml -> textContent

上级 6cd19bac
......@@ -43,10 +43,9 @@ export class UniTextElement extends UniAnimationElement<TextProps> {
const {
$props: { space, decode },
} = this
this.$.innerHTML = parseText(this._text, {
space,
decode,
}).join('<br>')
this.$.textContent = parseText(this._text, { space, decode }).join('\n')
super.update(isMounted)
}
}
......@@ -2,3 +2,7 @@ uni-text[selectable] {
cursor: auto;
user-select: text;
}
uni-text {
white-space: pre;
}
......@@ -922,10 +922,10 @@
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
"@dcloudio/types@^2.5.6":
version "2.5.6"
resolved "https://registry.yarnpkg.com/@dcloudio/types/-/types-2.5.6.tgz#fba90cc0420e123eab09e895d5baceb0b73ebb21"
integrity sha512-SvJ2aRViG7aMn/Sf44FnKXcuqAnuYeG2X0NvU6iFiOnC/NKo1n8lWxGy88VnNINic0M1jRaeFKLOhosuAsTndQ==
"@dcloudio/types@2.5.8":
version "2.5.8"
resolved "https://registry.yarnpkg.com/@dcloudio/types/-/types-2.5.8.tgz#3aee4b179bb4c13877309dc0fe1ba4ca1ff7d3b0"
integrity sha512-H/6I+Ui2F/g/juepMrx3wx2jfOFI8sRlKlAxOMycR2o75/ghVIhJU6GW9hU1DYNActGsM5UhcdpZYLL0qXkr4Q==
"@eslint/eslintrc@^0.4.3":
version "0.4.3"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册