feat: 从配置中获取应用图标,简化代码

This commit is contained in:
2025-06-10 21:24:00 +08:00
parent a93b6048a4
commit 499684e962
2 changed files with 51 additions and 50 deletions

View File

@@ -3,6 +3,56 @@ export default defineAppConfig({
title: "🎉社区吉祥物「星小火」", title: "🎉社区吉祥物「星小火」",
link: "https://tai3.cn", link: "https://tai3.cn",
}, },
appIcons: [
"hmcl",
"firefox",
"123pan",
"netease-cloud", //
"qq-music",
"kugou-music",
"kuwo-music",
"youku",
"bilibili",
"alipan",
"github-desktop",
"feishu",
"dingtalk", //
"pycharm",
"vscode",
"wine",
"wechat",
"qq",
"hoyolauncher",
"inkscape",
"monumentvalley2",
"kdenlive", //
"zwcad",
"amber-ce",
"meituxiuxiu",
"photoshop",
"canva",
"mpv",
"osu-lazer",
"sunlogin",
"todesk", //
"drawio",
"blender",
"baidu-translate",
"caj-viewer",
"yuque",
"photogimp",
"sysbro",
"sr-cloud",
"tencent-meeting", //
"wps-office",
"steam",
"minecraft",
"angry-birds",
"genshin-impact",
"welink",
"xmind",
"xterminal",
],
// 不设置 latestRelease 时,默认为构建时从 Gitee 获取的最新版本信息 // 不设置 latestRelease 时,默认为构建时从 Gitee 获取的最新版本信息
// latestRelease: { // latestRelease: {
// tag_name: "1.0.0", // tag_name: "1.0.0",

View File

@@ -6,56 +6,7 @@ const appConfig = useAppConfig();
const scrollPanel = inject<Ref<ComponentPublicInstance>>("scrollPanel"); const scrollPanel = inject<Ref<ComponentPublicInstance>>("scrollPanel");
const sProgress = ref(0); const sProgress = ref(0);
const appIcons = ref([ const appIcons = appConfig.appIcons;
"hmcl",
"firefox",
"123pan",
"netease-cloud", //
"qq-music",
"kugou-music",
"kuwo-music",
"youku",
"bilibili",
"alipan",
"github-desktop",
"feishu",
"dingtalk", //
"pycharm",
"vscode",
"wine",
"wechat",
"qq",
"hoyolauncher",
"inkscape",
"monumentvalley2",
"kdenlive", //
"zwcad",
"amber-ce",
"meituxiuxiu",
"photoshop",
"canva",
"mpv",
"osu-lazer",
"sunlogin",
"todesk", //
"drawio",
"blender",
"baidu-translate",
"caj-viewer",
"yuque",
"photogimp",
"sysbro",
"sr-cloud",
"tencent-meeting", //
"wps-office",
"steam",
"minecraft",
"angry-birds",
"genshin-impact",
"welink",
"xmind",
"xterminal",
]);
onMounted(() => { onMounted(() => {
watchEffect(() => { watchEffect(() => {