1
1
import PropTypes from '../_util/vue-types' ;
2
2
import { ConfigConsumerProps } from '../config-provider' ;
3
- import { getComponentFromProp , getListeners } from '../_util/props-util' ;
3
+ import { getComponent } from '../_util/props-util' ;
4
4
import LocaleReceiver from '../locale-provider/LocaleReceiver' ;
5
5
import DefaultEmptyImg from './empty' ;
6
6
import SimpleEmptyImg from './simple' ;
7
- import Base from '../base' ;
8
7
9
8
export const TransferLocale = ( ) => {
10
9
return {
@@ -30,8 +29,8 @@ const Empty = {
30
29
renderEmpty ( contentLocale ) {
31
30
const { prefixCls : customizePrefixCls , imageStyle } = this . $props ;
32
31
const prefixCls = ConfigConsumerProps . getPrefixCls ( 'empty' , customizePrefixCls ) ;
33
- const image = getComponentFromProp ( this , 'image' ) || < DefaultEmptyImg /> ;
34
- const description = getComponentFromProp ( this , 'description' ) ;
32
+ const image = getComponent ( this , 'image' ) || < DefaultEmptyImg /> ;
33
+ const description = getComponent ( this , 'description' ) ;
35
34
36
35
const des = typeof description !== 'undefined' ? description : contentLocale . description ;
37
36
const alt = typeof des === 'string' ? des : 'empty' ;
@@ -47,7 +46,7 @@ const Empty = {
47
46
imageNode = image ;
48
47
}
49
48
return (
50
- < div class = { cls } { ... { on : getListeners ( this ) } } >
49
+ < div class = { cls } >
51
50
< div class = { `${ prefixCls } -image` } style = { imageStyle } >
52
51
{ imageNode }
53
52
</ div >
@@ -66,9 +65,8 @@ Empty.PRESENTED_IMAGE_DEFAULT = DefaultEmptyImg;
66
65
Empty . PRESENTED_IMAGE_SIMPLE = SimpleEmptyImg ;
67
66
68
67
/* istanbul ignore next */
69
- Empty . install = function ( Vue ) {
70
- Vue . use ( Base ) ;
71
- Vue . component ( Empty . name , Empty ) ;
68
+ Empty . install = function ( app ) {
69
+ app . component ( Empty . name , Empty ) ;
72
70
} ;
73
71
74
72
export default Empty ;
0 commit comments