Skip to content

Commit

Permalink
修复 **数据开发** 页面 数据源 && 元数据 的别名为空的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Zzm0809 committed May 27, 2022
1 parent cf2db30 commit 4592269
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const StudioDataBase = (props: any) => {
key: "alias",
sorter: true,
render: (dom, entity) => {
return <a onClick={() => setRow(entity)}>{dom}</a>;
return <a onClick={() => setRow(entity)}>{entity.alias === "" ? entity.name : entity.alias}</a>;
},
}];
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ const StudioMetaData = (props: any) => {
};

const getDataBaseOptions = ()=>{
return <>{database.map(({ id, alias, type, enabled }) => (
<Option value={id} label={<><Tag color={enabled ? "processing" : "error"}>{type}</Tag>{alias}</>}>
<Tag color={enabled ? "processing" : "error"}>{type}</Tag>{alias}
return <>{database.map(({ id, name, alias, type, enabled }) => (
<Option value={id} label={<><Tag color={enabled ? "processing" : "error"}>{type}</Tag>{ alias === "" ? name:alias}</>}>
<Tag color={enabled ? "processing" : "error"}>{type}</Tag>{ alias === "" ? name:alias}
</Option>
))}</>
};
Expand All @@ -77,7 +77,7 @@ const StudioMetaData = (props: any) => {
return (
<>
<Select
// style={{width: '100%'}}
style={{width: '90%'}}
placeholder="选择数据源"
optionLabelProp="label"
onChange={onChangeDataBase}
Expand Down

0 comments on commit 4592269

Please sign in to comment.