import AvatarCircle from '@/user/AvatarCircle' import useRouterStore from '@/useRouterStore' import asyncLoader from '@/utils/asyncLoader' import { OhVueIcon } from 'oh-vue-icons' import { computed, defineComponent, Transition } from 'vue' const Content = asyncLoader(() => import('./SettingsOverlayContent')) const SettingsTab = defineComponent({ props: { label: { type: String, required: true }, path: { type: String, required: true } }, setup(props) { const router = useRouterStore() return () => (
{ router.path = props.path as any }} > {props.label}
) } }) export default defineComponent(() => { const router = useRouterStore() const show = computed(() => router.path.startsWith('settings-')) return () => (
{/* 背景遮罩 */} {show.value && (
{ router.path = '' }} >
)} {/* 弹框主体 */} {show.value && (
{ router.path.startsWith('settings-') ? <>
{ router.path = 'settings-user' }} >
: router.path.startsWith('s2') ? <>
: '' }
)}
) })