设置主菜单图标

This commit is contained in:
zilong
2021-10-18 12:44:51 +08:00
parent ac766591c5
commit 580fe8dbeb
9 changed files with 13 additions and 145 deletions

View File

@@ -13,6 +13,13 @@ import {
useRouter,
} from "vue-router";
import { NMenu, NIcon } from "naive-ui";
import FaXian from '@/assets/svgs/FaXian.svg'
import ShiPin from '@/assets/svgs/ShiPin.svg'
import ZuiJin from '@/assets/svgs/ZuiJin.svg'
function renderIcon (icon) {
return () => h(NIcon, null, { default: () => h(icon) })
}
const menuOptions = ref([
{
@@ -27,6 +34,7 @@ const menuOptions = ref([
{ default: () => "发现" }
),
key: "/discover",
icon: renderIcon(FaXian),
},
{
label: () =>
@@ -40,6 +48,7 @@ const menuOptions = ref([
{ default: () => "视频" }
),
key: "/videos",
icon: renderIcon(ShiPin),
},
{
label: () =>
@@ -53,6 +62,7 @@ const menuOptions = ref([
{ default: () => "最近播放" }
),
key: "/played",
icon: renderIcon(ZuiJin),
},
//#region 其他
// {