From 91c3d1406d8877cb0c26f4d1cf31d68fe244bf04 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: Sun, 23 Oct 2022 21:12:06 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8(component):=20=E5=8F=91=E5=B8=83=201.?= =?UTF-8?q?7.0-alpha.1=20=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package/component/package.json | 2 +- package/component/src/component/page/index.vue | 10 +++++----- package/component/src/language/locales/zh_CN.ts | 2 +- .../src/document/zh-CN/components/exception.md | 2 +- .../src/document/zh-CN/guide/changelog.md | 1 + .../src/document/zh-CN/guide/locale.md | 4 ---- 6 files changed, 9 insertions(+), 12 deletions(-) diff --git a/package/component/package.json b/package/component/package.json index 95c63df6..1bb90712 100644 --- a/package/component/package.json +++ b/package/component/package.json @@ -1,6 +1,6 @@ { "name": "@layui/layui-vue", - "version": "1.7.0-dev.20", + "version": "1.7.0-alpha.1", "author": "就眠儀式", "license": "MIT", "description": "a component library for Vue 3 base on layui-vue", diff --git a/package/component/src/component/page/index.vue b/package/component/src/component/page/index.vue index 45b41bec..17f63040 100644 --- a/package/component/src/component/page/index.vue +++ b/package/component/src/component/page/index.vue @@ -43,7 +43,7 @@ const slots = useSlots(); const maxPage = ref(0); const limits = ref(props.limits); -const pages = Math.floor(props.pages / 2); +const pages = computed(() => Math.floor(props.pages / 2)) const currentPage: Ref = ref(props.modelValue); const currentPageShow: Ref = ref(currentPage.value); const inlimit = ref(props.limit); @@ -62,11 +62,11 @@ const totalPage = computed(() => { let start = maxPage.value <= props.pages ? 1 - : currentPage.value > pages - ? maxPage.value - currentPage.value + 1 < pages + : currentPage.value > pages.value + ? maxPage.value - currentPage.value + 1 < pages.value ? currentPage.value - - (pages + (pages - (maxPage.value - currentPage.value + 1))) - : currentPage.value - pages + (pages.value + (pages.value - (maxPage.value - currentPage.value + 1))) + : currentPage.value - pages.value : 1; for (let i = start; ; i++) { diff --git a/package/component/src/language/locales/zh_CN.ts b/package/component/src/language/locales/zh_CN.ts index 4110ca07..906f965a 100644 --- a/package/component/src/language/locales/zh_CN.ts +++ b/package/component/src/language/locales/zh_CN.ts @@ -44,5 +44,5 @@ export default { }, empty: { description: "无数据", - }, + } }; diff --git a/package/document-component/src/document/zh-CN/components/exception.md b/package/document-component/src/document/zh-CN/components/exception.md index 8f35f6a6..87bfeaed 100644 --- a/package/document-component/src/document/zh-CN/components/exception.md +++ b/package/document-component/src/document/zh-CN/components/exception.md @@ -13,7 +13,7 @@ ::: demo 使用 `lay-exception` 标签, 创建一个异常页面