mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-05-13 08:59:58 +08:00
23 lines
518 B
Vue
23 lines
518 B
Vue
<script lang="ts" setup>
|
|
import { type PropType, ref } from 'vue'
|
|
|
|
interface RenderProps {
|
|
component: string
|
|
content: any
|
|
}
|
|
|
|
// 输入参数
|
|
const props = defineProps({
|
|
config: Array as PropType<RenderProps[]>,
|
|
})
|
|
|
|
// 配置表单
|
|
const formItems = ref(props.config)
|
|
</script>
|
|
|
|
<template>
|
|
<Component :is="item.component" v-for="(item, index) in formItems" :key="index">
|
|
<FormRender v-for="(innerItem, innerIndex) in (item.content || [])" :key="innerIndex" :config="innerItem" />
|
|
</Component>
|
|
</template>
|