Skip to content

Commit

Permalink
fix(dropdown): [dropdown] fixed the data disorder issue caused by the…
Browse files Browse the repository at this point in the history
… composite scenario of two-layer components and self-invoking groups. (#2553)

* fix(drop-down): [drop-down] fixed the data confusion issue of dropdwon-item component

* fix(drop-down): [drop-down] fixed the data confusion issue of dropdwon-item component

* fix(drop-down): 优化文字描述

* fix: fix e2e error
  • Loading branch information
zzcr authored Nov 25, 2024
1 parent 0eb0078 commit db9f6cc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/sites/demos/pc/app/dropdown/visible-arrow.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ test('显示箭头', async ({ page }) => {
await dropdownTrigger.hover()
await expect(dropDownMenu).toBeVisible()
await expect(arrow).toBeVisible()
await expect(arrow).toHaveCSS('top', '-8px')
await expect(arrow).toHaveCSS('top', '-7px')
})
8 changes: 6 additions & 2 deletions packages/vue/src/dropdown-item/src/pc.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@
:key="index"
:label="item[state.textField]"
:item-data="item"
:_constants="_constants"
:icon="item.icon"
:is-mono="true"
:disabled="item.disabled"
:divided="item.divided"
:tip="item.tip"
Expand Down Expand Up @@ -102,13 +104,15 @@ export default defineComponent({
'textField',
'tip',
'tipPosition',
'effect'
'effect',
'isMono'
],
components: {
IconLeftWardArrow: iconLeftWardArrow()
},
setup(props, context) {
return setup({ props, context, renderless, api }) as unknown as IDropdownItemApi
// 修复 <双层组件 + 自调用组件> 复合场景导致的数据混乱问题
return setup({ props, context, renderless, api, mono: props.isMono }) as unknown as IDropdownItemApi
}
})
</script>

0 comments on commit db9f6cc

Please sign in to comment.