From 4fc71f9ac0ea103b262f19fc64651c5dc29bd8dc Mon Sep 17 00:00:00 2001 From: huangdeliang Date: Thu, 18 Mar 2021 14:31:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=87=E6=B3=A8=E4=BF=A1=E6=81=AF=E5=8F=AF?= =?UTF-8?q?=E6=8D=A2=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- stdiet-ui/src/components/TextInfo/index.vue | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/stdiet-ui/src/components/TextInfo/index.vue b/stdiet-ui/src/components/TextInfo/index.vue index 09654e7c6..5707918c5 100644 --- a/stdiet-ui/src/components/TextInfo/index.vue +++ b/stdiet-ui/src/components/TextInfo/index.vue @@ -21,10 +21,15 @@ export default { if ( this.value && typeof this.value === "string" && - this.value.includes("
") + (this.value.includes("
") || this.value.includes("\n")) ) { this.newLine = true; - return this.value.split("
"); + if (this.value.includes("
")) { + return this.value.split("
"); + } else if (this.value.includes("\n")) { + return this.value.split("\n"); + } + return this.value; } return this.value; },