mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-06-19 22:50:41 +08:00
- 新增路由 plugin-app 与壳页,按 nav_key 尝试 AppPage{Pascal}/AppPage/Page
- DefaultLayout 与 appcenter 合并插件侧栏项;plugin/sidebar_nav 经 Pinia 去重缓存
- 工具 pluginSidebarNav、联邦 loader 与文档/示例更新;登出时清空侧栏缓存
Made-with: Cursor
33 lines
777 B
Vue
33 lines
777 B
Vue
<script setup lang="ts">
|
||
/**
|
||
* 侧栏全页:在主应用 #/plugin-app/:pluginId/:navKey 中渲染,占据主内容区。
|
||
* 需在插件后端实现 get_sidebar_nav 才会出现在侧栏。
|
||
*/
|
||
const props = defineProps({
|
||
api: {
|
||
type: Object,
|
||
default: () => ({}),
|
||
},
|
||
navKey: {
|
||
type: String,
|
||
default: 'main',
|
||
},
|
||
pluginId: {
|
||
type: String,
|
||
default: '',
|
||
},
|
||
})
|
||
|
||
const emit = defineEmits(['action'])
|
||
</script>
|
||
|
||
<template>
|
||
<div class="plugin-app-page pa-4">
|
||
<div class="text-h6 mb-2">AppPage(侧栏全页)</div>
|
||
<div class="text-body-2 text-medium-emphasis mb-4">
|
||
pluginId: {{ pluginId }} · navKey: {{ navKey }}
|
||
</div>
|
||
<v-btn size="small" variant="tonal" @click="emit('action')">action</v-btn>
|
||
</div>
|
||
</template>
|