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

Image组件能否加个error插槽 #5649

Open
3 tasks done
Wlisfes opened this issue Jan 31, 2024 · 1 comment · May be fixed by #6424
Open
3 tasks done

Image组件能否加个error插槽 #5649

Wlisfes opened this issue Jan 31, 2024 · 1 comment · May be fixed by #6424

Comments

@Wlisfes
Copy link

Wlisfes commented Jan 31, 2024

问题的清晰而简明的描述

图像加载失败时可以自定义error显示

建议的解决方案

<n-image } src=”“object-fit="cover">
{{
error: () =>

error
,
placeholder: () => (
placeholder
),
}}

备选方案

No response

附加上下文

No response

验证

  • 阅读 贡献指南
  • 阅读 文档
  • 检查是否已经存在请求相同功能的问题,以避免创建重复的问题。
@Wlisfes
Copy link
Author

Wlisfes commented Jan 31, 2024

<n-image src="xxxx">
    {{
        error: () => <div>error</div>,
        placeholder: () => <div>placeholder</div>
    }}
</n-image>

@jahnli jahnli linked a pull request Oct 1, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant