table colStyle, cellStyle, html render
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
<div class="table_header">
|
||||
<div v-for="(col, i) in columns"
|
||||
:class="['table_cell', {['sortable']: col.orderBy, [`align-${col.align}`]: col.align}]"
|
||||
:style="col.colStyle"
|
||||
:key="i">
|
||||
|
||||
<!-- Column with sorting -->
|
||||
@@ -29,10 +30,11 @@
|
||||
<!-- Row content -->
|
||||
<div v-for="(col, ci) in columns"
|
||||
:class="['table_cell', {[`align-${col.align}`]: col.align}]"
|
||||
:style="typeof col.cellStyle == 'function' ? col.cellStyle(row) : col.cellStyle"
|
||||
:key="ci + 'c'">
|
||||
|
||||
<span v-if="col.prop" :title="getProp(row, col.prop)">{{ getProp(row, col.prop) }}</span>
|
||||
<span v-else-if="col.render">{{ col.render(row) }}</span>
|
||||
<span v-else-if="col.render" v-html="col.render(row)"></span>
|
||||
</div>
|
||||
|
||||
<!-- Row actions -->
|
||||
|
||||
Reference in New Issue
Block a user