|
|
|
|
@ -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) {
|
|
|
|
|
|