!1036 修复:模板界面问题

pull/1036/MERGE
ZoeLeeFZ 4 years ago committed by ChenX
parent 3d30101efb
commit 61b60738b6

@ -813,13 +813,10 @@ export class CommonPanel extends React.Component<ICommonPanelProps, ICommonPanel
this.tree.addEventListener("drop", this.handleMoveFiles);
document.addEventListener('dragend', this.handleDragEnd);
this.selectTool = new SelectDataTool(this.selectContainer);
this.selectTool.StartCallBack = () =>
this.selectTool.SelectCallBack = (els: HTMLElement[]) =>
{
this.dataList.forEach(d => d.isChecked = false);
this.needDeleteData.clear();
};
this.selectTool.SelectCallBack = (els: HTMLElement[]) =>
{
let ids = els.map(el => el.getAttribute('data-id'));
for (let img of this.dataList)

@ -38,13 +38,14 @@ export class SelectDataTool
private Start = (e: MouseEvent) =>
{
let el = (e.target as HTMLElement);
if (el.nodeName !== "IMG" && el.nodeName !== "svg" && el.nodeName !== "path" && !el.className.includes('control'))
if (el.nodeName !== "INPUT" && el.nodeName !== "IMG" && el.nodeName !== "svg" && el.nodeName !== "path" && !el.className.includes('control'))
{
e.stopPropagation();
e.preventDefault();
}
else return;
this.StartCallBack();
if (this.StartCallBack)
this.StartCallBack();
this.mouseOn = true;
let selectContainer = this.container;
this.offsetLeft = this.getOffsetLeft(selectContainer);
@ -119,9 +120,11 @@ export class SelectDataTool
this.container.removeEventListener('mousedown', this.Start);
this.container.removeEventListener('mousemove', this.Move);
document.removeEventListener('mouseup', this.Stop);
this.StartCallBack();
if (this.StartCallBack)
this.StartCallBack();
this.StartCallBack = null;
this.SelectCallBack([]);
if (this.SelectCallBack)
this.SelectCallBack([]);
this.SelectCallBack = null;
}
}

Loading…
Cancel
Save