chore: improve css import

- 公共样式放入顶层
- 合并 `<style>`
This commit is contained in:
YangFong 2023-08-26 19:20:03 +08:00
parent 8e2669788b
commit 2c9f31eeb0
4 changed files with 7 additions and 14 deletions

View File

@ -13,17 +13,11 @@ import CodemirrorEditor from '@/views/CodemirrorEditor.vue'
html, html,
body, body,
#app { #app {
width: 100%;
height: 100%;
margin: 0; margin: 0;
padding: 0; padding: 0;
height: 100%;
width: 100%;
} }
</style>
<style lang="less">
/* 每个页面公共css */
@import url('./assets/less/style-mirror.css');
@import url('./assets/less/theme.less');
::-webkit-scrollbar { ::-webkit-scrollbar {
width: 6px; width: 6px;

View File

@ -7,6 +7,11 @@ import 'element-ui/lib/theme-chalk/index.css'
import 'codemirror/lib/codemirror.css' import 'codemirror/lib/codemirror.css'
import 'codemirror/theme/xq-light.css' import 'codemirror/theme/xq-light.css'
/* 每个页面公共css */
import './assets/less/app.less'
import './assets/less/theme.less'
import './assets/less/style-mirror.less'
import 'codemirror/mode/css/css' import 'codemirror/mode/css/css'
import 'codemirror/mode/markdown/markdown' import 'codemirror/mode/markdown/markdown'
import 'codemirror/addon/edit/closebrackets' import 'codemirror/addon/edit/closebrackets'

View File

@ -622,9 +622,7 @@ export default {
.editor__header { .editor__header {
padding: 0; padding: 0;
} }
</style>
<style lang="less" scoped>
.main-body { .main-body {
padding-top: 12px; padding-top: 12px;
overflow: hidden; overflow: hidden;
@ -699,7 +697,3 @@ export default {
overflow-x: auto; overflow-x: auto;
} }
</style> </style>
<style lang="less" scoped>
@import url('../assets/less/app.less');
</style>