Browse Source

修改文件显示问题

pull/2/head
gongzijian 6 years ago
parent
commit
d5cacb192e
  1. 2
      escheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/details/index.vue
  2. 3
      escheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/edit/index.vue

2
escheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/details/index.vue

@ -79,7 +79,7 @@
this.isData = false this.isData = false
} else { } else {
this.isData = true this.isData = true
this._handlerEditor().setValue(res.data.content) this._handlerEditor().setValue(res.data.content + '\n')
// Initialize the plugin to prevent repeated calls // Initialize the plugin to prevent repeated calls
if (editor.lineCount() < 1000) { if (editor.lineCount() < 1000) {

3
escheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/edit/index.vue

@ -92,7 +92,8 @@
this.isData = false this.isData = false
} else { } else {
this.isData = true this.isData = true
this._handlerEditor().setValue(res.data.content || '') let content = res.data.content ? res.data.content + '\n' : ''
this._handlerEditor().setValue(content)
setTimeout(() => { setTimeout(() => {
$('.code-mirror-model').scrollTop(12).scrollLeft(0) $('.code-mirror-model').scrollTop(12).scrollLeft(0)
}, 200) }, 200)

Loading…
Cancel
Save