mirror of https://github.com/halo-dev/halo-admin
perf: improve functional page ui
parent
35f51fce2b
commit
e8cd837a00
|
@ -1,13 +1,6 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import {
|
import { VEmpty, VSpace, VButton, IconAddCircle } from "@halo-dev/components";
|
||||||
VEmpty,
|
|
||||||
VSpace,
|
|
||||||
VButton,
|
|
||||||
IconAddCircle,
|
|
||||||
IconSettings,
|
|
||||||
VTag,
|
|
||||||
} from "@halo-dev/components";
|
|
||||||
import type { PagesPublicState } from "@halo-dev/admin-shared";
|
import type { PagesPublicState } from "@halo-dev/admin-shared";
|
||||||
import { useExtensionPointsState } from "@/composables/usePlugins";
|
import { useExtensionPointsState } from "@/composables/usePlugins";
|
||||||
|
|
||||||
|
@ -44,28 +37,23 @@ useExtensionPointsState("PAGES", pagesPublicState);
|
||||||
v-for="(page, index) in pagesPublicState.functionalPages"
|
v-for="(page, index) in pagesPublicState.functionalPages"
|
||||||
:key="index"
|
:key="index"
|
||||||
v-permission="page.permissions"
|
v-permission="page.permissions"
|
||||||
@click="$router.push({ path: page.path })"
|
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="relative block cursor-pointer px-4 py-3 transition-all hover:bg-gray-50"
|
class="relative block cursor-pointer px-4 py-3 transition-all hover:bg-gray-50"
|
||||||
>
|
>
|
||||||
<div class="relative flex flex-row items-center">
|
<div class="relative flex flex-row items-center">
|
||||||
<div class="flex-1">
|
<div class="flex-1">
|
||||||
<div class="flex flex-row">
|
<div class="flex">
|
||||||
<span
|
<RouterLink
|
||||||
class="mr-0 truncate text-sm font-medium text-gray-900 sm:mr-2"
|
:to="page.path"
|
||||||
|
class="truncate text-sm font-medium text-gray-900"
|
||||||
>
|
>
|
||||||
{{ page.name }}
|
{{ page.name }}
|
||||||
</span>
|
</RouterLink>
|
||||||
<VTag>{{ page.url }}</VTag>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="mt-1 flex">
|
||||||
<div class="flex">
|
<span class="text-xs text-gray-500">
|
||||||
<div
|
{{ page.url }}
|
||||||
class="inline-flex flex-col items-end gap-4 sm:flex-row sm:items-center sm:gap-6"
|
|
||||||
>
|
|
||||||
<span class="cursor-pointer">
|
|
||||||
<IconSettings />
|
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -357,9 +357,7 @@ const handleSelectUser = (user?: User) => {
|
||||||
query: { name: singlePage.page.metadata.name },
|
query: { name: singlePage.page.metadata.name },
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<span
|
<span class="truncate text-sm font-medium text-gray-900">
|
||||||
class="mr-0 truncate text-sm font-medium text-gray-900 sm:mr-2"
|
|
||||||
>
|
|
||||||
{{ singlePage.page.spec.title }}
|
{{ singlePage.page.spec.title }}
|
||||||
</span>
|
</span>
|
||||||
</RouterLink>
|
</RouterLink>
|
||||||
|
|
Loading…
Reference in New Issue