mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-05-12 02:21:06 +08:00
fix
This commit is contained in:
@@ -1,22 +1,24 @@
|
||||
<script lang="ts" setup>
|
||||
import { type PropType, ref } from 'vue'
|
||||
|
||||
// 组件配置
|
||||
interface RenderProps {
|
||||
component: string
|
||||
content: any
|
||||
props: any
|
||||
}
|
||||
|
||||
// 输入参数
|
||||
const props = defineProps({
|
||||
const elementProps = defineProps({
|
||||
config: Array as PropType<RenderProps[]>,
|
||||
})
|
||||
|
||||
// 配置表单
|
||||
const formItems = ref(props.config)
|
||||
const formItems = ref(elementProps.config)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Component :is="item.component" v-for="(item, index) in formItems" :key="index">
|
||||
<Component :is="item.component" v-for="(item, index) in formItems" :key="index" v-bind="item.props">
|
||||
<FormRender v-for="(innerItem, innerIndex) in (item.content || [])" :key="innerIndex" :config="innerItem" />
|
||||
</Component>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user