publish 0.9.9-rc-4
optimizing Table performance
This commit is contained in:
parent
d0e206c501
commit
a81dc06c7d
3 changed files with 26 additions and 20 deletions
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "iview",
|
"name": "iview",
|
||||||
"version": "0.9.9-rc-3",
|
"version": "0.9.9-rc-4",
|
||||||
"title": "iView",
|
"title": "iView",
|
||||||
"description": "A high quality UI components Library with Vue.js",
|
"description": "A high quality UI components Library with Vue.js",
|
||||||
"homepage": "http://www.iviewui.com",
|
"homepage": "http://www.iviewui.com",
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
:columns-width="columnsWidth"
|
:columns-width="columnsWidth"
|
||||||
:obj-data="objData"></table-body>
|
:obj-data="objData"></table-body>
|
||||||
</div>
|
</div>
|
||||||
<div :class="[prefixCls + '-fixed']" :style="fixedTableStyle">
|
<div :class="[prefixCls + '-fixed']" :style="fixedTableStyle" v-if="isLeftFixed">
|
||||||
<div :class="[prefixCls + '-fixed-header']" v-if="showHeader">
|
<div :class="[prefixCls + '-fixed-header']" v-if="showHeader">
|
||||||
<table-head
|
<table-head
|
||||||
fixed="left"
|
fixed="left"
|
||||||
|
@ -43,7 +43,7 @@
|
||||||
:obj-data="objData"></table-body>
|
:obj-data="objData"></table-body>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div :class="[prefixCls + '-fixed-right']" :style="fixedRightTableStyle">
|
<div :class="[prefixCls + '-fixed-right']" :style="fixedRightTableStyle" v-if="isRightFixed">
|
||||||
<div :class="[prefixCls + '-fixed-header']" v-if="showHeader">
|
<div :class="[prefixCls + '-fixed-header']" v-if="showHeader">
|
||||||
<table-head
|
<table-head
|
||||||
fixed="right"
|
fixed="right"
|
||||||
|
@ -226,6 +226,12 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return right.concat(other);
|
return right.concat(other);
|
||||||
|
},
|
||||||
|
isLeftFixed () {
|
||||||
|
return this.columns.some(col => col.fixed && col.fixed === 'left');
|
||||||
|
},
|
||||||
|
isRightFixed () {
|
||||||
|
return this.columns.some(col => col.fixed && col.fixed === 'right');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -342,8 +348,8 @@
|
||||||
},
|
},
|
||||||
handleBodyScroll (event) {
|
handleBodyScroll (event) {
|
||||||
if (this.showHeader) this.$els.header.scrollLeft = event.target.scrollLeft;
|
if (this.showHeader) this.$els.header.scrollLeft = event.target.scrollLeft;
|
||||||
if (this.leftFixedColumns.length) this.$els.fixedBody.scrollTop = event.target.scrollTop;
|
if (this.isLeftFixed) this.$els.fixedBody.scrollTop = event.target.scrollTop;
|
||||||
if (this.rightFixedColumns.length) this.$els.fixedRightBody.scrollTop = event.target.scrollTop;
|
if (this.isRightFixed) this.$els.fixedRightBody.scrollTop = event.target.scrollTop;
|
||||||
this.hideColumnFilter();
|
this.hideColumnFilter();
|
||||||
},
|
},
|
||||||
handleMouseWheel (event) {
|
handleMouseWheel (event) {
|
||||||
|
|
|
@ -9,21 +9,21 @@
|
||||||
return {
|
return {
|
||||||
self: this,
|
self: this,
|
||||||
columns7: [
|
columns7: [
|
||||||
// {
|
{
|
||||||
// title: '姓名',
|
title: '姓名',
|
||||||
// key: 'name',
|
key: 'name',
|
||||||
// render (row, column, index) {
|
render (row, column, index) {
|
||||||
// return `<strong>${row.name}</strong>`;
|
return `<strong>${row.name}</strong>`;
|
||||||
// }
|
}
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// title: '年龄',
|
title: '年龄',
|
||||||
// key: 'age'
|
key: 'age'
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// title: '地址',
|
title: '地址',
|
||||||
// key: 'address'
|
key: 'address'
|
||||||
// },
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
key: 'action',
|
key: 'action',
|
||||||
|
|
Loading…
Add table
Reference in a new issue