From 9f18058e9e52d3814c99129336626f6f171026bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B1=E7=9C=A0=E4=BB=AA=E5=BC=8F?= <854085467@qq.com> Date: Mon, 11 Oct 2021 00:11:54 +0800 Subject: [PATCH] =?UTF-8?q?feat(page):=20=E6=96=B0=E5=A2=9E=20@jump=20?= =?UTF-8?q?=E5=9B=9E=E8=B0=83=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/docs/zh-CN/components/page.md | 25 +++++++++++++++++++++++++ docs/src/layouts/Layout.vue | 2 +- src/module/page/index.vue | 4 ++++ 3 files changed, 30 insertions(+), 1 deletion(-) diff --git a/docs/docs/zh-CN/components/page.md b/docs/docs/zh-CN/components/page.md index 0f22d959..4f60f5e3 100644 --- a/docs/docs/zh-CN/components/page.md +++ b/docs/docs/zh-CN/components/page.md @@ -80,4 +80,29 @@ export default { } +::: + +::: demo + + + + + ::: \ No newline at end of file diff --git a/docs/src/layouts/Layout.vue b/docs/src/layouts/Layout.vue index 21d49782..87a185cf 100644 --- a/docs/src/layouts/Layout.vue +++ b/docs/src/layouts/Layout.vue @@ -269,7 +269,7 @@ export default { { id: 31, title: '穿梭框', - subTitle: 'tree', + subTitle: 'transfer', path: '/zh-CN/components/transfer', }, ] diff --git a/src/module/page/index.vue b/src/module/page/index.vue index 5a47c5e7..781217ed 100644 --- a/src/module/page/index.vue +++ b/src/module/page/index.vue @@ -82,6 +82,8 @@ const totalPage = ref(Math.ceil(props.total / inlimit.value)) const currentPage: Ref = ref(1) const currentPageShow: Ref = ref(currentPage.value) +const emit = defineEmits(['jump']) + const prev = function () { if (currentPage.value === 1) { return @@ -111,5 +113,7 @@ watch(inlimit, function () { watch(currentPage, function () { currentPageShow.value = currentPage.value + emit('jump', {current: currentPage.value}) }) +