界面优化
1.日志的中文字体改为微软雅黑 2.帮助文档按钮外边距调整到和日志窗左边距一致 3.扩大默认窗口大小,使得PyPI可以初始展示到一行 4.表单label改为垂直居中 5.设置tab页的“新”标签设置垂直居中,并且不能影响菜单栏的高度
This commit is contained in:
parent
0661b6bbc3
commit
9295d9f2cf
8 changed files with 99 additions and 36 deletions
|
@ -5,27 +5,44 @@ import hljs from 'highlight.js/lib/core'
|
|||
const log = inject('log')
|
||||
const log_ele = inject('log_ele')
|
||||
|
||||
const chinesePattern = {
|
||||
className: 'chinese',
|
||||
begin: /[\u4e00-\u9fa5]+/
|
||||
}
|
||||
|
||||
hljs.registerLanguage('naive-log', () => ({
|
||||
contains: [
|
||||
{
|
||||
className: 'info',
|
||||
begin: /\[信息\]/,
|
||||
end: /$/
|
||||
begin: /^\[信息\]/,
|
||||
end: /$/,
|
||||
returnBegin: true,
|
||||
returnEnd: true,
|
||||
contains: [chinesePattern]
|
||||
},
|
||||
{
|
||||
className: 'error',
|
||||
begin: /\[错误\]/,
|
||||
end: /$/
|
||||
begin: /^\[错误\]/,
|
||||
end: /$/,
|
||||
returnBegin: true,
|
||||
returnEnd: true,
|
||||
contains: [chinesePattern]
|
||||
},
|
||||
{
|
||||
className: 'execute_command',
|
||||
begin: /\[执行命令\]/,
|
||||
end: /$/
|
||||
begin: /^\[执行命令\]/,
|
||||
end: /$/,
|
||||
returnBegin: true,
|
||||
returnEnd: true,
|
||||
contains: [chinesePattern]
|
||||
},
|
||||
{
|
||||
className: 'command_out',
|
||||
begin: /\[命令输出\]/,
|
||||
end: /$/
|
||||
begin: /^\[命令输出\]/,
|
||||
end: /$/,
|
||||
returnBegin: true,
|
||||
returnEnd: true,
|
||||
contains: [chinesePattern]
|
||||
}
|
||||
]
|
||||
}))
|
||||
|
@ -54,22 +71,3 @@ hljs.registerLanguage('naive-log', () => ({
|
|||
user-select: text;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style>
|
||||
pre {
|
||||
word-break: break-all !important;
|
||||
}
|
||||
|
||||
.n-code pre .hljs-info {
|
||||
color: #33ff33;
|
||||
}
|
||||
.n-code pre .hljs-error {
|
||||
color: #ff0000;
|
||||
}
|
||||
.n-code pre .hljs-execute_command {
|
||||
color: #edaf1f;
|
||||
}
|
||||
.n-code pre .hljs-command_out {
|
||||
color: #ffffff;
|
||||
}
|
||||
</style>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue