mirror of https://github.com/openspug/spug
U 优化主机分组名称过长时换行的问题
parent
b92d0b8a8a
commit
ce7c17fe4d
|
@ -19,6 +19,7 @@ import {
|
||||||
} from '@ant-design/icons';
|
} from '@ant-design/icons';
|
||||||
import { AuthFragment } from 'components';
|
import { AuthFragment } from 'components';
|
||||||
import { hasPermission, http } from 'libs';
|
import { hasPermission, http } from 'libs';
|
||||||
|
import styles from './index.module.less';
|
||||||
import store from './store';
|
import store from './store';
|
||||||
import lds from 'lodash';
|
import lds from 'lodash';
|
||||||
|
|
||||||
|
@ -146,9 +147,7 @@ export default observer(function () {
|
||||||
} else {
|
} else {
|
||||||
const extend = nodeData.all_host_ids && nodeData.all_host_ids.length ? `(${nodeData.all_host_ids.length})` : null
|
const extend = nodeData.all_host_ids && nodeData.all_host_ids.length ? `(${nodeData.all_host_ids.length})` : null
|
||||||
return (
|
return (
|
||||||
<div style={{display: 'inline-block', lineHeight: '24px'}}>
|
<span style={{lineHeight: '24px'}}>{nodeData.title}{extend}</span>
|
||||||
<span>{nodeData.title}{extend}</span>
|
|
||||||
</div>
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -157,7 +156,7 @@ export default observer(function () {
|
||||||
return (
|
return (
|
||||||
<Card
|
<Card
|
||||||
title="分组列表"
|
title="分组列表"
|
||||||
style={{height: '100%'}}
|
className={styles.group}
|
||||||
extra={(
|
extra={(
|
||||||
<AuthFragment auth="admin">
|
<AuthFragment auth="admin">
|
||||||
<Switch
|
<Switch
|
||||||
|
|
|
@ -58,4 +58,14 @@
|
||||||
border-left: none;
|
border-left: none;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.group {
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
|
:global(.ant-tree-node-content-wrapper) {
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue