!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); this.tree.addEventListener("drop", this.handleMoveFiles);
document.addEventListener('dragend', this.handleDragEnd); document.addEventListener('dragend', this.handleDragEnd);
this.selectTool = new SelectDataTool(this.selectContainer); this.selectTool = new SelectDataTool(this.selectContainer);
this.selectTool.StartCallBack = () => this.selectTool.SelectCallBack = (els: HTMLElement[]) =>
{ {
this.dataList.forEach(d => d.isChecked = false); this.dataList.forEach(d => d.isChecked = false);
this.needDeleteData.clear(); this.needDeleteData.clear();
};
this.selectTool.SelectCallBack = (els: HTMLElement[]) =>
{
let ids = els.map(el => el.getAttribute('data-id')); let ids = els.map(el => el.getAttribute('data-id'));
for (let img of this.dataList) for (let img of this.dataList)

@ -38,12 +38,13 @@ export class SelectDataTool
private Start = (e: MouseEvent) => private Start = (e: MouseEvent) =>
{ {
let el = (e.target as HTMLElement); 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.stopPropagation();
e.preventDefault(); e.preventDefault();
} }
else return; else return;
if (this.StartCallBack)
this.StartCallBack(); this.StartCallBack();
this.mouseOn = true; this.mouseOn = true;
let selectContainer = this.container; let selectContainer = this.container;
@ -119,8 +120,10 @@ export class SelectDataTool
this.container.removeEventListener('mousedown', this.Start); this.container.removeEventListener('mousedown', this.Start);
this.container.removeEventListener('mousemove', this.Move); this.container.removeEventListener('mousemove', this.Move);
document.removeEventListener('mouseup', this.Stop); document.removeEventListener('mouseup', this.Stop);
if (this.StartCallBack)
this.StartCallBack(); this.StartCallBack();
this.StartCallBack = null; this.StartCallBack = null;
if (this.SelectCallBack)
this.SelectCallBack([]); this.SelectCallBack([]);
this.SelectCallBack = null; this.SelectCallBack = null;
} }

Loading…
Cancel
Save