From af33261403f401efc44768d10239fa360f059216 Mon Sep 17 00:00:00 2001 From: layyback <505187749@qq.com> Date: Wed, 30 Nov 2022 19:42:09 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20=E4=BF=AE=E5=A4=8D@=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E5=BC=82=E6=AD=A5=E4=B8=8D=E7=94=9F=E6=95=88=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/content/md-textarea.vue | 31 ++++++++++++-------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/src/components/content/md-textarea.vue b/src/components/content/md-textarea.vue index 54f5a6a..2c47a5c 100644 --- a/src/components/content/md-textarea.vue +++ b/src/components/content/md-textarea.vue @@ -184,14 +184,13 @@ export default { this.resetPreviewMinHeight(); }, watch: { - // userList: { - // handler: function(val) { - // if (!val.length) return; - // this.activeUserIndex = 0; - // } - // }, + userList: { + handler: function (val, old) { + if (!old && val) this.createSelectUserDialog(); + } + }, isFocus: { - handler: function(val) { + handler: function (val) { if (val) { this.resetPreviewMinHeight(); } else { @@ -204,14 +203,14 @@ export default { }, text: { immediate: true, - handler: function(val) { + handler: function (val) { this.textContent = val; this.transferMarkdown(val); } }, fullScreen: { immediate: true, - handler: function(val) { + handler: function (val) { if (val) { document.body.style.overflow = "hidden"; } else { @@ -224,7 +223,7 @@ export default { }, textContent: { immediate: true, - handler: function() { + handler: function () { setTimeout(() => { if (!this.autoSize) return; this.reSizeTextareaHeight(); @@ -232,7 +231,7 @@ export default { } }, showSelectUser: { - handler: function(val) { + handler: function (val) { if (!val) { setTimeout(() => { this.resetQueryInfo(); @@ -353,12 +352,10 @@ export default { const textEl = document.getElementById(this.id); if (!textEl) return; const fontSize = getComputedStyle(textEl).getPropertyValue("font-size"); - const lineHeight = getComputedStyle(textEl).getPropertyValue( - "line-height" - ); - const fontFamily = getComputedStyle(textEl).getPropertyValue( - "font-family" - ); + const lineHeight = + getComputedStyle(textEl).getPropertyValue("line-height"); + const fontFamily = + getComputedStyle(textEl).getPropertyValue("font-family"); const hideElId = type + this.id; let hideEl = document.getElementById(hideElId); if (!hideEl) { -- GitLab