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