diff --git a/33610.async.js b/33610.async.js index cdc87e8742..5600fe6322 100644 --- a/33610.async.js +++ b/33610.async.js @@ -2461,9 +2461,7 @@ var KeywordTag = function KeywordTag(_ref2) { margin: "0px", whiteSpace: "pre-wrap" }, - children: value.map(function (item) { - return item.trim(); - }).join(" 或 ") + children: value.join(" 或 ") }) }); }; @@ -2591,8 +2589,10 @@ var SubjectiveQuestionEditor = function SubjectiveQuestionEditor(_ref3) { var _e$target, _v$split, _currentKeywordsValue; // const v = `${(e.target as any)?.value}`.replaceAll(' ', '') //去除所有的空格,同时空格也不触发非法字符校验了 var v = "".concat((_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value); - var keywordArr = v === null || v === void 0 || (_v$split = v.split('|')) === null || _v$split === void 0 ? void 0 : _v$split.filter(function (k) { + var keywordArr = v === null || v === void 0 || (_v$split = v.split('|')) === null || _v$split === void 0 || (_v$split = _v$split.filter(function (k) { return !!k; + })) === null || _v$split === void 0 ? void 0 : _v$split.map(function (item) { + return item === null || item === void 0 ? void 0 : item.trim(); }); var currentKeywordsValue = form.getFieldValue('keywords'); var existKeywords = (currentKeywordsValue === null || currentKeywordsValue === void 0 || (_currentKeywordsValue = currentKeywordsValue.map(function (item) { @@ -3311,7 +3311,13 @@ var KeywordTag = function KeywordTag(_ref2) { closable: true, onClose: onClose, className: QuestionEditormodules/* default */.Z.keywordTag, - children: value === null || value === void 0 ? void 0 : value.join(' 或 ') + children: /*#__PURE__*/(0,jsx_runtime.jsx)("pre", { + style: { + margin: "0px", + whiteSpace: "pre-wrap" + }, + children: value.join(" 或 ") + }) }); }; var CombinationSubjectiveQuestionEditor_SubjectiveQuestionEditor = function SubjectiveQuestionEditor(_ref3) { @@ -3461,9 +3467,12 @@ var CombinationSubjectiveQuestionEditor_SubjectiveQuestionEditor = function Subj allowClear: true, onPressEnter: function onPressEnter(e) { var _e$target, _v$split, _currentKeywordsValue; - var v = "".concat((_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value).replaceAll(' ', ''); //去除所有的空格,同时空格也不触发非法字符校验了 - var keywordArr = v === null || v === void 0 || (_v$split = v.split('|')) === null || _v$split === void 0 ? void 0 : _v$split.filter(function (k) { + // const v = `${(e.target as any)?.value}`.replaceAll(' ', '') //去除所有的空格,同时空格也不触发非法字符校验了 + var v = "".concat((_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value); + var keywordArr = v === null || v === void 0 || (_v$split = v.split('|')) === null || _v$split === void 0 || (_v$split = _v$split.filter(function (k) { return !!k; + })) === null || _v$split === void 0 ? void 0 : _v$split.map(function (item) { + return item === null || item === void 0 ? void 0 : item.trim(); }); var currentKeywordsValue = form.getFieldValue('keywords'); var existKeywords = (currentKeywordsValue === null || currentKeywordsValue === void 0 || (_currentKeywordsValue = currentKeywordsValue.map(function (item) { diff --git a/p__Classrooms__Lists__Exercise__Add__index.async.js b/p__Classrooms__Lists__Exercise__Add__index.async.js index 29658be7a0..17d32b4a6a 100644 --- a/p__Classrooms__Lists__Exercise__Add__index.async.js +++ b/p__Classrooms__Lists__Exercise__Add__index.async.js @@ -2494,9 +2494,7 @@ var KeywordTag = function KeywordTag(_ref2) { margin: "0px", whiteSpace: "pre-wrap" }, - children: value.map(function (item) { - return item.trim(); - }).join(" 或 ") + children: value.join(" 或 ") }) }); }; @@ -2624,8 +2622,10 @@ var SubjectiveQuestionEditor = function SubjectiveQuestionEditor(_ref3) { var _e$target, _v$split, _currentKeywordsValue; // const v = `${(e.target as any)?.value}`.replaceAll(' ', '') //去除所有的空格,同时空格也不触发非法字符校验了 var v = "".concat((_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value); - var keywordArr = v === null || v === void 0 || (_v$split = v.split('|')) === null || _v$split === void 0 ? void 0 : _v$split.filter(function (k) { + var keywordArr = v === null || v === void 0 || (_v$split = v.split('|')) === null || _v$split === void 0 || (_v$split = _v$split.filter(function (k) { return !!k; + })) === null || _v$split === void 0 ? void 0 : _v$split.map(function (item) { + return item === null || item === void 0 ? void 0 : item.trim(); }); var currentKeywordsValue = form.getFieldValue('keywords'); var existKeywords = (currentKeywordsValue === null || currentKeywordsValue === void 0 || (_currentKeywordsValue = currentKeywordsValue.map(function (item) { @@ -8326,7 +8326,13 @@ var KeywordTag = function KeywordTag(_ref2) { closable: true, onClose: onClose, className: QuestionEditormodules.keywordTag, - children: value === null || value === void 0 ? void 0 : value.join(' 或 ') + children: /*#__PURE__*/(0,jsx_runtime.jsx)("pre", { + style: { + margin: "0px", + whiteSpace: "pre-wrap" + }, + children: value.join(" 或 ") + }) }); }; var SubjectiveQuestionEditor = function SubjectiveQuestionEditor(_ref3) { @@ -8468,9 +8474,12 @@ var SubjectiveQuestionEditor = function SubjectiveQuestionEditor(_ref3) { allowClear: true, onPressEnter: function onPressEnter(e) { var _e$target, _v$split, _currentKeywordsValue; - var v = "".concat((_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value).replaceAll(' ', ''); //去除所有的空格,同时空格也不触发非法字符校验了 - var keywordArr = v === null || v === void 0 || (_v$split = v.split('|')) === null || _v$split === void 0 ? void 0 : _v$split.filter(function (k) { + // const v = `${(e.target as any)?.value}`.replaceAll(' ', '') //去除所有的空格,同时空格也不触发非法字符校验了 + var v = "".concat((_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value); + var keywordArr = v === null || v === void 0 || (_v$split = v.split('|')) === null || _v$split === void 0 || (_v$split = _v$split.filter(function (k) { return !!k; + })) === null || _v$split === void 0 ? void 0 : _v$split.map(function (item) { + return item === null || item === void 0 ? void 0 : item.trim(); }); var currentKeywordsValue = form.getFieldValue('keywords'); var existKeywords = (currentKeywordsValue === null || currentKeywordsValue === void 0 || (_currentKeywordsValue = currentKeywordsValue.map(function (item) { diff --git a/p__Classrooms__Lists__Exercise__Add__index.chunk.css b/p__Classrooms__Lists__Exercise__Add__index.chunk.css index c97ec84f56..8ae3d1e402 100644 --- a/p__Classrooms__Lists__Exercise__Add__index.chunk.css +++ b/p__Classrooms__Lists__Exercise__Add__index.chunk.css @@ -2291,6 +2291,7 @@ span.CodeMirror-selectedtext { font-size: 14px; font-weight: 400; color: #000000; + display: flex; } .questionTitleEditorWrap___fdaK7 { margin-bottom: 18px; diff --git a/p__Classrooms__Lists__Exercise__Review__index.async.js b/p__Classrooms__Lists__Exercise__Review__index.async.js index 80c5de6285..1ae1cad74c 100644 --- a/p__Classrooms__Lists__Exercise__Review__index.async.js +++ b/p__Classrooms__Lists__Exercise__Review__index.async.js @@ -1828,7 +1828,6 @@ var jsx_runtime = __webpack_require__(37712); - var TextArea = input/* default */.Z.TextArea; var BFill = function BFill(_ref) { var item = _ref.item, @@ -1887,9 +1886,13 @@ var BFill = function BFill(_ref) { color: (item === null || item === void 0 || (_item$standard_answer = item.standard_answer) === null || _item$standard_answer === void 0 || (_item$standard_answer = _item$standard_answer[index]) === null || _item$standard_answer === void 0 || (_item$standard_answer = _item$standard_answer.answer_text) === null || _item$standard_answer === void 0 ? void 0 : _item$standard_answer[0]) == (answer === null || answer === void 0 ? void 0 : answer.answer_text) ? "#37AD83" : "#E30000" }, children: answer === null || answer === void 0 ? void 0 : answer.answer_text - }) : /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, { - value: answer === null || answer === void 0 ? void 0 : answer.answer_text + }) : /*#__PURE__*/(0,jsx_runtime.jsx)("pre", { + style: { + whiteSpace: 'pre-wrap' + }, + children: answer === null || answer === void 0 ? void 0 : answer.answer_text }) + // })] }); }), seeAnswerVisible && /*#__PURE__*/(0,jsx_runtime.jsx)(SeeAnswer/* SeeAnswer */.u, { diff --git a/p__Paperlibrary__Add__index.async.js b/p__Paperlibrary__Add__index.async.js index 68c42affe4..822e2b551f 100644 --- a/p__Paperlibrary__Add__index.async.js +++ b/p__Paperlibrary__Add__index.async.js @@ -2568,9 +2568,7 @@ var KeywordTag = function KeywordTag(_ref2) { margin: "0px", whiteSpace: "pre-wrap" }, - children: value.map(function (item) { - return item.trim(); - }).join(" 或 ") + children: value.join(" 或 ") }) }); }; @@ -2698,8 +2696,10 @@ var SubjectiveQuestionEditor = function SubjectiveQuestionEditor(_ref3) { var _e$target, _v$split, _currentKeywordsValue; // const v = `${(e.target as any)?.value}`.replaceAll(' ', '') //去除所有的空格,同时空格也不触发非法字符校验了 var v = "".concat((_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value); - var keywordArr = v === null || v === void 0 || (_v$split = v.split('|')) === null || _v$split === void 0 ? void 0 : _v$split.filter(function (k) { + var keywordArr = v === null || v === void 0 || (_v$split = v.split('|')) === null || _v$split === void 0 || (_v$split = _v$split.filter(function (k) { return !!k; + })) === null || _v$split === void 0 ? void 0 : _v$split.map(function (item) { + return item === null || item === void 0 ? void 0 : item.trim(); }); var currentKeywordsValue = form.getFieldValue('keywords'); var existKeywords = (currentKeywordsValue === null || currentKeywordsValue === void 0 || (_currentKeywordsValue = currentKeywordsValue.map(function (item) { @@ -8112,6 +8112,10 @@ var test = function test(str) { if (!str) { return false; } + if (/^s*$/.test(str) || str.trim() === '') { + message/* default */.ZP.warning('关键词不能全为空格'); + return; + } var containSpecial = new RegExp("[ `~!@#$^&*()={}':;,\\[\\].<>/?~!@#¥……&*()—【】‘;:”“。,、?「」『』_\\+\\-·%《》]|[\\\\/]"); // if (containSpecial.test(str)) { // message.warning("关键词不能含有特殊字符!") @@ -8131,7 +8135,13 @@ var KeywordTag = function KeywordTag(_ref2) { closable: true, onClose: onClose, className: QuestionEditormodules.keywordTag, - children: value === null || value === void 0 ? void 0 : value.join(' 或 ') + children: /*#__PURE__*/(0,jsx_runtime.jsx)("pre", { + style: { + margin: "0px", + whiteSpace: "pre-wrap" + }, + children: value.join(" 或 ") + }) }); }; var SubjectiveQuestionEditor = function SubjectiveQuestionEditor(_ref3) { @@ -8273,9 +8283,12 @@ var SubjectiveQuestionEditor = function SubjectiveQuestionEditor(_ref3) { allowClear: true, onPressEnter: function onPressEnter(e) { var _e$target, _v$split, _currentKeywordsValue; - var v = "".concat((_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value).replaceAll(' ', ''); //去除所有的空格,同时空格也不触发非法字符校验了 - var keywordArr = v === null || v === void 0 || (_v$split = v.split('|')) === null || _v$split === void 0 ? void 0 : _v$split.filter(function (k) { + // const v = `${(e.target as any)?.value}`.replaceAll(' ', '') //去除所有的空格,同时空格也不触发非法字符校验了 + var v = "".concat((_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value); + var keywordArr = v === null || v === void 0 || (_v$split = v.split('|')) === null || _v$split === void 0 || (_v$split = _v$split.filter(function (k) { return !!k; + })) === null || _v$split === void 0 ? void 0 : _v$split.map(function (item) { + return item.trim(); }); var currentKeywordsValue = form.getFieldValue('keywords'); var existKeywords = (currentKeywordsValue === null || currentKeywordsValue === void 0 || (_currentKeywordsValue = currentKeywordsValue.map(function (item) { diff --git a/p__Paperlibrary__Add__index.chunk.css b/p__Paperlibrary__Add__index.chunk.css index 3bdfbdd70d..d9a5735175 100644 --- a/p__Paperlibrary__Add__index.chunk.css +++ b/p__Paperlibrary__Add__index.chunk.css @@ -2221,6 +2221,7 @@ span.CodeMirror-selectedtext { font-size: 14px; font-weight: 400; color: #000000; + display: flex; } .questionTitleEditorWrap___SpNyf { margin-bottom: 18px; diff --git a/p__Problemset__NewItem__index.async.js b/p__Problemset__NewItem__index.async.js index 61d308c337..8f90210894 100644 --- a/p__Problemset__NewItem__index.async.js +++ b/p__Problemset__NewItem__index.async.js @@ -2881,9 +2881,7 @@ var KeywordTag = function KeywordTag(_ref2) { margin: "0px", whiteSpace: "pre-wrap" }, - children: value.map(function (item) { - return item.trim(); - }).join(" 或 ") + children: value.join(" 或 ") }) }); }; @@ -3011,8 +3009,10 @@ var SubjectiveQuestionEditor = function SubjectiveQuestionEditor(_ref3) { var _e$target, _v$split, _currentKeywordsValue; // const v = `${(e.target as any)?.value}`.replaceAll(' ', '') //去除所有的空格,同时空格也不触发非法字符校验了 var v = "".concat((_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value); - var keywordArr = v === null || v === void 0 || (_v$split = v.split('|')) === null || _v$split === void 0 ? void 0 : _v$split.filter(function (k) { + var keywordArr = v === null || v === void 0 || (_v$split = v.split('|')) === null || _v$split === void 0 || (_v$split = _v$split.filter(function (k) { return !!k; + })) === null || _v$split === void 0 ? void 0 : _v$split.map(function (item) { + return item === null || item === void 0 ? void 0 : item.trim(); }); var currentKeywordsValue = form.getFieldValue('keywords'); var existKeywords = (currentKeywordsValue === null || currentKeywordsValue === void 0 || (_currentKeywordsValue = currentKeywordsValue.map(function (item) { @@ -3731,7 +3731,13 @@ var KeywordTag = function KeywordTag(_ref2) { closable: true, onClose: onClose, className: QuestionEditormodules/* default */.Z.keywordTag, - children: value === null || value === void 0 ? void 0 : value.join(' 或 ') + children: /*#__PURE__*/(0,jsx_runtime.jsx)("pre", { + style: { + margin: "0px", + whiteSpace: "pre-wrap" + }, + children: value.join(" 或 ") + }) }); }; var CombinationSubjectiveQuestionEditor_SubjectiveQuestionEditor = function SubjectiveQuestionEditor(_ref3) { @@ -3881,9 +3887,12 @@ var CombinationSubjectiveQuestionEditor_SubjectiveQuestionEditor = function Subj allowClear: true, onPressEnter: function onPressEnter(e) { var _e$target, _v$split, _currentKeywordsValue; - var v = "".concat((_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value).replaceAll(' ', ''); //去除所有的空格,同时空格也不触发非法字符校验了 - var keywordArr = v === null || v === void 0 || (_v$split = v.split('|')) === null || _v$split === void 0 ? void 0 : _v$split.filter(function (k) { + // const v = `${(e.target as any)?.value}`.replaceAll(' ', '') //去除所有的空格,同时空格也不触发非法字符校验了 + var v = "".concat((_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value); + var keywordArr = v === null || v === void 0 || (_v$split = v.split('|')) === null || _v$split === void 0 || (_v$split = _v$split.filter(function (k) { return !!k; + })) === null || _v$split === void 0 ? void 0 : _v$split.map(function (item) { + return item === null || item === void 0 ? void 0 : item.trim(); }); var currentKeywordsValue = form.getFieldValue('keywords'); var existKeywords = (currentKeywordsValue === null || currentKeywordsValue === void 0 || (_currentKeywordsValue = currentKeywordsValue.map(function (item) {