diff --git a/src/components/content/md-textarea.vue b/src/components/content/md-textarea.vue index 54f5a6a57ddc1702719d8299ab729eeadb23493b..2c47a5c8eae74d795ea8864a0e6f7d4f9f48bc75 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) {