Explorar el Código

Table: support show attribute

master
Bing Sun hace 5 años
padre
commit
f9b20f01f7
Firmado por: sunb ID de clave GPG: F7795F8C590626AB
Se han modificado 1 ficheros con 4 adiciones y 2 borrados
  1. +4
    -2
      src/components/Table.js

+ 4
- 2
src/components/Table.js Ver fichero

@@ -85,7 +85,9 @@ export default initial_vnode => {
}

return [
m('table', [
m('table', {
style: vnode.attrs.show ? undefined : {display: 'none'},
}, [
// always show table header
m('thead', m('tr', [
vnode.attrs.serial ? m('th.centered', '序号') : undefined,
@@ -105,7 +107,7 @@ export default initial_vnode => {
]))) : m('', 'Empty')
]),
// page navigation
pages.length > 1 ?
pages.length > 1 && vnode.attrs.show ?
m('.centered',
m('.pagination.centered', pages.map((page, i) => page.show ? m('a', {
class: page.active ? 'active' : '',


Cargando…
Cancelar
Guardar