mirror of
https://github.com/YMFE/yapi.git
synced 2025-02-23 13:59:28 +08:00
fix: 解决冲突
This commit is contained in:
commit
03514de2b9
@ -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={{
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user