feat: 本次更新项目为:
语法格式化
This commit is contained in:
@@ -117,7 +117,7 @@ export default function AccountSelection({
|
||||
acc =>
|
||||
acc.userName.includes(searchQuery) ||
|
||||
acc.realName.includes(searchQuery) ||
|
||||
acc.departmentName.includes(searchQuery),
|
||||
acc.departmentName.includes(searchQuery)
|
||||
);
|
||||
|
||||
// 处理账号选择
|
||||
|
||||
@@ -58,7 +58,7 @@ interface ContentLibrarySelectionProps {
|
||||
readonly?: boolean;
|
||||
onConfirm?: (
|
||||
selectedIds: string[],
|
||||
selectedItems: ContentLibraryItem[],
|
||||
selectedItems: ContentLibraryItem[]
|
||||
) => void;
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ export default function ContentLibrarySelection({
|
||||
|
||||
// 获取已选内容库详细信息
|
||||
const selectedLibraryObjs = libraries.filter(item =>
|
||||
selectedLibraries.includes(item.id),
|
||||
selectedLibraries.includes(item.id)
|
||||
);
|
||||
|
||||
// 删除已选内容库
|
||||
@@ -161,7 +161,7 @@ export default function ContentLibrarySelection({
|
||||
onSelect(newSelected);
|
||||
if (onSelectDetail) {
|
||||
const selectedObjs = libraries.filter(item =>
|
||||
newSelected.includes(item.id),
|
||||
newSelected.includes(item.id)
|
||||
);
|
||||
onSelectDetail(selectedObjs);
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ const SelectionPopup: React.FC<SelectionPopupProps> = ({
|
||||
wxid: d.wechatId || "",
|
||||
nickname: d.nickname || "",
|
||||
usedInPlans: d.usedInPlans || 0,
|
||||
})),
|
||||
}))
|
||||
);
|
||||
setTotal(res.total || 0);
|
||||
}
|
||||
@@ -71,7 +71,7 @@ const SelectionPopup: React.FC<SelectionPopupProps> = ({
|
||||
setLoading(false);
|
||||
}
|
||||
},
|
||||
[],
|
||||
[]
|
||||
);
|
||||
|
||||
// 打开弹窗时获取第一页
|
||||
|
||||
@@ -137,7 +137,7 @@ export default function FriendSelection({
|
||||
// 如果有 onSelectDetail 回调,传递完整的好友对象
|
||||
if (onSelectDetail) {
|
||||
const selectedFriendObjs = friends.filter(friend =>
|
||||
newSelectedFriends.includes(friend.id),
|
||||
newSelectedFriends.includes(friend.id)
|
||||
);
|
||||
onSelectDetail(selectedFriendObjs);
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ export default function GroupSelection({
|
||||
|
||||
// 获取已选群聊详细信息
|
||||
const selectedGroupObjs = groups.filter(group =>
|
||||
selectedGroups.includes(group.id),
|
||||
selectedGroups.includes(group.id)
|
||||
);
|
||||
|
||||
// 删除已选群聊
|
||||
@@ -141,7 +141,7 @@ export default function GroupSelection({
|
||||
// 如果有 onSelectDetail 回调,传递完整的群聊对象
|
||||
if (onSelectDetail) {
|
||||
const selectedGroupObjs = groups.filter(group =>
|
||||
newSelectedGroups.includes(group.id),
|
||||
newSelectedGroups.includes(group.id)
|
||||
);
|
||||
onSelectDetail(selectedGroupObjs);
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ const Layout: React.FC<LayoutProps> = ({
|
||||
const setRealHeight = () => {
|
||||
document.documentElement.style.setProperty(
|
||||
"--real-vh",
|
||||
`${window.innerHeight * 0.01}px`,
|
||||
`${window.innerHeight * 0.01}px`
|
||||
);
|
||||
};
|
||||
setRealHeight();
|
||||
|
||||
@@ -50,11 +50,11 @@ const VideoUpload: React.FC<VideoUploadProps> = ({
|
||||
};
|
||||
|
||||
// 处理文件变化
|
||||
const handleChange: UploadProps["onChange"] = (info) => {
|
||||
const handleChange: UploadProps["onChange"] = info => {
|
||||
console.log("VideoUpload handleChange info:", info);
|
||||
|
||||
// 更新 fileList,确保所有 URL 都是字符串
|
||||
const updatedFileList = info.fileList.map((file) => ({
|
||||
const updatedFileList = info.fileList.map(file => ({
|
||||
...file,
|
||||
url:
|
||||
file.url ||
|
||||
|
||||
@@ -59,9 +59,9 @@ const UploadComponent: React.FC<UploadComponentProps> = ({
|
||||
};
|
||||
|
||||
// 处理文件变化
|
||||
const handleChange: UploadProps["onChange"] = (info) => {
|
||||
const handleChange: UploadProps["onChange"] = info => {
|
||||
// 更新 fileList,确保所有 URL 都是字符串
|
||||
const updatedFileList = info.fileList.map((file) => ({
|
||||
const updatedFileList = info.fileList.map(file => ({
|
||||
...file,
|
||||
url:
|
||||
file.url ||
|
||||
@@ -91,7 +91,7 @@ const UploadComponent: React.FC<UploadComponentProps> = ({
|
||||
} else if (info.file.status === "removed") {
|
||||
// 文件被删除
|
||||
const urls = updatedFileList
|
||||
.map((f) => f.url || "")
|
||||
.map(f => f.url || "")
|
||||
.filter(Boolean) as string[];
|
||||
onChange?.(urls);
|
||||
}
|
||||
@@ -99,11 +99,9 @@ const UploadComponent: React.FC<UploadComponentProps> = ({
|
||||
|
||||
// 删除文件
|
||||
const handleRemove = (file: UploadFile) => {
|
||||
const newFileList = fileList.filter((f) => f.uid !== file.uid);
|
||||
const newFileList = fileList.filter(f => f.uid !== file.uid);
|
||||
setFileList(newFileList);
|
||||
const urls = newFileList
|
||||
.map((f) => f.url || "")
|
||||
.filter(Boolean) as string[];
|
||||
const urls = newFileList.map(f => f.url || "").filter(Boolean) as string[];
|
||||
onChange?.(urls);
|
||||
return true;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user