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
| @@ -18,7 +18,7 @@ const request = axios.create({ | @@ -18,7 +18,7 @@ const request = axios.create({ | ||
| 18 | timeout: 1000 * 60, | 18 | timeout: 1000 * 60, |
| 19 | withCredentials: true, | 19 | withCredentials: true, |
| 20 | headers: { | 20 | headers: { |
| 21 | - token: '5d3cb24cecd69e7d61d3c84912735e09', | 21 | + token: 'd7c11a1011b66691a8f55a8cf1b35b30', |
| 22 | 'Accept-Language': 'zh-CN' | 22 | 'Accept-Language': 'zh-CN' |
| 23 | } | 23 | } |
| 24 | }); | 24 | }); |
examples/views/page/test.vue
| 1 | <template> | 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 | <template #search-enableFlag="{ model }"> | 3 | <template #search-enableFlag="{ model }"> |
| 4 | <eagle-select v-model="model.enableFlag" :dataSource="[{ label: '正常', value: true }, { label: '禁用', value: false }]"></eagle-select> | 4 | <eagle-select v-model="model.enableFlag" :dataSource="[{ label: '正常', value: true }, { label: '禁用', value: false }]"></eagle-select> |
| 5 | </template> | 5 | </template> |
| @@ -69,5 +69,10 @@ export default { | @@ -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 | </script> | 78 | </script> |
| 74 | \ No newline at end of file | 79 | \ No newline at end of file |
packages/scheme/index.vue
| @@ -226,7 +226,7 @@ export default { | @@ -226,7 +226,7 @@ export default { | ||
| 226 | // 当前页 | 226 | // 当前页 |
| 227 | currentPage: 1, | 227 | currentPage: 1, |
| 228 | // 每页最大数据量 | 228 | // 每页最大数据量 |
| 229 | - pageSize: 10, | 229 | + pageSize: this.paginationProps.pageSize || 10, |
| 230 | // 数据总量 | 230 | // 数据总量 |
| 231 | totalCount: 0, | 231 | totalCount: 0, |
| 232 | // 弹出框状态 | 232 | // 弹出框状态 |
| @@ -595,6 +595,7 @@ export default { | @@ -595,6 +595,7 @@ export default { | ||
| 595 | // 表格选择 | 595 | // 表格选择 |
| 596 | handleTableSelectionChange(selection) { | 596 | handleTableSelectionChange(selection) { |
| 597 | this.tableSelection = selection; | 597 | this.tableSelection = selection; |
| 598 | + this.$emit('selection', selection); | ||
| 598 | }, | 599 | }, |
| 599 | // 显示弹出框 | 600 | // 显示弹出框 |
| 600 | showDialog() { | 601 | showDialog() { |