-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ae35dec
commit 0efce14
Showing
2 changed files
with
124 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
选中效果在翻页后仍维持 | ||
|
||
```vue | ||
<template> | ||
<el-data-table v-bind="$data"></el-data-table> | ||
</template> | ||
<script> | ||
export default { | ||
name: 'persist-selection', | ||
data() { | ||
return { | ||
firstPage: 0, | ||
paginationSizes: [2, 4], | ||
url: 'https://easy-mock.com/mock/5c1b3895fe5907404e654045/femessage-mock/el-data-table/persist-selection', | ||
columns: [ | ||
{type: 'selection'}, | ||
{prop: 'id', label: 'id'}, | ||
{prop: 'name', label: '用户名'} | ||
], | ||
hasNew: false, | ||
persistSelection: true, | ||
onDelete: selected => { | ||
return this.$axios.delete( | ||
'https://www.easy-mock.com/mock/5bbefdf6faedce31cd6a5261/example/on-delete', | ||
{ | ||
data: { | ||
rows: selected.id || selected.map(v => v.id) | ||
} | ||
} | ||
) | ||
} | ||
} | ||
}, | ||
} | ||
</script> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters