mirror of https://github.com/openspug/spug
U 优化Breadcrumb组件
parent
8fd9780250
commit
9a08f25161
|
@ -3,20 +3,18 @@
|
||||||
* Copyright (c) <spug.dev@gmail.com>
|
* Copyright (c) <spug.dev@gmail.com>
|
||||||
* Released under the AGPL-3.0 License.
|
* Released under the AGPL-3.0 License.
|
||||||
*/
|
*/
|
||||||
import React from "react";
|
import React from 'react';
|
||||||
import Editor from 'react-ace';
|
import Editor from 'react-ace';
|
||||||
import 'ace-builds/src-noconflict/ext-language_tools';
|
|
||||||
import 'ace-builds/src-noconflict/mode-sh';
|
import 'ace-builds/src-noconflict/mode-sh';
|
||||||
|
import 'ace-builds/src-noconflict/mode-python';
|
||||||
import 'ace-builds/src-noconflict/theme-tomorrow';
|
import 'ace-builds/src-noconflict/theme-tomorrow';
|
||||||
import 'ace-builds/src-noconflict/snippets/sh';
|
|
||||||
|
|
||||||
export default function (props) {
|
export default function (props) {
|
||||||
return (
|
return (
|
||||||
<Editor
|
<Editor
|
||||||
wrapEnabled
|
|
||||||
theme="tomorrow"
|
theme="tomorrow"
|
||||||
enableBasicAutocompletion={true}
|
fontSize={13}
|
||||||
enableSnippets={true}
|
tabSize={2}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
|
|
|
@ -27,10 +27,12 @@ export default class extends React.Component {
|
||||||
<Breadcrumb>
|
<Breadcrumb>
|
||||||
{this.props.children}
|
{this.props.children}
|
||||||
</Breadcrumb>
|
</Breadcrumb>
|
||||||
<div className={styles.title}>
|
{this.props.extra ? (
|
||||||
<span>{title}</span>
|
<div className={styles.title}>
|
||||||
{this.props.extra}
|
<span>{title}</span>
|
||||||
</div>
|
{this.props.extra}
|
||||||
|
</div>
|
||||||
|
) : null}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -139,7 +139,7 @@
|
||||||
|
|
||||||
.breadcrumb {
|
.breadcrumb {
|
||||||
margin: -24px -24px 24px -24px;
|
margin: -24px -24px 24px -24px;
|
||||||
padding: 16px 24px 0 24px;
|
padding: 16px 24px;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border-bottom: 1px solid #e8e8e8;
|
border-bottom: 1px solid #e8e8e8;
|
||||||
|
|
||||||
|
@ -147,9 +147,8 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-bottom: 9px;
|
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
line-height: 50px;
|
margin-top: 8px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue