From 17b9dc14f5225eb75542facdb5053f4916b9d77f Mon Sep 17 00:00:00 2001 From: tjz <415800467@qq.com> Date: Sat, 26 May 2018 22:47:19 +0800 Subject: [PATCH] fix: table emptyText not work --- components/table/Table.jsx | 6 +++++- components/vc-pagination/Pager.jsx | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/components/table/Table.jsx b/components/table/Table.jsx index 924fc9952f..683a3d28b2 100755 --- a/components/table/Table.jsx +++ b/components/table/Table.jsx @@ -925,7 +925,7 @@ export default { showHeader, expandIconColumnIndex, expandIconAsCell, - emptyText: !(loading.props && loading.spinning) && locale.emptyText, + emptyText: !(loading.props && loading.props.spinning) && locale.emptyText, }, on: this.$listeners, class: classString, @@ -949,6 +949,10 @@ export default { spinning: loading, }, } + } else { + loading = { + props: { ...loading }, + } } const table = ( diff --git a/components/vc-pagination/Pager.jsx b/components/vc-pagination/Pager.jsx index 4c5d731fcf..e8903871b5 100644 --- a/components/vc-pagination/Pager.jsx +++ b/components/vc-pagination/Pager.jsx @@ -2,7 +2,7 @@ import PropTypes from '../_util/vue-types' export default { - name: 'Page', + name: 'Pager', props: { rootPrefixCls: PropTypes.string, page: PropTypes.number,