chore: add trailingComma
This commit is contained in:
@@ -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
@@ -80,8 +80,8 @@ Tag.props = {
|
||||
closeable: Boolean,
|
||||
type: {
|
||||
type: String,
|
||||
default: 'default'
|
||||
}
|
||||
default: 'default',
|
||||
},
|
||||
};
|
||||
|
||||
export default createComponent<TagProps>(Tag);
|
||||
|
||||
+11
-11
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user