3 커밋

2개의 변경된 파일6개의 추가작업 그리고 4개의 파일을 삭제
통합 보기
  1. +5
    -3
      src/components/Table.js
  2. +1
    -1
      src/util/make_model.js

+ 5
- 3
src/components/Table.js 파일 보기

@@ -17,7 +17,7 @@ export default initial_vnode => {
})) }))
// merge column options // merge column options
columns = columns.map( columns = columns.map(
column => column.label in initial_vnode.attrs.columns_options
column => initial_vnode.attrs.columns_options && column.label in initial_vnode.attrs.columns_options
? {...initial_vnode.attrs.columns_options[column.label], ...column} : column ? {...initial_vnode.attrs.columns_options[column.label], ...column} : column
).filter(column => !('display' in column) || column.display != false) ).filter(column => !('display' in column) || column.display != false)
} }
@@ -85,7 +85,9 @@ export default initial_vnode => {
} }


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


+ 1
- 1
src/util/make_model.js 파일 보기

@@ -112,7 +112,7 @@ export default (options={}) => {
// selects // selects
...(_configs.selects ? [{ ...(_configs.selects ? [{
label: 'select', label: 'select',
value: _configs.selects.map(select => select.alias ? select.alias + ':' + select.label : select.label).join(',')
value: _configs.selects.map(select => '"' + (select.alias ? select.alias + ':' + select.label : select.label) + '"').join(',')
}] : []), }] : []),


...(_configs.wheres ? _configs.wheres : []), ...(_configs.wheres ? _configs.wheres : []),


불러오는 중...
취소
저장