|
@@ -1,6 +1,7 @@
|
|
import Pager from './pager.vue';
|
|
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 ElInput from 'element-ui/packages/input';
|
|
import Locale from 'element-ui/src/mixins/locale';
|
|
import Locale from 'element-ui/src/mixins/locale';
|
|
|
|
|
|
export default {
|
|
export default {
|
|
@@ -34,7 +35,11 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
|
|
- popperClass: String
|
|
|
|
|
|
+ popperClass: String,
|
|
|
|
+
|
|
|
|
+ prevText: String,
|
|
|
|
+
|
|
|
|
+ nextText: String
|
|
},
|
|
},
|
|
|
|
|
|
data() {
|
|
data() {
|
|
@@ -102,7 +107,11 @@ export default {
|
|
type="button"
|
|
type="button"
|
|
class={['btn-prev', { disabled: this.$parent.internalCurrentPage <= 1 }]}
|
|
class={['btn-prev', { disabled: this.$parent.internalCurrentPage <= 1 }]}
|
|
on-click={ this.$parent.prev }>
|
|
on-click={ this.$parent.prev }>
|
|
- <i class="el-icon el-icon-arrow-left"></i>
|
|
|
|
|
|
+ {
|
|
|
|
+ this.$parent.prevText
|
|
|
|
+ ? <span>{ this.$parent.prevText }</span>
|
|
|
|
+ : <i class="el-icon el-icon-arrow-left"></i>
|
|
|
|
+ }
|
|
</button>
|
|
</button>
|
|
);
|
|
);
|
|
}
|
|
}
|
|
@@ -118,7 +127,11 @@ export default {
|
|
{ disabled: this.$parent.internalCurrentPage === this.$parent.internalPageCount || this.$parent.internalPageCount === 0 }
|
|
{ disabled: this.$parent.internalCurrentPage === this.$parent.internalPageCount || this.$parent.internalPageCount === 0 }
|
|
]}
|
|
]}
|
|
on-click={ this.$parent.next }>
|
|
on-click={ this.$parent.next }>
|
|
- <i class="el-icon el-icon-arrow-right"></i>
|
|
|
|
|
|
+ {
|
|
|
|
+ this.$parent.nextText
|
|
|
|
+ ? <span>{ this.$parent.nextText }</span>
|
|
|
|
+ : <i class="el-icon el-icon-arrow-right"></i>
|
|
|
|
+ }
|
|
</button>
|
|
</button>
|
|
);
|
|
);
|
|
}
|
|
}
|
|
@@ -166,7 +179,8 @@ export default {
|
|
|
|
|
|
components: {
|
|
components: {
|
|
ElSelect,
|
|
ElSelect,
|
|
- ElOption
|
|
|
|
|
|
+ ElOption,
|
|
|
|
+ ElInput
|
|
},
|
|
},
|
|
|
|
|
|
methods: {
|
|
methods: {
|
|
@@ -203,8 +217,8 @@ export default {
|
|
this.handleChange({ target: event.target });
|
|
this.handleChange({ target: event.target });
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- handleChange({ target }) {
|
|
|
|
- this.$parent.internalCurrentPage = this.$parent.getValidCurrentPage(target.value);
|
|
|
|
|
|
+ handleChange(value) {
|
|
|
|
+ this.$parent.internalCurrentPage = this.$parent.getValidCurrentPage(value);
|
|
this.oldValue = null;
|
|
this.oldValue = null;
|
|
},
|
|
},
|
|
reassignMaxValue(target) {
|
|
reassignMaxValue(target) {
|
|
@@ -218,18 +232,17 @@ export default {
|
|
return (
|
|
return (
|
|
<span class="el-pagination__jump">
|
|
<span class="el-pagination__jump">
|
|
{ this.t('el.pagination.goto') }
|
|
{ this.t('el.pagination.goto') }
|
|
- <input
|
|
|
|
- class="el-pagination__editor"
|
|
|
|
- type="number"
|
|
|
|
|
|
+ <el-input
|
|
|
|
+ class="el-pagination__editor is-in-pagination"
|
|
min={ 1 }
|
|
min={ 1 }
|
|
max={ this.$parent.internalPageCount }
|
|
max={ this.$parent.internalPageCount }
|
|
value={ this.$parent.internalCurrentPage }
|
|
value={ this.$parent.internalCurrentPage }
|
|
- domProps-value={ this.$parent.internalCurrentPage }
|
|
|
|
- on-change={ this.handleChange }
|
|
|
|
- on-focus={ this.handleFocus }
|
|
|
|
- on-blur={ this.handleBlur }
|
|
|
|
- on-keyup={ this.handleKeyUp }
|
|
|
|
- number/>
|
|
|
|
|
|
+ domPropsValue={ this.$parent.internalCurrentPage }
|
|
|
|
+ type="number"
|
|
|
|
+ onChange={ this.handleChange }
|
|
|
|
+ onFocus={ this.handleFocus }
|
|
|
|
+ onBlur={ this.handleBlur }
|
|
|
|
+ nativeOnKeyup={ this.handleKeyUp }/>
|
|
{ this.t('el.pagination.pageClassifier') }
|
|
{ this.t('el.pagination.pageClassifier') }
|
|
</span>
|
|
</span>
|
|
);
|
|
);
|