【fix ESLint】src/components/jero/JCodeEditor
This commit is contained in:
@@ -284,11 +284,7 @@ export default {
|
|||||||
// 支持双向绑定
|
// 支持双向绑定
|
||||||
this.coder.on('change', (coder) => {
|
this.coder.on('change', (coder) => {
|
||||||
this.code = coder.getValue()
|
this.code = coder.getValue()
|
||||||
if (this.code) {
|
this.hasCode = !!this.code
|
||||||
this.hasCode = true
|
|
||||||
} else {
|
|
||||||
this.hasCode = false
|
|
||||||
}
|
|
||||||
if (this.$emit) {
|
if (this.$emit) {
|
||||||
this.$emit('input', this.code)
|
this.$emit('input', this.code)
|
||||||
}
|
}
|
||||||
@@ -297,11 +293,7 @@ export default {
|
|||||||
this.hasCode = true
|
this.hasCode = true
|
||||||
})
|
})
|
||||||
this.coder.on('blur', () => {
|
this.coder.on('blur', () => {
|
||||||
if (this.code) {
|
this.hasCode = !!this.code
|
||||||
this.hasCode = true
|
|
||||||
} else {
|
|
||||||
this.hasCode = false
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
/* this.coder.on('cursorActivity',()=>{
|
/* this.coder.on('cursorActivity',()=>{
|
||||||
@@ -369,14 +361,17 @@ export default {
|
|||||||
display: flex;
|
display: flex;
|
||||||
position: relative;
|
position: relative;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
||||||
.CodeMirror {
|
.CodeMirror {
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
|
|
||||||
.CodeMirror-code {
|
.CodeMirror-code {
|
||||||
line-height: 19px;
|
line-height: 19px;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.code-mode-select {
|
.code-mode-select {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
@@ -384,10 +379,12 @@ export default {
|
|||||||
top: 10px;
|
top: 10px;
|
||||||
max-width: 130px;
|
max-width: 130px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.CodeMirror {
|
.CodeMirror {
|
||||||
height: auto;
|
height: auto;
|
||||||
min-height: 100%;
|
min-height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.null-tip {
|
.null-tip {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 4px;
|
top: 4px;
|
||||||
@@ -396,10 +393,13 @@ export default {
|
|||||||
color: #ffffffc9;
|
color: #ffffffc9;
|
||||||
line-height: initial;
|
line-height: initial;
|
||||||
}
|
}
|
||||||
|
|
||||||
.null-tip-hidden {
|
.null-tip-hidden {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**选中样式偶然出现高度不够的情况*/
|
/**选中样式偶然出现高度不够的情况*/
|
||||||
|
|
||||||
.CodeMirror-selected {
|
.CodeMirror-selected {
|
||||||
min-height: 19px !important;
|
min-height: 19px !important;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user