Skip to content

Commit

Permalink
Merge branch 'dev-4.3.1' of https://code.alipay.com/oceanbase/oceanba…
Browse files Browse the repository at this point in the history
…se-developer-center into dev-4.3.1
  • Loading branch information
HSunboy committed Jul 24, 2024
2 parents a23ff38 + b64b2bc commit 8eaa6a5
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 38 deletions.
19 changes: 7 additions & 12 deletions src/component/CommonTable/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ interface IProps<RecordType> {
operationContent?: IOperationContent;
// 是否展示 操作连 筛选区&自定义操作区 分割标记
isSplit?: boolean;
// 行选择 相关配置
// 行选择 相关配置 (初使用时容易与antd的rowSelection混淆重复导致bug)
rowSelecter?: IRowSelecter<RecordType>;
// 行选择状态回调
rowSelectedCallback?: (selectedRowKeys: any[]) => void;
Expand Down Expand Up @@ -460,17 +460,12 @@ const CommonTable: <RecordType extends object = any>(
}
onChange={handleChange}
rowSelection={
rowSelecter
? {
...tableProps?.rowSelection,
...rowSelecter,
selectedRowKeys,
onSelect: handleRowKeySelect,
onSelectAll: handleSelectAll,
}
: {
...tableProps?.rowSelection,
}
rowSelecter && {
...rowSelecter,
selectedRowKeys,
onSelect: handleRowKeySelect,
onSelectAll: handleSelectAll,
}
}
pagination={{
...tableProps?.pagination,
Expand Down
2 changes: 1 addition & 1 deletion src/component/ProfileFlow/customComponents/DetailBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ export default ({ dataSource, topNodes, initialNodes, globalInfo }: Iprops) => {
<Radio.Group
value={sortType}
onChange={handleSortChange}
style={{ width: '100%', padding: '0 6px 8px 6px' }}
style={{ width: '100%', padding: '4px 6px 8px 6px', textAlign: 'center' }}
>
<Radio.Button value={subNodeSortType.BY_DURATION}>
{subNodesSortMap[subNodeSortType.BY_DURATION].label}
Expand Down
9 changes: 7 additions & 2 deletions src/component/SelectTransfer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,13 @@ export default function SelectTransfer(props: IProps) {
checkable
selectable={false}
checkedKeys={checkedKeys}
onCheck={(v) => {
setCheckedKeys([...(checkedKeys || []), ...(v as string[])]);
onCheck={(v, e) => {
const { checked, checkedNodes, node, event, halfCheckedKeys } = e;
if (checked === false) {
setCheckedKeys([...checkedKeys.filter((i) => i !== node?.key)]);
} else {
setCheckedKeys([...(checkedKeys || []), ...(v as string[])]);
}
}}
height={274}
treeData={sourceDisplayTreeData}
Expand Down
12 changes: 5 additions & 7 deletions src/page/Project/User/ManageModal/Table/TaskApplyList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,11 @@ const TaskApplyList: React.FC<IProps> = (props) => {
onOk: onReclaim,
},
],
getCheckboxProps: (record: ITablePermission) => {
return {
disabled: record?.status === TablePermissionStatus.EXPIRED,
};
},
}
: null
}
Expand All @@ -303,13 +308,6 @@ const TaskApplyList: React.FC<IProps> = (props) => {
tableProps={{
columns: columns?.filter((item) => (isOwner ? true : item?.dataIndex !== 'action')),
dataSource: dataSource?.contents ?? [],
rowSelection: {
getCheckboxProps: (record: ITablePermission) => {
return {
disabled: record?.status === TablePermissionStatus.EXPIRED,
};
},
},
rowKey: 'id',
scroll: {
x: 950,
Expand Down
12 changes: 5 additions & 7 deletions src/page/Project/User/ManageModal/Table/UserAuthList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,11 @@ const UserAuthList: React.FC<IProps> = (props) => {
onOk: onReclaim,
},
],
getCheckboxProps: (record: ITablePermission) => {
return {
disabled: record?.status === TablePermissionStatus.EXPIRED,
};
},
}
: null
}
Expand All @@ -251,13 +256,6 @@ const UserAuthList: React.FC<IProps> = (props) => {
columns: columns?.filter((item) => (isOwner ? true : item?.dataIndex !== 'action')),
dataSource: dataSource?.contents ?? [],
rowKey: 'id',
rowSelection: {
getCheckboxProps: (record: ITablePermission) => {
return {
disabled: record?.status === TablePermissionStatus.EXPIRED,
};
},
},
scroll: {
x: 950,
y: 800,
Expand Down
20 changes: 11 additions & 9 deletions src/page/Workspace/components/DDLResultSet/StatusBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,15 +130,17 @@ const StatusBar: React.FC<IProps> = function ({
</span>
) : null}
<Space size={'small'}>
<span>
{formatMessage(
{
id: 'src.page.Workspace.components.DDLResultSet.0B7666A0',
defaultMessage: '总耗时:${DBCostTime}',
},
{ DBCostTime: DBCostTime },
)}
</span>
{timer && (
<span>
{formatMessage(
{
id: 'src.page.Workspace.components.DDLResultSet.0B7666A0',
defaultMessage: '总耗时:${DBCostTime}',
},
{ DBCostTime: DBCostTime },
)}
</span>
)}
<span>
{
formatMessage(
Expand Down

0 comments on commit 8eaa6a5

Please sign in to comment.