diff --git a/luckydiamond/src/assets/css/ComponentsStyles/chat.css b/luckydiamond/src/assets/css/ComponentsStyles/chat.css index 87ef473..19b2d4e 100644 --- a/luckydiamond/src/assets/css/ComponentsStyles/chat.css +++ b/luckydiamond/src/assets/css/ComponentsStyles/chat.css @@ -18,6 +18,7 @@ .chat { margin: 1% 3.2% 0 0; + word-break: break-all; } .chat__content { diff --git a/luckydiamond/src/components/WritechatComponent.vue b/luckydiamond/src/components/WritechatComponent.vue index 3daa1e8..78fba92 100644 --- a/luckydiamond/src/components/WritechatComponent.vue +++ b/luckydiamond/src/components/WritechatComponent.vue @@ -42,21 +42,21 @@ export default { } }, SendmsgData() { - const formattedWord = this.InsertSpaceEvery24Chars(this.msg); - this.$emit("send", [formattedWord, this.username, this.icon]); + // const formattedWord = this.InsertSpaceEvery24Chars(this.msg); + this.$emit("send", [this.msg, this.username, this.icon]); this.msg = ""; }, - InsertSpaceEvery24Chars(text) { - let result = ""; - for (let i = 0; i < text.length; i++) { - if (i > 0 && i % 24 === 0) { - result += " "; - } - result += text[i]; - } - return result; - }, + // InsertSpaceEvery24Chars(text) { + // let result = ""; + // for (let i = 0; i < text.length; i++) { + // if (i > 0 && i % 24 === 0) { + // result += " "; + // } + // result += text[i]; + // } + // return result; + // }, }, };