fix(Skeleton): incorrect export component name (#11247)

* fix(Skeleton): incorrect export component name

* chore: fix name
This commit is contained in:
neverland 2022-11-13 09:21:05 +08:00 committed by GitHub
parent 80270138e1
commit e6c6265e69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 13 deletions

View File

@ -1,5 +1,8 @@
<script setup lang="ts">
import VanSkeleton, { VanSkeletonParagraph, VanSkeletonImage } from '..';
import VanSkeleton, {
SkeletonImage as VanSkeletonImage,
SkeletonParagraph as VanSkeletonParagraph,
} from '..';
import VanSwitch from '../../switch';
import { ref } from 'vue';
import { cdnURL, useTranslate } from '../../../docs/site';

View File

@ -6,10 +6,10 @@ import _SkeletonParagraph from './SkeletonParagraph';
import { withInstall } from '../utils';
export const VanSkeletonImage = withInstall(_SkeletonImage);
export const VanSkeletonTitle = withInstall(_SkeletonTitle);
export const VanSkeletonAvatar = withInstall(_SkeletonAvatar);
export const VanSkeletonParagraph = withInstall(_SkeletonParagraph);
export const SkeletonImage = withInstall(_SkeletonImage);
export const SkeletonTitle = withInstall(_SkeletonTitle);
export const SkeletonAvatar = withInstall(_SkeletonAvatar);
export const SkeletonParagraph = withInstall(_SkeletonParagraph);
export const Skeleton = withInstall(_Skeleton);
export default Skeleton;
@ -43,9 +43,9 @@ export type {
declare module 'vue' {
export interface GlobalComponents {
VanSkeleton: typeof Skeleton;
VanSkeletonImage: typeof VanSkeletonImage;
VanSkeletonTitle: typeof VanSkeletonTitle;
VanSkeletonAvatar: typeof VanSkeletonAvatar;
VanSkeletonParagraph: typeof VanSkeletonParagraph;
VanSkeletonImage: typeof SkeletonImage;
VanSkeletonTitle: typeof SkeletonTitle;
VanSkeletonAvatar: typeof SkeletonAvatar;
VanSkeletonParagraph: typeof SkeletonParagraph;
}
}

View File

@ -1,5 +1,5 @@
import { mount } from '../../../test';
import { Skeleton, VanSkeletonImage } from '..';
import { Skeleton, SkeletonImage } from '..';
test('should render with row width array correctly', () => {
const wrapper = mount(Skeleton, {
@ -80,13 +80,13 @@ test('should allow to disable animation', async () => {
});
test('should skeleton image render correctly', () => {
const wrapper = mount(VanSkeletonImage);
const wrapper = mount(SkeletonImage);
expect(wrapper.html()).toMatchSnapshot();
});
test('should skeleton image works with imageSize prop', () => {
const wrapper = mount(VanSkeletonImage, {
const wrapper = mount(SkeletonImage, {
props: {
imageSize: '20rem',
},
@ -98,7 +98,7 @@ test('should skeleton image works with imageSize prop', () => {
});
test('should skeleton image works with imageShape prop', () => {
const wrapper = mount(VanSkeletonImage, {
const wrapper = mount(SkeletonImage, {
props: {
imageShape: 'round',
},