fix(upload): shows slot warning when list-type="image-card"

This commit is contained in:
07akioni 2022-06-12 21:41:37 +08:00
parent c023232932
commit 6be7adfefb
3 changed files with 8 additions and 5 deletions

View File

@ -16,6 +16,7 @@
- Fix `n-slider`'s tooltip has no enter transition when it's triggered by keyboard.
- Fix `n-slider`'s mark line wrap isn't correct when it appears at right-most position.
- Fix `n-upload`'s inner anchor element may show focus-visible outline style.
- Fix `n-upload` shows slot warning when `list-type="image-card"`.
### Feats

View File

@ -16,6 +16,7 @@
- 修复 `n-slider` 使用键盘聚焦触发 toolip 的时候没有动画
- 修复 `n-slider` 在 mark 出现在最右侧的时候换行不正常
- 修复 `n-upload` 内部的链接会出现原生 focus-visible 的 outline 样式
- 修复 `n-upload``list-type="image-card"` 时会出现 slot 相关 warning
### Feats

View File

@ -109,11 +109,12 @@ export default defineComponent({
{isImageCardTypeRef.value ? (
<NUploadDragger>
{{
default: resolveSlot(slots.default, () => [
<NBaseIcon clsPrefix={mergedClsPrefix}>
{{ default: () => <AddIcon /> }}
</NBaseIcon>
])
default: () =>
resolveSlot(slots.default, () => [
<NBaseIcon clsPrefix={mergedClsPrefix}>
{{ default: () => <AddIcon /> }}
</NBaseIcon>
])
}}
</NUploadDragger>
) : (