From b20a4d7c75c2ff8951e93d9c0394df9277fc6093 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 15 五月 2023 21:05:17 +0800 Subject: [PATCH] 2023-05-15 --- src/menu/components/table/base-table/columns/index.jsx | 19 ++++++++++++++++--- 1 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/menu/components/table/base-table/columns/index.jsx b/src/menu/components/table/base-table/columns/index.jsx index b7cd7e3..e970390 100644 --- a/src/menu/components/table/base-table/columns/index.jsx +++ b/src/menu/components/table/base-table/columns/index.jsx @@ -46,7 +46,8 @@ return !is(fromJS(this.props.column), fromJS(nextProps.column)) || !is(fromJS(this.props.fields), fromJS(nextProps.fields)) || - this.props.index !== nextProps.index + this.props.index !== nextProps.index || + window.GLOB.columnId === nextProps.column.uuid || window.GLOB.precolumnId === nextProps.column.uuid } render() { @@ -57,6 +58,10 @@ if (column.Width) { style.width = column.Width style.minWidth = column.Width + } + + if (window.GLOB.columnId === column.uuid) { + style.color = '#1890ff' } return connectDragSource( @@ -83,6 +88,11 @@ style.width = column.Width style.minWidth = column.Width } + + if (window.GLOB.columnId === column.uuid) { + style.color = '#1890ff' + } + return ( <th {...restProps} style={style} key={column.uuid} onDoubleClick={() => this.props.editColumn(column)}> <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ @@ -354,7 +364,7 @@ config.action = config.action.filter(item => item.uuid !== btn.uuid) setTimeout(() => { - MKEmitter.emit('revert', config.uuid) + MKEmitter.emit('revertBtn', config.uuid) }, 200) } @@ -452,6 +462,9 @@ resolve() } } + + window.GLOB.precolumnId = window.GLOB.columnId || '' + window.GLOB.columnId = col.uuid this.setState({card: null}) this.updateCol(col) @@ -650,7 +663,7 @@ } return ( - <div className={`normal-table-columns ${config.setting.laypage} ${config.wrap.tableType} ${config.wrap.mode || ''} table-vertical-${config.wrap.vertical || ''}`} id={tableId}> + <div className={`normal-table-columns ${config.setting.laypage} ${config.wrap.tableType} ${config.wrap.mode || ''} table-vertical-${config.wrap.vertical || ''} table-col-${columns.length}`} id={tableId}> <div className="col-control"> <FieldsComponent config={config} type="columns" /> <CopyOutlined title="澶嶅埗鏄剧ず鍒�" onClick={this.copycolumn} /> -- Gitblit v1.8.0