refactor(web): 界面工具 - 代码优化,替换重复的复制、打包、项目选择和主题切换实现

删除未再引用的文字扫光组件。复制提示、压缩包读写、项目多选和主题揭示的对外行为保持不变。
This commit is contained in:
ddcat666
2026-10-01 11:40:08 +08:00
parent 22e7331d04
commit 572bc341f0
7 changed files with 264 additions and 425 deletions

View File

@@ -1,11 +1,12 @@
import { App } from "antd";
import copy from "copy-to-clipboard";
import { App } from "antd";
const COPIED_HINT = "已复制";
export function useCopyText() {
const { message } = App.useApp();
return (value: string, successText = "已复制") => {
copy(value);
message.success(successText);
const feedback = App.useApp().message;
return (value: string, successText = COPIED_HINT) => {
copy(String(value));
feedback.success(successText);
};
}