3232 </style >
3333
3434<script >
35- import abstractInputComponent from ' ./AbstractInputComponent.vue'
36- import { codemirror } from ' vue-codemirror-lite'
35+ import abstractInputComponent from ' ./AbstractInputComponent.vue'
36+ import { codemirror } from ' vue-codemirror-lite'
3737
38- export default {
39- name: ' dialog-codemirror' ,
40- extends: abstractInputComponent,
41- components: {
42- codemirror
43- },
44- mounted () {
45- let defaultSetting = {
46- lineNumbers: true ,
47- lineWrapping: true ,
48- height: ' 200px'
49- }
38+ export default {
39+ name: ' dialog-codemirror' ,
40+ extends: abstractInputComponent,
41+ components: {
42+ codemirror
43+ },
44+ mounted () {
45+ let defaultSetting = {
46+ lineNumbers: true ,
47+ lineWrapping: true ,
48+ height: ' 200px'
49+ }
5050
51- if (! this .param .editorSetting )
52- this .param .editorSetting = defaultSetting
53- else {
54- for (let setting in defaultSetting) {
55- if (this .param .editorSetting [setting] === undefined )
56- this .param .editorSetting [setting] = defaultSetting[setting]
57- }
51+ if (! this .param .editorSetting ) { this .param .editorSetting = defaultSetting } else {
52+ for (let setting in defaultSetting) {
53+ if (this .param .editorSetting [setting] === undefined ) { this .param .editorSetting [setting] = defaultSetting[setting] }
5854 }
55+ }
5956
60- this .editor .setSize (' 100%' , this .param .editorSetting .height )
61- this .editor .focus ()
62- },
63- computed: {
64- editor () {
65- return this .$refs .editor .editor
66- }
67- },
68- methods: {
69- updateContent (newContent ) {
70- this .value = newContent
71- }
57+ this .editor .setSize (' 100%' , this .param .editorSetting .height )
58+ this .editor .focus ()
59+ },
60+ computed: {
61+ editor () {
62+ return this .$refs .editor .editor
63+ }
64+ },
65+ methods: {
66+ updateContent (newContent ) {
67+ this .value = newContent
7268 }
7369 }
70+ }
7471 </script >
0 commit comments