题库地址

video_transcode
杨树林 5 years ago
parent 122d7dc248
commit 8f5b1dea42

@ -1,7 +1,7 @@
/* /*
* @Description: 添加测试用例 * @Description: 添加测试用例
* @Author: tangjiang * @Author: tangjiang
* @Github: * @Github:
* @Date: 2019-11-21 09:19:38 * @Date: 2019-11-21 09:19:38
* @LastEditors : tangjiang * @LastEditors : tangjiang
* @LastEditTime : 2019-12-27 10:37:41 * @LastEditTime : 2019-12-27 10:37:41
@ -19,14 +19,14 @@ const AddTestDemo = (props) => {
const { const {
// key, // key,
// onSubmitTest, // onSubmitTest,
onDeleteTest, onDeleteTest,
testCase, testCase,
testCaseValidate, testCaseValidate,
isOpen isOpen
} = props; } = props;
// const [isEditor, setIsEditor] = useState(false); // 是否是编辑 // const [isEditor, setIsEditor] = useState(false); // 是否是编辑
// 删除操作 // 删除操作
const handleDeletePanel = (e) => { const handleDeletePanel = (e) => {
// console.log('点击的删除按钮') // console.log('点击的删除按钮')
@ -63,7 +63,7 @@ const AddTestDemo = (props) => {
const value = e.target.value; const value = e.target.value;
testCaseOutputChange(value, index); testCaseOutputChange(value, index);
} }
// 右侧删除图标 // 右侧删除图标
const genExtra = () => ( const genExtra = () => (
<Icon <Icon
@ -127,7 +127,7 @@ const AddTestDemo = (props) => {
* 文本输入框可编辑的情况 * 文本输入框可编辑的情况
* 1. 新增时 * 1. 新增时
* 2. isAdd false isEditor 为true * 2. isAdd false isEditor 为true
* @param {*} testCase * @param {*} testCase
*/ */
// const isDisabled = (testCase) => { // const isDisabled = (testCase) => {
// return !testCase.isAdd && !isEditor; // return !testCase.isAdd && !isEditor;
@ -138,21 +138,19 @@ const AddTestDemo = (props) => {
// defaultActiveKey: [isOpen ? '1' : ''] // defaultActiveKey: [isOpen ? '1' : '']
// }; // };
// console.log(activePane); // console.log(activePane);
// 切换手风琴 // 切换手风琴
const handleChangeCollapse = () => { const handleChangeCollapse = () => {
const {index, updateOpenTestCaseIndex} = props; const {index, updateOpenTestCaseIndex} = props;
updateOpenTestCaseIndex(index); updateOpenTestCaseIndex(index);
} }
return ( return (
<Collapse className={'collapse_area'} activeKey={isOpen?'1':''} onChange={() => handleChangeCollapse()}> <Collapse className={'collapse_area'} activeKey={isOpen?'1':''} onChange={() => handleChangeCollapse()}>
<Panel header={`测试用例${props.index + 1}`} extra={genExtra()} key="1"> <Panel header={`测试用例${props.index + 1}`} extra={genExtra()} key="1">
<Form> <Form>
<FormItem <FormItem
label={<span className={'label_text'}>输入</span>} label={<span className={'label_text'}>输入</span>}
validateStatus={testCaseValidate.input.validateStatus}
help={testCaseValidate.input.errMsg}
colon={ false } colon={ false }
> >
<TextArea <TextArea
@ -164,8 +162,6 @@ const AddTestDemo = (props) => {
</FormItem> </FormItem>
<FormItem <FormItem
label={<span className={'label_text'}>输出</span>} label={<span className={'label_text'}>输出</span>}
validateStatus={testCaseValidate.output.validateStatus}
help={testCaseValidate.output.errMsg}
colon={ false } colon={ false }
> >
<TextArea <TextArea

Loading…
Cancel
Save