diff --git a/src/drawer/src/Drawer.vue b/src/drawer/src/Drawer.vue index 3ffa5d420..46219ceff 100644 --- a/src/drawer/src/Drawer.vue +++ b/src/drawer/src/Drawer.vue @@ -104,7 +104,7 @@ export default { validator () { warn( 'drawer', - '`draw-style` is deprecated, please use `body-style` instead.' + '`drawer-style` is deprecated, please use `style` instead.' ) return true }, @@ -114,7 +114,7 @@ export default { validator () { warn( 'drawer', - '`draw-class` is deprecated, please use `body-class` instead.' + '`drawer-class` is deprecated, please use `class` instead.' ) return true }, diff --git a/src/modal/src/BodyWrapper.vue b/src/modal/src/BodyWrapper.vue index 436eeecbb..8c8de29be 100644 --- a/src/modal/src/BodyWrapper.vue +++ b/src/modal/src/BodyWrapper.vue @@ -24,7 +24,6 @@ import { nextTick, reactive, toRefs, toRef, watch, ref, inject } from 'vue' import { clickoutside } from 'vdirs' -import { useCompitable } from 'vooks' import { NScrollbar } from '../../scrollbar' import { NDialog } from '../../dialog' import { NCard } from '../../card' @@ -162,7 +159,6 @@ export default { return { NModal, mousePosition: toRef(NModal, 'mousePosition'), - compitableBodyStyle: useCompitable(props, ['overlayStyle', 'bodyStyle']), bodyRef: ref(null), ...dataRefs } diff --git a/src/modal/src/Modal.js b/src/modal/src/Modal.js index e0a75ca61..a7c355d2d 100644 --- a/src/modal/src/Modal.js +++ b/src/modal/src/Modal.js @@ -81,6 +81,18 @@ export default { default: null }, // deprecated + overlayStyle: { + validator () { + if (__DEV__) { + warn( + 'modal', + '`overlay-style` is deprecated, please use `style` instead.' + ) + } + return true + }, + default: undefined + }, onBeforeHide: { validator () { if (__DEV__) { @@ -183,6 +195,10 @@ export default { NModalBodyWrapper, { ...this.$attrs, + style: { + ...this.$attrs.style, + ...this.overlayStyle + }, ref: 'bodyWrapper', ...omit(this.$props, ['maskClosable', 'to']), theme: this.mergedTheme, diff --git a/src/modal/src/presetProps.js b/src/modal/src/presetProps.js index 89d237458..b5f8770f2 100644 --- a/src/modal/src/presetProps.js +++ b/src/modal/src/presetProps.js @@ -1,8 +1,4 @@ export default { - bodyStyle: { - type: Object, - default: undefined - }, // For preset: confirm, card title: { type: String,