From 86fab2bb908a7b987a1ea6e2d3a032d2f8dcd324 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E6=99=A8=E6=99=A8?= Date: Wed, 26 Apr 2023 17:48:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=96=E6=B6=88=E5=88=86=E9=A1=B5=E6=BB=9A?= =?UTF-8?q?=E5=8A=A8=E9=A1=B6=E9=83=A8=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Pagination/index.vue | 3 ++- src/utils/DefaultCheck.js | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 src/utils/DefaultCheck.js diff --git a/src/components/Pagination/index.vue b/src/components/Pagination/index.vue index 56f5a6b..929a684 100644 --- a/src/components/Pagination/index.vue +++ b/src/components/Pagination/index.vue @@ -96,7 +96,8 @@ export default { handleCurrentChange(val) { this.$emit('pagination', { page: val, limit: this.pageSize }) if (this.autoScroll) { - scrollTo(0, 800) + //滚动效果 + // scrollTo(0, 800) } } } diff --git a/src/utils/DefaultCheck.js b/src/utils/DefaultCheck.js new file mode 100644 index 0000000..5eec157 --- /dev/null +++ b/src/utils/DefaultCheck.js @@ -0,0 +1,9 @@ +export function DefaultCheck (line,dataList){ + this.$nextTick(() => { + if (line === null) { + this.$refs.refDom.setCurrentRow(dataList[0]); + } else { + this.$refs.refDom.setCurrentRow(line,true); + } + }); +} \ No newline at end of file