feat(Toast): add overlay prop (#4969)

This commit is contained in:
neverland
2019-11-09 16:28:16 +08:00
committed by GitHub
parent f4f88c5254
commit 5040233234
4 changed files with 6 additions and 3 deletions
+3 -1
View File
@@ -5,10 +5,12 @@ import { isObj, isServer } from '../utils';
const defaultOptions = {
icon: '',
type: 'text',
// @deprecated
mask: false,
value: true,
message: '',
className: '',
overlay: false,
onClose: null,
onOpened: null,
duration: 2000,
@@ -65,7 +67,7 @@ function createInstance() {
function transformOptions(options) {
return {
...options,
overlay: options.mask,
overlay: options.mask || options.overlay,
mask: undefined,
duration: undefined
};