feat: fix type

This commit is contained in:
MoreStrive
2024-07-05 09:48:34 +07:00
parent 554ceab3c6
commit 76d4628100
22 changed files with 133 additions and 40 deletions
@@ -8,7 +8,7 @@ const props = defineProps<{
dataType?: any;
dataQuery?: any;
layout?: string;
label?: string;
label?: any;
}>();
const LAYOUT_PARSE = computed(() => {
@@ -9,7 +9,7 @@ const props = defineProps<{
dataType?: any;
dataQuery?: any;
layout?: string;
label?: string;
label?: any;
}>();
const LAYOUT_PARSE = computed(() => {
@@ -7,7 +7,7 @@ const props = defineProps<{
dataType?: any;
dataQuery?: any;
layout?: string;
label?: string;
label?: any;
}>();
const LAYOUT_PARSE = computed(() => {
@@ -8,7 +8,7 @@ const props = defineProps<{
dataType?: any;
dataQuery?: any;
layout?: string;
label?: string;
label?: any;
}>();
const LAYOUT_PARSE = computed(() => {
@@ -9,7 +9,7 @@ const _props = defineProps<{
dataType?: any;
dataQuery?: any;
layout?: string;
label?: string;
label?: any;
}>();
const SETTING_OPTIONS = {
BREADCRUMB_MAX_ELEMENT: 3,
@@ -5,7 +5,7 @@ import { COLLECTION_QUERY_DROP, getValueStringWithKeyAndColon, getInputValue } f
const _props = defineProps<{
dataResult?: any[];
dataQuery?: string;
label?: string;
label?: any;
}>();
const designObject = computed(() => {
@@ -5,7 +5,7 @@ import { COLLECTION_QUERY_DROP, getValueStringWithKeyAndColon, getInputValue } f
const _props = defineProps<{
dataResult?: any[];
dataQuery?: string;
label?: string;
label?: any;
}>();
const SETTING_OPTIONS = {
@@ -8,7 +8,7 @@ const _props = defineProps<{
dataResult?: any[];
dataQuery?: string;
layout?: string;
label?: string;
label?: any;
content?: any;
}>();
@@ -8,7 +8,7 @@ const _props = defineProps<{
dataResult?: any[];
dataQuery?: string;
layout?: string;
label?: string;
label?: any;
content?: any;
}>();
@@ -1,4 +1,4 @@
// export { default as Weather_Day } from './weathers/WeatherDay.vue'
// export { default as Comment_Default } from './comments/Default.vue'
export { default as Other_Weather } from './weathers/index.vue'
export { default as Other_Secutities } from './securities/index.vue'
export { default as Other_Stock } from './stocks/index.vue'
@@ -1,6 +1,6 @@
<script lang="ts" setup>
import { enumPageComponentTemplate, enumPageComponentKey, enumPageComponentLayouts } from "@/definitions/enum";
import { Other_Weather, Other_Secutities } from "./index";
import { Other_Weather, Other_Stock } from "./index";
const _props = defineProps<{
settings: any;
@@ -9,7 +9,7 @@ const _props = defineProps<{
}>();
const definedDynamicComponent: Record<string, any> = {
[enumPageComponentTemplate[enumPageComponentKey.OTHER]["WEATHER"]]: Other_Weather,
[enumPageComponentTemplate[enumPageComponentKey.OTHER]["SECURITIES"]]: Other_Secutities,
[enumPageComponentTemplate[enumPageComponentKey.OTHER]['STOCK']]: Other_Stock,
// [enumPageComponentTemplate[enumPageComponentKey.ARTICLE]["ARTICLE_DETAIL"]]: Article_Detail,
};
const getCurrentComponent = computed(() => _props.settings.template);
@@ -1,15 +0,0 @@
<script setup lang="ts"></script>
<template>
<div>chứng khoán</div>
</template>
<style lang="scss" scoped>
div {
width: 100%;
height: 200px;
background-color: #ededed;
font-size: 24px;
display: flex;
align-items: center;
justify-content: center;
}
</style>
@@ -1 +0,0 @@
export { default as Securities_Default } from './Securities.vue'
@@ -0,0 +1,34 @@
<script setup lang="ts">
import JSWidget from '@/components/widget/JSwidget.vue';
const widgetOptions = {
"locale": "vi",
"price_line_color": "#71BDDF",
"grid_color": "#999999",
"label_color": "#999999",
"width": "350px",
"height": "250px"
}
</script>
<template>
<div>
<JSWidget
CONTAINER_ID="default_widget_[123123]"
SCRIPT_ID="12312312"
SCRIPT_SRC="https://www.fireant.vn/Scripts/web/widgets.js"
:options="widgetOptions"
widgetKey="FireAnt"
/>
</div>
</template>
<style lang="scss" scoped>
div {
width: 100%;
height: 200px;
background-color: #ededed;
font-size: 24px;
display: flex;
align-items: center;
justify-content: center;
}
</style>
@@ -0,0 +1 @@
export { default as Stock_Default } from './334x641.vue'
@@ -1,15 +1,14 @@
<script lang="ts" setup>
import { enumPageComponentTemplate, enumPageComponentKey, enumPageComponentLayouts } from "@/definitions/enum";
import { Stock_Default } from "./index";
// import { Article_Card, Article_Detail_Video, Article_Detail_Podcast, Article_Detail_General, Article_Detail_Image } from "./index";
import { Securities_Default } from "./index";
const _props = defineProps<{
settings: any;
component?: any;
content?: any;
}>();
const definedDynamicComponent: Record<string, any> = {
[enumPageComponentLayouts[enumPageComponentTemplate[enumPageComponentKey.OTHER]["SECURITIES"]]["SECURITIES_DEFAULT"]]: Securities_Default,
[enumPageComponentLayouts[enumPageComponentTemplate[enumPageComponentKey.OTHER]['STOCK']]['STOCK_DEFAULT']]: Stock_Default,
};
const getCurrentComponent = computed(() => `${_props.settings.layout}`);
@@ -32,3 +31,4 @@ const GET_PROPS = computed(() => {
<template>
<component :is="definedDynamicComponent[getCurrentComponent]" v-bind="{ ...GET_PROPS(), component: _props.component, settings: _props.settings }" />
</template>
../stocks/index
@@ -13,7 +13,7 @@ const _props = defineProps<{
dataResult?: any[];
dataQuery?: string;
component?: any;
label?: string;
label?: any;
}>();
const SETTING_OPTIONS = {