From f60db10134c75775088bf91cbae0c3dea56e5751 Mon Sep 17 00:00:00 2001 From: kooriookami <38392315+kooriookami@users.noreply.github.com> Date: Mon, 15 Jan 2024 14:34:26 +0800 Subject: [PATCH] fix(components): [image-viewer] Fix crossorigin (#15511) * fix(components): [image-viewer] Fix crossorigin closed #15468 * fix(components): update --- packages/components/image-viewer/src/image-viewer.ts | 1 - packages/components/image-viewer/src/image-viewer.vue | 1 - packages/components/image/src/image.vue | 1 - 3 files changed, 3 deletions(-) diff --git a/packages/components/image-viewer/src/image-viewer.ts b/packages/components/image-viewer/src/image-viewer.ts index 695c49aadd..a7cbdaccc4 100644 --- a/packages/components/image-viewer/src/image-viewer.ts +++ b/packages/components/image-viewer/src/image-viewer.ts @@ -83,7 +83,6 @@ export const imageViewerProps = buildProps({ */ crossorigin: { type: definePropType<'anonymous' | 'use-credentials' | ''>(String), - default: 'anonymous', }, } as const) export type ImageViewerProps = ExtractPropTypes diff --git a/packages/components/image-viewer/src/image-viewer.vue b/packages/components/image-viewer/src/image-viewer.vue index 8be1c2df6f..ac452f6c4e 100644 --- a/packages/components/image-viewer/src/image-viewer.vue +++ b/packages/components/image-viewer/src/image-viewer.vue @@ -127,7 +127,6 @@ const imgRefs = ref([]) const scopeEventListener = effectScope() const loading = ref(true) -const crossorigin = ref(props.crossorigin) const activeIndex = ref(props.initialIndex) const mode = shallowRef(modes.CONTAIN) const transform = ref({ diff --git a/packages/components/image/src/image.vue b/packages/components/image/src/image.vue index 682f39c7dc..093f544fae 100644 --- a/packages/components/image/src/image.vue +++ b/packages/components/image/src/image.vue @@ -85,7 +85,6 @@ const rawAttrs = useRawAttrs() const attrs = useAttrs() const imageSrc = ref() -const crossorigin = ref(props.crossorigin) const hasLoadError = ref(false) const isLoading = ref(true) const showViewer = ref(false)