Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.en-US.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# CHANGELOG

## NEXT_VERSION

`NEXT_VERSION`

### Feats

- `n-image` shows error placeholder when `src` is empty string, closes [#7452](https://github.com/tusen-ai/naive-ui/issues/7452).

## 2.43.2

### Fixes
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.zh-CN.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# CHANGELOG

## NEXT_VERSION

`NEXT_VERSION`

### Feats

- `n-image` 当 `src` 为空字符串时显示错误占位图,关闭 [#7452](https://github.com/tusen-ai/naive-ui/issues/7452)

## 2.43.2

### Fixes
Expand Down
4 changes: 2 additions & 2 deletions src/image/src/Image.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ export default defineComponent({
})

watchEffect(() => {
void (props.src || props.imgProps?.src)
showErrorRef.value = false
const src = props.src || props.imgProps?.src
showErrorRef.value = !src
})

watchEffect((onInvalidate) => {
Expand Down
Loading