vexip-ui / vexip-ui

A Vue 3 UI library, highly customizability, full TypeScript, performance pretty good.
https://www.vexipui.com
MIT License
1.78k stars 170 forks source link

Pagination组件选中状态 #479

Closed NJHSFNAK closed 5 months ago

NJHSFNAK commented 5 months ago

Describe the bug

Pagination通过 v-model:active设置第几项是被选中状态,当我传入的值是固定的,点击Pagination,组件的选中状态还是修改了

Reproduction

https://playground.vexipui.com/#eNp9VM1u20YQfpUFU4RLQCYbBL0IktAmMJAWaRvEvoUBw5Ijce3l7nZ3SdmV9QA99NRbb32I3trHyaGnvkJnlqQkOz+AYZEz337zzcy33EXOVtk3xqR9B9E8WnhojSw9rHLF2OJVuRGq9EIr1p+1ugY5LysveljmUdVZC8ojBPKIzb32pcTwV1/Sm8HomRO/EPAJRlaL7Mg1cJvV+39+f//rb//++dd/f/+x27ETQrbfLzKDuEV2IghfXWWF8cyB7wyTpdogv3fInyvRGm092zEL61mlW9N5qNmera1uWYztxcRQaeX8vVJLNoH5Llcb8DzZWeS3ij3Zz3KFtXhfyrnq2p/AJoiZsrna419CKgddqCKaRYOQs7Y06ZXTCqeKZxjLxwSqnbMdnQxo71DSWmweYEmTkGB/NDSx4QxlKFdKqbffhZi3HaDGIV41UF1/JH7lbiiWR8aCA9vjvg45X1pseUifX/wAN/h8SOLGO4nozyRfg9OyI40D7FmnapR9ggtqvw2tC7W5dOc3HpSbmron1N8aCNE3edTDjTBnnchCMK1TGtxbQtJSCI0rff6ZKR07e5o+DeemkZPl21IopMSBH3xTWUCf4V2YseYD3xxQAv2DLR0Bo05EjRhkGHPpdLOOycsGWrjYCl81B9BJbARPPn0NRqJBQ0+qbGHOYgrFYQLhEvBk6nh0JQaWK9bwuBZ9PGNvGo4aEmyJn5RJ3qJrp4lMxVrdKY/VBobAOiRKbAjDfCtUrbesdKxUt0laFJgoCrpA0+Q4qUvSzgEf55RgIWJCaDoaHazV9kUZfIKH8QauQiEtYchxCOroSNDE40f4HGMwqFWwZa9wdMLBoteiXnGOvtayhxkO4Qoq/7ABUWOduCjCrgrnbyUUBY55ymtJgFpXXYtfhfTnDuztBUhkQjHvHn2xE/X+XUKNv7j8/uVLoa7PJc4Sp3XHVCflkanBjw/Varw3bp5lnTLXG2y8zSaffE0fM+ezWuC/ICWtnAs7Z0ysGScxjx+TpnRgWy4D7cmiQ7M8DGna+7jOoxKJKlEJsd3dHXsbVjXK5zGhaLB0jp7TT48qpC2QH+MQdw2AP6bG1unnhE8rqUviHFx1T/sICDtHxLC74exBbwNlnaKXwPpnsNYWOJ2aPQCshXX+eSNkTSZJUt+A4sE7+B7t/wfFb17W

Steps to reproduce

No response

System Info

No response

Validations

NJHSFNAK commented 5 months ago

TabNav 组件也有相同的问题

qmhc commented 5 months ago

可以看看这个 SFC,v-model 派发的更新事件是不会再触发更新 prop 本身的,你的这个 case 需要自己分别用 prop 和事件去控制。

NJHSFNAK commented 5 months ago

抱歉,我没懂你的意思,能提供个示例嘛

qmhc commented 5 months ago

你的这种写法在原始的 vue 里也不工作,看上面的 SFC,input 里面的值依然可以被改写