fix:解决dragborder和draggable必须同时使用的问题

This commit is contained in:
yangchch6 2019-07-15 10:59:26 +08:00
parent 3a16ccb5c2
commit e67d6d5cea
7 changed files with 8 additions and 12 deletions

View File

@ -557,7 +557,7 @@ var TableHeader = function (_Component) {
if (dragborder) { if (dragborder) {
this.dragBorderEventInit(); //列宽 this.dragBorderEventInit(); //列宽
} }
if (dragborder) { if (draggable) {
this.dragAbleEventInit(); //交换列 this.dragAbleEventInit(); //交换列
} }
if (this.table && this.table.tr) { if (this.table && this.table.tr) {

View File

@ -69,7 +69,6 @@ class Demo22 extends Component {
columns={columns} columns={columns}
data={data} data={data}
bordered bordered
dragborder={true}
draggable={true} draggable={true}
onDrop ={(event,data,columns)=>{ onDrop ={(event,data,columns)=>{
console.log("--拖拽交换列后触发事件"); console.log("--拖拽交换列后触发事件");

View File

@ -61,9 +61,8 @@ class Demo23 extends Component {
columns={columns23} columns={columns23}
data={data23} data={data23}
bordered bordered
dragborder={true}
draggable={true}
scroll={{y:200}} scroll={{y:200}}
dragborder={true}
onDropBorder ={(e,width)=>{ onDropBorder ={(e,width)=>{
console.log(width+"--调整列宽后触发事件",e.target); console.log(width+"--调整列宽后触发事件",e.target);
}} }}

File diff suppressed because one or more lines are too long

8
dist/demo.js vendored

File diff suppressed because one or more lines are too long

2
dist/demo.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -112,7 +112,7 @@ class TableHeader extends Component {
if(dragborder){ if(dragborder){
this.dragBorderEventInit();//列宽 this.dragBorderEventInit();//列宽
} }
if(dragborder){ if(draggable){
this.dragAbleEventInit();//交换列 this.dragAbleEventInit();//交换列
} }
if(this.table && this.table.tr){ if(this.table && this.table.tr){