This commit is contained in:
2021-07-02 15:43:49 +08:00
15 changed files with 157 additions and 69 deletions

View File

@@ -3,6 +3,9 @@ import { Form, message as Message, Spin } from 'antd'
import { AntIcon } from 'components'
import { cloneDeep } from 'lodash'
import MonacoEditor from 'react-monaco-editor'
import store from 'store'
const { getState } = store
const initialValues = {}
@@ -10,6 +13,7 @@ export default class form extends Component {
state = {
// 加载状态
loading: true,
...getState('layout'),
}
// 表单实例
@@ -83,6 +87,8 @@ export default class form extends Component {
//#endregion
render() {
const { theme } = this.state
return (
<Form initialValues={initialValues} ref={this.form} className="yo-form">
<Spin spinning={this.state.loading} indicator={<AntIcon type="loading" />}>
@@ -90,7 +96,7 @@ export default class form extends Component {
<MonacoEditor
height={300}
language="json"
theme="vs-dark"
theme={theme === 'dark' ? 'vs-dark' : 'default'}
options={{
fontSize: 12,
}}