From af62058b4919c814da0302a4bae868ca48e14641 Mon Sep 17 00:00:00 2001
From: tanjinzhou <415800467@qq.com>
Date: Thu, 12 Nov 2020 13:41:02 +0800
Subject: [PATCH] feat: dialogStyle dialogClass deprecated #3142

---
 components/vc-dialog/Dialog.jsx          | 7 +++++--
 components/vc-dialog/IDialogPropTypes.js | 4 ++--
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/components/vc-dialog/Dialog.jsx b/components/vc-dialog/Dialog.jsx
index d06606c61..f29c9bba6 100644
--- a/components/vc-dialog/Dialog.jsx
+++ b/components/vc-dialog/Dialog.jsx
@@ -7,6 +7,7 @@ import BaseMixin from '../_util/BaseMixin';
 import { getTransitionProps, Transition } from '../_util/transition';
 import switchScrollingEffect from '../_util/switchScrollingEffect';
 import getDialogPropTypes from './IDialogPropTypes';
+import warning from '../_util/warning';
 const IDialogPropTypes = getDialogPropTypes();
 
 let uuid = 0;
@@ -64,6 +65,8 @@ export default defineComponent({
     focusTriggerAfterClose: true,
   }),
   data() {
+    warning(!this.dialogClass, 'Modal', 'dialogClass is deprecated, please use class instead.');
+    warning(!this.dialogStyle, 'Modal', 'dialogStyle is deprecated, please use style instead.');
     return {
       inTransition: false,
       titleId: `rcDialogTitle${uuid++}`,
@@ -210,8 +213,8 @@ export default defineComponent({
         bodyProps,
         forceRender,
         closeIcon,
-        dialogStyle,
-        dialogClass,
+        dialogStyle = {},
+        dialogClass = '',
       } = this;
       const dest = { ...dialogStyle };
       if (width !== undefined) {
diff --git a/components/vc-dialog/IDialogPropTypes.js b/components/vc-dialog/IDialogPropTypes.js
index 1d3849bb6..300962972 100644
--- a/components/vc-dialog/IDialogPropTypes.js
+++ b/components/vc-dialog/IDialogPropTypes.js
@@ -32,8 +32,8 @@ function IDialogPropTypes() {
     maskProps: PropTypes.any,
     wrapProps: PropTypes.any,
     getContainer: PropTypes.any,
-    dialogStyle: PropTypes.object.def(() => ({})),
-    dialogClass: PropTypes.string.def(''),
+    dialogStyle: PropTypes.object,
+    dialogClass: PropTypes.string,
     closeIcon: PropTypes.any,
     forceRender: PropTypes.looseBool,
     getOpenCount: PropTypes.func,