优化:由于若干问题,暂时隐藏文章阅读数及评论组件
This commit is contained in:
@@ -2,8 +2,6 @@ import DefaultTheme from 'vitepress/theme'
|
||||
import MyLayout from "./components/MyLayout.vue"
|
||||
import ElementPlus from 'element-plus'
|
||||
import "element-plus/dist/index.css"
|
||||
import * as ElIcons from '@element-plus/icons-vue'
|
||||
import api from './api/index'
|
||||
import ArticleMetadata from './components/ArticleMetadata.vue'
|
||||
import './styles/vars.css'
|
||||
import './styles/custom.css'
|
||||
@@ -11,18 +9,10 @@ import './styles/custom.css'
|
||||
export default {
|
||||
...DefaultTheme,
|
||||
Layout: MyLayout,
|
||||
enhanceApp({ app, router }) {
|
||||
// 全局注册ElementPlus的所有图标
|
||||
for (const [key, elIcon] of Object.entries(ElIcons)) {
|
||||
app.component(key, elIcon)
|
||||
}
|
||||
enhanceApp({ app }) {
|
||||
// 全局注册ElementPlus
|
||||
app.use(ElementPlus)
|
||||
|
||||
// 全局挂载api接口
|
||||
if (typeof window !== 'undefined') {
|
||||
window.$api = api
|
||||
}
|
||||
app.component('ArticleMetadata', ArticleMetadata)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user