refactor(ui): 优化用户界面和代码显示
- 将"清空"按钮文本改为"返回",提高用户友好性 - 优化代码预览显示,移除代码块内部滚动条,提高可读性
This commit is contained in:
@@ -39,7 +39,7 @@
|
|||||||
<el-icon class="edit-icon" @click="openRenameDialog(selectedFile, 'file')"><Edit /></el-icon>
|
<el-icon class="edit-icon" @click="openRenameDialog(selectedFile, 'file')"><Edit /></el-icon>
|
||||||
</h2>
|
</h2>
|
||||||
<div class="actions">
|
<div class="actions">
|
||||||
<el-button v-if="!showEditor" type="primary" @click="selectedFile = null">清空</el-button>
|
<el-button v-if="!showEditor" type="primary" @click="selectedFile = null">返回</el-button>
|
||||||
<el-button v-if="!showEditor && userStore.isLoggedIn" type="primary" @click="editNote(selectedFile); isCollapsed = true">编辑</el-button>
|
<el-button v-if="!showEditor && userStore.isLoggedIn" type="primary" @click="editNote(selectedFile); isCollapsed = true">编辑</el-button>
|
||||||
<el-button v-if="!showEditor && userStore.isLoggedIn" type="danger" @click="deleteNote(selectedFile)">删除</el-button>
|
<el-button v-if="!showEditor && userStore.isLoggedIn" type="danger" @click="deleteNote(selectedFile)">删除</el-button>
|
||||||
<el-button v-if="showEditor" type="primary" @click="showEditor = !showEditor; previewFile(editData)">返回</el-button>
|
<el-button v-if="showEditor" type="primary" @click="showEditor = !showEditor; previewFile(editData)">返回</el-button>
|
||||||
@@ -731,6 +731,20 @@ const handleExportMd = () => {
|
|||||||
.dark-theme .vditor-toolbar__item--current {
|
.dark-theme .vditor-toolbar__item--current {
|
||||||
background-color: var(--primary-color-light) !important;
|
background-color: var(--primary-color-light) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 移除预览中代码块的内部滚动条 */
|
||||||
|
.markdown-preview .vditor-reset pre {
|
||||||
|
max-height: none !important;
|
||||||
|
overflow: visible !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown-preview .vditor-reset pre code {
|
||||||
|
max-height: none !important;
|
||||||
|
overflow-y: visible !important;
|
||||||
|
word-break: break-all !important;
|
||||||
|
white-space: pre-wrap !important;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
Reference in New Issue
Block a user