Modal add global setting, #5592, close #5383

This commit is contained in:
梁灏 2019-04-10 14:19:27 +08:00
parent 383e96a86a
commit 67d3aba1dc
2 changed files with 6 additions and 1 deletions

View file

@ -60,7 +60,9 @@
},
maskClosable: {
type: Boolean,
default: true
default () {
return !this.$IVIEW || this.$IVIEW.modal.maskClosable === '' ? true : this.$IVIEW.modal.maskClosable;
}
},
title: {
type: String

View file

@ -216,6 +216,9 @@ const install = function(Vue, opts = {}) {
closeIcon: opts.tabs ? opts.tabs.closeIcon ? opts.tabs.closeIcon : '' : '',
customCloseIcon: opts.tabs ? opts.tabs.customCloseIcon ? opts.tabs.customCloseIcon : '' : '',
closeIconSize: opts.tabs ? opts.tabs.closeIconSize ? opts.tabs.closeIconSize : '' : ''
},
modal: {
maskClosable: opts.modal ? 'maskClosable' in opts.modal ? opts.modal.maskClosable : '' : ''
}
};