mirror of https://github.com/ElemeFE/element
parent
a8373aa632
commit
2d5bc59c67
|
@ -70,6 +70,7 @@
|
||||||
"cross-env": "^3.1.3",
|
"cross-env": "^3.1.3",
|
||||||
"css-loader": "^0.24.0",
|
"css-loader": "^0.24.0",
|
||||||
"es6-promise": "^4.0.5",
|
"es6-promise": "^4.0.5",
|
||||||
|
"eslint": "^3.10.2",
|
||||||
"extract-text-webpack-plugin": "^1.0.1",
|
"extract-text-webpack-plugin": "^1.0.1",
|
||||||
"file-loader": "^0.9.0",
|
"file-loader": "^0.9.0",
|
||||||
"file-save": "^0.2.0",
|
"file-save": "^0.2.0",
|
||||||
|
|
|
@ -2,7 +2,7 @@ import Pager from './pager.vue';
|
||||||
import ElSelect from 'element-ui/packages/select';
|
import ElSelect from 'element-ui/packages/select';
|
||||||
import ElOption from 'element-ui/packages/option';
|
import ElOption from 'element-ui/packages/option';
|
||||||
import Migrating from 'element-ui/src/mixins/migrating';
|
import Migrating from 'element-ui/src/mixins/migrating';
|
||||||
import { t } from 'element-ui/src/locale';
|
import Locale from 'element-ui/src/mixins/locale';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ElPagination',
|
name: 'ElPagination',
|
||||||
|
@ -117,6 +117,8 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
Sizes: {
|
Sizes: {
|
||||||
|
mixins: [Locale],
|
||||||
|
|
||||||
created() {
|
created() {
|
||||||
if (Array.isArray(this.$parent.pageSizes)) {
|
if (Array.isArray(this.$parent.pageSizes)) {
|
||||||
this.$parent.internalPageSize = this.$parent.pageSizes.indexOf(this.$parent.pageSize) > -1
|
this.$parent.internalPageSize = this.$parent.pageSizes.indexOf(this.$parent.pageSize) > -1
|
||||||
|
@ -137,7 +139,7 @@ export default {
|
||||||
this.$parent.pageSizes.map(item =>
|
this.$parent.pageSizes.map(item =>
|
||||||
<el-option
|
<el-option
|
||||||
value={ item }
|
value={ item }
|
||||||
label={ item + ' ' + t('el.pagination.pagesize') }>
|
label={ item + ' ' + this.t('el.pagination.pagesize') }>
|
||||||
</el-option>
|
</el-option>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -162,6 +164,8 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
Jumper: {
|
Jumper: {
|
||||||
|
mixins: [Locale],
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
oldValue: null
|
oldValue: null
|
||||||
|
@ -186,7 +190,7 @@ export default {
|
||||||
render(h) {
|
render(h) {
|
||||||
return (
|
return (
|
||||||
<span class="el-pagination__jump">
|
<span class="el-pagination__jump">
|
||||||
{ t('el.pagination.goto') }
|
{ this.t('el.pagination.goto') }
|
||||||
<input
|
<input
|
||||||
class="el-pagination__editor"
|
class="el-pagination__editor"
|
||||||
type="number"
|
type="number"
|
||||||
|
@ -197,17 +201,19 @@ export default {
|
||||||
on-focus={ this.handleFocus }
|
on-focus={ this.handleFocus }
|
||||||
style={{ width: '30px' }}
|
style={{ width: '30px' }}
|
||||||
number/>
|
number/>
|
||||||
{ t('el.pagination.pageClassifier') }
|
{ this.t('el.pagination.pageClassifier') }
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
Total: {
|
Total: {
|
||||||
|
mixins: [Locale],
|
||||||
|
|
||||||
render(h) {
|
render(h) {
|
||||||
return (
|
return (
|
||||||
typeof this.$parent.total === 'number'
|
typeof this.$parent.total === 'number'
|
||||||
? <span class="el-pagination__total">{ t('el.pagination.total', { total: this.$parent.total }) }</span>
|
? <span class="el-pagination__total">{ this.t('el.pagination.total', { total: this.$parent.total }) }</span>
|
||||||
: ''
|
: ''
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue