在多个组件中添加渲染模式支持,优化插件配置和数据加载逻辑,增强用户体验和代码可读性

This commit is contained in:
jxxghp
2025-05-03 10:04:50 +08:00
parent 04e9b68e4a
commit 4a8cf16012
5 changed files with 251 additions and 64 deletions

View File

@@ -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

View File

@@ -631,6 +631,10 @@ export interface DashboardItem {
cols: { [key: string]: number }
// 页面元素
elements: RenderProps[]
// 渲染方式
render_mode: string
// 组件地址
component_url: string
}
// 种子信息