fix render

This commit is contained in:
jxxghp
2023-07-26 17:47:38 +08:00
parent ed8923125f
commit f4ab540d29
2 changed files with 10 additions and 1 deletions

View File

@@ -158,7 +158,7 @@ const dropdownItems = ref([
>
<div class="me-n3 absolute top-0 right-3">
<IconBtn>
<VIcon icon="mdi-dots-vertical" />
<VIcon icon="mdi-dots-vertical" class="text-white" />
<VMenu
activator="parent"
close-on-content-click

View File

@@ -5,6 +5,7 @@ import { type PropType, ref } from 'vue'
interface RenderProps {
component: string
text: string
html: string
content?: any
props?: any
}
@@ -19,6 +20,7 @@ const elementProps = defineProps({
const formItem = ref<RenderProps>(elementProps.config || {
component: 'div',
text: '',
html: '',
props: {},
content: [],
})
@@ -27,6 +29,7 @@ const formItem = ref<RenderProps>(elementProps.config || {
<template>
<Component
:is="formItem.component"
v-if="!formItem.html"
v-bind="formItem.props"
>
{{ formItem.text }}
@@ -36,4 +39,10 @@ const formItem = ref<RenderProps>(elementProps.config || {
:config="innerItem"
/>
</Component>
<Component
:is="formItem.component"
v-if="!formItem.content && formItem.html"
v-bind="formItem.props"
v-html="formItem.html"
/>
</template>