wocwin / t-ui-plus

基于vue3+ts+Element-plus二次封装基础组件文档;vue3基础组件文档
https://wocwin.github.io/t-ui-plus/
MIT License
272 stars 52 forks source link

fix: 查询条件组件下拉框联动赋值导致表单重置 #41

Open xpretty opened 5 months ago

wocwin commented 5 months ago

录制一下修复解决了哪个问题

xpretty commented 5 months ago

https://github.com/wocwin/t-ui-plus/assets/34908213/33a05bcc-51a2-40ed-a290-3c1739feaeac

select联动listTypeInfo重新赋值,form被重置

xpretty commented 5 months ago

https://github.com/wocwin/t-ui-plus/assets/34908213/5e609524-ec63-43c1-a04e-feba3e643c33

修复后

wocwin commented 5 months ago

你拉最新代码,我这边本地重现不了github文档也一样重现不了你这种问题,而且你这样改也会出现新的问题(动态设置默认值失效)

xpretty commented 5 months ago

动态改变Select数据表单会被清空.docx

wocwin commented 5 months ago

需要这样改 image

xpretty commented 5 months ago

if opts[field].defaultVal条件前置的话每次watch opts时 已经修改的值会被重置为默认值defaultVal image

wocwin commented 5 months ago

确实需要重置后回显默认值 image

xpretty commented 5 months ago

configChangedReset会导致每次动态更新selsct data都需要修改configChangedReset且存在其他问题;

解决动态切换默认值可以让开发者自己暴露组件:key更新