chore: prefer named exports (#8315)

* chore: prefer named exports

* chore: fix import
This commit is contained in:
neverland
2021-03-09 15:39:26 +08:00
committed by GitHub
parent 5d5ff1da4a
commit 1381070a12
171 changed files with 272 additions and 263 deletions
+3 -3
View File
@@ -23,9 +23,9 @@ import { useWindowSize } from '@vant/use';
import { useExpose } from '../composables/use-expose';
// Components
import Icon from '../icon';
import Swipe, { SwipeToOptions } from '../swipe';
import Popup, { PopupCloseIconPosition } from '../popup';
import { Icon } from '../icon';
import { Swipe, SwipeToOptions } from '../swipe';
import { Popup, PopupCloseIconPosition } from '../popup';
import ImagePreviewItem from './ImagePreviewItem';
const [name, bem] = createNamespace('image-preview');
+4 -4
View File
@@ -6,10 +6,10 @@ import { range, preventDefault, createNamespace } from '../utils';
// Composables
import { useTouch } from '../composables/use-touch';
// Component
import Image from '../image';
import Loading from '../loading';
import SwipeItem from '../swipe-item';
// Components
import { Image } from '../image';
import { Loading } from '../loading';
import { SwipeItem } from '../swipe-item';
function getDistance(touches: TouchList) {
return Math.sqrt(
+2 -2
View File
@@ -36,8 +36,8 @@
<script lang="ts">
import { reactive, toRefs } from 'vue';
import { useTranslate } from '@demo/use-translate';
import ImagePreview, { ImagePreviewOptions } from '..';
import Toast from '../../toast';
import { ImagePreview, ImagePreviewOptions } from '..';
import { Toast } from '../../toast';
const i18n = {
'zh-CN': {
+1 -1
View File
@@ -1,5 +1,5 @@
import { createApp } from 'vue';
import ImagePreview from '..';
import { ImagePreview } from '..';
import ImagePreviewComponent from '../ImagePreview';
test('should expose ImagePreviewComponent in ImagePreview.Component', () => {
+4 -4
View File
@@ -1,14 +1,14 @@
import { nextTick } from 'vue';
import { DOMWrapper } from '@vue/test-utils/dist/domWrapper';
import {
mount,
later,
trigger,
triggerDrag,
mockGetBoundingClientRect,
trigger,
} from '../../../test';
import { ImagePreview } from '..';
import ImagePreviewComponent from '../ImagePreview';
import ImagePreview from '..';
import { nextTick } from 'vue';
import { DOMWrapper } from '@vue/test-utils/dist/domWrapper';
const images = [
'https://img.yzcdn.cn/1.png',