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.
488 lines
20 KiB
488 lines
20 KiB
"use strict";
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[7046],{
|
|
|
|
/***/ 80488:
|
|
/*!**********************************************************!*\
|
|
!*** ./src/components/FixedButton/index.tsx + 1 modules ***!
|
|
\**********************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
t: function() { return /* binding */ FixedButton; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js
|
|
var es_button = __webpack_require__(3113);
|
|
;// CONCATENATED MODULE: ./src/components/FixedButton/index.less?modules
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ var FixedButtonmodules = ({"buttonFixed":"buttonFixed___vyq30","button":"button___hxmYv","buttonWrap":"buttonWrap___uK8dl"});
|
|
// EXTERNAL MODULE: ./node_modules/_classnames@2.5.1@classnames/index.js
|
|
var _classnames_2_5_1_classnames = __webpack_require__(92310);
|
|
var _classnames_2_5_1_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_5_1_classnames);
|
|
;// CONCATENATED MODULE: ./src/components/FixedButton/index.tsx
|
|
var __defProp = Object.defineProperty;
|
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
var __spreadValues = (a, b) => {
|
|
for (var prop in b || (b = {}))
|
|
if (__hasOwnProp.call(b, prop))
|
|
__defNormalProp(a, prop, b[prop]);
|
|
if (__getOwnPropSymbols)
|
|
for (var prop of __getOwnPropSymbols(b)) {
|
|
if (__propIsEnum.call(b, prop))
|
|
__defNormalProp(a, prop, b[prop]);
|
|
}
|
|
return a;
|
|
};
|
|
|
|
|
|
|
|
|
|
const FixedButton = ({
|
|
cancelText = "\u53D6\u6D88",
|
|
okText = "\u786E\u5B9A",
|
|
loading = false,
|
|
hasOkBtn = true,
|
|
hasCancelBtn = true,
|
|
okButtonProps = {},
|
|
onCancel = () => {
|
|
},
|
|
onOk = () => {
|
|
},
|
|
className = ""
|
|
}) => {
|
|
return /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: _classnames_2_5_1_classnames_default()(FixedButtonmodules.buttonFixed, className) }, /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: FixedButtonmodules.buttonWrap }, hasCancelBtn && /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
es_button/* default */.ZP,
|
|
{
|
|
size: "middle",
|
|
className: `${FixedButtonmodules.button} mr20`,
|
|
onClick: onCancel
|
|
},
|
|
cancelText
|
|
), hasOkBtn && /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
es_button/* default */.ZP,
|
|
__spreadValues({
|
|
size: "middle",
|
|
type: "primary",
|
|
className: `${FixedButtonmodules.button} mr20`,
|
|
loading,
|
|
onClick: onOk
|
|
}, okButtonProps),
|
|
okText
|
|
)));
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 60759:
|
|
/*!*************************************************************!*\
|
|
!*** ./src/components/markdown-editor/code-block/index.tsx ***!
|
|
\*************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ h: function() { return /* binding */ MyCodeMirror; }
|
|
/* harmony export */ });
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 59301);
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! antd */ 57809);
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! antd */ 78241);
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! antd */ 3113);
|
|
/* harmony import */ var codemirror__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! codemirror */ 89780);
|
|
/* harmony import */ var codemirror__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(codemirror__WEBPACK_IMPORTED_MODULE_1__);
|
|
/* harmony import */ var codemirror_lib_codemirror_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! codemirror/lib/codemirror.css */ 98151);
|
|
/* harmony import */ var codemirror_theme_blackboard_css__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! codemirror/theme/blackboard.css */ 83463);
|
|
var __defProp = Object.defineProperty;
|
|
var __defProps = Object.defineProperties;
|
|
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
var __spreadValues = (a, b) => {
|
|
for (var prop in b || (b = {}))
|
|
if (__hasOwnProp.call(b, prop))
|
|
__defNormalProp(a, prop, b[prop]);
|
|
if (__getOwnPropSymbols)
|
|
for (var prop of __getOwnPropSymbols(b)) {
|
|
if (__propIsEnum.call(b, prop))
|
|
__defNormalProp(a, prop, b[prop]);
|
|
}
|
|
return a;
|
|
};
|
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
|
|
|
|
|
|
|
|
|
const Option = antd__WEBPACK_IMPORTED_MODULE_4__["default"].Option;
|
|
const formItemLayout = {
|
|
labelCol: { span: 4 },
|
|
wrapperCol: { span: 20 }
|
|
};
|
|
const LanguageDesc = {
|
|
asp: ["ASP", "vbscript"],
|
|
actionscript: ["ActionScript(3.0)/Flash/Flex", "clike"],
|
|
bash: ["Bash/Bat", "shell"],
|
|
css: ["CSS", "css"],
|
|
c: ["C", "clike"],
|
|
cpp: ["C++", "clike"],
|
|
csharp: ["C#", "clike"],
|
|
coffeescript: ["CoffeeScript", "coffeescript"],
|
|
d: ["D", "d"],
|
|
dart: ["Dart", "dart"],
|
|
delphi: ["Delphi/Pascal", "pascal"],
|
|
erlang: ["Erlang", "erlang"],
|
|
go: ["Golang", "go"],
|
|
groovy: ["Groovy", "groovy"],
|
|
html: ["HTML", "text/html"],
|
|
java: ["Java", "clike"],
|
|
json: ["JSON", "text/json"],
|
|
javascript: ["Javascript", "javascript"],
|
|
lua: ["Lua", "lua"],
|
|
less: ["LESS", "css"],
|
|
markdown: ["Markdown", "gfm"],
|
|
"objective-c": ["Objective-C", "clike"],
|
|
php: ["PHP", "php"],
|
|
perl: ["Perl", "perl"],
|
|
python: ["Python", "python"],
|
|
r: ["R", "r"],
|
|
rst: ["reStructedText", "rst"],
|
|
ruby: ["Ruby", "ruby"],
|
|
sql: ["SQL", "sql"],
|
|
sass: ["SASS/SCSS", "sass"],
|
|
shell: ["Shell", "shell"],
|
|
scala: ["Scala", "clike"],
|
|
swift: ["Swift", "clike"],
|
|
vb: ["VB/VBScript", "vb"],
|
|
xml: ["XML", "text/xml"],
|
|
yaml: ["YAML", "yaml"]
|
|
};
|
|
/* harmony default export */ __webpack_exports__.Z = (({ callback, onCancel }) => {
|
|
const [mode, setMode] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)("python");
|
|
function onSetMode(value) {
|
|
setMode(LanguageDesc[value][1]);
|
|
}
|
|
function onSubmit(values) {
|
|
callback(values);
|
|
}
|
|
return /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(
|
|
antd__WEBPACK_IMPORTED_MODULE_5__["default"],
|
|
__spreadProps(__spreadValues({}, formItemLayout), {
|
|
className: "code-block-panel",
|
|
initialValues: { language: "python", content: "" },
|
|
onFinish: onSubmit,
|
|
style: { width: 500 }
|
|
}),
|
|
/* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(antd__WEBPACK_IMPORTED_MODULE_5__["default"].Item, { label: "\u4EE3\u7801\u8BED\u8A00", name: "language" }, /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(
|
|
antd__WEBPACK_IMPORTED_MODULE_4__["default"],
|
|
{
|
|
getPopupContainer: (trigger) => trigger.parentNode,
|
|
onChange: onSetMode
|
|
},
|
|
Object.keys(LanguageDesc).map((item) => /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(Option, { key: item, value: item }, LanguageDesc[item][0]))
|
|
)),
|
|
/* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(
|
|
antd__WEBPACK_IMPORTED_MODULE_5__["default"].Item,
|
|
{
|
|
label: "\u4EE3\u7801\u5185\u5BB9",
|
|
name: "content",
|
|
rules: [{ required: true, message: "\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9" }]
|
|
},
|
|
/* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(MyCodeMirror, { mode })
|
|
),
|
|
/* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: "flex-container flex-end" }, /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(antd__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .ZP, { type: "primary", htmlType: "submit", style: { marginRight: 10 } }, "\u786E\u5B9A"), /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(antd__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .ZP, { type: "ghost", onClick: onCancel }, "\u53D6\u6D88"))
|
|
);
|
|
});
|
|
function MyCodeMirror({ value, onChange, mode, options = {} }) {
|
|
const el = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();
|
|
const [cm, setCm] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)();
|
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
if (cm) {
|
|
let onChangeHandler = function(cm2) {
|
|
const content = cm2.getValue();
|
|
onChange && onChange(content);
|
|
};
|
|
cm.on("change", onChangeHandler);
|
|
return () => {
|
|
cm.off("change", onChangeHandler);
|
|
};
|
|
}
|
|
}, [cm, onChange]);
|
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
if (cm) {
|
|
cm.setOption("mode", mode);
|
|
}
|
|
}, [cm, mode]);
|
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
if (cm) {
|
|
if (value !== cm.getValue() || value === "") {
|
|
setTimeout(() => {
|
|
cm.setValue(value || "");
|
|
}, 300);
|
|
}
|
|
}
|
|
}, [cm, value]);
|
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
if (el.current && !cm) {
|
|
const instance = codemirror__WEBPACK_IMPORTED_MODULE_1___default().fromTextArea(el.current, __spreadValues({
|
|
mode,
|
|
lineNumbers: true,
|
|
lineWrapping: true,
|
|
autoCloseBrackets: true,
|
|
tabSize: 4,
|
|
autofocus: true,
|
|
autoCloseTags: true,
|
|
matchBrackets: true,
|
|
styleActiveLine: true
|
|
}, options));
|
|
setCm(instance);
|
|
}
|
|
}, [el.current, cm]);
|
|
return /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: "my-codemirror-container" }, /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("textarea", { ref: el }));
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 57638:
|
|
/*!***************************************************************************!*\
|
|
!*** ./src/pages/Shixuns/Detail/Repository/AddFile/index.tsx + 1 modules ***!
|
|
\***************************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
// ESM COMPAT FLAG
|
|
__webpack_require__.r(__webpack_exports__);
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
"default": function() { return /* binding */ Repository_AddFile; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
// EXTERNAL MODULE: ./src/.umi-production/exports.ts + 15 modules
|
|
var _umi_production_exports = __webpack_require__(23852);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/form/index.js + 19 modules
|
|
var es_form = __webpack_require__(78241);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/index.js + 5 modules
|
|
var input = __webpack_require__(20008);
|
|
// EXTERNAL MODULE: ./src/components/markdown-editor/code-block/index.tsx
|
|
var code_block = __webpack_require__(60759);
|
|
// EXTERNAL MODULE: ./src/components/FixedButton/index.tsx + 1 modules
|
|
var FixedButton = __webpack_require__(80488);
|
|
;// CONCATENATED MODULE: ./src/pages/Shixuns/Detail/Repository/AddFile/index.less?modules
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ var AddFilemodules = ({"bg":"bg___YV4bB","wrap":"wrap___kzW1f","title":"title___qum64","path":"path___G15kO","colorBlue":"colorBlue___LDjoN","width240":"width240___QOLSj"});
|
|
;// CONCATENATED MODULE: ./src/pages/Shixuns/Detail/Repository/AddFile/index.tsx
|
|
var __defProp = Object.defineProperty;
|
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
var __spreadValues = (a, b) => {
|
|
for (var prop in b || (b = {}))
|
|
if (__hasOwnProp.call(b, prop))
|
|
__defNormalProp(a, prop, b[prop]);
|
|
if (__getOwnPropSymbols)
|
|
for (var prop of __getOwnPropSymbols(b)) {
|
|
if (__propIsEnum.call(b, prop))
|
|
__defNormalProp(a, prop, b[prop]);
|
|
}
|
|
return a;
|
|
};
|
|
var __objRest = (source, exclude) => {
|
|
var target = {};
|
|
for (var prop in source)
|
|
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
target[prop] = source[prop];
|
|
if (source != null && __getOwnPropSymbols)
|
|
for (var prop of __getOwnPropSymbols(source)) {
|
|
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
target[prop] = source[prop];
|
|
}
|
|
return target;
|
|
};
|
|
var __async = (__this, __arguments, generator) => {
|
|
return new Promise((resolve, reject) => {
|
|
var fulfilled = (value) => {
|
|
try {
|
|
step(generator.next(value));
|
|
} catch (e) {
|
|
reject(e);
|
|
}
|
|
};
|
|
var rejected = (value) => {
|
|
try {
|
|
step(generator.throw(value));
|
|
} catch (e) {
|
|
reject(e);
|
|
}
|
|
};
|
|
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
});
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const AddFile = (_a) => {
|
|
var _b = _a, {
|
|
shixunsDetail,
|
|
globalSetting,
|
|
loading,
|
|
user,
|
|
dispatch
|
|
} = _b, props = __objRest(_b, [
|
|
"shixunsDetail",
|
|
"globalSetting",
|
|
"loading",
|
|
"user",
|
|
"dispatch"
|
|
]);
|
|
const location = (0,_umi_production_exports.useLocation)();
|
|
const [formValue, setFormValue] = (0,_react_17_0_2_react.useState)({});
|
|
const isRepository = (0,_react_17_0_2_react.useRef)();
|
|
const shixunId = (0,_react_17_0_2_react.useRef)();
|
|
const [form] = es_form["default"].useForm();
|
|
const [filePath, setFilePath] = (0,_react_17_0_2_react.useState)("");
|
|
(0,_react_17_0_2_react.useEffect)(() => {
|
|
dispatch({
|
|
type: "globalSetting/footerToggle",
|
|
payload: false
|
|
});
|
|
return () => {
|
|
dispatch({
|
|
type: "globalSetting/footerToggle",
|
|
payload: true
|
|
});
|
|
};
|
|
}, []);
|
|
(0,_react_17_0_2_react.useEffect)(() => {
|
|
const pathArray = sessionStorage.getItem("pathArray");
|
|
if (pathArray) {
|
|
const joinPath = pathArray.split(",").join("/");
|
|
const path = joinPath.indexOf("/") === 0 ? joinPath.substr(1) : joinPath;
|
|
setFilePath(path);
|
|
}
|
|
}, []);
|
|
(0,_react_17_0_2_react.useEffect)(() => {
|
|
var _a2, _b2, _c, _d;
|
|
shixunId.current = (_b2 = (_a2 = location.pathname) == null ? void 0 : _a2.split("/")) == null ? void 0 : _b2[2];
|
|
isRepository.current = ((_d = (_c = location.pathname) == null ? void 0 : _c.split("/")) == null ? void 0 : _d[3]) === "repository";
|
|
}, []);
|
|
const handleFinish = (..._0) => __async(void 0, [..._0], function* (values = {}) {
|
|
const res = yield dispatch({
|
|
type: "shixunsDetail/addRepositoryFile",
|
|
payload: {
|
|
id: shixunId.current,
|
|
message: values.commitMessage,
|
|
content: values.codeMirror,
|
|
path: `${filePath ? `${filePath}/` : ""}${values.path || ""}`,
|
|
secret_repository: isRepository.current ? void 0 : true
|
|
}
|
|
});
|
|
if (res) {
|
|
const returnUrl = isRepository.current ? `/shixuns/${shixunId.current}/repository${filePath ? `/master/shixun_show/${filePath}` : ""}` : `/shixuns/${shixunId.current}/secret_repository`;
|
|
_umi_production_exports.history.replace(returnUrl);
|
|
}
|
|
});
|
|
const handleReturn = () => {
|
|
var _a2, _b2;
|
|
_umi_production_exports.history.push(`/shixuns/${shixunId.current}/${(_b2 = (_a2 = location.pathname) == null ? void 0 : _a2.split("/")) == null ? void 0 : _b2[3]}${filePath ? `/master/shixun_show/${filePath}` : ""}`);
|
|
};
|
|
return /* @__PURE__ */ _react_17_0_2_react.createElement("section", { className: AddFilemodules.bg }, /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: AddFilemodules.wrap }, /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: AddFilemodules.title }, "\u65B0\u5EFA\u6587\u4EF6"), /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
es_form["default"],
|
|
{
|
|
className: "mt10",
|
|
form,
|
|
scrollToFirstError: true,
|
|
layout: "vertical",
|
|
onFinish: handleFinish,
|
|
onValuesChange: () => setFormValue(__spreadValues({}, form.getFieldsValue()))
|
|
},
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement(es_form["default"].Item, { label: "\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84\uFF1A" }, /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
es_form["default"].Item,
|
|
{
|
|
name: "path",
|
|
rules: [
|
|
{ required: true, message: "\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84" },
|
|
{ whitespace: true, message: "\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C" }
|
|
],
|
|
noStyle: true
|
|
},
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement("span", null, /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: "mr5" }, filePath ? `${filePath}/` : ""), /* @__PURE__ */ _react_17_0_2_react.createElement(input["default"], { className: AddFilemodules.width240, placeholder: "\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84" }))
|
|
), /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: "ml5" }, "\u63D0\u793A\uFF1A1.\u8F93\u5165\u6587\u4EF6\u540D\u53EF\u4EE5\u521B\u5EFA\u4E00\u4E2A\u65B0\u6587\u4EF6\uFF1B2.\u8F93\u5165\u65B0\u6587\u4EF6\u5939\u540D/\u65B0\u6587\u4EF6\u540D\u53EF\u4EE5\u521B\u5EFA\u65B0\u6587\u4EF6\u5939\u548C\u65B0\u6587\u4EF6\u3002\uFF08\u5982\uFF1Astep1/HelloWorld.java\uFF09")),
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
es_form["default"].Item,
|
|
{
|
|
label: "\u63D0\u4EA4\u4FE1\u606F\uFF1A",
|
|
name: "commitMessage",
|
|
rules: [
|
|
{ required: true, message: "\u8BF7\u8F93\u5165\u63D0\u4EA4\u4FE1\u606F" },
|
|
{ whitespace: true, message: "\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C" }
|
|
]
|
|
},
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement(input["default"], { placeholder: "\u8BF7\u8F93\u5165\u672C\u6B21\u63D0\u4EA4\u7684\u4E3B\u8981\u4FE1\u606F\uFF0C\u5408\u7406\u7684\u63CF\u8FF0\u4FE1\u606F\u6709\u5229\u4E8E\u4EE3\u7801\u5386\u53F2\u8BB0\u5F55\u7684\u7BA1\u7406" })
|
|
),
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: "mt10 mb20" }, /* @__PURE__ */ _react_17_0_2_react.createElement(es_form["default"].Item, { name: "codeMirror", rules: [
|
|
{ required: true, message: "\u8BF7\u8F93\u5165\u6587\u4EF6\u5185\u5BB9" }
|
|
] }, /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
code_block/* MyCodeMirror */.h,
|
|
{
|
|
options: {
|
|
modal: "javascript",
|
|
lineNumbers: true,
|
|
theme: "railscasts",
|
|
indentUnit: 4,
|
|
matchBrackets: true,
|
|
autoRefresh: true,
|
|
smartIndent: true,
|
|
extraKeys: { "Alt-/": "autocomplete" },
|
|
autofocus: true,
|
|
styleActiveLine: true,
|
|
lint: true,
|
|
linkurl: "",
|
|
gutters: ["CodeMirror-linenumbers", "breakpoints", "CodeMirror-lint-markers"]
|
|
}
|
|
}
|
|
))),
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement(es_form["default"].Item, { noStyle: true }, /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
FixedButton/* FixedButton */.t,
|
|
{
|
|
okButtonProps: {
|
|
htmlType: "submit"
|
|
},
|
|
onCancel: handleReturn
|
|
}
|
|
))
|
|
)));
|
|
};
|
|
/* harmony default export */ var Repository_AddFile = ((0,_umi_production_exports.connect)(
|
|
({
|
|
shixunsDetail,
|
|
loading,
|
|
globalSetting,
|
|
user
|
|
}) => ({
|
|
shixunsDetail,
|
|
globalSetting,
|
|
user,
|
|
loading: loading.models.index
|
|
})
|
|
)(AddFile));
|
|
|
|
|
|
/***/ })
|
|
|
|
}]); |