mirror of
https://github.com/YMFE/yapi.git
synced 2024-11-27 04:40:08 +08:00
fix: 修改 formItemLayout
This commit is contained in:
parent
06e4184c8b
commit
5b80f234c3
@ -5,6 +5,24 @@ import { Form, Switch, Button, Icon, Tooltip, message } from 'antd';
|
||||
import AceEditor from '../../../../components/AceEditor/AceEditor';
|
||||
const FormItem = Form.Item;
|
||||
import { updateProjectMock, getProject } from '../../../../reducer/modules/project';
|
||||
|
||||
const formItemLayout = {
|
||||
labelCol: {
|
||||
sm: { span: 4 }
|
||||
},
|
||||
wrapperCol: {
|
||||
sm: { span: 16 }
|
||||
}
|
||||
};
|
||||
const tailFormItemLayout = {
|
||||
wrapperCol: {
|
||||
sm: {
|
||||
span: 16,
|
||||
offset: 11
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@connect(
|
||||
state => {
|
||||
return {
|
||||
@ -73,30 +91,18 @@ export default class ProjectMock extends Component {
|
||||
};
|
||||
|
||||
render() {
|
||||
const formItemLayout = {
|
||||
labelCol: {
|
||||
sm: { span: 4 }
|
||||
},
|
||||
wrapperCol: {
|
||||
sm: { span: 16 }
|
||||
}
|
||||
};
|
||||
const tailFormItemLayout = {
|
||||
wrapperCol: {
|
||||
sm: {
|
||||
span: 16,
|
||||
offset: 11
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
return (
|
||||
<div style={{ padding: '20px 10px' }}>
|
||||
<div className="m-panel">
|
||||
<Form>
|
||||
<FormItem
|
||||
label={
|
||||
<span>
|
||||
是否开启 <a target="_blank" rel="noopener noreferrer" href="https://yapi.ymfe.org/documents/project.html#token%E9%85%8D%E7%BD%AE">
|
||||
是否开启 <a
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
href="https://yapi.ymfe.org/documents/project.html#token%E9%85%8D%E7%BD%AE"
|
||||
>
|
||||
<Tooltip title="点击查看文档">
|
||||
<Icon type="question-circle-o" />
|
||||
</Tooltip>
|
||||
|
@ -238,7 +238,7 @@ module.exports = async (ctx, next) => {
|
||||
httpCode: 200,
|
||||
delay: 0
|
||||
};
|
||||
// console.log('project', project);
|
||||
|
||||
if (project.is_mock_open && project.project_mock_script) {
|
||||
// 项目层面的mock脚本解析
|
||||
let script = project.project_mock_script;
|
||||
|
Loading…
Reference in New Issue
Block a user