mixin templateCell(columns)
template(
v-for='item in ' + columns
:slot="item.key + '-base-th'"
slot-scope="props"
v-if="$scopedSlots[item.key+'-th']"
)
slot(:name="item.key + '-th'" :item="props.item")
template(
v-for='item in ' + columns
:slot="item.key + '-base-td'"
slot-scope="props"
v-if="$scopedSlots[item.key+'-td']"
)
slot(:name="item.key + '-td'" :item="props.item" :rowIndex="props.rowIndex")
template(slot="expandRow" slot-scope="props")
slot(name="expand" :row="props.row")
mixin Table(columns, onlyhead, onlybody)
c-basetable(
:columns=columns
:datasource="dataList"
:height="height"
:sortkey="sortkey"
:sortorder="sortorder"
:rowClassName="rowClassName"
:hoverRowIndex="hoverRowIndex"
:onlybody=onlybody
:onlyhead=onlyhead
:allChecked="allChecked"
:indeterminate="indeterminate"
:noresultMsg="noresultMsg"
@sort="sorter"
@selectChange="onSelectChange"
@selectAllChange="onSelectAllChange"
@rowEnter="rowEnter"
@rowLeave="rowLeave"
@openExpand="onOpenExpand"
:expand="expand"
:spanMethod="spanMethod"
)
+templateCell(columns)
mixin TableWithHeight(columns, tbody, onScroll, nobody)
.c-scroll__thead
+Table(columns, "true", "false")
.c-table__body(
v-if="!" + nobody
ref=tbody
@scroll=onScroll
)
+Table(columns, "false", "true")
div(:class="className")
.c-table(v-if="hasFixed"
:class="withBorderClass"
)
template(v-if="height")
.c-table__wrapper
.c-table__headwrapper
.c-scroll__thead(@scroll="theadScroll")
+Table("columns", "true", "false")
.c-table__bodywrapper
.c-scroll__tbody(
@mouseenter="setCurrentScrollBox"
@mouseleave="removeCurrentScrollBox"
:ref="scrollbody"
)
+Table("columns", "false", "true")
.c-fixtable__left(
:class="{'c-fixed__leftscroll': isScrollMove}"
@mouseenter="setCurrentScrollBox"
@mouseleave="removeCurrentScrollBox"
)
template(v-if="datasource.length > 0")
+TableWithHeight("fixedLeftColumns", "fixedleft", "onYscroll")
template(v-else)
+TableWithHeight("fixedLeftColumns", "fixedleft", "onYscroll", "true")
.c-fixtable__right(
:class="{'c-fixed__rightscroll': isScrollMove}"
@mouseenter="setCurrentScrollBox"
@mouseleave="removeCurrentScrollBox"
)
template(v-if="datasource.length > 0")
+TableWithHeight("fixedRightColumns", "fixedright", "onYscroll")
template(v-else)
+TableWithHeight("fixedRightColumns", "fixedright", "onYscroll", "true")
template(v-else)
.c-scrolltable(@scroll="onScroll")
+Table("columns")
.c-fixtable__left(
:class="{'c-fixed__leftscroll': isScrollMove}"
v-if="fixedLeftColumns.length > 0"
)
template(v-if="datasource.length > 0")
+Table("fixedLeftColumns")
template(v-else)
+Table("fixedLeftColumns", "true")
.c-fixtable__right(
:class="{'c-fixed__rightscroll': isScrollMove}"
v-if="fixedRightColumns.length > 0"
)
template(v-if="datasource.length > 0")
+Table("fixedRightColumns")
template(v-else)
+Table("fixedRightColumns", "true")
.c-table(v-else
:class="withBorderClass"
)
template(v-if="height")
+TableWithHeight("columns", "scrollBody", "onScroll")
template(v-else)
.c-scroll__table
+Table("columns")