You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
540 B
28 lines
540 B
4 years ago
|
import { defineComponent } from 'vue'
|
||
|
|
||
|
export default defineComponent({
|
||
|
name: 'CompRender',
|
||
|
props: {
|
||
|
element: {
|
||
|
type: Object,
|
||
|
default: () => ({})
|
||
|
},
|
||
|
config: {
|
||
|
type: Object,
|
||
|
default: () => ({})
|
||
|
}
|
||
|
},
|
||
|
setup(props) {
|
||
|
return () => {
|
||
|
const component = props.config.componentMap[props.element.componentKey]
|
||
|
return component.render({
|
||
|
size: {},
|
||
|
props: props.element.props || {},
|
||
|
model: {},
|
||
|
block: props.element,
|
||
|
custom: {}
|
||
|
})
|
||
|
}
|
||
|
}
|
||
|
})
|