|
@@ -90,10 +90,13 @@
|
|
|
</div>
|
|
|
<el-pagination
|
|
|
class="__cus-pagination"
|
|
|
- :current-page="enterprise.table.pageNum"
|
|
|
+ :currentPage="enterprise.table.pageNum"
|
|
|
:page-size="enterprise.table.pageSize"
|
|
|
- :total="enterprise.table.total"
|
|
|
- layout="total,prev,pager,next,jumper"
|
|
|
+ :page-sizes="[10, 20, 30, 50, 100]"
|
|
|
+ pager-count="4"
|
|
|
+ layout="total,sizes,prev,pager,next,jumper"
|
|
|
+ :total="Number(enterprise.table.total)"
|
|
|
+ @size-change="handleSizeChange"
|
|
|
@current-change="handleCurrentChange"
|
|
|
/>
|
|
|
</div>
|
|
@@ -177,6 +180,11 @@ export default defineComponent({
|
|
|
}
|
|
|
onSearch()
|
|
|
}
|
|
|
+ const handleSizeChange = (val: Number) => {
|
|
|
+ state.enterprise.table.pageNum = 1
|
|
|
+ state.enterprise.table.pageSize = val
|
|
|
+ handleSearch()
|
|
|
+ }
|
|
|
const handleCurrentChange = (val: number) => {
|
|
|
state.enterprise.table.pageNum = val
|
|
|
handleSearch()
|
|
@@ -271,6 +279,7 @@ export default defineComponent({
|
|
|
...toRefs(state),
|
|
|
onSearch,
|
|
|
onReset,
|
|
|
+ handleSizeChange,
|
|
|
handleCurrentChange,
|
|
|
handleClick
|
|
|
}
|