forked from github/dataease
feat(数据集): 添加SQL,UI初步
This commit is contained in:
parent
47c39acb8d
commit
573641b426
@ -33,7 +33,7 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col style="width:35vh;min-width: 200px;">
|
<el-col style="min-width: 200px;">
|
||||||
<codemirror
|
<codemirror
|
||||||
ref="myCm"
|
ref="myCm"
|
||||||
v-model="sql"
|
v-model="sql"
|
||||||
@ -55,11 +55,8 @@ import { codemirror } from 'vue-codemirror'
|
|||||||
// 核心样式
|
// 核心样式
|
||||||
import 'codemirror/lib/codemirror.css'
|
import 'codemirror/lib/codemirror.css'
|
||||||
// 引入主题后还需要在 options 中指定主题才会生效
|
// 引入主题后还需要在 options 中指定主题才会生效
|
||||||
import 'codemirror/theme/rubyblue.css'
|
import 'codemirror/theme/solarized.css'
|
||||||
import 'codemirror/mode/python/python.js'
|
|
||||||
import 'codemirror/mode/sql/sql.js'
|
import 'codemirror/mode/sql/sql.js'
|
||||||
// theme css
|
|
||||||
import 'codemirror/theme/3024-day.css'
|
|
||||||
// require active-line.js
|
// require active-line.js
|
||||||
import 'codemirror/addon/selection/active-line.js'
|
import 'codemirror/addon/selection/active-line.js'
|
||||||
// closebrackets
|
// closebrackets
|
||||||
@ -94,10 +91,10 @@ export default {
|
|||||||
styleActiveLine: true,
|
styleActiveLine: true,
|
||||||
lineNumbers: true,
|
lineNumbers: true,
|
||||||
line: true,
|
line: true,
|
||||||
mode: 'text/x-mysql',
|
mode: 'text/x-sql',
|
||||||
theme: '3024-day',
|
theme: 'solarized',
|
||||||
hintOptions: {
|
hintOptions: {
|
||||||
completeSingle: true // 当匹配只有一项的时候是否自动补全
|
completeSingle: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -160,13 +157,11 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.codemirror {
|
.codemirror {
|
||||||
height: 40vh;
|
height: auto;
|
||||||
min-height: 300px;
|
min-height: 100px;
|
||||||
width: 100%;
|
|
||||||
min-width: 200px;
|
|
||||||
}
|
}
|
||||||
.codemirror >>> .CodeMirror-scroll {
|
.codemirror >>> .CodeMirror-scroll {
|
||||||
height: 40vh;
|
height: auto;
|
||||||
min-height: 300px;
|
min-height: 100px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
Loading…
Reference in New Issue
Block a user