thainv-dev: Fix Ui

This commit is contained in:
nguyen van thai
2024-06-25 09:08:44 +07:00
parent ab3419bd5f
commit fcb826a7c6
9 changed files with 25 additions and 18 deletions
@@ -5,6 +5,7 @@ import {
const _props = defineProps<{
settings: any;
component?: any;
content?: any
}>();
const definedDynamicComponent: Record<string, any> = {
@@ -26,8 +27,9 @@ const GET_PROPS = computed(() => {
}
};
});
</script>
<template>
<component :is="definedDynamicComponent[getCurrentComponent]" v-bind="GET_PROPS()" />
<component :is="definedDynamicComponent[getCurrentComponent]" v-bind="{...GET_PROPS(), content: _props.content}" />
</template>
@@ -16,8 +16,8 @@ const _props = defineProps<{
dataQuery?: string;
layout?: string;
label?: string;
content?: any
}>();
const SETTING_OPTIONS = {
MAX_ELEMENT: 5,
TEMPLATE: "Article",
@@ -102,6 +102,8 @@ const mapActivesToItems = (index: number) => {
return output[index + 1] || {};
};
const CONTENT_PARSE = computed(() => JSON.parse(_props.content))
</script>
<template>