Przeglądaj źródła

Table: support producer and style in column_options

master
Bing Sun 5 lat temu
rodzic
commit
bfa117bb94
Podpisane przez: sunb ID klucza GPG: F7795F8C590626AB
1 zmienionych plików z 4 dodań i 1 usunięć
  1. +4
    -1
      src/components/Table.js

+ 4
- 1
src/components/Table.js Wyświetl plik

@@ -105,7 +105,10 @@ export default initial_vnode => {
if (typeof column.tag != 'undefined')
v = m(column.tag, v)

return m(`td${column.class || ''}`, v)
if (typeof column.producer == 'function')
v = column.producer(v)

return m(`td${column.class || ''}`, {style: column.style || undefined}, v)
})
]))) : m('', 'Empty')
]),


Ładowanie…
Anuluj
Zapisz