"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const Common_1 = require("../Common");
const fsExtra = require("fs-extra");
const VueParse_1 = require("../../generator/VueParse");
const path = require("path");
const config_1 = require("../../../config");
class Pagination extends Common_1.default {
    constructor(data) {
        super();
        this.name = 'Pagination';
        this.init();
    }
    init() {
        const fileStr = fsExtra.readFileSync(path.join(config_1.default.templatePath, 'scene/BaseTable', 'index.vue'), 'utf8');
        this.vueParse = new VueParse_1.default(this.uuid, fileStr);
    }
    fragment() {
        const type = this.storage.get('preview_view_status') || 0;
        if (type === 0) {
            return `
        <pagination v-show="total>0" :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
      `;
        }
        else {
            return `
        <div class="custom-inline">
          <pagination v-show="total>0" :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
        </div>`;
        }
    }
}
exports.default = Pagination;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbGliL2FkYXB0ZXItdnVlL21vZHVsZXMvY3VzdG9tL1BhZ2luYXRpb24vaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSxzQ0FBK0I7QUFDL0Isb0NBQW9DO0FBQ3BDLHVEQUFnRDtBQUNoRCw2QkFBNkI7QUFDN0IsNENBQXFDO0FBRXJDLE1BQXFCLFVBQVcsU0FBUSxnQkFBTTtJQUk1QyxZQUFhLElBQVM7UUFDcEIsS0FBSyxFQUFFLENBQUM7UUFKVixTQUFJLEdBQVcsWUFBWSxDQUFDO1FBSzFCLElBQUksQ0FBQyxJQUFJLEVBQUUsQ0FBQztJQUNkLENBQUM7SUFFTyxJQUFJO1FBQ1YsTUFBTSxPQUFPLEdBQUcsT0FBTyxDQUFDLFlBQVksQ0FBQyxJQUFJLENBQUMsSUFBSS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