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