Compare commits
7 Commits
docs/devic
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 5544cabb4e | |||
| d0b8a3fa9c | |||
| cfd8199006 | |||
| 74497733a9 | |||
| 6a853d360b | |||
| 7c0c9e46dd | |||
| 8e5c577098 |
@@ -1,6 +1,9 @@
|
|||||||
import { defineConfig } from 'vitepress'
|
import { defineConfig } from 'vitepress'
|
||||||
|
import { withMermaid } from 'vitepress-plugin-mermaid'
|
||||||
|
import mathjax3 from 'markdown-it-mathjax3'
|
||||||
|
|
||||||
export default defineConfig({
|
export default withMermaid(
|
||||||
|
defineConfig({
|
||||||
title: 'HF-MES v5.0 使用手册',
|
title: 'HF-MES v5.0 使用手册',
|
||||||
description: 'HF-MES v5.0 制造执行系统完整使用指南',
|
description: 'HF-MES v5.0 制造执行系统完整使用指南',
|
||||||
lang: 'zh-CN',
|
lang: 'zh-CN',
|
||||||
@@ -200,7 +203,10 @@ export default defineConfig({
|
|||||||
light: 'github-light',
|
light: 'github-light',
|
||||||
dark: 'github-dark'
|
dark: 'github-dark'
|
||||||
},
|
},
|
||||||
lineNumbers: false
|
lineNumbers: false,
|
||||||
|
config(md) {
|
||||||
|
md.use(mathjax3)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
head: [
|
head: [
|
||||||
@@ -208,4 +214,6 @@ export default defineConfig({
|
|||||||
['meta', { name: 'author', content: 'HF-MES' }],
|
['meta', { name: 'author', content: 'HF-MES' }],
|
||||||
['meta', { name: 'viewport', content: 'width=device-width, initial-scale=1.0' }]
|
['meta', { name: 'viewport', content: 'width=device-width, initial-scale=1.0' }]
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
|
)
|
||||||
|
|||||||
@@ -1,6 +1,36 @@
|
|||||||
import DefaultTheme from 'vitepress/theme'
|
import DefaultTheme from 'vitepress/theme'
|
||||||
|
import mediumZoom from 'medium-zoom'
|
||||||
|
import { onMounted, watch, nextTick } from 'vue'
|
||||||
|
import { useRoute } from 'vitepress'
|
||||||
|
|
||||||
import './style/print.css'
|
import './style/print.css'
|
||||||
|
import './style/zoom.css'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
...DefaultTheme,
|
...DefaultTheme,
|
||||||
|
|
||||||
|
setup() {
|
||||||
|
const route = useRoute()
|
||||||
|
|
||||||
|
const initZoom = () => {
|
||||||
|
mediumZoom('.main img', {
|
||||||
|
background: 'rgba(0,0,0,0.8)'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
nextTick(() => {
|
||||||
|
initZoom()
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => route.path,
|
||||||
|
() => {
|
||||||
|
nextTick(() => {
|
||||||
|
initZoom()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
7
.vitepress/theme/style/zoom.css
Normal file
7
.vitepress/theme/style/zoom.css
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
.medium-zoom-overlay {
|
||||||
|
z-index: 9998;
|
||||||
|
}
|
||||||
|
|
||||||
|
.medium-zoom-image--opened {
|
||||||
|
z-index: 9999;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user