@@ -14,6 +14,7 @@ import PropTypes from '../_util/vue-types';
14
14
import { getTransitionProps , Transition } from '../_util/transition' ;
15
15
import { getComponent , isValidElement , findDOMNode } from '../_util/props-util' ;
16
16
import { defaultConfigProvider } from '../config-provider' ;
17
+ import { tuple } from '../_util/type' ;
17
18
18
19
function noop ( ) { }
19
20
@@ -35,7 +36,7 @@ export const AlertProps = {
35
36
/**
36
37
* Type of Alert styles, options:`success`, `info`, `warning`, `error`
37
38
*/
38
- type : PropTypes . oneOf ( [ 'success' , 'info' , 'warning' , 'error' ] ) ,
39
+ type : PropTypes . oneOf ( tuple ( 'success' , 'info' , 'warning' , 'error' ) ) ,
39
40
/** Whether Alert can be closed */
40
41
closable : PropTypes . looseBool ,
41
42
/** Close text to show */
@@ -98,7 +99,7 @@ const Alert = defineComponent({
98
99
99
100
render ( ) {
100
101
const { prefixCls : customizePrefixCls , banner, closing, closed, $attrs } = this ;
101
- const getPrefixCls = this . configProvider . getPrefixCls ;
102
+ const { getPrefixCls } = this . configProvider ;
102
103
const prefixCls = getPrefixCls ( 'alert' , customizePrefixCls ) ;
103
104
104
105
let { closable, type, showIcon } = this ;
0 commit comments