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">
|
||||
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';
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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',
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user