Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] AvatarGroup修改zIndex属性报错: Uncaught (in promise): Cannot read properties of undefined (reading 'style') #3114

Open
Lzzzzzzy opened this issue Jun 29, 2024 · 1 comment

Comments

@Lzzzzzzy
Copy link

NutUI 包名

@nutui/nutui-taro

NutUI 版本号

4.2.6

平台

weapp

重现链接

https://nutui.jd.com/playground/#eyJBcHAudnVlIjoiPHNjcmlwdCBzZXR1cCBsYW5nPVwidHNcIj5cbmltcG9ydCB7IERvbmdkb25nIH0gZnJvbSAnQG51dHVpL2ljb25zLXZ1ZSdcbjwvc2NyaXB0PlxuPHRlbXBsYXRlPlxuICA8bnV0LWF2YXRhci1ncm91cCBtYXgtY291bnQ9XCIzXCIgIG1heC1jb250ZW50PVwiLi4uXCIgc3Bhbj1cIi0xNlwiIHpJbmRleD1cInJpZ2h0XCI+XG4gICAgICA8bnV0LWF2YXRhcj5cbiAgICAgICAgICA8RG9uZ2RvbmcgLz5cbiAgICAgIDwvbnV0LWF2YXRhcj5cbiAgPC9udXQtYXZhdGFyLWdyb3VwPlxuPC90ZW1wbGF0ZT4ifQ==

重现步骤

  <nut-avatar-group max-count="3"  max-content="..." span="-16" zIndex="right">
      <nut-avatar>
          <Dongdong />
      </nut-avatar>
  </nut-avatar-group>

期望的结果是什么?

1.z-index属性改为right时, 当头像数量小于max-count时不显示max-content的内容

2.控制台不报错: Uncaught (in promise): Cannot read properties of undefined (reading 'style')

实际的结果是什么?

1.方向改成right后, 即使头像数量小于max-count也会显示max-content的内容
2.控制台报错Uncaught (in promise): Cannot read properties of undefined (reading 'style')

环境信息

No response

其他补充信息

No response

@Lzzzzzzy
Copy link
Author

当头像数量大于等于max-count时就不会报错

@Lzzzzzzy Lzzzzzzy changed the title AvatarGroup修改zIndex属性报错: Uncaught (in promise): Cannot read properties of undefined (reading 'style') [BUG] AvatarGroup修改zIndex属性报错: Uncaught (in promise): Cannot read properties of undefined (reading 'style') Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant