Commit d131c6b0569f4710ec26f186e9e07728d7c6b73f
1 parent
34561a2a
Exists in
master
and in
1 other branch
Scheme支持配置初始pageSize,新增selection事件
Showing
3 changed files
with
9 additions
and
3 deletions
Show diff stats
examples/main.js
examples/views/page/test.vue
| 1 | 1 | <template> |
| 2 | - <eagle-scheme class="p-3" :list="schemeList" :option="{ $http: $axios, url: '/overseas/price/sale', showActionBtnDelete: false }"> | |
| 2 | + <eagle-scheme class="p-3" :list="schemeList" :option="{ $http: $axios, url: '/overseas/price/sale', showActionBtnDelete: false }" @selection="handleSelection"> | |
| 3 | 3 | <template #search-enableFlag="{ model }"> |
| 4 | 4 | <eagle-select v-model="model.enableFlag" :dataSource="[{ label: '正常', value: true }, { label: '禁用', value: false }]"></eagle-select> |
| 5 | 5 | </template> |
| ... | ... | @@ -69,5 +69,10 @@ export default { |
| 69 | 69 | ], |
| 70 | 70 | } |
| 71 | 71 | }, |
| 72 | + methods: { | |
| 73 | + handleSelection(selection) { | |
| 74 | + console.log(selection); | |
| 75 | + } | |
| 76 | + } | |
| 72 | 77 | } |
| 73 | 78 | </script> |
| 74 | 79 | \ No newline at end of file | ... | ... |
packages/scheme/index.vue
| ... | ... | @@ -226,7 +226,7 @@ export default { |
| 226 | 226 | // 当前页 |
| 227 | 227 | currentPage: 1, |
| 228 | 228 | // 每页最大数据量 |
| 229 | - pageSize: 10, | |
| 229 | + pageSize: this.paginationProps.pageSize || 10, | |
| 230 | 230 | // 数据总量 |
| 231 | 231 | totalCount: 0, |
| 232 | 232 | // 弹出框状态 |
| ... | ... | @@ -595,6 +595,7 @@ export default { |
| 595 | 595 | // 表格选择 |
| 596 | 596 | handleTableSelectionChange(selection) { |
| 597 | 597 | this.tableSelection = selection; |
| 598 | + this.$emit('selection', selection); | |
| 598 | 599 | }, |
| 599 | 600 | // 显示弹出框 |
| 600 | 601 | showDialog() { | ... | ... |