chore(Toast): fix missing overlay prop (#8236)

This commit is contained in:
neverland 2021-02-27 20:56:21 +08:00 committed by GitHub
parent 6da5267891
commit e6eb703207
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -18,10 +18,10 @@ export default createComponent({
props: {
icon: String,
show: Boolean,
overlay: Boolean,
message: [Number, String],
className: UnknownProp,
iconPrefix: String,
lockScroll: Boolean,
loadingType: String as PropType<LoadingType>,
forbidClick: Boolean,
overlayClass: UnknownProp,
@ -126,6 +126,7 @@ export default createComponent({
bem([props.position, { [props.type]: !props.icon }]),
props.className,
]}
overlay={props.overlay}
lockScroll={false}
transition={props.transition}
overlayClass={props.overlayClass}

View File

@ -1,11 +1,11 @@
import Toast from '../Toast';
import { mount , later } from '../../../test';
import { mount, later } from '../../../test';
test('should change overlay style after using overlay-style prop', async () => {
const wrapper = mount(Toast, {
props: {
show: true,
overlay: true,
overlayStyle: {
background: 'red',
},
@ -32,6 +32,7 @@ test('should close Toast when using closeOnClickOverlay prop and overlay is clic
const wrapper = mount(Toast, {
props: {
show: true,
overlay: true,
closeOnClickOverlay: true,
},
});