保誠-保戶業務員媒合平台
HelenHuang
2021-12-06 1076fdc06d40646d1d6f125a3ce4d43cf4eac673
PAMapp/components/Ui/UiPagination.vue
@@ -12,20 +12,20 @@
<script lang="ts">
import { Vue, Component, Prop, Emit, Watch } from 'nuxt-property-decorator';
import { Consultants } from '~/assets/ts/models/consultant.model';
import { Consultant } from '~/assets/ts/models/consultant.model';
@Component
export default class UiPagination extends Vue {
    @Prop() totalList!: Consultants[];
    @Prop() totalList!: Consultant[];
    @Prop({default: 5}) pageSize!: number;
    currentPage = 1;
    pageList: Consultants[] = [];
    pageList: Consultant[] = [];
    mounted() {
        this.handleCurrentChange(this.currentPage);
    }
    @Emit('changePage') chagnePage(): Consultants[] {
    @Emit('changePage') chagnePage(): Consultant[] {
        return this.pageList
    }
@@ -41,7 +41,7 @@
        }
    }
    @Watch('totalList') watchtotalList(newValue: Consultants[]) {
    @Watch('totalList') watchtotalList(newValue: Consultant[]) {
        if (newValue) {
            this.handleCurrentChange(this.currentPage);
        }