| | |
| | | <el-input |
| | | style="width: 500px; height: 50px" |
| | | placeholder="请输入内容" |
| | | @change="gotoSearch" |
| | | v-model="searchKey" |
| | | :suffix-icon="Search" |
| | | @keyup.enter="gotoSearch" |
| | | > |
| | | </el-input> |
| | | <div class="loginInfoBox"> |
| | |
| | | import { Search, Avatar, SwitchButton } from '@element-plus/icons-vue' |
| | | import { useUserStore } from '@/store' |
| | | import { useRouter } from 'vue-router' |
| | | import { ElMessage } from 'element-plus' |
| | | const userStore = useUserStore() |
| | | const router = useRouter() |
| | | |
| | |
| | | console.log(userInfo.value, 'userInfo') |
| | | }) |
| | | |
| | | const gotoSearch = () => {} |
| | | const gotoSearch = () => { |
| | | router.push({ |
| | | path: '/search', |
| | | query: { |
| | | key: searchKey.value, |
| | | }, |
| | | }) |
| | | } |
| | | const handleCommand = (item) => { |
| | | if (item === 'gotoPersonalCenter') { |
| | | router.push({ |
| | |
| | | } |
| | | } |
| | | const gotoPage = (item) => { |
| | | router.push(item.path) |
| | | if (item.path === '/teachingServices') { |
| | | ElMessage({ |
| | | message: '建设中...', |
| | | type: 'warning', |
| | | }) |
| | | } else { |
| | | router.push(item.path) |
| | | } |
| | | } |
| | | </script> |
| | | |