mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
48 lines
1.0 KiB
Vue
48 lines
1.0 KiB
Vue
<template>
|
|
<div class="custom-navbar-extra-options">
|
|
<VButton
|
|
v-if="login"
|
|
ref="button"
|
|
@mouseover="loadNavbarSettings()"
|
|
@click="toggleNavbarSettings()"
|
|
>
|
|
布局设置<VIcon icon="right-arrow" :size="16"></VIcon>
|
|
</VButton>
|
|
</div>
|
|
</template>
|
|
<script lang="ts">
|
|
import { getUID } from '@/core/utils'
|
|
import { VButton, VIcon } from '@/ui'
|
|
|
|
import { loadNavbarSettings, setTriggerElement, toggleNavbarSettings } from './vm'
|
|
|
|
export default Vue.extend({
|
|
components: {
|
|
VIcon,
|
|
VButton,
|
|
},
|
|
data() {
|
|
return {
|
|
login: Boolean(getUID()),
|
|
}
|
|
},
|
|
methods: {
|
|
async loadNavbarSettings() {
|
|
const isFirstLoad = await loadNavbarSettings()
|
|
if (isFirstLoad) {
|
|
const triggerButton = this.$refs.button.$el as HTMLElement
|
|
setTriggerElement(triggerButton)
|
|
}
|
|
},
|
|
toggleNavbarSettings,
|
|
},
|
|
})
|
|
</script>
|
|
<style lang="scss">
|
|
.custom-navbar-extra-options {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
</style>
|