feat:更新MySQL博客
This commit is contained in:
@@ -37,9 +37,9 @@ export default withMermaid({
|
||||
'/Others/': [routers[4]]
|
||||
},
|
||||
|
||||
// socialLinks: [
|
||||
// { icon: 'github', link: 'https://github.com/vuejs/vitepress' }
|
||||
// ]
|
||||
socialLinks: [
|
||||
{ icon: 'gitea', link: 'https://cxxgit.iepose.cn/Cxx0822/blog-press' }
|
||||
],
|
||||
|
||||
footer: {
|
||||
message: '基于 VitePress 构建',
|
||||
|
||||
@@ -34,12 +34,15 @@ import { useData } from 'vitepress'
|
||||
const wordCount = ref(0)
|
||||
const imageCount = ref(0)
|
||||
|
||||
// 获取页面数据
|
||||
const { page } = useData()
|
||||
|
||||
// 文字阅读时间
|
||||
const wordTime = computed(() => {
|
||||
return ((wordCount.value / 275) * 60)
|
||||
})
|
||||
|
||||
// 图片阅读时间
|
||||
const imageTime = computed(() => {
|
||||
const n = imageCount.value
|
||||
if (imageCount.value <= 10) {
|
||||
@@ -54,13 +57,14 @@ const readTime = computed(() => {
|
||||
return Math.ceil((wordTime.value + imageTime.value) / 60)
|
||||
})
|
||||
|
||||
function analyze() {
|
||||
document.querySelectorAll('.meta-des').forEach(v => v.remove())
|
||||
const analyze = () => {
|
||||
// 选择文档内容区域
|
||||
const docDomContainer = window.document.querySelector('#VPContent')
|
||||
const imgs = docDomContainer?.querySelectorAll<HTMLImageElement>(
|
||||
'.content-container .main img'
|
||||
)
|
||||
// 统计图片数量
|
||||
const imgs = docDomContainer?.querySelectorAll<HTMLImageElement>('.content-container .main img')
|
||||
imageCount.value = imgs?.length || 0
|
||||
|
||||
// 统计文字数量(textContent:提取纯文本)
|
||||
const words = docDomContainer?.querySelector('.content-container .main')?.textContent || ''
|
||||
wordCount.value = countWord(words)
|
||||
}
|
||||
|
||||
@@ -43,12 +43,18 @@ export const routers = [
|
||||
{ text: '基于OAuth2的安全验证', link: '/Web-Backend/FastAPI/OAuth2' }
|
||||
]
|
||||
},
|
||||
{
|
||||
text: '🐬 MySQL',
|
||||
items: [
|
||||
{ text: 'MyBatis简介和使用', link: '/Web-Backend/MySQL/MyBatis' },
|
||||
{ text: 'Flyway简单使用', link: '/Web-Backend/MySQL/Flyway' },
|
||||
{ text: 'MySQL知识点', link: '/Web-Backend/MySQL/MySQL-Knowledge' },
|
||||
{ text: 'SQL高阶用法', link: '/Web-Backend/MySQL/SQL-Advance' }
|
||||
]
|
||||
},
|
||||
{
|
||||
text: '🔄 其他',
|
||||
items: [
|
||||
{ text: 'MySQL知识点', link: '/Web-Backend/Others/MySQL-Knowledge' },
|
||||
{ text: 'Flyway简单使用', link: '/Web-Backend/Others/Flyway' },
|
||||
{ text: 'MyBatis简介和使用', link: '/Web-Backend/Others/MyBatis' },
|
||||
{ text: 'RustFS简介和使用', link: '/Web-Backend/Others/RustFS' },
|
||||
{ text: 'AList简介和使用', link: '/Web-Backend/Others/AList' },
|
||||
{ text: '网络编程简介', link: '/Web-Backend/Others/Netword-Program' }
|
||||
@@ -63,7 +69,7 @@ export const routers = [
|
||||
{ text: 'Jenkins部署和使用', link: '/DevOps/Jenkins' },
|
||||
{ text: 'ElasticSearch部署和使用', link: '/DevOps/ElasticSearch' },
|
||||
{ text: 'Docker简介和安装', link: '/DevOps/Docker' }
|
||||
]
|
||||
]
|
||||
},
|
||||
{
|
||||
text: '📱 Flutter',
|
||||
|
||||
Reference in New Issue
Block a user