!1904 优化:BBS备注添加拖拽延伸

pull/1912/MERGE
黄诗津 2 years ago committed by ChenX
parent d58515e4dc
commit 3f0c18f57c

@ -259,7 +259,6 @@ interface IBBSSealingComponentProps
option: IBoardInfoOptions; option: IBoardInfoOptions;
ModifyDataRecord: (index: number, brData: Board, modifyKey: string, value: string | LinesType | ProcessingGroupRecord[]) => void; ModifyDataRecord: (index: number, brData: Board, modifyKey: string, value: string | LinesType | ProcessingGroupRecord[]) => void;
index: number; index: number;
} }
@ -601,42 +600,50 @@ export class BBSProcessGroupItem extends React.Component<IBBSProcessGroupItemPro
}; };
} }
interface IBBSRemarksComponentProps extends IBBSSealingComponentProps
{
getCalcStyles: (key: string) => React.CSSProperties;
}
@observer @observer
export class BBSRemarksComponent extends React.Component<IBBSSealingComponentProps> export class BBSRemarksComponent extends React.Component<IBBSRemarksComponentProps>
{ {
render() render()
{ {
const { board, option, index, click } = this.props; const { board, option, index, click } = this.props;
return ( return (
<> <>
{ {
option.remarks.length === 0 ? option.remarks.length === 0 ?
<div className="bbs-list-td bbs-td"> <div className="bbs-list-td bbs-td remarks" style={this.props.getCalcStyles("remarks")}>
<input <input
className="bp3-input " className="bp3-input "
value="" value=""
readOnly={true}
onClick={() => { click("remarks"); }} onClick={() => { click("remarks"); }}
/> />
</div> </div>
: :
<Tooltip <div className="bbs-list-td bbs-td remarks" style={this.props.getCalcStyles("remarks")} >
className="bbs-list-td bbs-td" <Tooltip
usePortal={false} usePortal={false}
content={<ul> content={
{ <ul>
option.remarks.map((d, i) => <li key={i}>{d[0]} : {d[1]}</li>) {
option.remarks.map((d, i) => <li key={i}>{d[0]} : {d[1]}</li>)
}
</ul>
} }
</ul>} position={Position.RIGHT}
position={Position.RIGHT} intent={Intent.PRIMARY}
intent={Intent.PRIMARY} >
> <input
<input className="bp3-input"
className="bp3-input " value={option.remarks.reduce((s, r) => s += `${r[0]}:${r[1]} `, "")}
value={option.remarks.reduce((s, r) => s += `${r[0]}:${r[1]} `, "")} readOnly={true}
onClick={() => { click("remarks"); }} onClick={() => { click("remarks"); }}
/> />
</Tooltip> </Tooltip>
</div>
} }
</> </>
); );

@ -236,6 +236,7 @@ export class BoardInfoList extends React.Component<IBoardInfoListProps, {}>
click={this.HandleOnClick} click={this.HandleOnClick}
board={dataBr} board={dataBr}
option={this.option} option={this.option}
getCalcStyles={this.props.getCalcStyles}
ModifyDataRecord={ModifyDataRecord} ModifyDataRecord={ModifyDataRecord}
index={index} index={index}
/>; />;

@ -23,7 +23,7 @@ export class BBSEditorStore implements IConfigStore
{ {
@observable configName = "默认"; @observable configName = "默认";
@observable configsNames = []; @observable configsNames = [];
noResize = [6, 7, 8, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28]; //用于字段列宽度调整,但是有一些特殊框就不做调整了 noResize = [6, 7, 8, 19, 20, 22, 23, 24, 25, 26, 27, 28]; //用于字段列宽度调整,但是有一些特殊框就不做调整了
@observable tabbarIndexs = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 19, 20]; @observable tabbarIndexs = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 19, 20];
InitOption() InitOption()
{ {

Loading…
Cancel
Save