提交 cdb6d25a 编写于 作者: D DCloud_LXH

fix(App): uniTextElement innerHtml -> textContent

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