fix: 解决冲突

This commit is contained in:
gaoxiaolin.gao 2018-03-19 11:19:16 +08:00
commit 03514de2b9
2 changed files with 8 additions and 11 deletions

View File

@ -11,8 +11,9 @@ import EasyDragSort from "../../../../components/EasyDragSort/EasyDragSort.js";
import mockEditor from "client/components/AceEditor/mockEditor";
import axios from "axios";
const jSchema = require("json-schema-editor-visual")();
const Jeditor = jSchema.Component;
const jSchema = require("json-schema-editor-visual");
const ResBodySchema = jSchema();
const ReqBodySchema = jSchema();
require("codemirror/lib/codemirror.css"); // codemirror
require("tui-editor/dist/tui-editor.css"); // editor ui
@ -1057,7 +1058,7 @@ class InterfaceEditForm extends Component {
</Tooltip>
全局编辑 退出全屏 请按{" "}F9</span>
): (
<Jeditor onChange={(text)=>{
<ReqBodySchema onChange={(text)=>{
this.setState({
req_body_other: text
})
@ -1150,13 +1151,13 @@ class InterfaceEditForm extends Component {
</div>
) :
(
<Jeditor onChange={(text)=>{
<ResBodySchema onChange={(text)=>{
this.setState({
res_body: text
})
}} data={res_body} />
)
}
)}
<div
id="res_body_json"
style={{

View File

@ -9,11 +9,8 @@ import addInterface from './addInterface.js'
import menu from './menu.js'
import follow from './follow.js'
const jSchema = require('json-schema-editor-visual')()
import { emitHook } from 'client/plugin.js'
let jSchemaModule = jSchema.Model.getReducers();
const reducerModules = {
group,
@ -24,8 +21,7 @@ const reducerModules = {
news,
addInterface,
menu,
follow,
schema: jSchemaModule.schema
follow
}
emitHook('add_reducer', reducerModules);