U 优化样式问题

pull/418/head
vapao 2021-12-09 17:44:38 +08:00
parent da19a6981e
commit 411bbc2c57
25 changed files with 47 additions and 44 deletions

View File

@ -15,6 +15,7 @@ export default function (props) {
theme="tomorrow"
fontSize={13}
tabSize={2}
style={{fontFamily: 'source-code-pro, Menlo, Monaco, Consolas, PingFang SC, Microsoft YaHei'}}
{...props}
/>
)

View File

@ -1,20 +1,27 @@
@import '~antd/dist/antd.css';
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
"Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Microsoft YaHei, Source Han Sans SC, Noto Sans CJK SC, WenQuanYi Micro Hei, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
overflow: hidden;
}
div::-webkit-scrollbar, textarea::-webkit-scrollbar {
width: 6px;
}
div::-webkit-scrollbar-thumb, textarea::-webkit-scrollbar-thumb {
border-radius: 6px;
background: rgba(0, 0, 0, .2);
}
code {
font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
monospace;
font-family: source-code-pro, Menlo, Monaco, Consolas, Courier New, monospace, PingFang SC, Microsoft YaHei;
}
/* Common CSS style */
.none {
display: none;
display: none;
}

View File

@ -74,6 +74,10 @@
overflow-y: scroll;
}
.content::-webkit-scrollbar {
width: 0;
}
.sider {
height: 100%;
width: 208px;
@ -83,7 +87,10 @@
.menus {
overflow: auto;
}
.menus::-webkit-scrollbar {
width: 0;
}
.logo {

View File

@ -91,7 +91,6 @@ class ComTable extends React.Component {
pagination={{
showSizeChanger: true,
showLessItems: true,
hideOnSinglePage: true,
showTotal: total => `${total}`,
pageSizeOptions: ['10', '20', '50', '100']
}}

View File

@ -50,7 +50,6 @@ class ComTable extends React.Component {
pagination={{
showSizeChanger: true,
showLessItems: true,
hideOnSinglePage: true,
showTotal: total => `${total}`,
pageSizeOptions: ['10', '20', '50', '100']
}}>

View File

@ -72,7 +72,6 @@ class ComTable extends React.Component {
pagination={{
showSizeChanger: true,
showLessItems: true,
hideOnSinglePage: true,
showTotal: total => `${total}`,
pageSizeOptions: ['10', '20', '50', '100']
}}>

View File

@ -59,7 +59,6 @@ class ComTable extends React.Component {
pagination={{
showSizeChanger: true,
showLessItems: true,
hideOnSinglePage: true,
showTotal: total => `${total}`,
pageSizeOptions: ['10', '20', '50', '100']
}}>

View File

@ -54,7 +54,6 @@ function ComTable() {
pagination={{
showSizeChanger: true,
showLessItems: true,
hideOnSinglePage: true,
showTotal: total => `${total}`,
pageSizeOptions: ['10', '20', '50', '100']
}}>

View File

@ -55,7 +55,6 @@ class ComTable extends React.Component {
pagination={{
showSizeChanger: true,
showLessItems: true,
hideOnSinglePage: true,
showTotal: total => `${total}`,
pageSizeOptions: ['10', '20', '50', '100']
}}>

View File

@ -35,7 +35,7 @@ export default function () {
{ip !== null && <Tag closable color="#1890ff" onClose={() => setIp(null)}>{ip}</Tag>}
</div>
)}>
<List style={{height: 329, overflow: 'scroll'}} dataSource={dataSource} renderItem={item => (
<List className={styles.loginActive} dataSource={dataSource} renderItem={item => (
<List.Item>
<span>{item.created_at}</span>
<span className={styles.spanText} onClick={() => setName(item.nickname)}>{item.nickname}</span>

View File

@ -1,25 +1,30 @@
:global(.ant-card-extra) {
padding: 12px 0;
padding: 12px 0;
}
.spanButton {
cursor: pointer;
margin-right: 24px;
color: rgba(0, 0, 0, .65);
cursor: pointer;
margin-right: 24px;
color: rgba(0, 0, 0, .65);
}
.spanButtonActive {
cursor: pointer;
margin-right: 24px;
color: #1890ff;
cursor: pointer;
margin-right: 24px;
color: #1890ff;
}
.spanButton:hover {
color: #1890ff;
color: #1890ff;
}
.spanText {
cursor: pointer;
color: #1890ff;
padding: 0 4px;
cursor: pointer;
color: #1890ff;
padding: 0 4px;
}
.loginActive {
height: 329px;
overflow: auto;
}

View File

@ -135,7 +135,6 @@ function ComTable() {
pagination={{
showSizeChanger: true,
showLessItems: true,
hideOnSinglePage: true,
showTotal: total => `${total}`,
pageSizeOptions: ['10', '20', '50', '100']
}}>

View File

@ -71,6 +71,7 @@ export default observer(function Console() {
function initialTerm() {
const fitPlugin = new FitAddon()
term.loadAddon(fitPlugin)
term.setOption('fontFamily', 'source-code-pro, Menlo, Monaco, Consolas, PingFang SC, Microsoft YaHei')
term.setOption('theme', {background: '#fafafa', foreground: '#000', selection: '#999'})
term.open(el.current)
term.fit = () => fitPlugin.fit()

View File

@ -81,7 +81,6 @@ function ComTable() {
pagination={{
showSizeChanger: true,
showLessItems: true,
hideOnSinglePage: true,
showTotal: total => `${total}`,
pageSizeOptions: ['10', '20', '50', '100']
}}>

View File

@ -14,6 +14,7 @@ function OutView(props) {
setTimeout(() => {
const fitPlugin = new FitAddon()
const term = new Terminal({disableStdin: true})
term.setOption('fontFamily', 'source-code-pro, Menlo, Monaco, Consolas, PingFang SC, Microsoft YaHei')
term.loadAddon(fitPlugin)
term.setOption('theme', {background: '#fff', foreground: '#000', selection: '#999'})
term.open(el.current)

View File

@ -179,7 +179,6 @@ function ComTable() {
pagination={{
showSizeChanger: true,
showLessItems: true,
hideOnSinglePage: true,
showTotal: total => `${total}`,
pageSizeOptions: ['10', '20', '50', '100']
}}/>

View File

@ -31,6 +31,7 @@ function OutView(props) {
gCurrent = current
const fitPlugin = new FitAddon()
term.setOption('disableStdin', false)
term.setOption('fontFamily', 'source-code-pro, Menlo, Monaco, Consolas, PingFang SC, Microsoft YaHei')
term.setOption('theme', {background: '#f0f0f0', foreground: '#000', selection: '#999', cursor: '#f0f0f0'})
term.loadAddon(fitPlugin)
term.open(el.current)

View File

@ -57,7 +57,6 @@ class ComTable extends React.Component {
pagination={{
showSizeChanger: true,
showLessItems: true,
hideOnSinglePage: true,
showTotal: total => `${total}`,
pageSizeOptions: ['10', '20', '50', '100']
}}>

View File

@ -166,7 +166,7 @@ export default observer(function () {
onChange={setDraggable}
checkedChildren="排版"
unCheckedChildren="浏览"/>
<Tooltip title="右键点击分组进行编辑,开启排版模式后可通过拖拽分组进行快速排序。">
<Tooltip title="排版模式下,可通过拖拽分组实现快速排序。">
<QuestionCircleOutlined style={{marginLeft: 8, color: '#999'}}/>
</Tooltip>
</AuthFragment>)}>

View File

@ -69,7 +69,6 @@ class ComTable extends React.Component {
pagination={{
showSizeChanger: true,
showLessItems: true,
hideOnSinglePage: true,
showTotal: total => `${total}`,
pageSizeOptions: ['10', '20', '50', '100']
}}>

View File

@ -145,7 +145,6 @@ class ComTable extends React.Component {
pagination={{
showSizeChanger: true,
showLessItems: true,
hideOnSinglePage: true,
showTotal: total => `${total}`,
pageSizeOptions: ['10', '20', '50', '100']
}}

View File

@ -18,6 +18,7 @@ function WebSSH(props) {
useEffect(() => {
const fitPlugin = new FitAddon();
term.loadAddon(fitPlugin);
term.setOption('fontFamily', 'source-code-pro, Menlo, Monaco, Consolas, PingFang SC, Microsoft YaHei')
term.open(container.current);
term.write('WebSocket connecting ... ');
const protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';

View File

@ -112,7 +112,6 @@ class ComTable extends React.Component {
pagination={{
showSizeChanger: true,
showLessItems: true,
hideOnSinglePage: true,
showTotal: total => `${total}`,
pageSizeOptions: ['10', '20', '50', '100']
}}

View File

@ -56,14 +56,7 @@ export default observer(function () {
confirmLoading={loading}
onOk={handleSubmit}>
<Form layout="vertical">
<Form.Item label={
<span>
授权访问主机组&nbsp;
<Tooltip title="主机权限将全局影响属于该角色的用户能够看到的主机。">
<QuestionCircleOutlined/>
</Tooltip>
</span>
}>
<Form.Item label="授权访问主机组" tooltip="主机权限将全局影响属于该角色的用户能够看到的主机。">
{groups.map((id, index) => (
<div className={styles.groupItem} key={index}>
<TreeSelect

View File

@ -69,7 +69,6 @@ class ComTable extends React.Component {
pagination={{
showSizeChanger: true,
showLessItems: true,
hideOnSinglePage: true,
showTotal: total => `${total}`,
pageSizeOptions: ['10', '20', '50', '100']
}}