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

chore: fix ssr error #2985

Merged
merged 1 commit into from
Dec 15, 2023
Merged
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
4 changes: 2 additions & 2 deletions src/image-viewer/base/ImageItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ export default defineComponent({
rotate: Number,
scale: Number,
mirror: Number,
src: [String, File] as PropType<string | File>,
placementSrc: [String, File] as PropType<string | File>,
src: [String, Object] as PropType<string | File>,
placementSrc: [String, Object] as PropType<string | File>,
},

setup(props) {
Expand Down
2 changes: 1 addition & 1 deletion src/image/props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export default {
},
/** 用于显示图片的链接或原始图片文件对象 */
src: {
type: [String, File] as PropType<TdImageProps['src']>,
type: [String, Object] as PropType<TdImageProps['src']>,
},
/** 图片链接集合,用于支持特殊格式的图片,如 `.avif` 和 `.webp`。会优先加载 `srcset` 中的图片格式,浏览器不支持的情况下,加载 `src` 设置的图片地址 */
srcset: {
Expand Down
Loading