Skip to content

Commit 94be9f0

Browse files
committed
fix: lint error
1 parent e5cb832 commit 94be9f0

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

components/vc-image/src/Preview.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ const Preview = defineComponent({
6161
props: previewProps,
6262
emits: ['close', 'afterClose'],
6363
setup(props, { emit, attrs }) {
64-
const { rotateLeft, rotateRight, zoomIn, zoomOut, close, left, right } = props.icons;
64+
const { rotateLeft, rotateRight, zoomIn, zoomOut, close, left, right } = reactive(props.icons);
6565

6666
const scale = ref(1);
6767
const rotate = ref(0);

components/vc-image/src/PreviewGroup.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { PropType, Ref, ComputedRef } from 'vue';
1+
import type { PropType, Ref, ComputedRef } from 'vue';
22
import { ref, provide, defineComponent, inject, watch, reactive, computed, watchEffect } from 'vue';
3-
import { ImagePreviewType, mergeDefaultValue } from './Image';
3+
import { type ImagePreviewType, mergeDefaultValue } from './Image';
44
import Preview from './Preview';
55
import type { PreviewProps } from './Preview';
66

@@ -102,7 +102,7 @@ const Group = defineComponent({
102102
),
103103
);
104104

105-
const setPreviewUrls = (id: number, url: string, canPreview: boolean = true) => {
105+
const setPreviewUrls = (id: number, url: string, canPreview = true) => {
106106
previewUrls.set(id, {
107107
url,
108108
canPreview,
@@ -118,7 +118,7 @@ const Group = defineComponent({
118118
isShowPreview.value = val;
119119
};
120120

121-
const registerImage = (id: number, url: string, canPreview: boolean = true) => {
121+
const registerImage = (id: number, url: string, canPreview = true) => {
122122
const unRegister = () => {
123123
previewUrls.delete(id);
124124
};

0 commit comments

Comments
 (0)