[Bug]: 分页组件currentPage、totalNumber两个属性双向绑定问题
Opened this issue · 1 comments
dadalxx commented
Version
latest
Angular Version
latest
Link to minimal reproduction
https://opentiny.design/tiny-ng/components/pagination
Step to reproduce
分页组件当前页和总数两个输入属性类型为双向绑定的,这点让人很疑惑:
1、分页组件内部currentPage、totalNumber被修改时会直接污染输入属性
2、业界众多分页组件,大部分都是单向绑定的
What is expected
No response
What is actually happening
No response
Any additional comments (optional)
No response
qiesuijianwu commented
分页和表格联动,前台搜索之后总数变化,以及总数变化导致当前页变化,需要对外通知;用户输入的当前页不在可选页码范围内转化为合法页码也需要对外通知,例如:输入 -1 调整为1;或者总页数为 10 ,输入11需要调整为10