Avansamos mucho con el administracion propiedades

This commit is contained in:
2025-01-03 01:52:35 -03:00
parent 2fa110bb89
commit 0a9ac0a787
19 changed files with 818 additions and 45 deletions
@@ -0,0 +1,35 @@
<script lang="ts">
import { onMount } from "svelte";
import {urlG} from "../stores/urlStore";
let {currentPag,
cantpag,
queryPag
}:{
currentPag: number,
cantpag: number,
queryPag: (a:number) => void} = $props();
const token = sessionStorage.getItem("token");
onMount(async () => {
});
let array = $derived.by(()=> Array.from({ length: cantpag }, (_, i) => i + 1));
</script>
{#if cantpag>1}
<nav aria-label="Page navigation example">
<ul class="pagination">
{#each array as num }
{#if currentPag !== num}
<li class="page-item"><a class="page-link" href="#" onclick={()=>queryPag(num)}>{String(num)}</a></li>
{:else}
<li class="page-item"><a class="page-link active" href="#" onclick={()=>queryPag(num)}>{String(num)}</a></li>
{/if}
{/each}
</ul>
</nav>
{/if}