mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
fix(Skeleton): incorrect export component name (#11247)
* fix(Skeleton): incorrect export component name * chore: fix name
This commit is contained in:
parent
80270138e1
commit
e6c6265e69
@ -1,5 +1,8 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import VanSkeleton, { VanSkeletonParagraph, VanSkeletonImage } from '..';
|
import VanSkeleton, {
|
||||||
|
SkeletonImage as VanSkeletonImage,
|
||||||
|
SkeletonParagraph as VanSkeletonParagraph,
|
||||||
|
} from '..';
|
||||||
import VanSwitch from '../../switch';
|
import VanSwitch from '../../switch';
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { cdnURL, useTranslate } from '../../../docs/site';
|
import { cdnURL, useTranslate } from '../../../docs/site';
|
||||||
|
@ -6,10 +6,10 @@ import _SkeletonParagraph from './SkeletonParagraph';
|
|||||||
|
|
||||||
import { withInstall } from '../utils';
|
import { withInstall } from '../utils';
|
||||||
|
|
||||||
export const VanSkeletonImage = withInstall(_SkeletonImage);
|
export const SkeletonImage = withInstall(_SkeletonImage);
|
||||||
export const VanSkeletonTitle = withInstall(_SkeletonTitle);
|
export const SkeletonTitle = withInstall(_SkeletonTitle);
|
||||||
export const VanSkeletonAvatar = withInstall(_SkeletonAvatar);
|
export const SkeletonAvatar = withInstall(_SkeletonAvatar);
|
||||||
export const VanSkeletonParagraph = withInstall(_SkeletonParagraph);
|
export const SkeletonParagraph = withInstall(_SkeletonParagraph);
|
||||||
export const Skeleton = withInstall(_Skeleton);
|
export const Skeleton = withInstall(_Skeleton);
|
||||||
|
|
||||||
export default Skeleton;
|
export default Skeleton;
|
||||||
@ -43,9 +43,9 @@ export type {
|
|||||||
declare module 'vue' {
|
declare module 'vue' {
|
||||||
export interface GlobalComponents {
|
export interface GlobalComponents {
|
||||||
VanSkeleton: typeof Skeleton;
|
VanSkeleton: typeof Skeleton;
|
||||||
VanSkeletonImage: typeof VanSkeletonImage;
|
VanSkeletonImage: typeof SkeletonImage;
|
||||||
VanSkeletonTitle: typeof VanSkeletonTitle;
|
VanSkeletonTitle: typeof SkeletonTitle;
|
||||||
VanSkeletonAvatar: typeof VanSkeletonAvatar;
|
VanSkeletonAvatar: typeof SkeletonAvatar;
|
||||||
VanSkeletonParagraph: typeof VanSkeletonParagraph;
|
VanSkeletonParagraph: typeof SkeletonParagraph;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { mount } from '../../../test';
|
import { mount } from '../../../test';
|
||||||
import { Skeleton, VanSkeletonImage } from '..';
|
import { Skeleton, SkeletonImage } from '..';
|
||||||
|
|
||||||
test('should render with row width array correctly', () => {
|
test('should render with row width array correctly', () => {
|
||||||
const wrapper = mount(Skeleton, {
|
const wrapper = mount(Skeleton, {
|
||||||
@ -80,13 +80,13 @@ test('should allow to disable animation', async () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
test('should skeleton image render correctly', () => {
|
test('should skeleton image render correctly', () => {
|
||||||
const wrapper = mount(VanSkeletonImage);
|
const wrapper = mount(SkeletonImage);
|
||||||
|
|
||||||
expect(wrapper.html()).toMatchSnapshot();
|
expect(wrapper.html()).toMatchSnapshot();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('should skeleton image works with imageSize prop', () => {
|
test('should skeleton image works with imageSize prop', () => {
|
||||||
const wrapper = mount(VanSkeletonImage, {
|
const wrapper = mount(SkeletonImage, {
|
||||||
props: {
|
props: {
|
||||||
imageSize: '20rem',
|
imageSize: '20rem',
|
||||||
},
|
},
|
||||||
@ -98,7 +98,7 @@ test('should skeleton image works with imageSize prop', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
test('should skeleton image works with imageShape prop', () => {
|
test('should skeleton image works with imageShape prop', () => {
|
||||||
const wrapper = mount(VanSkeletonImage, {
|
const wrapper = mount(SkeletonImage, {
|
||||||
props: {
|
props: {
|
||||||
imageShape: 'round',
|
imageShape: 'round',
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user