This commit is contained in:
jxxghp
2023-07-23 15:05:39 +08:00
parent 9dabed99a4
commit 35a556ec02
2 changed files with 7 additions and 10 deletions

View File

@@ -202,7 +202,9 @@ const dropdownItems = ref([
scrollable
>
<VCard :title="`插件 - ${props.plugin?.plugin_name}`">
<VCardText />
<VCardText>
<FormRender v-for="(item, index) in pluginFormItems" :key="index" :config="item" />
</VCardText>
<VCardActions>
<VBtn v-if="pluginPageItems.length > 0" @click="showPluginInfo">
详情
@@ -222,9 +224,7 @@ const dropdownItems = ref([
scrollable
>
<VCard :title="`插件 - ${props.plugin?.plugin_name}`">
<VCardText>
<FormRender v-for="(item, index) in pluginFormItems" :key="index" :config="item" />
</VCardText>
<VCardText />
<VCardActions>
<VSpacer />
<VBtn @click="pluginInfoDialog = false">

View File

@@ -1,5 +1,5 @@
<script lang="ts" setup>
import type { PropType } from 'vue'
import { type PropType, ref } from 'vue'
interface RenderProps {
component: string
@@ -16,10 +16,7 @@ const formItems = ref(props.config)
</script>
<template>
<Component :is="item.component" v-for="(item, index) in formItems" :key="index" v-bind="$attrs">
<template v-for="(innerItem, innerIndex) in item.content" :key="innerIndex">
<FormRender v-if="innerItem.component" :config="innerItem" v-bind="$attrs" />
<Component :is="innerItem.component" v-else v-bind="innerItem" />
</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>