Commit 4c6993b2 by luyt

add;page-sizes自定义分页

1 parent d67ca64b
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
<slot name="additionalContent"></slot> <slot name="additionalContent"></slot>
</template> </template>
</el-table> </el-table>
<el-pagination v-if="hasPage" background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="page[this.pageConf.pageNum]" :page-sizes="[10, 20, 30, 40]" :page-size="page[this.pageConf.pageSize]" :total="getListApi ? total : tableTotal" :layout="layout"></el-pagination> <el-pagination v-if="hasPage" background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="page[this.pageConf.pageNum]" :page-sizes="pageSizes" :page-size="page[this.pageConf.pageSize]" :total="getListApi ? total : tableTotal" :layout="layout"></el-pagination>
</div> </div>
</template> </template>
...@@ -149,6 +149,10 @@ export default { ...@@ -149,6 +149,10 @@ export default {
}) })
} }
}, },
pageSizes:{
type: Array,
default: ()=>[10, 20, 30, 40]
},
// 分页,默认有 // 分页,默认有
hasPage: { hasPage: {
type: Boolean, type: Boolean,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!