4
0
mirror of https://github.com/iczer/vue-antd-admin.git synced 2025-05-21 22:02:33 +08:00

Merge remote-tracking branch 'origin/basic' into basic

This commit is contained in:
chenghongxing 2020-07-25 13:12:15 +08:00
commit a3bca2756e
2 changed files with 16 additions and 3 deletions

View File

@ -36,7 +36,18 @@
<script>
export default {
name: 'StandardTable',
props: ['bordered', 'loading', 'columns', 'dataSource', 'rowKey', 'pagination', 'selectedRows'],
props: {
bordered: Boolean,
loading: [Boolean, Object],
columns: Array,
dataSource: Array,
rowKey: {
type: [String, Function],
default: 'key'
},
pagination: Object,
selectedRows: Array
},
data () {
return {
needTotalList: [],
@ -96,7 +107,9 @@ export default {
},
computed: {
selectedRowKeys() {
return this.selectedRows.map(row => row.key)
return this.selectedRows.map(record => {
return (typeof this.rowKey === 'function') ? this.rowKey(record) : record[this.rowKey]
})
}
}
}

View File

@ -13,7 +13,7 @@
<div :class="['admin-header-right', headerTheme]">
<header-search class="header-item" />
<a-tooltip class="header-item" title="帮助文档" placement="bottom" >
<a>
<a href="https://iczer.github.io/vue-antd-admin/" target="_blank">
<a-icon type="question-circle-o" />
</a>
</a-tooltip>