e.stopPropagation()}
style={{ width: '100%', height: '100%' }}>
-
e.stopPropagation()}
style={{ width: '100%', height: '100%' }}>
--
Gitee
From 2a0dc3145374a4a668bfa05d15e3aaf0184482c8 Mon Sep 17 00:00:00 2001
From: JY <1140938202@qq.com>
Date: Tue, 23 Jul 2024 19:38:09 +0800
Subject: [PATCH 2/2] fix
---
src/components/Directory/views/listMode.tsx | 283 ++++++++++----------
1 file changed, 139 insertions(+), 144 deletions(-)
diff --git a/src/components/Directory/views/listMode.tsx b/src/components/Directory/views/listMode.tsx
index 5c08d1850..ecad1d019 100644
--- a/src/components/Directory/views/listMode.tsx
+++ b/src/components/Directory/views/listMode.tsx
@@ -254,159 +254,154 @@ const ListMode = ({
e.stopPropagation()}
style={{ width: '100%', height: '100%' }}>
-
e.stopPropagation()}
- style={{ width: '100%', height: '100%' }}>
-
- {content.length > 0 && (
-
- {content.map((item, index) => (
-
- {(provided: any) => (
+
+ {content.length > 0 && (
+
+ {content.map((item, index) => (
+
+ {(provided: any) => (
+
-
- {!groups && href.indexOf('home') != -1 && (
-
{
- const { checked, value } = e.target;
- if (checked) {
- setSelectedKeys([...selectedKeys, value]);
- } else {
- setSelectedKeys(
- selectedKeys.filter(
- (k: any) => k !== value,
- ),
- );
- }
- }}
- checked={selectedKeys.includes(item)}>
- )}
-
{
- fileOpen(item, false);
- }}
- onDoubleClick={() => {
- fileOpen(item, true);
+ style={{ display: 'flex', alignItems: 'center' }}
+ className={getItemClassName(item)}>
+ {!groups && href.indexOf('home') != -1 && (
+ {
+ const { checked, value } = e.target;
+ if (checked) {
+ setSelectedKeys([...selectedKeys, value]);
+ } else {
+ setSelectedKeys(
+ selectedKeys.filter(
+ (k: any) => k !== value,
+ ),
+ );
+ }
}}
- onContextMenu={() => setCxtItem(item)}
- actions={[
-
- {showChatTime(item.updateTime)}
-
,
- ]}>
-
-
- {item.name}
-
- {renderSpecialTags(item)}
- {!isDynamic &&
- item.groupTags
- .filter((i) => i.length > 0)
- .map((label) => {
- return (
-
- {label}
-
- );
- })}
- {isNav ? (
- <>
-
- {
- (item as IPageTemplate).directory
- .target.name
- }
-
-
- {
- (item as IPageTemplate).directory
- .target.space.name
- }
-
- >
- ) : isDynamic ? (
- <>
-
- {item.typeName}
-
- >
- ) : (
- <>>
+ checked={selectedKeys.includes(item)}>
+ )}
+ {
+ fileOpen(item, false);
+ }}
+ onDoubleClick={() => {
+ fileOpen(item, true);
+ }}
+ onContextMenu={() => setCxtItem(item)}
+ actions={[
+
+ {showChatTime(item.updateTime)}
+
,
+ ]}>
+
+
+ {item.name}
+
+ {renderSpecialTags(item)}
+ {!isDynamic &&
+ item.groupTags
+ .filter((i) => i.length > 0)
+ .map((label) => {
+ return (
+
+ {label}
+
+ );
+ })}
+ {isNav ? (
+ <>
+
+ {
+ (item as IPageTemplate).directory
+ .target.name
+ }
+
+
+ {
+ (item as IPageTemplate).directory
+ .target.space.name
+ }
+
+ >
+ ) : isDynamic ? (
+ <>
+
+ {item.typeName}
+
+ >
+ ) : (
+ <>>
+ )}
+ {'dev' in item &&
+ 'score' in item &&
+ 'conduct' in item &&
+ item.score != 0 && (
+
+
+ {item.score as number}
+
+
)}
- {'dev' in item &&
- 'score' in item &&
- 'conduct' in item &&
- item.score != 0 && (
-
-
- {item.score as number}
-
-
- )}
- >
- }
- avatar={
-
-
-
- }
- description={
- // TODO 后期需要优化
-
-
- {item.remark || item.code}
-
+ >
+ }
+ avatar={
+
+
+
+ }
+ description={
+ // TODO 后期需要优化
+
+
+ {item.remark || item.code}
- }
- />
-
-
+
+ }
+ />
+
- )}
-
- ))}
- {provided.placeholder}
-
- )}
- {content.length === 0 && (
-
{emptyElement()}
- )}
-
-
setCxtItem(undefined)}>
-
-
+
+ )}
+
+ ))}
+ {provided.placeholder}
+
+ )}
+ {content.length === 0 && (
+ {emptyElement()}
+ )}
+
+ setCxtItem(undefined)}>
)}
-
+