arco-design-vue icon indicating copy to clipboard operation
arco-design-vue copied to clipboard

fix(popover): Fixed extra 4px margin that appears when title is empty

Open briantang1117 opened this issue 1 year ago • 1 comments

Types of changes

  • [ ] New feature
  • [x] Bug fix
  • [ ] Enhancement
  • [ ] Component style change
  • [ ] Typescript definition change
  • [ ] Documentation change
  • [ ] Coding style change
  • [ ] Refactoring
  • [ ] Test cases
  • [ ] Continuous integration
  • [ ] Breaking change
  • [ ] Others

Background and context

修复popover组件的title属性以及slot为空时出现的4px下变局

Solution

判断有无 title 属性和 title slot,如果均没有则隐藏整个 title div

How is the change tested?

截屏2024-04-26 12 15 16 截屏2024-04-26 12 15 12

Changelog

Component Changelog(CN) Changelog(EN) Related issues
popover 修复没有 title 为空时边距问题 Fixed an issue where there was no space time margin for title

Checklist:

  • [x] Test suite passes (npm run test)
  • [x] Provide changelog for relevant changes (e.g. bug fixes and new features) if applicable.
  • [x] Changes are submitted to the appropriate branch (e.g. features should be submitted to feature branch and others should be submitted to main branch)

Other information

briantang1117 avatar Apr 26 '24 04:04 briantang1117

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders
Open Preview

codesandbox[bot] avatar Apr 26 '24 04:04 codesandbox[bot]