Skip to content

A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.

fix: mentions style format

shuai40a6cbdab74b
diff --git a/ui/src/components/Mentions/index.scss b/ui/src/components/Mentions/index.scss
new file mode 100644
index 00000000..bd8614a3
--- /dev/null
+++ b/ui/src/components/Mentions/index.scss
@@ -0,0 +1,4 @@
+.bg-gray-200 {
+ color: var(--bs-body-color);
+ background-color: var(--an-invite-answer-item-active);
+}
diff --git a/ui/src/components/Mentions/index.tsx b/ui/src/components/Mentions/index.tsx
index 63d0f702..fd1beb03 100644
--- a/ui/src/components/Mentions/index.tsx
+++ b/ui/src/components/Mentions/index.tsx
@@ -23,6 +23,8 @@ import { Dropdown } from 'react-bootstrap';
import { useSearchUserStaff } from '@/services';
import * as Types from '@/common/interface';
+import './index.scss';
+
interface IProps {
children: React.ReactNode;
pageUsers;
@@ -50,8 +52,6 @@ const Mentions: FC<IProps> = ({ children, pageUsers, onSelected }) => {
users.findIndex((user) => user.userName === item.userName) < 0,
) || [];
- console.log('staffUserList:', staffUserList);
-
const searchUser = () => {
const element = dropdownRef.current?.children[0];
const { value, selectionStart = 0 } = element as HTMLTextAreaElement;
@@ -71,9 +71,6 @@ const Mentions: FC<IProps> = ({ children, pageUsers, onSelected }) => {
if (str.substring(str.lastIndexOf(' '), selectionStart).indexOf('@') < 0) {
return;
}
-
- console.log('str111111:', str);
- console.log('str2222:', str.substring(1));
setValue(str.substring(1));
if (!str.substring(1)) {
@@ -148,6 +145,8 @@ const Mentions: FC<IProps> = ({ children, pageUsers, onSelected }) => {
}
};
+ console.log('keyCode11111', cursor);
+
return (
<Dropdown
ref={dropdownRef}