mirror of
https://github.com/pengzhanbo/vuepress-theme-plume.git
synced 2026-04-23 10:58:13 +08:00
fix(theme): 修复代码块行数显示问题
This commit is contained in:
parent
896b9b1732
commit
1da1b0a57c
@ -31,7 +31,7 @@
|
||||
"@vuepress/shared": "2.0.0-beta.49",
|
||||
"@vuepress/utils": "2.0.0-beta.49",
|
||||
"vue": "^3.2.37",
|
||||
"vue-router": "^4.1.2"
|
||||
"vue-router": "^4.1.3"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
||||
@ -35,7 +35,7 @@
|
||||
"@vuepress/utils": "2.0.0-beta.49",
|
||||
"leancloud-storage": "^4.12.2",
|
||||
"vue": "^3.2.37",
|
||||
"vue-router": "^4.1.2"
|
||||
"vue-router": "^4.1.3"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
||||
@ -66,7 +66,7 @@
|
||||
"sass-loader": "^13.0.2",
|
||||
"ts-debounce": "^4.0.0",
|
||||
"vue": "^3.2.37",
|
||||
"vue-router": "^4.1.2",
|
||||
"vue-router": "^4.1.3",
|
||||
"vuepress-plugin-comment2": "2.0.0-beta.87",
|
||||
"vuepress-plugin-md-enhance": "2.0.0-beta.87",
|
||||
"vuepress-plugin-seo2": "2.0.0-beta.87",
|
||||
|
||||
@ -34,8 +34,9 @@ watch(
|
||||
|
||||
const route = useRoute()
|
||||
let offsetHeight = 0
|
||||
onBeforeRouteUpdate((to) => {
|
||||
onBeforeRouteUpdate((to, from) => {
|
||||
if (__VUEPRESS_SSR__) return
|
||||
if (to.fullPath === from.fullPath) return
|
||||
setPostListPage((to.query.p as unknown as number) || 1)
|
||||
const { home, banner, mobileBanner } = frontmatter.value
|
||||
let top = 0
|
||||
|
||||
@ -116,8 +116,8 @@ const sidebarClick = (sidebar: SidebarListComputed): void => {
|
||||
p.sidebar-items-title {
|
||||
position: relative;
|
||||
margin: 0;
|
||||
height: 2.5rem;
|
||||
line-height: 2.5rem;
|
||||
padding: 0.25rem 0;
|
||||
line-height: 1.55;
|
||||
cursor: pointer;
|
||||
|
||||
.arrow-right-icon {
|
||||
|
||||
@ -234,17 +234,19 @@ div[class*='language-'] {
|
||||
color: var(--code-ln-color);
|
||||
padding-top: 1.25rem;
|
||||
line-height: 1.4;
|
||||
|
||||
br {
|
||||
user-select: none;
|
||||
}
|
||||
counter-reset: line-number;
|
||||
|
||||
.line-number {
|
||||
position: relative;
|
||||
z-index: 3;
|
||||
user-select: none;
|
||||
font-size: 0.85em;
|
||||
line-height: 0;
|
||||
height: 1.4em;
|
||||
|
||||
&::before {
|
||||
counter-increment: line-number;
|
||||
content: counter(line-number);
|
||||
font-size: 0.85em;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
2479
pnpm-lock.yaml
generated
2479
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user