import type { Component } from "vue"; import { h } from "vue"; import { NIcon } from "naive-ui"; import { CloudDownloadOutline, ListOutline } from "@vicons/ionicons5"; function renderIcon(icon: Component) { return () => h(NIcon, null, { default: () => h(icon) }); } export type PageKey = "grid" | "tasks"; export const navOptions = [ { label: "下载", key: "download", icon: renderIcon(CloudDownloadOutline), children: [ { label: "栅格下载", key: "grid" as const, icon: renderIcon(CloudDownloadOutline) }, ], }, { label: "下载管理", key: "tasks" as const, icon: renderIcon(ListOutline) }, ];