Skip to content

Commit

Permalink
Merge branch 'v0.0.11'
Browse files Browse the repository at this point in the history
  • Loading branch information
Robin-front committed Jul 9, 2019
2 parents 132c311 + 4be8f26 commit b091042
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 10 deletions.
7 changes: 6 additions & 1 deletion src/css/main.less
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,17 @@
background-color: #fff;
border-bottom: 1px solid #dddee1;
position: relative;

&-wrap{
position: relative;
border: 1px solid #dddee1;
// border-bottom: none;
display: flex;
align-content: stretch;

& *{
box-sizing: border-box;
}
}
&-big{
.@{fb}{
Expand Down Expand Up @@ -312,7 +317,7 @@
}
.has-scroll-bar{
.@{fb}-fixed-right-wrap{
right: 16px;
right: 15px;
}
}
.checkbox-component{
Expand Down
2 changes: 1 addition & 1 deletion src/table.vue
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ export default {
newItem._isDisabled = !!newItem._disabled;
newItem._expanded = !!newItem._expanded;
newItem._disableExpand = !!newItem._disableExpand;
this.rowHeight[index] = 0;
this.$set(this.rowHeight, index, 0);
return newItem;
});
return list;
Expand Down
11 changes: 7 additions & 4 deletions src/tableFoot.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@

<template>
<div class="flex-table-foot">
<div class="flex-table-row" :style="{ height: height }">
<div class="flex-table-foot" :style="{ height: height }">
<div class="flex-table-row">
<div
class="flex-table-col"
v-for="(item, index) in columns"
:key="index"
:style="setCellStyle(item)"
>
<template v-if="sum[item.key] && !isHidden(item)">
<template v-if="shouldRender(item)">
<Expand
v-if="item.render"
:row="sum"
Expand Down Expand Up @@ -70,12 +70,15 @@ export default {
if (!this.onlyFixed) {
this.owner.onRowHeightChange({
rowIndex: 'footer',
height: this.$el.offsetHeight-1,
height: this.$el.offsetHeight,
});
}
},
isHidden(item) {
return this.onlyFixed && (item.fixed !== this.onlyFixed);
},
shouldRender(item) {
return this.sum[item.key] !== undefined && !this.isHidden(item)
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/tableHead.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div class="flex-table-head">
<div class="flex-table-row" :style="{ height: height }">
<div class="flex-table-head" :style="{ height: height }">
<div class="flex-table-row">
<div
class="flex-table-col"
v-for="(item, index) in headRow"
Expand Down Expand Up @@ -129,7 +129,7 @@ export default {
if (!this.onlyFixed) {
this.owner.onRowHeightChange({
rowIndex: 'header',
height: this.$el.offsetHeight-1,
height: this.$el.offsetHeight,
});
}
},
Expand Down
2 changes: 1 addition & 1 deletion src/tableTr.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export default {
if (!this.onlyFixed) {
this.owner.onRowHeightChange({
rowIndex: this.rowIndex,
height: this.$el.offsetHeight-1,
height: this.$el.offsetHeight,
})
}
}
Expand Down

0 comments on commit b091042

Please sign in to comment.