chore: solve merge conflict

This commit is contained in:
07akioni 2019-10-18 16:49:47 +08:00
commit 71a9290dea
4 changed files with 16 additions and 6 deletions

View File

@ -68,7 +68,10 @@ const _columns3 = ($this) => {
title: 'Name',
key: 'name',
sortable: true,
width: 300
width: 300,
renderHeader(h,column){
return <n-tag>{column.title}</n-tag>
}
},
{
title: 'Age',

View File

@ -1,6 +1,6 @@
{
"name": "naive-ui",
"version": "0.5.8",
"version": "0.5.9",
"description": "",
"main": "index.js",
"scripts": {

View File

@ -10,9 +10,9 @@ export default {
render: (h, ctx) => {
const params = ctx.props.row
const { keyName, render, row } = ctx.props
const { keyName, render } = ctx.props
if (render) {
return h('div', [render(h, params)])
return render(h, params)
} else return h('div', [params.row[keyName]])
}
}

View File

@ -62,7 +62,7 @@
:class="{
'n-advance-table__sortable-column': column.sortable
}"
@click.native="()=>sortByColumn(column)"
@click.native.self="()=>sortByColumn(column)"
>
<!-- 当前页全选 -->
<n-checkbox
@ -71,7 +71,14 @@
:indeterminate="!isCheckedBoxAllIndeterminate"
@click.native="onAllCheckboxesClick"
/>
{{ column.title }}
<row
v-if="column.renderHeader"
:index="i"
:row="column"
:key-name="column.key || i"
:render="column.renderHeader"
/>
{{ !column.renderHeader ? column.title : '' }}
<SortIcon
v-if="column.sortable"
:ref="'sorter_' + (column.key || i)"