feat: 指令菜单功能 (#1407)

* feat: 指令菜单功能

* 增加快捷指令功能

* 废弃jwt结构StandardClaims替换为RegisteredClaims #1409

* 调整快捷指令登出操作

---------

Co-authored-by: krank <emosick@qq.com>
This commit is contained in:
奇淼(piexlmax
2023-04-08 15:37:22 +08:00
committed by GitHub
co-authored by krank
parent 6ad7ccdd6e
commit 5f0402043a
10 changed files with 269 additions and 92 deletions
+15 -67
View File
@@ -1,43 +1,20 @@
<template>
<div class="search-component">
<div v-if="show" class="transition-box">
<el-select
ref="searchInput"
filterable
placeholder="请选择"
@blur="hiddenSearch"
@change="changeRouter"
>
<el-option
v-for="item in routerStore.routerList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<div
class="user-box"
>
<div class="gvaIcon gvaIcon-refresh" :class="[reload ? 'reloading' : '']" @click="handleReload" />
</div>
<div
class="user-box"
>
<Screenfull class="search-icon" :style="{cursor:'pointer'}" />
</div>
<div
class="user-box"
>
<div class="service gvaIcon-customer-service" @click="toService" />
</div>
<template v-else>
<div
class="user-box"
>
<div class="gvaIcon gvaIcon-refresh" :class="[reload ? 'reloading' : '']" @click="handleReload" />
</div>
<div
class="user-box"
>
<div class="gvaIcon gvaIcon-search" @click="showSearch" />
</div>
<div
class="user-box"
>
<Screenfull class="search-icon" :style="{cursor:'pointer'}" />
</div>
<div
class="user-box"
>
<div class="service gvaIcon-customer-service" @click="toService" />
</div>
</template>
</div>
</template>
@@ -50,35 +27,7 @@ export default {
<script setup>
import Screenfull from '@/view/layout/screenfull/index.vue'
import { emitter } from '@/utils/bus.js'
import { ref, nextTick } from 'vue'
import { useRouter } from 'vue-router'
import { useRouterStore } from '@/pinia/modules/router'
const router = useRouter()
const routerStore = useRouterStore()
const changeRouter = (e) => {
if (e.indexOf('http:') > -1 || e.indexOf('https:') > -1) {
window.open(e)
return
}
router.push({ name: e })
}
const show = ref(false)
const hiddenSearch = async() => {
setTimeout(() => {
show.value = false
}, 100)
}
const searchInput = ref(null)
const showSearch = async() => {
show.value = true
await nextTick()
searchInput.value.focus()
}
import { ref } from 'vue'
const reload = ref(false)
const handleReload = () => {
@@ -117,7 +66,6 @@ const toService = () => {
}
}
.reloading{
animation:turn 0.5s linear infinite;
}