chore: add trailingComma
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
:loading="!show"
|
||||
>
|
||||
<div class="demo-preview">
|
||||
<img src="https://img.yzcdn.cn/vant/logo.png">
|
||||
<img src="https://img.yzcdn.cn/vant/logo.png" />
|
||||
<div class="demo-content">
|
||||
<h3>{{ $t('title') }}</h3>
|
||||
<p>{{ $t('desc') }}</p>
|
||||
@@ -45,21 +45,21 @@ export default {
|
||||
showAvatar: '显示头像',
|
||||
showChildren: '显示子组件',
|
||||
title: '关于 Vant',
|
||||
desc: 'Vant 是一套轻量、可靠的移动端 Vue 组件库,提供了丰富的基础组件和业务组件,帮助开发者快速搭建移动应用。'
|
||||
desc: 'Vant 是一套轻量、可靠的移动端 Vue 组件库,提供了丰富的基础组件和业务组件,帮助开发者快速搭建移动应用。',
|
||||
},
|
||||
'en-US': {
|
||||
showAvatar: 'Show Avatar',
|
||||
showChildren: 'Show Children',
|
||||
title: 'About Vant',
|
||||
desc: 'Vant is a set of Mobile UI Components built on Vue.'
|
||||
}
|
||||
desc: 'Vant is a set of Mobile UI Components built on Vue.',
|
||||
},
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
show: false
|
||||
show: false,
|
||||
};
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
@@ -88,32 +88,32 @@ Skeleton.props = {
|
||||
avatar: Boolean,
|
||||
row: {
|
||||
type: Number,
|
||||
default: 0
|
||||
default: 0,
|
||||
},
|
||||
loading: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
default: true,
|
||||
},
|
||||
animate: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
default: true,
|
||||
},
|
||||
avatarSize: {
|
||||
type: String,
|
||||
default: '32px'
|
||||
default: '32px',
|
||||
},
|
||||
avatarShape: {
|
||||
type: String,
|
||||
default: 'round'
|
||||
default: 'round',
|
||||
},
|
||||
titleWidth: {
|
||||
type: [Number, String],
|
||||
default: '40%'
|
||||
default: '40%',
|
||||
},
|
||||
rowWidth: {
|
||||
type: [Number, String, Array],
|
||||
default: DEFAULT_ROW_WIDTH
|
||||
}
|
||||
default: DEFAULT_ROW_WIDTH,
|
||||
},
|
||||
};
|
||||
|
||||
export default createComponent<SkeletonProps>(Skeleton);
|
||||
|
||||
@@ -5,8 +5,8 @@ test('row-width array', () => {
|
||||
const wrapper = mount(Skeleton, {
|
||||
propsData: {
|
||||
row: 4,
|
||||
rowWidth: ['100%', 30, '5rem']
|
||||
}
|
||||
rowWidth: ['100%', 30, '5rem'],
|
||||
},
|
||||
});
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
||||
@@ -18,7 +18,7 @@ test('render chidren', () => {
|
||||
<div>Content</div>
|
||||
</skeleton>
|
||||
`,
|
||||
components: { Skeleton }
|
||||
components: { Skeleton },
|
||||
});
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
||||
@@ -28,8 +28,8 @@ test('avatar shape', () => {
|
||||
propsData: {
|
||||
avatar: true,
|
||||
avatarSize: 20,
|
||||
avatarShape: 'square'
|
||||
}
|
||||
avatarShape: 'square',
|
||||
},
|
||||
});
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
||||
@@ -38,8 +38,8 @@ test('disable animate', () => {
|
||||
const wrapper = mount(Skeleton, {
|
||||
propsData: {
|
||||
row: 1,
|
||||
aniamte: false
|
||||
}
|
||||
aniamte: false,
|
||||
},
|
||||
});
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user