|
|
@ -18,8 +18,7 @@ const { TabPane } = Tabs;
|
|
|
|
const ControlSetting = (props) => {
|
|
|
|
const ControlSetting = (props) => {
|
|
|
|
|
|
|
|
|
|
|
|
const {
|
|
|
|
const {
|
|
|
|
hack,
|
|
|
|
editor_code,
|
|
|
|
userCode,
|
|
|
|
|
|
|
|
inputValue,
|
|
|
|
inputValue,
|
|
|
|
loading,
|
|
|
|
loading,
|
|
|
|
submitLoading,
|
|
|
|
submitLoading,
|
|
|
@ -59,7 +58,7 @@ const ControlSetting = (props) => {
|
|
|
|
|
|
|
|
|
|
|
|
// 调试代码
|
|
|
|
// 调试代码
|
|
|
|
const handleTestCode = (e) => {
|
|
|
|
const handleTestCode = (e) => {
|
|
|
|
if (!userCode) {
|
|
|
|
if (!editor_code) {
|
|
|
|
notification.warning({
|
|
|
|
notification.warning({
|
|
|
|
message: '提示',
|
|
|
|
message: '提示',
|
|
|
|
description: '代码块内容不能为空'
|
|
|
|
description: '代码块内容不能为空'
|
|
|
@ -78,7 +77,7 @@ const ControlSetting = (props) => {
|
|
|
|
// 提交
|
|
|
|
// 提交
|
|
|
|
const handleSubmit = (e) => {
|
|
|
|
const handleSubmit = (e) => {
|
|
|
|
e.preventDefault();
|
|
|
|
e.preventDefault();
|
|
|
|
if (!userCode) {
|
|
|
|
if (!editor_code) {
|
|
|
|
notification.warning({
|
|
|
|
notification.warning({
|
|
|
|
message: '提示',
|
|
|
|
message: '提示',
|
|
|
|
description: '代码块内容不能为空'
|
|
|
|
description: '代码块内容不能为空'
|
|
|
@ -108,7 +107,7 @@ const ControlSetting = (props) => {
|
|
|
|
style={{ top: showTextResult ? '-267px' : 0 }}
|
|
|
|
style={{ top: showTextResult ? '-267px' : 0 }}
|
|
|
|
>
|
|
|
|
>
|
|
|
|
{/* <i className="iconfont icon-xiajiantou icon"></i> */}
|
|
|
|
{/* <i className="iconfont icon-xiajiantou icon"></i> */}
|
|
|
|
<Icon type={ showTextResult ? "down" : "up" } />
|
|
|
|
<Icon type={showTextResult ? "down" : "up"} />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<Tabs
|
|
|
|
<Tabs
|
|
|
|
className={classNames}
|
|
|
|
className={classNames}
|
|
|
@ -134,10 +133,8 @@ const ControlSetting = (props) => {
|
|
|
|
<Button
|
|
|
|
<Button
|
|
|
|
type="link"
|
|
|
|
type="link"
|
|
|
|
style={{ color: '#fff' }}
|
|
|
|
style={{ color: '#fff' }}
|
|
|
|
// onClick={handleShowControl}
|
|
|
|
|
|
|
|
>
|
|
|
|
>
|
|
|
|
控制台
|
|
|
|
控制台
|
|
|
|
{/* <Icon type={ showTextResult ? "down" : "up" } /> */}
|
|
|
|
|
|
|
|
</Button>
|
|
|
|
</Button>
|
|
|
|
<p>
|
|
|
|
<p>
|
|
|
|
<Button ghost
|
|
|
|
<Button ghost
|
|
|
@ -151,7 +148,6 @@ const ControlSetting = (props) => {
|
|
|
|
type="primary"
|
|
|
|
type="primary"
|
|
|
|
onClick={handleSubmit}
|
|
|
|
onClick={handleSubmit}
|
|
|
|
>
|
|
|
|
>
|
|
|
|
{/* {props.identifier ? '更新' : '提交'} */}
|
|
|
|
|
|
|
|
提交
|
|
|
|
提交
|
|
|
|
</Button>
|
|
|
|
</Button>
|
|
|
|
</p>
|
|
|
|
</p>
|
|
|
@ -161,12 +157,12 @@ const ControlSetting = (props) => {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const mapStateToProps = (state) => {
|
|
|
|
const mapStateToProps = (state) => {
|
|
|
|
const {commonReducer, ojForUserReducer} = state;
|
|
|
|
const { commonReducer, ojForUserReducer } = state;
|
|
|
|
const {loading, excuteState, submitLoading, showOrHideControl } = commonReducer;
|
|
|
|
const { loading, excuteState, submitLoading, showOrHideControl } = commonReducer;
|
|
|
|
const { commitTestRecordDetail, hack, userCode } = ojForUserReducer;
|
|
|
|
const { commitTestRecordDetail, hack, editor_code } = ojForUserReducer;
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
hack,
|
|
|
|
hack,
|
|
|
|
userCode,
|
|
|
|
editor_code,
|
|
|
|
loading,
|
|
|
|
loading,
|
|
|
|
submitLoading,
|
|
|
|
submitLoading,
|
|
|
|
excuteState,
|
|
|
|
excuteState,
|
|
|
|