fix all build checks

This commit is contained in:
liangping
2023-06-08 10:02:47 +08:00
parent e2782c1e00
commit a25dde89f5
18 changed files with 123 additions and 80 deletions
@@ -1,5 +1,6 @@
<script setup lang="ts">
import { Icon } from '@iconify/vue';
import { controlledComputed } from '@vueuse/core'
interface Props {
title: string;
+5 -4
View File
@@ -2,7 +2,7 @@
import { computed, ref } from 'vue';
const props = defineProps({
total: { type: Number },
total: { type: String },
limit: { type: Number },
callback: { type: Function, required: true },
});
@@ -10,12 +10,13 @@ const current = ref(1)
const showSize = 3
const pages = computed(() => {
const pages: { color: string, page: number }[] = []
if (props.total && props.limit && props.total > props.limit) {
const total = Number(props.total || 0)
if (total > 0 && props.limit && total > props.limit) {
let page = 0
while (true) {
if (page * props.limit > props.total) break
if (page * props.limit > total) break
page += 1
if (props.total / props.limit > 10 && page > showSize && page < (props.total / props.limit - showSize + 1)) {
if (total / props.limit > 10 && page > showSize && page < (total / props.limit - showSize + 1)) {
if (!(page >= current.value - 1 && page <= current.value + 1)) {
continue
}
+1
View File
@@ -1,6 +1,7 @@
<script lang="ts" setup>
import { toBase64, toHex } from '@cosmjs/encoding';
import { computed } from '@vue/reactivity';
import { ref } from 'vue';
const props = defineProps(['value']);
const format = ref('base64');