mirror of https://github.com/ElemeFE/element
Merge pull request #123 from Leopoldthecoder/next
fix pagination icon/dialog slot/fixed-column tablepull/2/head
commit
69655b734e
|
@ -8,7 +8,7 @@
|
|||
<i class="el-dialog__close el-icon el-icon-close" @click='close()'></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="el-dialog__body"><slot></slot></div>
|
||||
<div class="el-dialog__body" v-if="rendered"><slot></slot></div>
|
||||
<div class="el-dialog__footer" v-if="$slots.footer">
|
||||
<slot name="footer"></slot>
|
||||
</div>
|
||||
|
|
|
@ -5,11 +5,11 @@
|
|||
v-if="pageCount > 0"
|
||||
class="number">1</li>
|
||||
<li
|
||||
class="el-icon ellipsis btn-quickprev"
|
||||
class="el-icon more btn-quickprev"
|
||||
:class="[quickprevIconClass]"
|
||||
v-if="showPrevMore"
|
||||
@mouseenter="quickprevIconClass = 'el-icon-d-arrow-left'"
|
||||
@mouseleave="quickprevIconClass = 'el-icon-ellipsis'"
|
||||
@mouseleave="quickprevIconClass = 'el-icon-more'"
|
||||
>
|
||||
</li>
|
||||
<li
|
||||
|
@ -17,11 +17,11 @@
|
|||
:class="{ active: currentPage === pager }"
|
||||
class="number">{{ pager }}</li>
|
||||
<li
|
||||
class="el-icon ellipsis btn-quicknext"
|
||||
class="el-icon more btn-quicknext"
|
||||
:class="[quicknextIconClass]"
|
||||
v-if="showNextMore"
|
||||
@mouseenter="quicknextIconClass = 'el-icon-d-arrow-right'"
|
||||
@mouseleave="quicknextIconClass = 'el-icon-ellipsis'"
|
||||
@mouseleave="quicknextIconClass = 'el-icon-more'"
|
||||
>
|
||||
</li>
|
||||
<li
|
||||
|
@ -52,7 +52,7 @@
|
|||
const pageCount = this.pageCount;
|
||||
const currentPage = this.currentPage;
|
||||
|
||||
if (target.className.indexOf('ellipsis') !== -1) {
|
||||
if (target.className.indexOf('more') !== -1) {
|
||||
if (target.className.indexOf('quickprev') !== -1) {
|
||||
newPage = currentPage - 5;
|
||||
} else if (target.className.indexOf('quicknext') !== -1) {
|
||||
|
@ -130,8 +130,8 @@
|
|||
current: null,
|
||||
showPrevMore: false,
|
||||
showNextMore: false,
|
||||
quicknextIconClass: 'el-icon-ellipsis',
|
||||
quickprevIconClass: 'el-icon-ellipsis'
|
||||
quicknextIconClass: 'el-icon-more',
|
||||
quickprevIconClass: 'el-icon-more'
|
||||
};
|
||||
}
|
||||
};
|
||||
|
|
|
@ -421,6 +421,21 @@
|
|||
const style = this.$refs.fixed.style;
|
||||
if (!style) return;
|
||||
style.height = this.$el.clientHeight + 'px';
|
||||
|
||||
// 若非固定列中的某行内容被撑高, 需要固定列中对应行高度与其保持一致
|
||||
let bodyHeight = this.$el.querySelector('.el-table__body-wrapper').offsetHeight;
|
||||
let fixedBodyHeight = this.$el.querySelector('.el-table__fixed-body-wrapper').offsetHeight;
|
||||
if (bodyHeight !== fixedBodyHeight) {
|
||||
let bodyTrs = this.$el.querySelector('.el-table__body-wrapper').querySelectorAll('tr');
|
||||
let fixedBodyTrs = this.$el.querySelector('.el-table__fixed-body-wrapper').querySelectorAll('tr');
|
||||
bodyTrs.forEach((tr, index) => {
|
||||
let trHeight = tr.offsetHeight;
|
||||
let fixedTrHeight = fixedBodyTrs[index].offsetHeight;
|
||||
if (trHeight !== fixedTrHeight) {
|
||||
fixedBodyTrs[index].style.height = trHeight + 'px';
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue