From 56d56c43be3b98b2af42fe7bf2d05e5be2c7552a Mon Sep 17 00:00:00 2001 From: layyback <505187749@qq.com> Date: Thu, 9 Jun 2022 12:38:45 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20=E4=BF=AE=E5=A4=8D@=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E6=97=B6=E6=8F=92=E5=85=A5=E4=BD=8D=E7=BD=AE=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src/assets/.DS_Store | Bin 6148 -> 6148 bytes src/components/content/md-textarea.vue | 4 +++- .../content/mixins/select-link-type-mixins.js | 1 - .../content/mixins/select-user-mixins.js | 3 +++ 5 files changed, 7 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index a54d0ff..4831a23 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "awesome-markdown-editor", "description": " A open source markdown editor of csdn codechina team contributed", - "version": "1.0.0", + "version": "1.1.0", "publisher": "guoweijia", "license": "MIT", "scripts": { diff --git a/src/assets/.DS_Store b/src/assets/.DS_Store index a3c6f4ae49d5108a4d65a92566fd555e5b775723..90577a2451feba4116ae196f4ade31ba78c57cd9 100644 GIT binary patch delta 71 zcmZoMXfc=|#>B)qu~2NHo+2ab#(>?7jI5J+SbQfxVCCL?kkyT8V?!+SW_AvK4xqBl Zf*jwOC-aLqaxee^BLf4=<_M8B%mAgy5g-5n delta 350 zcmZoMXfc=|#>B!ku~2NHo+2a1#(>?7iw`g}F>*}iVe+l#W5{ACWhh{%WGG=sWhi3M z1>#hOJcbky&od`KIVmSUiGhJZfPsNg97t>Y2Lm9BfdQ}Hr1IhdsNR!F1v#0;B?bo9 z8JU<_SlQS)IJh{tc)4POGsN=CgG&-iN{gKmi=u-w^2-AfOEQuYC*NoCtmok1xqpS2eWtOvtUQs;;T6n+bLk10y4ZX5fd? zFlrW%f!D=l!9{sF`FZI;bs#e~M=}L6ZD!}-=KzM@=8eqXnJ4p$IC21`m_SBuju2VH F3;@j?Ps{)S diff --git a/src/components/content/md-textarea.vue b/src/components/content/md-textarea.vue index 661ed30..54f5a6a 100644 --- a/src/components/content/md-textarea.vue +++ b/src/components/content/md-textarea.vue @@ -234,7 +234,9 @@ export default { showSelectUser: { handler: function(val) { if (!val) { - this.resetQueryInfo(); + setTimeout(() => { + this.resetQueryInfo(); + }, 50); } } } diff --git a/src/components/content/mixins/select-link-type-mixins.js b/src/components/content/mixins/select-link-type-mixins.js index 102b579..0e97c8a 100644 --- a/src/components/content/mixins/select-link-type-mixins.js +++ b/src/components/content/mixins/select-link-type-mixins.js @@ -3,7 +3,6 @@ export default { methods: { handleSelectLinkType(index) { const originalText = this.textContent; - const queryInfo = this.queryInfo; const cursorPosition = getPosition(this.id); let typeStr = ""; switch (index) { diff --git a/src/components/content/mixins/select-user-mixins.js b/src/components/content/mixins/select-user-mixins.js index 039c87b..6953ecf 100644 --- a/src/components/content/mixins/select-user-mixins.js +++ b/src/components/content/mixins/select-user-mixins.js @@ -24,6 +24,9 @@ export default { const originalText = this.textContent; const queryInfo = this.queryInfo; const cursorPosition = getPosition(this.id); + + + console.log('p',cursorPosition,this.queryInfo); const username = user.nickname + " "; const newText = originalText.slice(0, queryInfo.startPosition) + -- GitLab