mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-05-31 05:10:45 +08:00
feat 插件配置
This commit is contained in:
@@ -119,12 +119,6 @@ function showPluginInfo() {
|
||||
|
||||
// 显示插件配置
|
||||
async function showPluginConfig() {
|
||||
// 加载插件表单
|
||||
await loadPluginForm()
|
||||
// 加载插件配置
|
||||
loadPluginConf()
|
||||
// 加载详情数据
|
||||
loadPluginPage()
|
||||
// 显示对话框
|
||||
pluginConfigDialog.value = true
|
||||
}
|
||||
@@ -141,6 +135,13 @@ const dropdownItems = ref([
|
||||
},
|
||||
},
|
||||
])
|
||||
|
||||
// 加载插件配置
|
||||
onBeforeMount(async () => {
|
||||
await loadPluginForm()
|
||||
await loadPluginConf()
|
||||
await loadPluginPage()
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -207,7 +208,12 @@ const dropdownItems = ref([
|
||||
<VCard :title="`插件 - ${props.plugin?.plugin_name}`">
|
||||
<DialogCloseBtn @click="pluginConfigDialog = false" />
|
||||
<VCardText>
|
||||
<FormRender v-for="(item, index) in pluginFormItems" :key="index" :config="item" :form="pluginConfigForm" />
|
||||
<FormRender
|
||||
v-for="(item, index) in pluginFormItems"
|
||||
:key="index"
|
||||
:config="item"
|
||||
:form="pluginConfigForm"
|
||||
/>
|
||||
</VCardText>
|
||||
<VCardActions>
|
||||
<VBtn v-if="pluginPageItems.length > 0" @click="showPluginInfo">
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { type PropType, ref } from 'vue'
|
||||
|
||||
// 组件配置
|
||||
// 组件接口
|
||||
interface RenderProps {
|
||||
component: string
|
||||
content?: any
|
||||
@@ -26,7 +26,11 @@ const formData = ref<any>(elementProps.form || {})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Component :is="formItem.component" v-bind="formItem.props" v-model="formData[formItem.props?.model || '']">
|
||||
<Component
|
||||
:is="formItem.component"
|
||||
v-bind="formItem.props"
|
||||
v-model="formData[formItem.props?.model || '']"
|
||||
>
|
||||
<FormRender
|
||||
v-for="(innerItem, innerIndex) in (formItem.content || [])"
|
||||
:key="innerIndex"
|
||||
|
||||
Reference in New Issue
Block a user