chore: add trailingComma

This commit is contained in:
陈嘉涵
2020-01-19 11:57:09 +08:00
parent e841175fe8
commit 389d68884d
269 changed files with 2706 additions and 2702 deletions
+4 -4
View File
@@ -52,16 +52,16 @@ export default {
mode: '通知栏模式',
wrapable: '多行展示',
text: '足协杯战线连续第2年上演广州德比战,上赛季半决赛上恒大以两回合5-3的总比分淘汰富力。',
customStyle: '自定义样式'
customStyle: '自定义样式',
},
'en-US': {
mode: 'Mode',
wrapable: 'Wrapable',
unscrollable: 'Disable scroll',
text: 'Only those who have the patience to do simple things perfectly ever acquire the skill to do difficult things easily.',
customStyle: 'Custom Style'
}
}
customStyle: 'Custom Style',
},
},
};
</script>
+12 -12
View File
@@ -13,16 +13,16 @@ export default createComponent({
background: String,
delay: {
type: [Number, String],
default: 1
default: 1,
},
scrollable: {
type: Boolean,
default: true
default: true,
},
speed: {
type: Number,
default: 50
}
default: 50,
},
},
data() {
@@ -32,7 +32,7 @@ export default createComponent({
duration: 0,
offsetWidth: 0,
showNoticeBar: true,
animationClass: ''
animationClass: '',
};
},
@@ -55,8 +55,8 @@ export default createComponent({
}
});
},
immediate: true
}
immediate: true,
},
},
methods: {
@@ -73,7 +73,7 @@ export default createComponent({
this.duration = (this.offsetWidth + this.wrapWidth) / this.speed;
this.animationClass = bem('play--infinite');
});
}
},
},
render() {
@@ -81,13 +81,13 @@ export default createComponent({
const barStyle = {
color: this.color,
background: this.background
background: this.background,
};
const contentStyle = {
paddingLeft: this.firstRound ? 0 : this.wrapWidth + 'px',
animationDelay: (this.firstRound ? this.delay : 0) + 's',
animationDuration: this.duration + 's'
animationDuration: this.duration + 's',
};
function LeftIcon() {
@@ -132,7 +132,7 @@ export default createComponent({
class={[
bem('content'),
this.animationClass,
{ 'van-ellipsis': !this.scrollable && !this.wrapable }
{ 'van-ellipsis': !this.scrollable && !this.wrapable },
]}
style={contentStyle}
onAnimationend={this.onAnimationEnd}
@@ -144,5 +144,5 @@ export default createComponent({
{RightIcon()}
</div>
);
}
},
});
+4 -4
View File
@@ -11,8 +11,8 @@ test('click event', () => {
test('close event', () => {
const wrapper = mount(NoticeBar, {
propsData: {
mode: 'closeable'
}
mode: 'closeable',
},
});
const close = wrapper.find('.van-notice-bar__right-icon');
@@ -30,8 +30,8 @@ test('icon slot', () => {
</notice-bar>
`,
components: {
NoticeBar
}
NoticeBar,
},
});
expect(wrapper).toMatchSnapshot();