|
|
|
@ -17,9 +17,11 @@
|
|
|
|
|
|
|
|
|
|
import { defineComponent, PropType } from 'vue' |
|
|
|
|
import { NDropdown, NIcon, NButton } from 'naive-ui' |
|
|
|
|
import styles from './index.module.scss' |
|
|
|
|
import { DownOutlined, UserOutlined } from '@vicons/antd' |
|
|
|
|
import { useDropDown } from './use-dropdown' |
|
|
|
|
import { useUserStore } from '@/store/user/user' |
|
|
|
|
import styles from './index.module.scss' |
|
|
|
|
import type { UserInfoRes } from '@/service/modules/users/types' |
|
|
|
|
|
|
|
|
|
const User = defineComponent({ |
|
|
|
|
name: 'User', |
|
|
|
@ -31,7 +33,9 @@ const User = defineComponent({
|
|
|
|
|
}, |
|
|
|
|
setup() { |
|
|
|
|
const { handleSelect } = useDropDown() |
|
|
|
|
return { handleSelect } |
|
|
|
|
const userStore = useUserStore() |
|
|
|
|
|
|
|
|
|
return { handleSelect, userStore } |
|
|
|
|
}, |
|
|
|
|
render() { |
|
|
|
|
return ( |
|
|
|
@ -45,7 +49,7 @@ const User = defineComponent({
|
|
|
|
|
<NIcon class={styles.icon}> |
|
|
|
|
<UserOutlined /> |
|
|
|
|
</NIcon> |
|
|
|
|
admin |
|
|
|
|
{(this.userStore.getUserInfo as UserInfoRes).userName} |
|
|
|
|
<NIcon class={styles.icon}> |
|
|
|
|
<DownOutlined /> |
|
|
|
|
</NIcon> |
|
|
|
|