Initial commit: TaskPool React panel
- React frontend with route-level code splitting - Backend rebranded from Baihu to TaskPool - DB brand migration script and local compatibility
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
---
|
||||
layout: false
|
||||
---
|
||||
|
||||
<script setup>
|
||||
import { ApiReference } from '@scalar/api-reference'
|
||||
import '@scalar/api-reference/style.css'
|
||||
</script>
|
||||
|
||||
<div class="scalar-container">
|
||||
<ClientOnly>
|
||||
<ApiReference
|
||||
:configuration="{
|
||||
spec: {
|
||||
url: '/taskpool/swagger.json'
|
||||
},
|
||||
theme: 'alternate',
|
||||
showSidebar: true,
|
||||
servers: [
|
||||
{
|
||||
url: '{protocol}://{host}:{port}/open2api/v1',
|
||||
description: '可编辑的服务器地址',
|
||||
variables: {
|
||||
protocol: { default: 'http', enum: ['http', 'https'] },
|
||||
host: { default: 'localhost' },
|
||||
port: { default: '8052' }
|
||||
}
|
||||
}
|
||||
]
|
||||
}"
|
||||
/>
|
||||
</ClientOnly>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
:root, body, #app {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.scalar-container {
|
||||
height: 100vh;
|
||||
width: 100vw;
|
||||
}
|
||||
|
||||
/* 覆盖 VitePress 可能存在的样式干扰 */
|
||||
.scalar-container :deep(.scalar-api-reference) {
|
||||
min-height: 100vh;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user