fix: 修改 formItemLayout

This commit is contained in:
gaoxiaolin.gao 2018-07-24 14:24:43 +08:00
parent 06e4184c8b
commit 5b80f234c3
2 changed files with 26 additions and 20 deletions

View File

@ -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>
是否开启&nbsp;<a target="_blank" rel="noopener noreferrer" href="https://yapi.ymfe.org/documents/project.html#token%E9%85%8D%E7%BD%AE">
是否开启&nbsp;<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>

View File

@ -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;