chore: add trailingComma
This commit is contained in:
@@ -33,20 +33,20 @@ export default {
|
||||
i18n: {
|
||||
'zh-CN': {
|
||||
showOverlay: '显示遮罩层',
|
||||
embeddedContent: '嵌入内容'
|
||||
embeddedContent: '嵌入内容',
|
||||
},
|
||||
'en-US': {
|
||||
showOverlay: 'Show Overlay',
|
||||
embeddedContent: 'Embedded Content'
|
||||
}
|
||||
embeddedContent: 'Embedded Content',
|
||||
},
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
showEmbedded: false
|
||||
showEmbedded: false,
|
||||
};
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ function Overlay(
|
||||
) {
|
||||
const style: { [key: string]: any } = {
|
||||
zIndex: props.zIndex,
|
||||
...props.customStyle
|
||||
...props.customStyle,
|
||||
};
|
||||
|
||||
if (isDef(props.duration)) {
|
||||
@@ -61,7 +61,7 @@ Overlay.props = {
|
||||
customStyle: Object,
|
||||
zIndex: {
|
||||
type: [Number, String],
|
||||
default: 1
|
||||
default: 1,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@ test('z-index prop', () => {
|
||||
const wrapper = mount(Overlay, {
|
||||
propsData: {
|
||||
show: true,
|
||||
zIndex: 99
|
||||
}
|
||||
zIndex: 99,
|
||||
},
|
||||
});
|
||||
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
@@ -16,8 +16,8 @@ test('class-name prop', () => {
|
||||
const wrapper = mount(Overlay, {
|
||||
propsData: {
|
||||
show: true,
|
||||
className: 'my-overlay'
|
||||
}
|
||||
className: 'my-overlay',
|
||||
},
|
||||
});
|
||||
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
@@ -28,9 +28,9 @@ test('custom style prop', () => {
|
||||
propsData: {
|
||||
show: true,
|
||||
customStyle: {
|
||||
backgroundColor: 'red'
|
||||
}
|
||||
}
|
||||
backgroundColor: 'red',
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
@@ -40,8 +40,8 @@ test('duration prop', () => {
|
||||
const wrapper = mount(Overlay, {
|
||||
propsData: {
|
||||
show: true,
|
||||
duration: 1
|
||||
}
|
||||
duration: 1,
|
||||
},
|
||||
});
|
||||
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
@@ -52,9 +52,9 @@ test('click event', () => {
|
||||
const wrapper = mount(Overlay, {
|
||||
context: {
|
||||
on: {
|
||||
click: onClick
|
||||
}
|
||||
}
|
||||
click: onClick,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
wrapper.trigger('click');
|
||||
@@ -64,8 +64,8 @@ test('click event', () => {
|
||||
test('default slot', () => {
|
||||
const wrapper = mount(Overlay, {
|
||||
scopedSlots: {
|
||||
default: () => 'Custom Default'
|
||||
}
|
||||
default: () => 'Custom Default',
|
||||
},
|
||||
});
|
||||
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
|
||||
Reference in New Issue
Block a user