Skip to content

Commit

Permalink
fix: dataset style issue
Browse files Browse the repository at this point in the history
  • Loading branch information
zggmd committed Apr 8, 2024
1 parent 05b6324 commit ad15234
Show file tree
Hide file tree
Showing 6 changed files with 81 additions and 24 deletions.
2 changes: 1 addition & 1 deletion packages/dataset-version-list/src/__constants.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/__constants.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 33 additions & 0 deletions src/pages/Dataset/index.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,36 @@
body {
font-size: 12px;
}

.dataset-collapse-header > div > .tenx-ui-materials-collapse-header {
padding: 12px;
}

.dataset-collapse-header {
background-color: unset !important;
}

.dataset-collapse-header .tenx-ui-materials-collapse-content-box {
padding: 0 !important;
}

.dataset-collapse-header .tenx-ui-materials-table-thead {
background-color: var(--menu-item-color);
}

.dataset-collapse-header th:first-child,
.dataset-collapse-header td:first-child {
padding-left: 16px !important;
}

.dataset-collapse-header td:last-child div {
display: flex;
justify-content: flex-end;
padding-right: 8px;
}

.dataset-collapse-header th:last-child {
display: flex;
justify-content: flex-end;
padding-right: 100px !important;
}
39 changes: 25 additions & 14 deletions src/pages/Dataset/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -1220,6 +1220,7 @@ class Dataset$$Page extends React.Component {
__component_name="Collapse"
accordion={true}
bordered={true}
className="dataset-collapse-header"
destroyInactivePanel={true}
expandIconPosition="right"
ghost={false}
Expand All @@ -1244,42 +1245,50 @@ class Dataset$$Page extends React.Component {
label: (
<Row
__component_name="Row"
style={{ display: 'flex', justifyContent: 'space-between' }}
align="middle"
style={{
display: 'flex',
justifyContent: 'space-between',
marginTop: '0px',
}}
wrap={true}
>
<Col
__component_name="Col"
span={11}
span={7}
style={{ alignItems: 'center', display: 'flex' }}
>
<Image
__component_name="Image"
fallback=""
height={32}
height={28}
preview={false}
src={__$$eval(
() =>
__$$context.constants.DATASET_DATA?.typeIcons?.[
item.contentType
]
)}
width={32}
width={28}
/>
<Typography.Title
__component_name="Typography.Title"
bold={false}
bordered={false}
<Typography.Text
__component_name="Typography.Text"
disabled={false}
ellipsis={true}
level={1}
style={{ paddingLeft: '8px' }}
strong={false}
style={{
fontSize: '14px',
fontWeight: 500,
paddingLeft: '8px',
}}
>
{__$$eval(() => __$$context.utils.getFullName(item))}
</Typography.Title>
</Typography.Text>
</Col>
<Col
__component_name="Col"
flex="200px"
span={4}
span={3}
style={{
alignItems: 'center',
display: 'flex',
Expand Down Expand Up @@ -1322,8 +1331,8 @@ class Dataset$$Page extends React.Component {
</Col>
<Col
__component_name="Col"
flex="150px"
span={4}
flex=""
span={8}
style={{
alignItems: 'center',
display: 'flex',
Expand Down Expand Up @@ -1371,6 +1380,7 @@ class Dataset$$Page extends React.Component {
);
}.bind(__$$context)}
shape="default"
size="small"
type="text"
>
{this.i18n('i18n-wgpt60zj') /* 新增版本 */}
Expand Down Expand Up @@ -1402,6 +1412,7 @@ class Dataset$$Page extends React.Component {
);
}.bind(__$$context)}
shape="default"
size="small"
type="text"
>
{this.i18n('i18n-z0idrepg') /* - */}
Expand Down
9 changes: 8 additions & 1 deletion src/pages/DatasetVersionDetail/index.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import '@/assets/style/index.less';

body {
font-size: 12px;
}
Expand All @@ -7,5 +9,10 @@ body {
}

.custom-table .tenx-ui-materials-table-thead {
background-color: var(--menu-item-color);
background-color: var(--background-color-body);
}

.dataset-version-header .tenx-ui-materials-card-body {
padding-top: 16px;
padding-bottom: 16px;
}
20 changes: 13 additions & 7 deletions src/pages/DatasetVersionDetail/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -1252,27 +1252,32 @@ class DatasetVersionDetail$$Page extends React.Component {
__component_name="Card"
actions={[]}
bordered={false}
className="dataset-version-header"
hoverable={false}
loading={false}
size="default"
style={{ marginBottom: '16px' }}
type="default"
>
<Row __component_name="Row">
<Col __component_name="Col" flex="470px">
<Col __component_name="Col" flex="470px" span={19}>
<Row __component_name="Row" wrap={true}>
<Col __component_name="Col" span={4}>
<Col __component_name="Col">
<Image
__component_name="Image"
fallback=""
height={64}
height={56}
preview={false}
src={__$$eval(() => this.constants.DATASET_DATA.versionImg)}
width={64}
width={56}
/>
</Col>
<Col __component_name="Col" span={6}>
<Row __component_name="Row" wrap={true}>
<Col __component_name="Col" span={20}>
<Row
__component_name="Row"
style={{ display: 'flex', height: '56px' }}
wrap={true}
>
<Col __component_name="Col" span={24}>
<Typography.Title
__component_name="Typography.Title"
Expand All @@ -1284,7 +1289,7 @@ class DatasetVersionDetail$$Page extends React.Component {
{__$$eval(() => this.data().data?.version || '-')}
</Typography.Title>
</Col>
<Col __component_name="Col" flex="" span={24}>
<Col __component_name="Col" span={24} style={{ marginTop: '-13px' }}>
<Space
__component_name="Space"
align="center"
Expand Down Expand Up @@ -1339,6 +1344,7 @@ class DatasetVersionDetail$$Page extends React.Component {
<Col
__component_name="Col"
flex="auto"
span={5}
style={{ display: 'flex', flexDirection: 'row', justifyContent: 'flex-end' }}
>
<Space __component_name="Space" align="center" direction="horizontal">
Expand Down

0 comments on commit ad15234

Please sign in to comment.