设置主菜单图标
This commit is contained in:
parent
ac766591c5
commit
580fe8dbeb
1
src/assets/svgs/Faxian.svg
Normal file
1
src/assets/svgs/Faxian.svg
Normal file
@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1634531737125" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5711" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M905.99424 292.57728c47.04256-80.7424 92.79488-187.2896 43.7248-236.35968-25.1904-25.20064-94.1568-48.6912-274.9952 67.39968a430.76608 430.76608 0 0 0-192.4096-45.17888C243.24096 78.4384 48.75264 272.92672 48.75264 512A430.75584 430.75584 0 0 0 96.256 708.93568l-0.64512-0.39936c-55.1936 89.2928-109.96736 206.73536-57.46688 259.23584 14.94016 14.9504 35.20512 21.10464 58.46016 21.10464 53.10464-0.01024 121.7536-32.11264 177.90976-64.8192 9.41056-5.4784 18.9952-11.35616 28.65152-17.39776a430.90944 430.90944 0 0 0 179.1488 38.90176c239.06304 0 433.5616-194.48832 433.5616-433.5616 0-62.3616-13.33248-121.63072-37.14048-175.2576a1093.632 1093.632 0 0 0 27.25888-44.16512z m14.75584-207.40096c17.92 17.92 14.15168 76.3904-50.14528 186.7776-4.3008 7.39328-8.84736 14.88896-13.5168 22.44608a436.76672 436.76672 0 0 0-141.80352-147.77344c113.85856-69.6832 184.68864-82.19648 205.4656-61.45024zM482.31424 119.3984c152.2176 0 284.38528 87.13216 349.50144 214.09792-59.8528 88.7296-141.64992 186.14272-235.95008 280.44288-99.6352 99.64544-202.72128 185.26208-295.40352 245.84192C175.3088 794.07104 89.71264 662.87616 89.71264 512c0-216.48384 176.11776-392.6016 392.6016-392.6016zM253.88032 888.66816c-110.3872 64.3072-168.87808 68.05504-186.7776 50.14528-17.7664-17.7664-13.74208-78.08 52.20352-190.17728a436.736 436.736 0 0 0 141.5168 135.87456c-2.304 1.3824-4.64896 2.82624-6.94272 4.15744zM874.91584 512c0 216.48384-176.11776 392.6016-392.6016 392.6016-48.47616 0-94.89408-8.88832-137.79968-25.02656 89.27232-60.95872 186.42944-142.7968 280.30976-236.68736 88.65792-88.65792 166.62528-180.25472 226.37568-265.34912A390.90176 390.90176 0 0 1 874.91584 512z" fill="" p-id="5712"></path><path d="M485.13024 419.62496c53.10464 0 96.31744-43.20256 96.31744-96.3072 0-53.11488-43.2128-96.31744-96.31744-96.31744s-96.3072 43.20256-96.3072 96.31744c0 53.10464 43.20256 96.3072 96.3072 96.3072z m0-151.66464a55.41888 55.41888 0 0 1 55.35744 55.35744 55.41888 55.41888 0 0 1-55.35744 55.3472 55.41888 55.41888 0 0 1-55.3472-55.3472 55.41888 55.41888 0 0 1 55.3472-55.35744zM372.96128 648.91904c42.27072 0 76.65664-34.38592 76.65664-76.65664s-34.38592-76.65664-76.65664-76.65664-76.65664 34.38592-76.65664 76.65664 34.38592 76.65664 76.65664 76.65664z m0-112.36352c19.68128 0 35.69664 16.00512 35.69664 35.69664s-16.01536 35.69664-35.69664 35.69664-35.69664-16.00512-35.69664-35.69664 16.01536-35.69664 35.69664-35.69664zM670.12608 791.64416c34.89792 0 63.30368-28.38528 63.30368-63.29344s-28.39552-63.30368-63.30368-63.30368-63.30368 28.39552-63.30368 63.30368 28.40576 63.29344 63.30368 63.29344z m0-85.63712c12.31872 0 22.34368 10.02496 22.34368 22.34368 0 12.30848-10.02496 22.33344-22.34368 22.33344s-22.34368-10.02496-22.34368-22.33344a22.3744 22.3744 0 0 1 22.34368-22.34368z" fill="" p-id="5713"></path></svg>
|
After Width: | Height: | Size: 3.1 KiB |
1
src/assets/svgs/ShiPin.svg
Normal file
1
src/assets/svgs/ShiPin.svg
Normal file
@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1634531656173" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3456" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M768 128a128 128 0 0 1 128 128v512a128 128 0 0 1-128 128H256a128 128 0 0 1-128-128V256a128 128 0 0 1 128-128h512z m0 64H256a64 64 0 0 0-63.84 59.2L192 256v512a64 64 0 0 0 59.2 63.84L256 832h512a64 64 0 0 0 63.84-59.2L832 768V256a64 64 0 0 0-59.2-63.84L768 192z m-347.008 137.088a64 64 0 0 1 25.248 5.216l5.824 2.88 214.016 118.88a64 64 0 0 1 5.056 108.736l-5.056 3.136-214.016 118.88a64 64 0 0 1-94.72-49.44l-0.352-6.496v-237.76a64 64 0 0 1 64-64z m0 64v237.792L635.008 512l-214.016-118.912z" p-id="3457"></path></svg>
|
After Width: | Height: | Size: 895 B |
1
src/assets/svgs/ZuiJin.svg
Normal file
1
src/assets/svgs/ZuiJin.svg
Normal file
@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1634531566370" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1880" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M785.546573 781.547354c-35.593048 35.093146-76.984964 62.787737-123.275923 82.183948-47.890646 20.196055-98.780707 30.694005-151.470416 31.193908h-4.099199c-53.289592 0-104.579574-10.297989-152.770162-30.594025-46.49092-19.596173-87.882835-47.690685-123.075962-83.383714-70.286272-71.386057-108.278852-166.667448-106.679164-267.947666 0.799844-52.089826 11.497754-102.280023 31.893771-149.570787 19.696153-45.791056 47.590705-86.78305 82.883811-121.976177 72.585823-72.285882 169.466901-112.17809 272.446788-112.17809 52.389768 0 103.179848 10.198008 150.970514 30.194103 46.190978 19.296231 87.482913 46.990822 123.075961 82.183948 35.593048 35.193126 63.4876 76.08514 82.883812 121.676235 20.096075 47.090803 30.394064 97.181019 30.394064 148.770943 0 101.780121-40.19215 197.461433-113.177895 269.447374M511.400117 69.286467c-246.951767 0-443.413396 198.261277-447.112673 442.813513C60.488186 759.351689 259.649287 954.813513 506.701035 954.813513h4.699082c246.951767-2.499512 447.212654-198.161297 447.212654-442.813513 0.09998-244.452255-200.260887-442.713533-447.212654-442.713533" p-id="1881"></path><path d="M736.656122 517.998828H511.200156V290.543253c0-16.596758-13.397383-29.994142-29.994142-29.994141s-29.994142 13.397383-29.994141 29.994141V547.89299c0 16.596758 13.397383 29.994142 29.994141 29.994141h255.350127c16.596758 0 29.994142-13.397383 29.994142-29.994141 0-16.496778-13.397383-29.894161-29.894161-29.894162" p-id="1882"></path></svg>
|
After Width: | Height: | Size: 1.8 KiB |
@ -1,80 +0,0 @@
|
||||
"use strict";
|
||||
|
||||
import { app, protocol, BrowserWindow } from "electron";
|
||||
import { createProtocol } from "vue-cli-plugin-electron-builder/lib";
|
||||
import installExtension, { VUEJS3_DEVTOOLS } from "electron-devtools-installer";
|
||||
const isDevelopment = process.env.NODE_ENV !== "production";
|
||||
|
||||
// Scheme must be registered before the app is ready
|
||||
protocol.registerSchemesAsPrivileged([
|
||||
{ scheme: "app", privileges: { secure: true, standard: true } },
|
||||
]);
|
||||
|
||||
async function createWindow() {
|
||||
// Create the browser window.
|
||||
const win = new BrowserWindow({
|
||||
width: 800,
|
||||
height: 600,
|
||||
webPreferences: {
|
||||
// Use pluginOptions.nodeIntegration, leave this alone
|
||||
// See nklayman.github.io/vue-cli-plugin-electron-builder/guide/security.html#node-integration for more info
|
||||
nodeIntegration: process.env.ELECTRON_NODE_INTEGRATION,
|
||||
contextIsolation: !process.env.ELECTRON_NODE_INTEGRATION,
|
||||
},
|
||||
});
|
||||
|
||||
if (process.env.WEBPACK_DEV_SERVER_URL) {
|
||||
// Load the url of the dev server if in development mode
|
||||
await win.loadURL(process.env.WEBPACK_DEV_SERVER_URL);
|
||||
if (!process.env.IS_TEST) win.webContents.openDevTools();
|
||||
} else {
|
||||
createProtocol("app");
|
||||
// Load the index.html when not in development
|
||||
win.loadURL("app://./index.html");
|
||||
}
|
||||
}
|
||||
|
||||
// Quit when all windows are closed.
|
||||
app.on("window-all-closed", () => {
|
||||
// On macOS it is common for applications and their menu bar
|
||||
// to stay active until the user quits explicitly with Cmd + Q
|
||||
if (process.platform !== "darwin") {
|
||||
app.quit();
|
||||
}
|
||||
});
|
||||
|
||||
app.on("activate", () => {
|
||||
// On macOS it's common to re-create a window in the app when the
|
||||
// dock icon is clicked and there are no other windows open.
|
||||
if (BrowserWindow.getAllWindows().length === 0) createWindow();
|
||||
});
|
||||
|
||||
// This method will be called when Electron has finished
|
||||
// initialization and is ready to create browser windows.
|
||||
// Some APIs can only be used after this event occurs.
|
||||
app.on("ready", async () => {
|
||||
if (isDevelopment && !process.env.IS_TEST) {
|
||||
// Install Vue Devtools
|
||||
try {
|
||||
await installExtension(VUEJS3_DEVTOOLS);
|
||||
} catch (e) {
|
||||
console.error("Vue Devtools failed to install:", e.toString());
|
||||
}
|
||||
}
|
||||
createWindow();
|
||||
});
|
||||
|
||||
// Exit cleanly on request from parent process in development mode.
|
||||
if (isDevelopment) {
|
||||
if (process.platform === "win32") {
|
||||
process.on("message", (data) => {
|
||||
if (data === "graceful-exit") {
|
||||
app.quit();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
process.on("SIGTERM", () => {
|
||||
app.quit();
|
||||
});
|
||||
}
|
||||
}
|
@ -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 其他
|
||||
// {
|
||||
|
@ -1,21 +0,0 @@
|
||||
<script setup>
|
||||
// This starter template is using Vue 3 <script setup> SFCs
|
||||
// Check out https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup
|
||||
import HelloWorld from './components/HelloWorld.vue'
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<img alt="Vue logo" src="./assets/logo.png" />
|
||||
<HelloWorld msg="Hello Vue 3 + Vite" />
|
||||
</template>
|
||||
|
||||
<style>
|
||||
#app {
|
||||
font-family: Avenir, Helvetica, Arial, sans-serif;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
text-align: center;
|
||||
color: #2c3e50;
|
||||
margin-top: 60px;
|
||||
}
|
||||
</style>
|
Binary file not shown.
Before Width: | Height: | Size: 6.7 KiB |
@ -1,40 +0,0 @@
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
|
||||
defineProps({
|
||||
msg: String
|
||||
})
|
||||
|
||||
const count = ref(0)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<h1>{{ msg }}</h1>
|
||||
|
||||
<p>
|
||||
Recommended IDE setup:
|
||||
<a href="https://code.visualstudio.com/" target="_blank">VSCode</a>
|
||||
+
|
||||
<a href="https://github.com/johnsoncodehk/volar" target="_blank">Volar</a>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="https://vitejs.dev/guide/features.html" target="_blank">
|
||||
Vite Documentation
|
||||
</a>
|
||||
|
|
||||
<a href="https://v3.vuejs.org/" target="_blank">Vue 3 Documentation</a>
|
||||
</p>
|
||||
|
||||
<button type="button" @click="count++">count is: {{ count }}</button>
|
||||
<p>
|
||||
Edit
|
||||
<code>components/HelloWorld.vue</code> to test hot module replacement.
|
||||
</p>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
a {
|
||||
color: #42b983;
|
||||
}
|
||||
</style>
|
@ -1,4 +0,0 @@
|
||||
import { createApp } from 'vue'
|
||||
import App from './App.vue'
|
||||
|
||||
createApp(App).mount('#app')
|
Loading…
x
Reference in New Issue
Block a user