feat: 新增页面

This commit is contained in:
duanshuwen
2025-12-07 14:54:52 +08:00
parent da7024747a
commit 14d916187c
15 changed files with 201 additions and 101 deletions

View File

@@ -1,12 +1,15 @@
<template>
<div class="w-[80px] h-full box-border pt-[12px] pb-[12px] flex flex-col items-center justify-center">
<div :class="['flex flex-col gap-[16px]', {'mt-auto mb-[8px] shrink-1': item.id === 7}]" v-for="(item) in menus" :key="item.id">
<div :class="['flex flex-col gap-[16px]', { 'mt-auto mb-[8px] shrink-1': item.id === 7 }]"
v-for="(item) in menus" :key="item.id">
<div :class="['cursor-pointer flex flex-col items-center justify-center']" @click="handleClick(item)">
<div :class="['box-border rounded-[16px] p-[8px]', {'bg-white': item.id === currentId}]">
<component :is="item.icon" :color="item.id === currentId ? item.activeColor : item.color" :class="['w-[32px] h-[32px]']" />
<div :class="['box-border rounded-[16px] p-[8px]', { 'bg-white': item.id === currentId }]">
<component :is="item.icon" :color="item.id === currentId ? item.activeColor : item.color"
:class="['w-[32px] h-[32px]']" />
</div>
<div :class="['text-[14px] mt-[4px] mb-[8px]', item.id === currentId ? `text-[${item.activeColor}]` : item.color]">
<div
:class="['text-[14px] mt-[4px] mb-[8px]', item.id === currentId ? `text-[${item.activeColor}]` : item.color]">
{{ item.name }}
</div>
</div>
@@ -21,9 +24,10 @@
import { ref } from 'vue'
import { menus } from '@constant/menus'
const currentId = ref(null)
const handleClick = (item: any) => {
const currentId = ref(1)
const handleClick = async (item: any) => {
currentId.value = item.id
await (window as any).ipcAPI.tabs.create(item.url)
}
</script>