Skip to content

Commit 2c7008d

Browse files
committed
fix: image width & height not work
1 parent 49d4b31 commit 2c7008d

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

components/vc-image/src/Image.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { ImgHTMLAttributes, CSSProperties, PropType } from 'vue';
1+
import type { CSSProperties, PropType } from 'vue';
22
import { ref, watch, defineComponent, computed, onMounted, onUnmounted } from 'vue';
33
import isNumber from 'lodash-es/isNumber';
44
import cn from '../../_util/classNames';
@@ -203,8 +203,6 @@ const ImageInternal = defineComponent({
203203
placeholder,
204204
wrapperStyle,
205205
rootClassName,
206-
} = props;
207-
const {
208206
width,
209207
height,
210208
crossorigin,
@@ -215,7 +213,7 @@ const ImageInternal = defineComponent({
215213
usemap,
216214
class: cls,
217215
style,
218-
} = attrs as ImgHTMLAttributes;
216+
} = { ...props, ...attrs } as any;
219217
const { icons, maskClassName, ...dialogProps } = preview.value;
220218

221219
const wrappperClass = cn(prefixCls, wrapperClassName, rootClassName, {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy