commit Table component

commit Table component
This commit is contained in:
梁灏 2016-11-23 16:27:17 +08:00
parent d2e82cd7f6
commit 2cb8a6d93e
12 changed files with 334 additions and 0 deletions

View file

@ -0,0 +1,32 @@
<template>
<thead>
<tr>
<th v-for="column in columns">{{{ renderHeader(column, $index) }}}</th>
</tr>
</thead>
</template>
<script>
export default {
props: {
prefixCls: String,
columns: Array
},
data () {
return {
}
},
computed: {
},
methods: {
renderHeader (column, $index) {
if ('renderHeader' in this.columns[$index]) {
return this.columns[$index].renderHeader(column, $index);
} else {
return column.title || '#';
}
}
}
}
</script>