2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 04:22:33 +08:00

fix: 首页图标渲染

This commit is contained in:
2026-01-07 04:01:16 +08:00
parent 647f9a530d
commit 554a7dfbd7
5 changed files with 55 additions and 9 deletions

View File

@@ -0,0 +1,22 @@
<script lang="ts" setup>
import { renderLocalIcon } from '@/utils'
const props = withDefaults(defineProps<Props>(), {
type: 'app',
size: 14,
color: undefined
})
interface Props {
type: string
icon: string
size?: number
color?: string
}
</script>
<template>
<component
:is="renderLocalIcon(props.type, props.icon, { size: props.size, color: props.color })"
/>
</template>

View File

@@ -102,7 +102,7 @@ const columns: any = [
NButton,
{
size: 'small',
type: 'success',
type: 'info',
onClick: () => handleManage(row.slug)
},
{
@@ -146,7 +146,7 @@ const columns: any = [
NButton,
{
size: 'small',
type: 'info',
type: 'success',
onClick: () => {
versionModalShow.value = true
versionModalOperation.value = $gettext('Install')

View File

@@ -86,7 +86,7 @@ const columns: any = [
NButton,
{
size: 'small',
type: 'success'
type: 'info'
//onClick: () => handleManage(row.slug)
},
{
@@ -138,7 +138,7 @@ const columns: any = [
NButton,
{
size: 'small',
type: 'primary'
type: 'success'
},
{
default: () => $gettext('Install')

View File

@@ -0,0 +1,22 @@
import type { RouteType } from '~/types/router'
const Layout = () => import('@/layout/IndexView.vue')
export default {
name: 'openresty',
path: '/apps/openresty',
component: Layout,
isHidden: true,
children: [
{
name: 'apps-openresty-index',
path: '',
component: () => import('../nginx/IndexView.vue'),
meta: {
title: 'OpenResty',
role: ['admin'],
requireAuth: true
}
}
]
} as RouteType

View File

@@ -1,4 +1,6 @@
<script lang="ts" setup>
import TheIconLocal from '@/components/custom/TheIconLocal.vue'
defineOptions({
name: 'home-index'
})
@@ -459,7 +461,7 @@ if (import.meta.hot) {
<n-flex v-if="realtime" size="large">
<n-popover placement="bottom" trigger="hover">
<template #trigger>
<n-flex vertical flex items-center p-20 pl-40 pr-40>
<n-flex vertical p-20 pl-40 pr-40 flex items-center>
<p>{{ $gettext('Load Status') }}</p>
<n-progress
type="dashboard"
@@ -498,7 +500,7 @@ if (import.meta.hot) {
</n-popover>
<n-popover placement="bottom" trigger="hover">
<template #trigger>
<n-flex vertical flex items-center p-20 pl-40 pr-40>
<n-flex vertical p-20 pl-40 pr-40 flex items-center>
<p>CPU</p>
<n-progress
type="dashboard"
@@ -534,7 +536,7 @@ if (import.meta.hot) {
</n-popover>
<n-popover placement="bottom" trigger="hover">
<template #trigger>
<n-flex vertical flex items-center p-20 pl-40 pr-40>
<n-flex vertical p-20 pl-40 pr-40 flex items-center>
<p>{{ $gettext('Memory') }}</p>
<n-progress
type="dashboard"
@@ -694,7 +696,7 @@ if (import.meta.hot) {
v-if="!appLoading"
x-gap="12"
y-gap="12"
cols="3 s:1 m:2 l:3"
cols="4 s:1 m:2 l:3 xl:4 2xl:4"
item-responsive
responsive="screen"
p-10
@@ -711,7 +713,7 @@ if (import.meta.hot) {
<n-thing>
<template #avatar>
<div class="mt-8">
<the-icon :size="30" :icon="item.icon" />
<the-icon-local type="app" :size="30" :icon="item.slug" />
</div>
</template>
<template #header>