mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-05-27 19:29:52 +08:00
在多个组件中添加渲染模式支持,优化插件配置和数据加载逻辑,增强用户体验和代码可读性
This commit is contained in:
@@ -7,6 +7,16 @@ const api = axios.create({
|
||||
baseURL: import.meta.env.VITE_API_BASE_URL,
|
||||
})
|
||||
|
||||
// 声明全局变量类型
|
||||
declare global {
|
||||
interface Window {
|
||||
MoviePilotAPI: typeof api
|
||||
}
|
||||
}
|
||||
|
||||
// 将 API 实例暴露到全局,供插件使用
|
||||
window.MoviePilotAPI = api
|
||||
|
||||
// 添加请求拦截器
|
||||
api.interceptors.request.use(config => {
|
||||
// 认证 Store
|
||||
|
||||
@@ -631,6 +631,10 @@ export interface DashboardItem {
|
||||
cols: { [key: string]: number }
|
||||
// 页面元素
|
||||
elements: RenderProps[]
|
||||
// 渲染方式
|
||||
render_mode: string
|
||||
// 组件地址
|
||||
component_url: string
|
||||
}
|
||||
|
||||
// 种子信息
|
||||
|
||||
Reference in New Issue
Block a user