vue-vben-admin icon indicating copy to clipboard operation
vue-vben-admin copied to clipboard

refactor: 重构表单收缩部分代码 (#2124)

Open wjc112233 opened this issue 3 years ago • 0 comments
trafficstars

原先的代码逻辑是把isAdvanced属性添加在每一个schema上(详见useAdvanced.ts的updateAdvanced方法),这种直接修改计算属性的方式本身就不规范,而且会导致如果schemas这个数组被更新后,每个schema上的isAdvanced属性就丢失了,页面会出现闪烁的情况。

具体可以看 "组件/Table/开启搜索区域"这个页面,就是因为schemas被重新设置了之后,导致出现闪烁的情况。

此次修改的代码范围小,应该不会产生什么副作用。

General

✏️ Mark the necessary items without changing the structure of the PR template.

  • [x] Pull request template structure not broken

Type

ℹ️ What types of changes does your code introduce?

👉 Put an x in the boxes that apply

  • [x] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [ ] This change requires a documentation update

Checklist

ℹ️ Check all checkboxes - this will indicate that you have done everything in accordance with the rules in CONTRIBUTING.

👉 Put an x in the boxes that apply.

  • [x] My code follows the style guidelines of this project
  • [x] Is the code format correct
  • [x] Is the git submission information standard?
  • [x] My code follows the style guidelines of this project
  • [x] I have performed a self-review of my own code
  • [ ] I have commented my code, particularly in hard-to-understand areas
  • [ ] I have made corresponding changes to the documentation
  • [ ] My changes generate no new warnings
  • [ ] I have added tests that prove my fix is effective or that my feature works
  • [ ] New and existing unit tests pass locally with my changes
  • [ ] Any dependent changes have been merged and published in downstream modules

wjc112233 avatar Jul 28 '22 08:07 wjc112233