Skip to content

Commit

Permalink
fix: lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
buqiyuan committed Apr 11, 2022
1 parent e5cb832 commit 94be9f0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion components/vc-image/src/Preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const Preview = defineComponent({
props: previewProps,
emits: ['close', 'afterClose'],
setup(props, { emit, attrs }) {
const { rotateLeft, rotateRight, zoomIn, zoomOut, close, left, right } = props.icons;
const { rotateLeft, rotateRight, zoomIn, zoomOut, close, left, right } = reactive(props.icons);

const scale = ref(1);
const rotate = ref(0);
Expand Down
8 changes: 4 additions & 4 deletions components/vc-image/src/PreviewGroup.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { PropType, Ref, ComputedRef } from 'vue';
import type { PropType, Ref, ComputedRef } from 'vue';
import { ref, provide, defineComponent, inject, watch, reactive, computed, watchEffect } from 'vue';
import { ImagePreviewType, mergeDefaultValue } from './Image';
import { type ImagePreviewType, mergeDefaultValue } from './Image';
import Preview from './Preview';
import type { PreviewProps } from './Preview';

Expand Down Expand Up @@ -102,7 +102,7 @@ const Group = defineComponent({
),
);

const setPreviewUrls = (id: number, url: string, canPreview: boolean = true) => {
const setPreviewUrls = (id: number, url: string, canPreview = true) => {
previewUrls.set(id, {
url,
canPreview,
Expand All @@ -118,7 +118,7 @@ const Group = defineComponent({
isShowPreview.value = val;
};

const registerImage = (id: number, url: string, canPreview: boolean = true) => {
const registerImage = (id: number, url: string, canPreview = true) => {
const unRegister = () => {
previewUrls.delete(id);
};
Expand Down

0 comments on commit 94be9f0

Please sign in to comment.