From 7e69c64c9c65783256e2d3591620e47371629a66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= <2897217417@qq.com> Date: Wed, 13 Oct 2021 11:52:54 +0800 Subject: [PATCH] =?UTF-8?q?@who=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tpm/challengesnew/css/newquestion.css | 22 ++++++++++-- .../tpm/challengesnew/tpm-md-editor.js | 35 ++++++++++++------- 2 files changed, 42 insertions(+), 15 deletions(-) diff --git a/src/modules/tpm/challengesnew/css/newquestion.css b/src/modules/tpm/challengesnew/css/newquestion.css index e0ac5defa..dbf45193e 100644 --- a/src/modules/tpm/challengesnew/css/newquestion.css +++ b/src/modules/tpm/challengesnew/css/newquestion.css @@ -9,8 +9,26 @@ /*md编辑器中输入@弹出可选人列表样式*/ .at_who_list{ position: absolute; + z-index: 99; + width: 180px; + max-height: 160px; + background: #FFFFFF; + box-shadow: 0px 4px 8px 2px rgba(212, 212, 212, 0.5); + border-radius: 4px; top: 100px; left: 100px; - background-color: red; - z-index: 99; + overflow-y: scroll; +} +.at_who{ + height: 40px; + display: flex; + flex-direction: row; + align-items: center; + border-bottom: 1px solid rgba(212, 212, 212, 0.5); +} +.at_who img{ + width:30px; + height:30px; + border-radius:50%; + margin-right: 10px; } \ No newline at end of file diff --git a/src/modules/tpm/challengesnew/tpm-md-editor.js b/src/modules/tpm/challengesnew/tpm-md-editor.js index dfe4e7b12..4736287cc 100644 --- a/src/modules/tpm/challengesnew/tpm-md-editor.js +++ b/src/modules/tpm/challengesnew/tpm-md-editor.js @@ -1,13 +1,11 @@ - import React, { Fragment, useEffect, useRef, useState } from 'react'; import { getUploadActionUrl, getUrl } from 'educoder'; import ResizeObserver from 'resize-observer-polyfill'; - +import { getImageUrl } from 'educoder'; import '../../courses/css/Courses.css'; import './css/TPMchallengesnew.css'; import 'codemirror/lib/codemirror.css'; import './css/newquestion.css'; -import { AutoComplete } from 'antd'; const $ = window.$ const mdIcons = ["bold", "italic", "|", "list-ul", "list-ol", "|", "code", "code-block", "link", "|", "inline-latex", "latex", '|', "image", "table", '|', "line-break", "watch", "clear"]; @@ -41,7 +39,6 @@ function md_rec_data(k, mdu, id) { } window.md_rec_data = md_rec_data; - function md_elocalStorage(editor, mdu, id) { let oc = window.sessionStorage.getItem('content' + mdu) if (oc !== null && oc !== editor.getValue()) { @@ -76,14 +73,6 @@ function md_elocalStorage(editor, mdu, id) { return tid } -const atWhoList = ( -