功能:点击模块面板<关联板个数时>显示关联板

pull/2976/MERGE
ChenX 3 weeks ago
parent d3f3f7d6cb
commit 6a2ade7edf

@ -566,6 +566,14 @@ export class TemplateParamDetail extends React.Component<{}>
return p?.Objects?.length ?? 0; return p?.Objects?.length ?? 0;
} }
ShowAssocBrs(tr: TemplateRecord)
{
let p = tr?.Positioning as PositioningClampSpace;
let brs = p?.Objects?.filter(id => !id.IsErase)?.map(id => id.Object as Board);
if (brs?.length)
app.Editor.SetSelection(brs);
}
//获取板件切割方式 //获取板件切割方式
ShowSplitType = (tr: TemplateRecord) => ShowSplitType = (tr: TemplateRecord) =>
{ {
@ -873,7 +881,7 @@ export class TemplateParamDetail extends React.Component<{}>
</div> </div>
} }
<div className="template-detail-float02" style={{ height: this.store.isVisualTemplate ? 140 : 120 }}> <div className="template-detail-float02" style={{ height: this.store.isVisualTemplate ? 140 : 120 }}>
<div className="attach-info"><span>{`${this.GetAssociateBrNums(this.store.GetCurrentTemplate())}`}</span></div> <div className="attach-info"><span onClick={() => { this.ShowAssocBrs(this.store.GetCurrentTemplate()); }}>{`${this.GetAssociateBrNums(this.store.GetCurrentTemplate())}`}</span></div>
<div className="attach-info"><span>{`${this.ShowSplitType(this.store.GetCurrentTemplate())}`}</span></div> <div className="attach-info"><span>{`${this.ShowSplitType(this.store.GetCurrentTemplate())}`}</span></div>
<div style={{ display: this.store.isVisualTemplate ? "unset" : "inline-flex" }}> <div style={{ display: this.store.isVisualTemplate ? "unset" : "inline-flex" }}>
{this.store.isVisualTemplate && <Checkbox {this.store.isVisualTemplate && <Checkbox

Loading…
Cancel
Save