diff --git a/Code/Fe/src/components/showCopyJsonPop/index.vue b/Code/Fe/src/components/showCopyJsonPop/index.vue index ebb2c6a..1377929 100644 --- a/Code/Fe/src/components/showCopyJsonPop/index.vue +++ b/Code/Fe/src/components/showCopyJsonPop/index.vue @@ -4,22 +4,27 @@ - + 内容详情 + 复制JSON + style="margin-right: 30px;float: right;" + >复制JSON + @@ -85,7 +90,7 @@ { - this.$message.success('复制成功'); - this.$refs.copyJsonTextarea_ref.focus() - document.getElementById('copyJsonTextarea_dialog_ref').scrollTop = 0 + this.copyJsonInputHandle('success') }) .catch(err => { - this.$message.error('复制失败'); - this.$refs.copyJsonTextarea_ref.focus() - document.getElementById('copyJsonTextarea_dialog_ref').scrollTop = 0 + this.copyJsonInputHandle('error') }); }else { // 创建text area @@ -236,16 +248,10 @@ textArea.remove() }).then(() => { this.$nextTick(()=>{ - if(this.$refs.copyJsonTextarea_ref){ - this.$message.success('复制成功'); - this.$refs.copyJsonTextarea_ref.focus() - document.getElementById('copyJsonTextarea_dialog_ref').scrollTop = 0 - } + this.copyJsonInputHandle('success') }) },() => { - this.$message.error('复制失败'); - this.$refs.copyJsonTextarea_ref.focus() - document.getElementById('copyJsonTextarea_dialog_ref').scrollTop = 0 + this.copyJsonInputHandle('error') }) } @@ -264,4 +270,12 @@ } } } - \ No newline at end of file + + \ No newline at end of file diff --git a/Code/Fe/src/components/umyTable/index.vue b/Code/Fe/src/components/umyTable/index.vue index 5df6312..5c494de 100644 --- a/Code/Fe/src/components/umyTable/index.vue +++ b/Code/Fe/src/components/umyTable/index.vue @@ -175,7 +175,7 @@ { - this.$refs.copyDetailInput_ref.focus() - document.getElementById('copyDetailInput_dialog_ref').scrollTop = 0 + if(this.$refs.copyDetailInput_ref){ + this.$refs.copyDetailInput_ref.focus() + this.$refs.copyDetailInput_ref.$refs.textarea.scrollTop = 0 + } }) }, closeJsonPop(){ @@ -765,4 +768,10 @@ span { .itemSpan{ white-space: nowrap !important } +::v-deep .copyDetailInput{ + textarea{ + max-height: calc(100vh - 220px) !important; + overflow: auto !important; + } +} \ No newline at end of file