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
+7 -7
View File
@@ -78,7 +78,7 @@ export default {
mark: '标记样式',
closeable: '可关闭标签',
customColor: '自定义颜色',
customSize: '标签大小'
customSize: '标签大小',
},
'en-US': {
plain: 'Plain style',
@@ -86,24 +86,24 @@ export default {
mark: 'Mark style',
closeable: 'Closeable',
customColor: 'Custom Color',
customSize: 'Custom Size'
}
customSize: 'Custom Size',
},
},
data() {
return {
show: {
primary: true,
success: true
}
success: true,
},
};
},
methods: {
close(tag) {
this.show[tag] = false;
}
}
},
},
};
</script>
+2 -2
View File
@@ -80,8 +80,8 @@ Tag.props = {
closeable: Boolean,
type: {
type: String,
default: 'default'
}
default: 'default',
},
};
export default createComponent<TagProps>(Tag);
+11 -11
View File
@@ -6,9 +6,9 @@ test('click event', () => {
const wrapper = mount(Tag, {
context: {
on: {
click
}
}
click,
},
},
});
wrapper.trigger('click');
@@ -19,13 +19,13 @@ test('close event', () => {
const close = jest.fn();
const wrapper = mount(Tag, {
propsData: {
closeable: true
closeable: true,
},
context: {
on: {
close
}
}
close,
},
},
});
wrapper.find('.van-tag__close').trigger('click');
@@ -38,14 +38,14 @@ test('should not trigger click event when close', () => {
const wrapper = mount(Tag, {
propsData: {
closeable: true
closeable: true,
},
context: {
on: {
close,
click
}
}
click,
},
},
});
wrapper.find('.van-tag__close').trigger('click');