Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita739e2e

Browse files
added tooltip option for table header
1 parent4cd85cc commita739e2e

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

‎client/packages/lowcoder/src/comps/comps/tableComp/column/columnTypeComps/columnDropdownComp.tsx‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,9 @@ export const ColumnDropdownComp = (function () {
5252
);
5353

5454
return(
55-
5655
<Dropdown
5756
trigger={["click"]}
58-
placement="bottom"
57+
placement="bottomRight"
5958
menu={{items}}
6059
dropdownRender={()=>menu}
6160
>

‎client/packages/lowcoder/src/comps/comps/tableComp/column/tableColumnComp.tsx‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ export type CellColorViewType = (param: {
8686
exportconstcolumnChildrenMap={
8787
// column title
8888
title:StringControl,
89+
tooltip:StringControl,
8990
showTitle:withDefault(BoolControl,true),
9091
// a custom column or a data column
9192
isCustom:valueComp<boolean>(false),
@@ -207,6 +208,9 @@ export class ColumnComp extends ColumnInitComp {
207208
label:trans("table.columnTitle"),
208209
placeholder:this.children.dataIndex.getView(),
209210
})}
211+
{this.children.tooltip.propertyView({
212+
label:trans("labelProp.tooltip"),
213+
})}
210214
<Dropdown
211215
showSearch={true}
212216
defaultValue={columnValue}

‎client/packages/lowcoder/src/comps/comps/tableComp/tableUtils.tsx‎

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ import { JSONObject, JSONValue } from "util/jsonTypes";
1818
import{StatusType}from"./column/columnTypeComps/columnStatusComp";
1919
import{ColumnListComp,tableDataRowExample}from"./column/tableColumnListComp";
2020
import{TableColumnLinkStyleType,TableColumnStyleType}from"comps/controls/styleControlConstants";
21+
importTooltipfrom"antd/es/tooltip";
22+
importInfoCircleOutlinedfrom"@ant-design/icons/InfoCircleOutlined";
2123

2224
exportconstCOLUMN_CHILDREN_KEY="children";
2325
exportconstOB_ROW_ORI_INDEX="__ob_origin_index";
@@ -240,11 +242,15 @@ export function getColumnsAggr(
240242
});
241243
}
242244

243-
functionrenderTitle(props:{title:string;editable:boolean}){
244-
const{ title, editable}=props;
245+
functionrenderTitle(props:{title:string;tooltip:string;editable:boolean}){
246+
const{ title,tooltip,editable}=props;
245247
return(
246248
<div>
247-
{title}
249+
<Tooltiptitle={tooltip}>
250+
<spanstyle={{borderBottom:tooltip ?'1px dotted' :''}}>
251+
{title}
252+
</span>
253+
</Tooltip>
248254
{editable&&<EditableIconstyle={{verticalAlign:"baseline",marginLeft:"4px"}}/>}
249255
</div>
250256
);
@@ -331,7 +337,7 @@ export function columnsToAntdFormat(
331337
text:string;
332338
status:StatusType;
333339
}[];
334-
consttitle=renderTitle({title:column.title,editable:column.editable});
340+
consttitle=renderTitle({title:column.title,tooltip:column.tooltip,editable:column.editable});
335341

336342
return{
337343
title:column.showTitle ?title :'',

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp