Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2c14764

Browse files
committed
perf[json-editor]:refine css
1 parent de3b29b commit 2c14764

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

src/components/JsonEditor/index.vue

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,16 @@ export default {
5353
}
5454
</script>
5555

56-
<style>
57-
.CodeMirror {
56+
<style scoped>
57+
.json-editor{
5858
height: 100%;
59+
position: relative;
5960
}
60-
.json-editor .cm-s-rubyblue span.cm-string {
61+
.json-editor >>> .CodeMirror {
62+
height: auto;
63+
min-height: 300px;
64+
}
65+
.json-editor >>> .cm-s-rubyblue span.cm-string {
6166
color: #F08047;
6267
}
6368
</style>

src/styles/index.scss

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,6 @@ code {
140140
margin-top: 30px;
141141
}
142142

143-
.editor-container .CodeMirror {
144-
height: 100%!important;
145-
}
146-
147143
.text-center {
148144
text-align: center
149145
}

src/views/components-demo/jsonEditor.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div class="components-container" style="height:100vh">
2+
<div class="components-container">
33
<code>JsonEditor is base on <a href="https://github.com/codemirror/CodeMirror" target="_blank">CodeMirrorr</a> , lint base on json-lint </code>
44
<div class="editor-container">
55
<json-editor ref="jsonEditor" v-model="value"></json-editor>

0 commit comments

Comments
 (0)