Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
啊嘞嘞EC
vue-vben-admin
提交
d6f65d47
V
vue-vben-admin
项目概览
啊嘞嘞EC
/
vue-vben-admin
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vue-vben-admin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
d6f65d47
编写于
10月 12, 2021
作者:
L
Lowell
提交者:
GitHub
10月 12, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(Table): 解决设置了分页的情况下,调整表格分页条数后,如果翻页,分页条数会重置的问题。 (#1270)
上级
052eff91
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
15 addition
and
11 deletion
+15
-11
CHANGELOG.zh_CN.md
CHANGELOG.zh_CN.md
+1
-0
mock/demo/table-demo.ts
mock/demo/table-demo.ts
+1
-1
src/components/Table/src/hooks/usePagination.tsx
src/components/Table/src/hooks/usePagination.tsx
+12
-10
src/views/demo/table/FetchTable.vue
src/views/demo/table/FetchTable.vue
+1
-0
未找到文件。
CHANGELOG.zh_CN.md
浏览文件 @
d6f65d47
...
...
@@ -11,6 +11,7 @@
-
修复
`inset`
属性不起作用的问题
-
修复
`useTable`
与
`BasicTable`
实例的
`reload`
方法
`await`
表现不一致的问题
-
修复
`clickToRowSelect`
会无视行选择框 disabled 状态的问题
-
修复
`BasicTable`
在某些情况下,分页会被重置的问题
-
**BasicModal**
-
修复点击遮罩、按下
`Esc`
键都不能关闭
`Modal`
的问题
-
修复点击关闭按钮、最大化按钮旁边的空白区域也会导致
`Modal`
关闭的问题
...
...
mock/demo/table-demo.ts
浏览文件 @
d6f65d47
...
...
@@ -12,7 +12,7 @@ function getRandomPics(count = 10): string[] {
const
demoList
=
(()
=>
{
const
result
:
any
[]
=
[];
for
(
let
index
=
0
;
index
<
6
0
;
index
++
)
{
for
(
let
index
=
0
;
index
<
20
0
;
index
++
)
{
result
.
push
({
id
:
`
${
index
}
`
,
beginTime
:
'
@datetime
'
,
...
...
src/components/Table/src/hooks/usePagination.tsx
浏览文件 @
d6f65d47
import
type
{
PaginationProps
}
from
'
../types/pagination
'
;
import
type
{
BasicTableProps
}
from
'
../types/table
'
;
import
{
computed
,
unref
,
ref
,
ComputedRef
,
watch
Effect
}
from
'
vue
'
;
import
{
computed
,
unref
,
ref
,
ComputedRef
,
watch
}
from
'
vue
'
;
import
{
LeftOutlined
,
RightOutlined
}
from
'
@ant-design/icons-vue
'
;
import
{
isBoolean
}
from
'
/@/utils/is
'
;
import
{
PAGE_SIZE
,
PAGE_SIZE_OPTIONS
}
from
'
../const
'
;
...
...
@@ -27,15 +27,17 @@ export function usePagination(refProps: ComputedRef<BasicTableProps>) {
const
configRef
=
ref
<
PaginationProps
>
({});
const
show
=
ref
(
true
);
watchEffect
(()
=>
{
const
{
pagination
}
=
unref
(
refProps
);
watch
(
()
=>
unref
(
refProps
).
pagination
,
(
pagination
)
=>
{
if
(
!
isBoolean
(
pagination
)
&&
pagination
)
{
configRef
.
value
=
{
...
unref
(
configRef
),
...(
pagination
??
{}),
};
}
});
},
);
const
getPaginationInfo
=
computed
(():
PaginationProps
|
boolean
=>
{
const
{
pagination
}
=
unref
(
refProps
);
...
...
src/views/demo/table/FetchTable.vue
浏览文件 @
d6f65d47
...
...
@@ -22,6 +22,7 @@
title
:
'
远程加载示例
'
,
api
:
demoListApi
,
columns
:
getBasicColumns
(),
pagination
:
{
pageSize
:
10
},
});
function
handleReloadCurrent
()
{
reload
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录