mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-05-23 10:57:31 +08:00
fix: search button issue
This commit is contained in:
@@ -50,11 +50,12 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { authState, clearToken, loadCurrentUser } from '~/utils/auth'
|
import { authState, clearToken, loadCurrentUser } from '~/utils/auth'
|
||||||
import { watch, nextTick } from 'vue'
|
import { watch, nextTick, ref, computed } from 'vue'
|
||||||
import { fetchUnreadCount, notificationState } from '~/utils/notification'
|
import { fetchUnreadCount, notificationState } from '~/utils/notification'
|
||||||
import DropdownMenu from '~/components/DropdownMenu.vue'
|
import DropdownMenu from '~/components/DropdownMenu.vue'
|
||||||
import SearchDropdown from '~/components/SearchDropdown.vue'
|
import SearchDropdown from '~/components/SearchDropdown.vue'
|
||||||
import { useIsMobile } from '~/utils/screen'
|
import { useIsMobile } from '~/utils/screen'
|
||||||
|
import { useRouter } from 'vue-router'
|
||||||
import { ClientOnly } from '#components'
|
import { ClientOnly } from '#components'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -66,18 +67,14 @@ export default {
|
|||||||
default: true,
|
default: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
avatar: '',
|
|
||||||
showSearch: false,
|
|
||||||
searchDropdown: null,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
setup() {
|
setup() {
|
||||||
const isLogin = computed(() => authState.loggedIn)
|
const isLogin = computed(() => authState.loggedIn)
|
||||||
const isMobile = useIsMobile()
|
const isMobile = useIsMobile()
|
||||||
const unreadCount = computed(() => notificationState.unreadCount)
|
const unreadCount = computed(() => notificationState.unreadCount)
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
const avatar = ref('')
|
||||||
|
const showSearch = ref(false)
|
||||||
|
const searchDropdown = ref(null)
|
||||||
|
|
||||||
const goToHome = () => {
|
const goToHome = () => {
|
||||||
router.push('/').then(() => {
|
router.push('/').then(() => {
|
||||||
@@ -144,6 +141,8 @@ export default {
|
|||||||
goToProfile,
|
goToProfile,
|
||||||
goToSignup,
|
goToSignup,
|
||||||
goToLogout,
|
goToLogout,
|
||||||
|
showSearch,
|
||||||
|
searchDropdown,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user