Skip to content

Commit

Permalink
fix(n-upload): default slot non-function value encountered warning
Browse files Browse the repository at this point in the history
  • Loading branch information
jahnli committed Jan 24, 2025
1 parent abea5be commit ca6bfcf
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
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`

### Fixes

- Fix `n-upload` default slot non-function value encountered warning.

## 2.41.0

`2025-01-05`
Expand Down
10 changes: 9 additions & 1 deletion CHANGELOG.zh-CN.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# CHANGELOG

## NEXT_VERSION

`NEXT_VERSION`

### Fixes

- 修复 `n-upload` 默认插槽非函数的警告问题

## 2.41.0

`2025-01-05`
Expand Down Expand Up @@ -2957,7 +2965,7 @@
### Fixes

- 修复 `n-date-picker` `n-provider` 传递 `date-locale` 属性无效,关闭 [#250](https://github.com/tusen-ai/naive-ui/issues/250)
- 修复 `n-input` clear button placeholder prevent clicking on actual component [#288](https://github.com/tusen-ai/naive-ui/issues/288)
- Fix `n-input` clear button placeholder prevent clicking on actual component [#288](https://github.com/tusen-ai/naive-ui/issues/288)
- 修复 `n-carousel` 点击当前页对应的控制按钮时,组件显示异常
- 修复 `n-menu` 折叠时 `render-label` 对于 tooltip 不生效
- 修复 `n-dropdown` 不能在选项中渲染 `n-popover`
Expand Down
4 changes: 2 additions & 2 deletions src/upload/src/UploadFile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -265,11 +265,11 @@ export default defineComponent({
renderIcon(file)
) : isImageFile(file) ? (
<NBaseIcon clsPrefix={clsPrefix}>
{{ default: renderImageIcon }}
{{ default: () => renderImageIcon }}
</NBaseIcon>
) : (
<NBaseIcon clsPrefix={clsPrefix}>
{{ default: renderDocumentIcon }}
{{ default: () => renderDocumentIcon }}
</NBaseIcon>
)}
</span>
Expand Down

0 comments on commit ca6bfcf

Please sign in to comment.