Element给所有弹窗组件增加属性
// 一行逻辑:给 ElDialog、ElDrawer 默认加上 append-to-body
;['ElDialog', 'ElDrawer'].forEach(name => {
const comp = Vue.component(name)
if (comp) {
comp.options.props.appendToBody = {
type: Boolean,
default: true
}
}
})
// 一行逻辑:给 ElDialog、ElDrawer 默认加上 append-to-body
;['ElDialog', 'ElDrawer'].forEach(name => {
const comp = Vue.component(name)
if (comp) {
comp.options.props.appendToBody = {
type: Boolean,
default: true
}
}
})