1234567891011121314151617181920212223 |
- export default {
- methods: {
- deletePageLastItem(len = 1) {
- let page = this.current || 1;
- if (this.$refs.TableList.data.length === len) {
- page = page > 1 ? page - 1 : 1;
- }
- this.toPage && this.toPage(page);
- },
- goback() {
- this.$router.go(-1);
- },
- getRouterPath(location) {
- const { href } = this.$router.resolve(location);
- return href;
- },
- indexMethod(index) {
- const current = this.current || 1;
- const size = this.size || 10;
- return (current - 1) * size + index + 1;
- },
- },
- };
|