mirror of https://github.com/ElemeFE/element
🐛 [Table] fixed incompatibility with vue-i18n (#1587)
parent
aea15ef5cf
commit
5cde77b37d
|
@ -29,7 +29,7 @@
|
||||||
:style="{ width: layout.bodyWidth ? layout.bodyWidth - (layout.scrollY ? layout.gutterWidth : 0 ) + 'px' : '' }">
|
:style="{ width: layout.bodyWidth ? layout.bodyWidth - (layout.scrollY ? layout.gutterWidth : 0 ) + 'px' : '' }">
|
||||||
</table-body>
|
</table-body>
|
||||||
<div class="el-table__empty-block" v-if="!data || data.length === 0">
|
<div class="el-table__empty-block" v-if="!data || data.length === 0">
|
||||||
<span class="el-table__empty-text">{{ emptyText }}</span>
|
<span class="el-table__empty-text">{{ emptyText || t('el.table.emptyText') }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="el-table__fixed" ref="fixedWrapper"
|
<div class="el-table__fixed" ref="fixedWrapper"
|
||||||
|
@ -102,7 +102,7 @@
|
||||||
import throttle from 'throttle-debounce/throttle';
|
import throttle from 'throttle-debounce/throttle';
|
||||||
import debounce from 'throttle-debounce/debounce';
|
import debounce from 'throttle-debounce/debounce';
|
||||||
import { addResizeListener, removeResizeListener } from 'element-ui/src/utils/resize-event';
|
import { addResizeListener, removeResizeListener } from 'element-ui/src/utils/resize-event';
|
||||||
import { t } from 'element-ui/src/locale';
|
import Locale from 'element-ui/src/mixins/locale';
|
||||||
import TableStore from './table-store';
|
import TableStore from './table-store';
|
||||||
import TableLayout from './table-layout';
|
import TableLayout from './table-layout';
|
||||||
import TableBody from './table-body';
|
import TableBody from './table-body';
|
||||||
|
@ -114,7 +114,7 @@
|
||||||
export default {
|
export default {
|
||||||
name: 'el-table',
|
name: 'el-table',
|
||||||
|
|
||||||
mixins: [Migrating],
|
mixins: [Migrating, Locale],
|
||||||
|
|
||||||
props: {
|
props: {
|
||||||
data: {
|
data: {
|
||||||
|
@ -152,12 +152,7 @@
|
||||||
|
|
||||||
highlightCurrentRow: Boolean,
|
highlightCurrentRow: Boolean,
|
||||||
|
|
||||||
emptyText: {
|
emptyText: String
|
||||||
type: String,
|
|
||||||
default() {
|
|
||||||
return t('el.table.emptyText');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
|
|
Loading…
Reference in New Issue