Commit 9c0eb1d4 authored by nick zheng's avatar nick zheng

Merge branch 'beta' into 'master'

chore: 应用设置页直接返回

See merge request !23
parents 7d10f23f 59401c2f
<script setup lang="ts">
import { computed, h, onMounted, readonly, ref, watch } from 'vue'
import { useRouter } from 'vue-router'
import { DropdownOption } from 'naive-ui'
import { useI18n } from 'vue-i18n'
import { sidebarMenus } from '@/router/index'
import CustomIcon from '@/components/custom-icon/custom-icon.vue'
import { useUserStore } from '@/store/modules/user'
import { usePersonalAppConfigStore } from '@/store/modules/personal-app-config'
......@@ -56,17 +54,6 @@ const agentAppOptionList = [
const personalAppConfig = computed(() => personalAppConfigStore.$state)
const menuOptions = computed(() => {
return sidebarMenus.map((item) => {
return {
label: () => h('span', {}, t(item.label)),
key: item.key,
routeName: item.routeName,
icon: () => h(CustomIcon, { icon: item.icon || 'icon-home' }),
}
})
})
const isShowModifiedTime = computed(() => {
return isUpdateAgentAppConfig.value && personalAppConfigStore.baseInfo.agentId
})
......@@ -109,10 +96,6 @@ onMounted(() => {
}
})
function handleMenuSelect(_key: number, option: DropdownOption) {
router.replace({ name: option.routeName as string })
}
function handleBackPreviousPage() {
router.go(-1)
}
......@@ -171,13 +154,11 @@ async function handlePublishApplication() {
<template>
<header class="h-navbar flex w-full items-center justify-between bg-[#f2f5f9] px-5 shadow-[inset_0_-1px_#e8e9eb]">
<div class="flex flex-1 items-center">
<NDropdown trigger="hover" :options="menuOptions" @select="handleMenuSelect">
<CustomIcon
icon="weui:back-outlined"
class="hover:text-theme-color mr-5 outline-none"
@click="handleBackPreviousPage"
/>
</NDropdown>
<CustomIcon
icon="weui:back-outlined"
class="hover:text-theme-color mr-5 cursor-pointer outline-none"
@click="handleBackPreviousPage"
/>
<div class="flex flex-col items-start justify-center">
<NPopover trigger="hover">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment