From 92694f5919ca5711119d1466d515e00d62445e99 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=B0=B1=E7=9C=A0=E5=84=80=E5=BC=8F?= <854085467@qq.com>
Date: Tue, 16 Aug 2022 15:50:46 +0800
Subject: [PATCH] =?UTF-8?q?=E2=9C=A8(component):=20release=201.4.3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../component/src/component/card/index.vue | 2 +-
.../component/src/component/page/index.vue | 31 +++++++++++++------
2 files changed, 23 insertions(+), 10 deletions(-)
diff --git a/package/component/src/component/card/index.vue b/package/component/src/component/card/index.vue
index af384191..4deb4c49 100644
--- a/package/component/src/component/card/index.vue
+++ b/package/component/src/component/card/index.vue
@@ -48,4 +48,4 @@ const classes = computed(() => {
-
\ No newline at end of file
+
diff --git a/package/component/src/component/page/index.vue b/package/component/src/component/page/index.vue
index dfd57037..12fddb53 100644
--- a/package/component/src/component/page/index.vue
+++ b/package/component/src/component/page/index.vue
@@ -48,14 +48,22 @@ const currentPage: Ref = ref(props.modelValue);
const currentPageShow: Ref = ref(currentPage.value);
const inlimit = ref(props.limit);
-watch(() => props.limit, () => {
- inlimit.value = props.limit;
-})
+watch(
+ () => props.limit,
+ () => {
+ inlimit.value = props.limit;
+ }
+);
const totalPage = computed(() => {
maxPage.value = Math.ceil(props.total / inlimit.value);
let r: number[] = [];
- let start = maxPage.value <= props.pages ? 1 : currentPage.value > pages ? currentPage.value - pages : 1;
+ let start =
+ maxPage.value <= props.pages
+ ? 1
+ : currentPage.value > pages
+ ? currentPage.value - pages
+ : 1;
for (let i = start; ; i++) {
if (r.length >= props.pages || i > maxPage.value) {
break;
@@ -96,15 +104,15 @@ const jumpPage = () => {
const changelimit = () => {
currentPage.value = 1;
emit("change", { current: currentPage.value, limit: inlimit.value });
-}
+};
const refresh = () => {
emit("change", { current: currentPage.value, limit: inlimit.value });
-}
+};
watch(inlimit, () => {
emit("update:limit", inlimit.value);
-})
+});
watch(currentPage, () => {
const min = totalPage.value[0];
@@ -178,7 +186,12 @@ watch(
-
+
@@ -199,4 +212,4 @@ watch(
-
\ No newline at end of file
+