diff --git a/src/forge/Newfile/Index.js b/src/forge/Newfile/Index.js index 3df1614f8..a9644a641 100644 --- a/src/forge/Newfile/Index.js +++ b/src/forge/Newfile/Index.js @@ -1,8 +1,94 @@ +// import React, { Component } from "react"; +// import Meditor from "./m_editor"; +// import "./index.css"; +// import { Input } from "antd"; +// import FileLanguage from '../Component/FileLanguage'; + +// class Index extends Component { +// constructor(props) { +// super(props); +// this.state = { +// editorValue: "", +// filename: "", +// language: undefined +// }; +// } + +// // 命名文件 +// changeFileName = (e) => { +// this.setState({ +// filename: e.target.value, +// }); +// }; +// // 取消,弹框询问 +// CancelAddFile = () => { +// this.props.history.goBack(); +// }; + +// select_language = (e) => { +// console.log(e) +// this.setState({ +// language: e +// }) + +// } + +// render() { +// const { pathname } = this.props.location; +// const { filename, language } = this.state; +// const urlroot = pathname.split("newfile")[1]; +// const file_path = `${urlroot}/${filename}`; +// const { projectDetail } = this.props; + +// return ( +// +// +// +// 新建文件 +// +// +// +// +// +// +// +// +// 取消 +// +// +// +// +// +// +// +// +// +// +// ); +// } +// } +// export default Index; + import React, { Component } from "react"; import Meditor from "./m_editor"; +import Top from "../Main/DetailTop"; import "./index.css"; -import { Input } from "antd"; -import FileLanguage from '../Component/FileLanguage'; +import { Input, Select } from "antd"; class Index extends Component { constructor(props) { @@ -39,9 +125,62 @@ class Index extends Component { const urlroot = pathname.split("newfile")[1]; const file_path = `${urlroot}/${filename}`; const { projectDetail } = this.props; - + const Option = Select.Option; + const languages = [ + "apex", + "azcli", + "bat", + "clojure", + "coffee", + "cpp", + "csharp", + "csp", + "css", + "dockerfile", + "fsharp", + "go", + "handlebars", + "html", + "ini", + "java", + "javascript", + "json", + "less", + "lua", + "markdown", + "msdax", + "mysql", + "objective", + "perl", + "pgsql", + "php", + "postiats", + "powerquery", + "powershell", + "pug", + "python", + "r", + "razor", + "redis", + "redshift", + "ruby", + "rust", + "sb", + "scheme", + "scss", + "shell", + "solidity", + "sql", + "st", + "swift", + "typescript", + "vb", + "xml", + "yaml", + ]; return ( + 新建文件 @@ -64,7 +203,12 @@ class Index extends Component { - + + 请选择文本语言 + {languages.map((item, key) => { + return {item}; + })} +
+// 新建文件 +//
新建文件 @@ -64,7 +203,12 @@ class Index extends Component {