diff --git a/CHANGELOG.en-US.md b/CHANGELOG.en-US.md index 338a3376e6..0a21c6c0fc 100644 --- a/CHANGELOG.en-US.md +++ b/CHANGELOG.en-US.md @@ -4,6 +4,10 @@ English | [Chinese](https://github.com/FightingDesign/fighting-design/blob/master/CHANGELOG.md) +## 0.40.3 (2023-05-22) + +- Fix unexpected margin display issue in the `f-avatar` component + ## 0.40.2 (2023-05-20) **Add** diff --git a/CHANGELOG.md b/CHANGELOG.md index 12420dff00..adf6d81a93 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ 中文 | [英文](https://github.com/FightingDesign/fighting-design/blob/master/CHANGELOG.en-US.md) +## 0.40.3 (2023-05-22) + +- 修复 `f-avatar` 组件意外的边距展示问题 + ## 0.40.2 (2023-05-20) **新增** diff --git a/docs/docs/changelog.md b/docs/docs/changelog.md index 12420dff00..adf6d81a93 100644 --- a/docs/docs/changelog.md +++ b/docs/docs/changelog.md @@ -2,6 +2,10 @@ 中文 | [英文](https://github.com/FightingDesign/fighting-design/blob/master/CHANGELOG.en-US.md) +## 0.40.3 (2023-05-22) + +- 修复 `f-avatar` 组件意外的边距展示问题 + ## 0.40.2 (2023-05-20) **新增** diff --git a/packages/fighting-design/_hooks/use-trigger/index.ts b/packages/fighting-design/_hooks/use-trigger/index.ts index 60ac4929dc..4d81cd79a8 100644 --- a/packages/fighting-design/_hooks/use-trigger/index.ts +++ b/packages/fighting-design/_hooks/use-trigger/index.ts @@ -212,8 +212,9 @@ export const useTrigger = ( */ const onBeforeEnter = (el: Element): void => { if (prop.trigger === 'hover') { - ;(el as HTMLElement).addEventListener('mouseenter', contentLave) - ;(el as HTMLElement).addEventListener('mouseleave', close) + const node = el as HTMLElement + node.addEventListener('mouseenter', contentLave) + node.addEventListener('mouseleave', close) } /** @@ -244,8 +245,9 @@ export const useTrigger = ( */ const onAfterLeave = (el: Element): void => { if (prop.trigger === 'hover') { - ;(el as HTMLElement).removeEventListener('mouseenter', contentLave) - ;(el as HTMLElement).removeEventListener('mouseleave', close) + const node = el as HTMLElement + node.removeEventListener('mouseenter', contentLave) + node.removeEventListener('mouseleave', close) } } diff --git a/packages/fighting-design/image/src/image.vue b/packages/fighting-design/image/src/image.vue index 06a79202c3..c88b81c10c 100644 --- a/packages/fighting-design/image/src/image.vue +++ b/packages/fighting-design/image/src/image.vue @@ -37,7 +37,7 @@