feat: dialogStyle dialogClass deprecated #3142
							parent
							
								
									d122901de6
								
							
						
					
					
						commit
						af62058b49
					
				|  | @ -7,6 +7,7 @@ import BaseMixin from '../_util/BaseMixin'; | ||||||
| import { getTransitionProps, Transition } from '../_util/transition'; | import { getTransitionProps, Transition } from '../_util/transition'; | ||||||
| import switchScrollingEffect from '../_util/switchScrollingEffect'; | import switchScrollingEffect from '../_util/switchScrollingEffect'; | ||||||
| import getDialogPropTypes from './IDialogPropTypes'; | import getDialogPropTypes from './IDialogPropTypes'; | ||||||
|  | import warning from '../_util/warning'; | ||||||
| const IDialogPropTypes = getDialogPropTypes(); | const IDialogPropTypes = getDialogPropTypes(); | ||||||
| 
 | 
 | ||||||
| let uuid = 0; | let uuid = 0; | ||||||
|  | @ -64,6 +65,8 @@ export default defineComponent({ | ||||||
|     focusTriggerAfterClose: true, |     focusTriggerAfterClose: true, | ||||||
|   }), |   }), | ||||||
|   data() { |   data() { | ||||||
|  |     warning(!this.dialogClass, 'Modal', 'dialogClass is deprecated, please use class instead.'); | ||||||
|  |     warning(!this.dialogStyle, 'Modal', 'dialogStyle is deprecated, please use style instead.'); | ||||||
|     return { |     return { | ||||||
|       inTransition: false, |       inTransition: false, | ||||||
|       titleId: `rcDialogTitle${uuid++}`, |       titleId: `rcDialogTitle${uuid++}`, | ||||||
|  | @ -210,8 +213,8 @@ export default defineComponent({ | ||||||
|         bodyProps, |         bodyProps, | ||||||
|         forceRender, |         forceRender, | ||||||
|         closeIcon, |         closeIcon, | ||||||
|         dialogStyle, |         dialogStyle = {}, | ||||||
|         dialogClass, |         dialogClass = '', | ||||||
|       } = this; |       } = this; | ||||||
|       const dest = { ...dialogStyle }; |       const dest = { ...dialogStyle }; | ||||||
|       if (width !== undefined) { |       if (width !== undefined) { | ||||||
|  |  | ||||||
|  | @ -32,8 +32,8 @@ function IDialogPropTypes() { | ||||||
|     maskProps: PropTypes.any, |     maskProps: PropTypes.any, | ||||||
|     wrapProps: PropTypes.any, |     wrapProps: PropTypes.any, | ||||||
|     getContainer: PropTypes.any, |     getContainer: PropTypes.any, | ||||||
|     dialogStyle: PropTypes.object.def(() => ({})), |     dialogStyle: PropTypes.object, | ||||||
|     dialogClass: PropTypes.string.def(''), |     dialogClass: PropTypes.string, | ||||||
|     closeIcon: PropTypes.any, |     closeIcon: PropTypes.any, | ||||||
|     forceRender: PropTypes.looseBool, |     forceRender: PropTypes.looseBool, | ||||||
|     getOpenCount: PropTypes.func, |     getOpenCount: PropTypes.func, | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	 tanjinzhou
						tanjinzhou