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
+1 -1
View File
@@ -158,7 +158,7 @@ const dropdownItems = ref([
> >
<div class="me-n3 absolute top-0 right-3"> <div class="me-n3 absolute top-0 right-3">
<IconBtn> <IconBtn>
<VIcon icon="mdi-dots-vertical" /> <VIcon icon="mdi-dots-vertical" class="text-white" />
<VMenu <VMenu
activator="parent" activator="parent"
close-on-content-click close-on-content-click
+9
View File
@@ -5,6 +5,7 @@ import { type PropType, ref } from 'vue'
interface RenderProps { interface RenderProps {
component: string component: string
text: string text: string
html: string
content?: any content?: any
props?: any props?: any
} }
@@ -19,6 +20,7 @@ const elementProps = defineProps({
const formItem = ref<RenderProps>(elementProps.config || { const formItem = ref<RenderProps>(elementProps.config || {
component: 'div', component: 'div',
text: '', text: '',
html: '',
props: {}, props: {},
content: [], content: [],
}) })
@@ -27,6 +29,7 @@ const formItem = ref<RenderProps>(elementProps.config || {
<template> <template>
<Component <Component
:is="formItem.component" :is="formItem.component"
v-if="!formItem.html"
v-bind="formItem.props" v-bind="formItem.props"
> >
{{ formItem.text }} {{ formItem.text }}
@@ -36,4 +39,10 @@ const formItem = ref<RenderProps>(elementProps.config || {
:config="innerItem" :config="innerItem"
/> />
</Component> </Component>
<Component
:is="formItem.component"
v-if="!formItem.content && formItem.html"
v-bind="formItem.props"
v-html="formItem.html"
/>
</template> </template>