|
|
@@ -4,10 +4,7 @@ import { getInputValue } from "@/utils/parseSQL";
|
|
|
|
import { enumPageComponentTemplates } from "@/definitions/enum";
|
|
|
|
import { enumPageComponentTemplates } from "@/definitions/enum";
|
|
|
|
const router = useRouter();
|
|
|
|
const router = useRouter();
|
|
|
|
const route = useRoute();
|
|
|
|
const route = useRoute();
|
|
|
|
|
|
|
|
import { useScroll } from '@vueuse/core';
|
|
|
|
const store = reactive({
|
|
|
|
|
|
|
|
component: useDynamicPageStore(),
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const _props = defineProps<{
|
|
|
|
const _props = defineProps<{
|
|
|
|
dataResult?: any[];
|
|
|
|
dataResult?: any[];
|
|
|
@@ -108,10 +105,11 @@ const mapActivesToItems = (index: number) => {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return {};
|
|
|
|
return {};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|
<section v-if="listArticleByCategory?.length > 0">
|
|
|
|
<section :id="`cpn_[${_props.component.id}]`" v-if="listArticleByCategory?.length > 0">
|
|
|
|
<div class="section-container">
|
|
|
|
<div class="section-container">
|
|
|
|
<div class="section-layout" :style="designObject['div.section']">
|
|
|
|
<div class="section-layout" :style="designObject['div.section']">
|
|
|
|
<template v-for="(component, index) in listArticlePaging?.length > 0 ? listArticlePaging : listArticleByCategory" :key="index">
|
|
|
|
<template v-for="(component, index) in listArticlePaging?.length > 0 ? listArticlePaging : listArticleByCategory" :key="index">
|
|
|
@@ -126,13 +124,13 @@ const mapActivesToItems = (index: number) => {
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
<div class="button-page flex">
|
|
|
|
<div class="button-page flex">
|
|
|
|
<span class="btn-page prev-page" @click.stop="() => handleNextPrev('-')" v-if="page > 1">
|
|
|
|
<a :href="`#cpn_[${_props.component.id}]`" class="btn-page prev-page" @click.stop="() => handleNextPrev('-')" v-if="page > 1">
|
|
|
|
<Icon name="ooui:previous-ltr"></Icon>
|
|
|
|
<Icon name="ooui:previous-ltr"></Icon>
|
|
|
|
</span>
|
|
|
|
</a>
|
|
|
|
<span :class="['btn-page', page === index + 1 && 'active']" @click.stop="() => select(index + 1)" v-for="(_, index) in Math.ceil(totals / limit)">{{ index + 1 }}</span>
|
|
|
|
<a :href="`#cpn_[${_props.component.id}]`" :class="['btn-page', page === index + 1 && 'active']" @click.stop="() => select(index + 1)" v-for="(_, index) in Math.ceil(totals / limit)" :key="index">{{ index + 1 }}</a>
|
|
|
|
<span class="btn-page next-page" @click.stop="() => handleNextPrev('+')" v-if="page < Math.ceil(totals / limit)">
|
|
|
|
<a :href="`#cpn_[${_props.component.id}]`" class="btn-page next-page" @click.stop="() => handleNextPrev('+')" v-if="page < Math.ceil(totals / limit)">
|
|
|
|
<Icon name="ooui:previous-rtl"></Icon>
|
|
|
|
<Icon name="ooui:previous-rtl"></Icon>
|
|
|
|
</span>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|