You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
import React , { Component } from 'react' ;
import { getImageUrl } from 'educoder' ;
import { Modal , InputNumber } from 'antd' ;
import axios from 'axios' ;
import './../questioncss/questioncom.css'
//立即申请试用
class Paperreview _itemModels extends Component {
constructor ( props ) {
super ( props ) ;
this . state = {
value : 0 ,
}
}
onChange = ( value ) => {
//console.log("Paperreview_itemModels");
//console.log(value);
this . setState ( {
value : value ,
} )
}
setDownloadysl = ( ) => {
var re = /^[0-9]+.?[0-9]*$/ ; //判断字符串是否为数字 //判断正整数 /^[1-9]+[0-9]*]*$/
var nubmer = this . state . value ;
if ( ! re . test ( nubmer ) ) {
this . props . showNotification ( ` 必须为数值 ` ) ;
return ;
}
try {
if ( nubmer < 1 ) {
this . props . showNotification ( ` 不能小于0 ` ) ;
return ;
}
} catch ( e ) {
}
console . log ( "必须为数值s" ) ;
this . props . setDownloadys ( this . state . value ) ;
}
render ( ) {
return (
< Modal
keyboard = { false }
closable = { false }
footer = { null }
destroyOnClose = { true }
title = "设置分数"
centered = { true }
visible = { this . props . modalsTypeys === undefined ? false : this . props . modalsTypeys }
width = "442px"
>
< style >
{
`
.yslzxueshisanfd .ant-input-number{
height: 35px !important;
width: 124px !important;
}
`
}
< / s t y l e >
< div className = "educouddiv intermediatecenter" >
< div className = { "tabeltext-alignleft mt10 sortinxdirection yslzxueshisanfd" } >
< p className = "titiles lh35" >
{ this . props . titilesm } : < / p >
< InputNumber min = { 0 }
step = { 0.1 }
onChange = { this . onChange } / >
< p className = "titiles ml5 lh35" >
分 / 题
< / p >
< / d i v >
< div className = "clearfix mt30 edu-txt-center" >
< a className = "task-btn mr30 w80" onClick = { ( ) => this . props . Singlemagazines ( false , null ) } > 取消 < / a >
< a className = "task-btn task-btn-orange w80" onClick = { ( ) => this . setDownloadysl ( ) } > 确定 < / a >
< / d i v >
< / d i v >
< / M o d a l >
)
}
}
export default Paperreview _itemModels ;