Skip to content

Commit 4fd6265

Browse files
committed
fix: 分类栏间距问题 + note 的代码高亮 cdn
fixed #13
1 parent 5c3270a commit 4fd6265

File tree

2 files changed

+53
-8
lines changed

2 files changed

+53
-8
lines changed

ui/src/views/bookmark/index.vue

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
<div class="mt-2">
3535

36-
<a-segmented class="mt-2" @change="clickSubCate" v-model:value="curSubCateId" :options="subCateList" style="background: #63636517;border-radius: 5px;max-width: 98vw;overflow-x: auto">
36+
<a-segmented v-if="subCateList.length" class="mt-2" @change="clickSubCate" v-model:value="curSubCateId" :options="subCateList" style="background: #63636517;border-radius: 20px;max-width: 98%;overflow-x: auto;padding: 2px 10px">
3737
<template #label="{ payload,title }">
3838
{{ title }} <span v-if="payload.count" style="font-size: 12px;margin-left: 2px">({{payload.count}})</span>
3939
</template>
@@ -286,12 +286,6 @@ if (route.query.url) {
286286
</script>
287287
<style scoped lang="scss">
288288
289-
.menu > li > div {
290-
//padding: 12px;
291-
}
292-
.active {
293-
border-bottom: 2px solid;
294-
}
295289
296290
.slide-fade-enter-active {
297291
transition: all .4s ease;
@@ -314,7 +308,33 @@ if (route.query.url) {
314308
:deep(.ant-menu-horizontal >.ant-menu-item){
315309
min-width: 66px;
316310
text-align: center;
317-
padding-inline: 2px;
311+
padding-inline: 12px !important;
312+
}
313+
314+
:deep(.ant-menu-horizontal .ant-menu-submenu){
315+
padding-inline: 12px !important;
316+
}
317+
318+
:deep(.ant-segmented .ant-segmented-group) {
319+
padding: 2px;
320+
}
321+
322+
:deep(.ant-segmented){
323+
&::-webkit-scrollbar{
324+
height: 6px;
325+
}
326+
&::-webkit-scrollbar-thumb {
327+
background: #ccc; // 滑块颜色
328+
border-radius: 5px; // 滑块圆角
329+
}
330+
&::-webkit-scrollbar-thumb:hover {
331+
background: rgba(63, 170, 231, 0.73); // 鼠标移入滑块变红
332+
}
333+
334+
.ant-segmented-item {
335+
border-radius: 12px;
336+
}
318337
}
319338
339+
320340
</style>

ui/src/views/note/components/Render.vue

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,31 @@
22
import { ref, onMounted, watch, nextTick, onUnmounted } from 'vue'
33
import { MdPreview, MdCatalog } from 'md-editor-v3'
44
import 'md-editor-v3/lib/preview.css'
5+
import * as MdEditor from 'md-editor-v3';
6+
7+
MdEditor.config({
8+
editorExtensions:{
9+
highlight:{
10+
js:"//cdn.bootcdn.net/ajax/libs/highlight.js/11.7.0/highlight.min.js",
11+
css:{
12+
atom:{
13+
light:"//cdn.bootcdn.net/ajax/libs/highlight.js/11.7.0/styles/atom-one-light.min.css",
14+
dark:"//cdn.bootcdn.net/ajax/libs/highlight.js/11.7.0/styles/atom-one-dark.min.css"
15+
},
16+
}
17+
18+
},
19+
mermaid:{
20+
js:"//cdn.bootcdn.net/ajax/libs/mermaid/10.1.0/mermaidAPI-67f627de.js",
21+
},
22+
katex:{
23+
js:"//cdn.bootcdn.net/ajax/libs/KaTeX/0.16.3/katex.min.js",
24+
css:"//cdn.bootcdn.net/ajax/libs/KaTeX/0.16.3/katex.min.css"
25+
},
26+
27+
}
28+
})
29+
530
631
const props = defineProps({
732

0 commit comments

Comments
 (0)