|
|
|
|
webpackJsonp([127],{3725:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(85),a=(n.n(r),n(72)),i=n.n(a),o=n(862),l=(n.n(o),n(863)),s=n.n(l),f=n(65),u=(n.n(f),n(66)),c=n.n(u),d=n(1212),A=(n.n(d),n(1213)),p=n.n(A),m=n(0),h=n.n(m),b=(n(5),n(45)),C=n(12),g=n.n(C),y=function(e,t,n){return t&&v(e.prototype,t),n&&v(e,n),e};function v(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var B={"Alt-/":"autocomplete"};function w(e){return{lineNumbers:!0,mode:function(e){var t="javascript";if(e&&e.length)for(var n=0;n<e.length;n++){var r=x[e[n]];if(r){t=r;break}}return t}(e),theme:"railscasts",indentUnit:4,matchBrackets:!0,autoRefresh:!0,smartIndent:!0,extraKeys:B,autofocus:!0,styleActiveLine:!0,lint:!0,gutters:["CodeMirror-linenumbers","breakpoints","CodeMirror-lint-markers"]}}var x={JFinal:"text/x-java",Java:"text/x-java",Kotlin:"text/x-kotlin","C/C++":"text/x-c++src",MachineLearning:{name:"python",version:3,singleLineStringErrors:!1},"Python2.7":{name:"python",version:3,singleLineStringErrors:!1},"Python3.6":{name:"python",version:3,singleLineStringErrors:!1}},k=(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(E,m.Component),y(E,[{key:"componentDidMount",value:function(){var e=w(this.props.mirror_name),t=window.CodeMirror.fromTextArea(window.$("#codemirror-file-edit")[0],e);t.setValue(""),t.refresh(),window.editor_tempCodeMirror=t,this.extend_editor=t}},{key:"render",value:function(){var e=this.props.form.getFieldDecorator,t=this.props.match.params.shixunId;return h.a.createElement("div",{className:"educontent"},h.a.createElement("style",null,"\n .formStyle .ant-form-item{\n margin-bottom:10px!important;\n }\n .formStyle .ant-col.ant-form-item-label{\n margin-left:-10px;\n line-height:30px;\n margin-bottom:10px;\n }\n .breadcrumb .ant-breadcrumb-separator{\n margin:0px 2px;\n }\n /*.filecode .CodeMirror.cm-s-railscasts{\n border:1px solid #E5E5E5;\n }\n .filecode .CodeMirror.cm-s-railscasts .CodeMirror-sizer,.filecode .CodeMirror-gutters,.filecode .CodeMirror-scroll{\n background:#fff;\n }\n .filecode .CodeMirror-linenumber{\n text-align:center\n }*/\n "),h.a.createElement("p",{className:"mt10 mb10"},h.a.createElement(p.a,{separator:">",className:"breadcrumb"},h.a.createElement(p.a.Item,{href:"/shixuns"},"实训项目"),h.a.createElement(p.a.Item,{href:"/shixuns/"+t+"/repository"},"版本库"),h.a.createElement(p.a.Item,null,"添加新文件"))),h.a.createElement(s.a,{onSubmit:this.handleSubmit,className:"formStyle"},h.a.createElement("div",{className:"edu-back-white padding20-30 mb10"},h.a.createElement(s.a.Item,{label:"文件名"},e("path",{rules:[{validator:this.checkPath}]})(h.a.createElement(c.a,{placeholder:"输入文件路径名,如:src/HelloWorld.java",className:"winput-300-35 fl"})))),h.a.createElement("div",{className:"edu-back-white padding30"},h.a.createElement("p",{className:"ant-form-item-label"},h.a.createElement("label",null,"内容")),h.a.createElement("div",{className:"mt10 mb25 repoCMWrapper filecode"},h.a.createElement("textarea",{className:"",id:"codemirror-file-edit",style:{display:"none"},name:"content"})),h.a.createElement(s.a.Item,{label:"提交信息"},e("message",{rules:[{required:!0,message:"请输入提交信息"}]})(h.a.createElement("textarea",{className:"winput-100-130 fl"})))),h.a.createElement("div",{className:"clearfix mt30 edu-txt-right mb30"},h.a.createElement(i.a,{type:"primary",className:"defalutSubmitbtn fr ml20",onClick:this.handleSubmit},"提<EFBFBD><EFBFBD>
|