设置主菜单图标
This commit is contained in:
@@ -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 其他
|
||||
// {
|
||||
|
||||
Reference in New Issue
Block a user