🎉初次提交
This commit is contained in:
29
docs/.vitepress/theme/custom.css
Normal file
29
docs/.vitepress/theme/custom.css
Normal file
@@ -0,0 +1,29 @@
|
||||
/* 自定义样式文件 */
|
||||
|
||||
/* 确保SwaggerUI容器有足够的高度 */
|
||||
.swagger-container {
|
||||
min-height: 600px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* SwaggerUI组件的容器样式 */
|
||||
.api-docs-container {
|
||||
background: var(--vp-c-bg);
|
||||
border-radius: 8px;
|
||||
padding: 20px;
|
||||
margin: 20px 0;
|
||||
}
|
||||
|
||||
/* 为API文档页面添加特殊样式 */
|
||||
.api-page .content-container {
|
||||
max-width: none !important;
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
/* 响应式调整 */
|
||||
@media (max-width: 960px) {
|
||||
.api-docs-container {
|
||||
padding: 10px;
|
||||
margin: 10px 0;
|
||||
}
|
||||
}
|
||||
17
docs/.vitepress/theme/index.ts
Normal file
17
docs/.vitepress/theme/index.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { h } from 'vue'
|
||||
import DefaultTheme from 'vitepress/theme'
|
||||
import SwaggerUI from '../components/SwaggerUI.vue'
|
||||
import './custom.css'
|
||||
|
||||
export default {
|
||||
extends: DefaultTheme,
|
||||
Layout: () => {
|
||||
return h(DefaultTheme.Layout, null, {
|
||||
// https://vitepress.dev/guide/extending-default-theme#layout-slots
|
||||
})
|
||||
},
|
||||
enhanceApp({ app, router, siteData }) {
|
||||
// 注册全局组件
|
||||
app.component('SwaggerUI', SwaggerUI)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user